Controlling 24v with 5v and GND?

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)

use google to find how relay module connected to arduino

-5V

did you mean 0V or GND?

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.

1 Like

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

The shield is not using all pins. Check its datasheet for used, and not used, pins.

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.

Assuming what that guy meant yeah - not my image, board just says dc+ dc-

DC- is GND,
DC+ is 5V,
IN triggers relay when LOW(pulled down to GND).
DC- doesn't use -5V, it just needs GND to work.

I know, because it's the exact same module as mine, which I tested.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.