Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Solar-Powered Wi-Fi Water Valve Controller with Battery Backup

Image of Solar-Powered Wi-Fi Water Valve Controller with Battery Backup

Circuit Documentation

Summary

This circuit is designed to control a plastic solenoid valve using a Raspberry Pi Pico W microcontroller. The circuit includes a solar panel connected to a charge controller, which charges a 12V 7Ah battery. The battery provides power to a 2-channel 12V relay, which is used to control the solenoid valve. A buck converter steps down the voltage from the microcontroller to power the relay. The circuit also includes a resistor and an NPN transistor to interface the microcontroller with the relay, and diodes for protection against reverse current.

Component List

Microcontroller

  • Raspberry Pi Pico W (PicoW)
    • A microcontroller board with Wi-Fi capabilities and multiple GPIO pins.

Power Components

  • Solar Panel
    • Converts sunlight into electrical energy to charge the battery through the charge controller.
  • Charge Controller
    • Manages the charging of the battery from the solar panel and provides power to the load.
  • 12V 7Ah Battery
    • Stores electrical energy and provides a stable power supply to the circuit.
  • Buck Converter
    • Steps down the voltage from the microcontroller to a lower level suitable for the relay.

Control Components

  • Plastic Solenoid Valve
    • An electrically-controlled valve used for controlling the flow of a fluid.
  • 2 Channel 12V Relay
    • An electromechanical switch used for turning the solenoid valve on and off.
  • NPN Transistor (CBE)
    • Acts as a switch to control the relay with a signal from the microcontroller.

Protection Components

  • 1N4007 Rectifier Diode
    • Prevents reverse current that could potentially damage the circuit.

Passive Components

  • Resistor
    • Limits the current to the base of the NPN transistor.

Wiring Details

Raspberry Pi Pico W (PicoW)

  • GP15 connected to one end of the Resistor.
  • VBUS connected to IN+ on the Buck Converter.
  • GND connected to OUT- on the Buck Converter.

Plastic Solenoid Valve

  • pin1 connected to NO1 on the 2 Channel 12V Relay.
  • pin2 connected to Load Negative on the Charge Controller.

Solar Panel

  • + connected to Solar Positive on the Charge Controller.
  • - connected to Solar Negative on the Charge Controller.

Charge Controller

  • Battery Positive connected to 12v + on the 12V 7Ah Battery.
  • Battery Negative connected to 12v - on the 12V 7Ah Battery.
  • Load Positive connected to IN+ on the Buck Converter and COM1 on the 2 Channel 12V Relay.

12V 7Ah Battery

  • 12v + connected to Battery Positive on the Charge Controller.
  • 12v - connected to Battery Negative on the Charge Controller.

Resistor

  • One end connected to GP15 on the PicoW.
  • The other end connected to base on the NPN Transistor (CBE).

NPN Transistor (CBE)

  • base connected to pin2 on the Resistor.
  • collector connected to Anode on the 1N4007 Rectifier Diode.
  • emitter connected to Load Negative on the Charge Controller, IN- on the Buck Converter, and pin2 on the Plastic Solenoid Valve.

1N4007 Rectifier Diode

  • Anode connected to collector on the NPN Transistor (CBE) and IN+ on the Buck Converter.
  • Cathode connected to 12v + and 12v - on the 2 Channel 12V Relay.

2 Channel 12V Relay

  • 12v + connected to Cathode on the 1N4007 Rectifier Diode.
  • 12v - connected to Cathode on the 1N4007 Rectifier Diode.
  • COM1 connected to Load Positive on the Charge Controller.
  • NO1 connected to pin1 on the Plastic Solenoid Valve.

Buck Converter

  • IN+ connected to VBUS on the PicoW and Load Positive on the Charge Controller.
  • IN- connected to emitter on the NPN Transistor (CBE).
  • OUT+ connected to VBUS on the PicoW.
  • OUT- connected to GND on the PicoW.

Documented Code

Raspberry Pi Pico W (PicoW) - sketch.ino

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Raspberry Pi Pico W (PicoW) - documentation.txt

(No additional documentation provided for the code)

This concludes the documentation for the given circuit. The circuit is designed to be powered by renewable energy from the solar panel and is capable of controlling a solenoid valve through the microcontroller and relay. The provided code template is a starting point for further development of the control logic.