Heating the wire is a separate electrical system from moving the machine. It is low voltage but high current, and getting it right is key to both safety and cut quality.
A dedicated supply
Use a dedicated power supply for the wire — typically a current-limited bench or LED-strip supply delivering a few volts at several amps. Keep it electrically separate from the controller's logic supply. Size it for your wire length and diameter: longer/thicker wire needs more current for the same temperature.
Switching the wire
The controller switches the wire on/off (the M8/M9 commands) through a MOSFET driven from a PWM-capable output (often the "spindle" output). The MOSFET handles the high current; the controller just provides a low-current control signal. This keeps the heavy current away from the delicate logic board.
Temperature control: PWM
Beyond on/off, you can set the wire temperature by PWM — rapidly switching the power on and off so the average power (and therefore temperature) is whatever you choose. A higher duty cycle = hotter wire. This lets you tune temperature in software (e.g. via an S value) rather than physically adjusting the supply.
Closed-loop with current sensing
For consistency, a current sensor such as an INA226 measures the actual current through the wire, so the machine can hold a target rather than drifting as the wire ages or the supply sags. A closed temperature loop on the machine reacts in milliseconds — far faster than anything the G-code stream could do.
Where control belongs
The cleanest division of labour: the simulator/tool is the single source of truth for material → feed → temperature target (it knows the foam), and emits that as a PWM/S target; the machine runs the fast inner loop that regulates the actual temperature. A hybrid like this is safer and more responsive than trying to control temperature from the host. See Cut settings.