Maker Pro
Maker Pro

Issue with solenoid valve

Nic12424

Sep 21, 2022
2
Joined
Sep 21, 2022
Messages
2
Hi there, I am working on a Bluetooth-controlled solenoid valve yet can't seem to get the valve working. When the valve is unplugged the relay activates as it should and 12V is supplied to the valve terminal when it should be. As soon as I plug in the valve, however, the relay only triggers once and then the ESP32/circuit does not work anymore. Any ideas on what could be causing this issue?
Thanks
 

Attachments

  • imagetoupload.PNG
    imagetoupload.PNG
    1.9 MB · Views: 3

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
Sounds like a brown out on the supply line.
Any freewheeling diode on the solenoid..?? or the relay coil for that matter.

Solenoids, like motors etc. can cause inductive spikes that intefere with microcrontrollers and the like.
Show a circuit drawing of what you have and the code.
 

Nic12424

Sep 21, 2022
2
Joined
Sep 21, 2022
Messages
2
Sounds like a brown out on the supply line.
Any freewheeling diode on the solenoid..?? or the relay coil for that matter.

Solenoids, like motors etc. can cause inductive spikes that intefere with microcrontrollers and the like.
Show a circuit drawing of what you have and the code.
Here is the code and the schematic. So you think I should try adding a diode across the solenoid or some other special arrangement? Thanks
 

Attachments

  • imagetoup2.PNG
    imagetoup2.PNG
    101.8 KB · Views: 9

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
So you think I should try adding a diode across the solenoid or some other special arrangement?

Definetely.
Look for freewheeling or flyback diode connection.

You may also need capacitors of appropriate values placed on the supply line to the uC close to the uC.
Try the diodes first though, on both the relay coil and the solenoid coil.
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
Agree, RY1 requires a reverse Diode across the coil.
 

danadak

Feb 19, 2021
751
Joined
Feb 19, 2021
Messages
751
When you use bypass capacitors on supplies like this with fast
transient loads cap technology matters. Low esr helps.

In this chart OSCON caps are polymer tantalums :

1663762312519.png


Regards, Dana.
 
Last edited:
Top