Controlling a 12v 25N 0.25a Electromagnet via Duet WiFi

  • I'm in the process of converting out my 2020 aex Core XY system to a Cartesian system with IDEX. (Though I am torn between a modified prusa x-axis for a z-axis bed, Makerbot, and E3d BigBox movement mechanics >.> ) I am going to be using a central mount with the belts attached and the DC42 IR Probe for my X-Axis. This central mount will have 2 of the above mentioned electromagnets. Basically I wanna be able to park the left extruder and pick up the right one via g-code changes to turn on and off the left or right magnet.

    I used relays for my prusa clone to do this same thing. For the Duet WiFi, I was thinking about using the extra heater outputs on the expansion header for it. I am going to be using the last two fan outputs on it for the part cooling fan for each extruder. Am I correct in that I can just simply hook the magnets up to say the heater 2 and 3 connections with a diode in parallel and be fine? Then just add in the gcode to turn on or off that heater each time I need to change the extruder out?

  • administrators

    Yes you can hook solenoids up to spare heater outputs, provided that you connect a flyback diode in parallel with the solenoid.

    Telling the solenoids to "heat" won't work because the heater protection will kick in, but you can configure them as general purpose outputs instead and use M42 to control them.

  • BReeves23, this is extremely cool and something I've got plans for eventually as well, I'd love to hear see more posts about your progress! Is it based on the Mark2 Ultimaker design?

  • I'm planing on connecting a small SMPS module (step-down) to E1 for about 15W of power draw. Is it enough if I just stick a 1N4148 across it?

  • administrators


    I'm planing on connecting a small SMPS module (step-down) to E1 for about 15W of power draw. Is it enough if I just stick a 1N4148 across it?

    NEVER connect any sort of voltage regulator to a heater or fan output.

  • Why is that an issue? what is the best way to drive a 12V fan with a 24V duet system then? thanks

  • administrators

    If you try to PWM the input of a buck converter then it will draw a surge current to charge its input capacitors on every PWM cycle, which is likely to destroy the MOSFET.

    Connect the input of your converter to 24V. To run all the fans from 12V, remove the fan voltage selection jumper and feed the 12V output of the converter into the centre pin of the jumper block. To run just one or two fans from 12V, connect the red fan wire to the +12V output from the converter and connect the black wire to the FAN- pin of your chosen fan connector.

  • Thanks David for clearing that up! always glad to learn new stuff

  • That is the clearest explanation I've seen yet for how to do the whole 12V buck converter setup, and the warning is timely as well. I know from how tricky it can be to explain a technical issue to someone who is not on the same experience level and understand what aspect they're struggling with. Those two replies and ideally some photos and diagrams could go straight on the wiki homepage under "Connecting 12v fans to 24v supplied Duet". Appreciate that you have a lot on your plate at the moment.

Log in to reply