Powering Solenoid and Arduino with 12V Power

Hello,

Basically I'm trying to power my 12V DC solenoid valve and my Arduino Uno Wifi Rev2 board using a single 12v DC power source (technically its 12.5v). I'm using a buck converter to reduce the voltage to 8v and connecting that to the DC input of the Arduino board. I have the 12v solenoid powered through the DC power source as noted.

The problem that I'm running into is that when I trigger the relay on, the valve opens but immediately closes. I have tried to power the Arduino board directly using the DC power source without the buck converter and the issue is the same.

The only time the system works as intended is when I plug my computer into the USB port and power the valve using the DC power source. I'm trying to avoid plugging in a battery or something else to reduce clutter. Is this a lost cause or is there a solution to this problem?

Attached is the schematic of my setup. Its not pretty, but I hope it makes sense.

Gosh thats a horrible diagram. Its not ideal but you can use (free) Diagram Designer to make simple schematics. You need the electronics templates.

You have an unlabelled box between the arduino and solenoid - I'm guessing its the relay.

You havent given the specs of the devices you are using, without that my best guess would be the relay /solenoid is causing a spike which is upsetting the arduino - possibly a grounding issue.

Also please post your code.

Hi,
Ops diagram;


Do you have a DMM?
Tom... :slight_smile:

Hi,
Can you please post a picture(s) of your project so we can see your component layout?
How have you got your diode connected?
Anode of the diode goes to the terminal of the solenoid that will be negative when activated.
Cathode of the diode goes to the terminal of the solenoid that will be positive when activated.

What buck converter are you using?

If you adjust your buck converter to 5V and feed it to the 5V pin of the UNO, don't connect the PC, does it work?

Thanks.. Tom... :slight_smile:

Sorry for the really shitty schematics. I took a picture with my phone and I hope this is a bit more clear.

I changed the setup a bit so that the Arduino has its own power source (USB) and the solenoid valve has its own 12v DC power source. The issue is still persisting and I've tried changing diodes, changing wires, changing relays, changing PINs, changing code, and I'm fresh out of ideas. I'm lost beyond measure.

Just to clarify on the picture, That black plug at the bottom is the DC power source. The RED wire coming out of it is positive and the yellow wire is negative.

Hi,
Thanks for the pic.
OPs pic.

Tom.. :slight_smile:

Hi,
That pic is of the working configuration is it?
Is there an indicator LED on the relay board, what does it do when the fault occurs?

What buck converter?
Link to data/specs.

Thanks.. Tom.. :slight_smile:

I took another picture and did some more markups for the actual layout with the buck converter (The one connected to the Arduino's DC input). When its powered on and I trigger the relay, the LED on the relay turns on and the orange LED on the Arduino starts to flicker. The Green LED on the Arduino indicating ON stays consistently on.

In terms of the buck convert, I have it set to take in voltage from the DC power source (12.48v) and output 10v to the Arduino through the DC input.

Theres like this weird switch on/off rapidly sound that goes off when the relay is triggered. The buck converter doesn't even stay on long enough to display any of the voltage information either. It turns on, but doesn't indicate the numbers.

I bought the buck converter on Newegg, but its no longer available so I can't point to the exact details regarding it. The closest thing that I found is this (https://www.amazon.com/DROK-Converter-5-3V-32V-Regulator-Transformer/dp/B078Q1624B/).

Hi,
Thanks for the info.
OPs pic.


Have you got the current limit set high enough on the converter?

What is your 12V power supply?

Tom.. :slight_smile:

Hi,
If you disconnect the solenoid, does the problem still occur?

What are the specs on the solenoid?
What is the resistance of the solenoid coil?

Tom... :slight_smile:

I disconnected the solenoid by removing it from the relay and removed the power to the relay from the DC power supply. I confirmed that the issue doesn't persist. Would this mean that the issue is with the solenoid? If thats the case, would I need to buy a new solenoid valve and do you have a recommendation on a more reliable one?

Hi,

What is your 12V power supply?
What are the specs on the solenoid?What is the resistance of the solenoid coil?

Add a diode where I have shown, the solenoid appears to be causing the DC-DC converter to glitch.
1N4007 should do the job.
What have you set the DC-DC current limit to?
Diode1.jpg

Tom... :slight_smile:

Diode1.jpg

12 volt power supply is basically just a DC plug that goes into the wall.
The solenoid valve that I use is this --> https://www.amazon.com/gp/product/B018WRJYOU/

Basically, just to confirm, I'm connecting a diode between the COM and positive connection from the power source, correct? In the direction such that the cathode side of the diode connects to the COM wire and the anode side of the diode connects to the positive power source, correct?

The DC-DC current is set to 10 volts and I confirmed it using a multi-meter.

Hi,
Yes that is the correct diode connections.

dhruvin917:
The DC-DC current is set to 10 volts and I confirmed it using a multi-meter.

No, 10V is not the current limit, look at the instructions for the DC-DC converter and learn how to set it up.
You set the output voltage AND you set the Max output CURRENT.
Tom... :slight_smile:

Hi,
Your water valve solenoid , what model is it?

There are more than one model, what is the part number on your solenoid?

If it is the 12-01 then it consumes 8W at 12V.

Power = Volts x Current
so

Current = Power / Volts = 8 / 12 = 0.66A

What are the specs of your power supply?
What is printed on its label?

Tom.... :slight_smile:

Darn, didn't realize there were multiple selections. I'm using the SLV-12-03 valve.

It consumes 33 wats on 12V so based on the formula the current equal 2.75A

My DC power supply details are as follows based on the label:
Model: GEO101UB-120100
I/P: 100-240VAC-50/60Hz 0.3A
O/P:12VDC --> 1A
ITE and AV Power Supply

So it seems like I'm going to need a bigger power supply, right?

Edit: Will this PSU work --> https://www.amazon.com/Chanzon-Switching-Adapter-100-240V-Transformer/dp/B07HNV6SBJ/

If you have a recommendation for a better/cheaper PSU, I'd definitely appreciate it.