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?



Some of those water solenoids are made to run off 24VAC. What is the model of solenoid you are using, and have you confirmed operation without the pi?
This is the one i bought https://www.tinytronics.nl/en/mechanics-and-actuators/solenoids/solenoid-valves/solenoid-valve-latching-5v-brass-g1-2
Interesting. I’ve never seen a solenoid want an hbridge to drive it.
Give it what it asks for
https://arduinoyard.com/l298n-motor-driver-with-arduino/
Edit Forgot this was for a pico. Same basic ideas.
https://microdigisoft.com/control-dc-motor-using-l298n-raspberry-pi-pico-micropython/
Thanks for the help btw. Together with other comments I will look into this. I thought it was a nice and easy project to start with😅
They never go how we think they will. Learning along the way is what’s fun, for me at least. Please update when you get there or get stuck again.