I am working on a project using an Arduino Uno, a cnc shield, and grbl softwarelink to cnc shield , that all works, however. I now need to control a 24v normal closed two pin solenoid with one of the accessory slots on the cnc shield for ease of integration with g code.
I am just a bit confused what the best method to do this would be. I am putting 24v into the shield but the only spots that output the 24v is for the stepper motors, so as I mentioned I am going to use one of the 5v accessory slots (ie coolant on/off) and I have the 24v supply covered.
Would a relay work? are there two pin relays? Most of the ones I was seeing require pwr gnd and a control pin... can I do it with just a pwr and gnd?
Would this be wrong to do? (not my image its from [this] (Amazon.com)relay on amazon)
Don't use relays. Use a logic level N channel MOSFET switching the low side of the load. Connect both grounds. Remember using a kick back diode across the coil.
The transistor only uses one controller output pin.
This will work with no actual control pins available? The shield completely covers the arduino like I said i basically just have power on and off with 5v and ground - nothing else
Also forgot to mention, it needs to be controlled by the cnc shield so I can control it using g code… because it will turning on and of periodically in different positions as the gantry it is on moves.