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.
GP15
connected to one end of the Resistor.VBUS
connected to IN+
on the Buck Converter.GND
connected to OUT-
on the Buck Converter.pin1
connected to NO1
on the 2 Channel 12V Relay.pin2
connected to Load Negative
on the Charge Controller.+
connected to Solar Positive
on the Charge Controller.-
connected to Solar Negative
on the 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 +
connected to Battery Positive
on the Charge Controller.12v -
connected to Battery Negative
on the Charge Controller.GP15
on the PicoW.base
on the 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.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.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.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.void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
(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.