Relay not activating solenoid unless plugged into computer

Im working on a robot right now that is giving me absolute fits! When I have it plugged into my computer my relay is working just fine and the solenoid is being activated, however as soon as I run it with my 12V 12.5A power supply it doesn't want to function. Voltages are reading at 5V when plugged into the computer however when not only 4.8V when putting the pin on high to turn on the relay.

Is this using an Arduino? If you are powering a relay/solonoid from an Arduino, don't! Use an external powersupply. If you continue, you will eventually damage the Arduino.

Powering from USB gives you about 0.5A available on Vcc, powering from 12V via the Vin or barrel jack will be much more limited as the on-board regulator has to drop 7V, so even 0.1A will make it very hot and much more would probably cause it to shutdown due to over current or over temperature.

An external 12V -> 5V dc-dc converter might be the best option.

But you haven't said how much current your relay needs, nor whether you've used a free-wheel diode (essential)...


Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Tom.... :)

Sorry for the lack of knowledge of circuit drawing I’m still pretty new to most of this. But to sort of explain what I’m trying to achieve here. I’m building a machine to glue parts in a perfect circle. One of the DC motors brings a bottle of glue down to the part, then that’s when the relay is supposed to kick on to dispense glue while the other dc motor is rotating. I have attached both ways that I have tried to use the relay.

No matter what when the circuit is unplugged from my computer the relay doesn’t work, however as soon as I plug it back into USB I can here the solenoid kick on.

Also here’s the relay that I am using: Its the 1A SPST-NO


Add a diode across the solonoid and relay. Cathode to +V. (If the solonoid is not AC) It looks like the resistance of the relay is ~500R but I would still drive the relay with a transistor. I would use a separate power supply for the Arduino. Edit: I am unable to see how the motors are being powered.

First of all, is the box down right the power supply? What are the terminals on the right???

Second, where is the GND connection of the Arduino?

The solenoid is a 120V type? Please keep mains and low voltage 100% seperate. Don't couple the neutral with the low side GND.

And indeed, I would use a transistor to dive the relay. In your drawing, connect the other side of the relay to 12V. But reverse the diode! Otherwise you will just short the power supply when you try to activate the solenoid.

If you are using a 120vac solonoid, your small relay may fry it's contacts in a short period of time.