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?

  • residentoflaniakea@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    24 days ago

    Could you clarify a few things? The circle symbol is meant to represent the voltage supply? Is it connected correctly? When you say solenoid, you mean an electromagnet, right? If so, why does it require that specific pulse with? You say you swapped out the LED for the coil, was the LED tested with MOSFET and diode in place? Does the solenoid engage when you take the connection off the RP2040 and drive it high directly? How did you ascertain the functioning of the solenoid by means of measuring resistance?