Hooking up the Valve

A project log for Magnificent Moisture Management

I've got a balcony, tomatoes and a micro controller

Michael HaasMichael Haas 02/11/2015 at 09:230 Comments

The valve requires a two-way switch to flip from "water go" to "water stop". Additionally, I would like to turn the valve off completely to prevent battery drain. Here's the schematic again:

I found a guide to use aTIP120 transistor to control a motor with an Arduino. Based on this guide, I added three transistors. The first transistor controls GND. This essentially dictactes whether the valve is powered at all. The second and third transistor make up the actual switch shown in the diagram above. Here's the current breadboard sketch:

Here, the valve is represented by two DC motors because I didn't have the correct part handy. What's missing is (likely) proper protection for the transistors. I'd also like to prevent both transistors from allowing current to pass at the same time. Perhaps I will drive both second and third transistor from a single pin with a logic inverter.

FWIW, I also added a proper Fritzing part for the ESP8266 which I found on GitHub.