this post was submitted on 15 Oct 2025
10 points (91.7% liked)

diyelectronics

565 readers
1 users here now

founded 4 years ago
MODERATORS
 

I am trying to get a solenoid water valve to work with my raspberrypi pico and python. The system works with a LED but when I swap the led with the valve, add the diode and switch the power to 5v (external, not pico), the valve does not open. When I use a voltage meter, I can measure a resistance for a short moment when connect to the valve so I suppose it functions?

Below is the schematics (the triangle thing represents the solenoid valve). The diode is a 1N4007

The valve has a pulse with of 30ms at 5V so I programmed a PWM to open 30ms and then 200ms (I tried to follow this tutorial: https://learn.adafruit.com/use-dc-stepper-servo-motor-solenoid-rp2040-pico/solenoids )

Am I missing something?

you are viewing a single comment's thread
view the rest of the comments
[–] Vincentvd@lemmy.ml 1 points 11 months ago (1 children)

Thanks, i see what you mean now. Would another valve like the one below work with my setup? My power adapter supports 12v so that is no problem.

https://www.kiwi-electronics.com/en/plastic-water-solenoid-valve-12v-1-2quot-nominal-2624?search=valve

[–] residentoflaniakea@discuss.tchncs.de 1 points 11 months ago (2 children)

The idea with the first valve is to drive it with an H-bridge. This allows for reversing polarity and is commonly used with motors to allow for spinning in two directions. This requires 4 MOSFETs. I'm not sure what type of MOSFET you are using but if you can find a simple dc motor to test this setup you can verify that it works with the one you have before you extend the circuit to an H-brigde configuration. This would be cheaper than buying another valve. You'd need two GPIO pins and careful design to not short circuiting the H-bridge.

[–] Vincentvd@lemmy.ml 1 points 11 months ago

I see. I have 4 valves for the system I want to make. I don't think my prototype board is large enough for 4 h bridges. Either I buy the other valves or some of these I suppose. https://www.tinytronics.nl/en/mechanics-and-actuators/motor-controllers-and-drivers/dc-motor-controllers-and-drivers/l298n-bipolar-stepper-motor-and-dc-motor-motor-controller

[–] Vincentvd@lemmy.ml 1 points 10 months ago (1 children)

Of course. Let me know how you're getting on.