I'm doing an experiment, or proof of concept, to see if I can control the pumps for the Automatic Watering System using transistors to switch the power on and off. I'm using 2N222A NPN transistors and will control them using digital pins from the arduino. In order to do that, I need to put a 1K Ohm resistor between the pin and the BASE leg of the transistor, and I'm switching the ground line so that the sensors get the full 5v and avoid the voltage drop caused by the transistor itself.
The yellow are the control lines, connected to the BASE leg of the transistors, and they hook up to the arduino digital pins. When the pin is HIGH, then current can flow through the transistor, and the sensor is powered. When the arduino set it's pin LOW, then current cannot flow, and the sensor has no power. The Red/Black pins are to supply 5v to the sensors, switched by the transistors. The Black, which is ground, hooks up to the EMITTER leg of the transistor, and supplied the path to ground for the current. Red is common to all sensors, and is attached to all edge pins on the top row. All sensors are connected to 5v, and it's the ground wire that is switched.. The edge pins on the bottom row are ground, but each pin goes to it's own transistor, to the COLLECTOR leg, where if the transistor is switched on, provides a path to ground. On the right of the yellow pins is a black pin, this is ground, tied to the ground beside the red pin. If your power supply to the sensors doesn't already share a common ground with the arduino, then adding the ninth wire to the connection will tie them together.
I just finished building this, and it's pretty ugly as I'm down to re-using scraps of perf-board, and you can see a damaged spot on the bottom where I screwed up removing some component. I'll be ordering more in a couple days.
I haven't tested it yet, not even my usual continuity checks on the circuit, so it will be a bit before I start pumping water, but one step at a time.