We recommend using a Female-to-Female STEMMA Connector and plugging it in between the PyPortal and the STEMMA Soil Sensor. No soldering is involved - just connect the cable between the Stemma Soil Sensor and the PyPortal I2C port.
The cable makes the following connections between the PyPortal's I2C port and the STEMMA Soil Sensor:
Add a ground and power wire to the end of the DC motor using alligator clips or by soldering wires directly to the terminals.
Make the following connections:
- Connect the JST PH 3-Pin to Male Header Cable to the D3 STEMMA connector on the PyPortal.
- Connect the header cable's power (red) and ground (black) to the breadboard's red and blue power rails.
- Ensuring the flat side of the transistor is facing towards the PyPortal; Connect the emitter to the GND rail.
- Connect the transistor's base to one lead of the 220ohm resistor. Connect the other lead of the resistor to the white (yellow in this wiring diagram) male header cable.
- Connect the female DC power adapter to the power and ground rails on the opposite side of the breadboard.
- Connect the left and right ground rails together.
- Connect the DC motor's power (green in this diagram) to the red power rail.
- Connect one lead of a 1N4148 diode to the transistor's collector lead.
- Connect one end of the motor to the striped diode lead. Connect the motor's other terminal to the un-striped diode lead.
- Re-read the notes above the diagram to ensure you did not make any errors while connecting components. It does not matter which way you connect the motor's leads for now.
When you're ready, stick the STEMMA Soil sensor into your plant's soil. Be sure to leave the white portion of the sensor not covered by soil. You may also want to position the sensor at the edge of your planter.
Affix one end of the silicone tubing from the end of the pump to the planter (tape, putty or glue work great), positioning it away from the soil sensor.
Insert the other end of the silicone tubing into a water bottle. The pump will be fed from the water bottle. Select the largest/widest bottle you have.