Electronic – Using a relay switch to switch power to solenoid

relaysolenoidsolenoid-valve

I'm fairly new to electronics, so I'm hoping I'm not so misguided that I am wasting all of your time. Basically I need to power a solenoid which in turn controls a gate valve, and the solenoid requires 24V DC. The manual for the whole thing describes very little, and I don't have any info like inrush current, which I'm worried about since any searching so far has had people providing that. The solenoid just has 2 black wires coming out of it, and is marked 24V DC.

To power the thing, I am going to use a 24V AC/DC power supply (here). I want to be able to control the whole setup remotely using a computer, so I immediately thought to use a relay controlled by USB. However, any time I've used this sort of stuff in the past, I've just been going off of Arduino tutorials or something, so I just bought what was recommended there.

I want to make sure I have a proper understanding of how to use these. What exactly is the difference between requiring 5V vs say 12V to power the relay? Can 12V handle more current passing through them, and that's the main reason to use a stronger one? If I were to say purchase this relay board, would that work? Under relay parameters it states 5V/72mA, 15A/24VDC, 10A/250VAC. The 5V I would understand as the potential I need for the relay, but does 15A/24VDC mean it can pass up to 15A/24VDC, meaning this would work for my application here? Or am I really misunderstanding this? Is there an entirely easier solution that I have no idea about? I currently envision connecting the power source to COM, then the solenoid to NO and switching it when the solenoid needs to be powered.

Additionally, bonus question, the relay will be very far away from my pc (guessing 60-70? feet of wire), should I worry about power loss by powering from USB? I just grabbed a USB powered one from a search, powering at the location and controlling via usb is perfectly fine, but usb powered would be convenient.

Thanks for your time and any help you can provide!

Best Answer

There is no real difference between the 5V and 12V relays. It's mostly a convenience depending on the supply voltage you have. A 5V relay is more convenient for USB. This voltage refers to the switching/coil voltage.

The 15A 24V DC does mean that, it's the maximum switched load can be supported. If this is good for your solenoid depends on its current. If you don't know the inrush, assume 2 to 3 times the stated current. Your solenoid is 4.5 Watts, at 24 Volts means 180 mA typical. Rule of thumb rounding, assume 1 Amp for the power supply and relay supported load voltage.

Usb has a max of 16 feet without a hub or booster. Keep it near the computer, and extend the 24 Volt side, at 60 feet (120 round trip), with typical 18/2 AWG cable, you shouldn't see any significant voltage droop. The solenoid should still trigger at a lower voltage anyway.

Alternatively, think about using a remote relay. Wifi, or RF. Or ethernet. Or if you already have the USB relay, use a small computer to drive it. Something like the Raspberry Pi with a wifi usb stick or ethernet.