Plant Protector

A plant soil moisture detector with a WebUI using the Adafruit Trinket

Similar projects worth following
A plant soil moisture detector using the Adafruit Trinket which can display sensor data via USB over a Web interface. The actual practicality of the sensor may be in question, but this is a great demonstration of sending data over USB with the Trinket and distributing it with a REST API.

Code for both the Arduino Sketch and the Web UI is available at

This project was built to learn about streaming data over USB from a Trinket, which is accomplished using Adafruit's bit-banging USB serial library since it doesn't support "actual" serial connectivity.

For the client connection, I didn't really care about sending any data - only receiving it - so I cut out any USB writes and just listened to USB reads. If you'd like to see the barebones Python logic for reading data over USB, I've created a GitHub Gist that has a base template.

Of course using USB means you can't use one entire side of the Trinket, since it is dedicated to power/ground/USB communication. That gives you perhaps one analog input and two analog outputs.

Bear in mind that the nails will eventually dissolve away, and if they are galvanized they may leak chromium into the soil. Which would be bad.

View all 8 components

  • 1
    Step 1

    On either side of the breadboard, drill small homes that your nails can fit through. Mini breadboards will sometimes have holes on either side of the median which serve as perfect mount points.

  • 2
    Step 2

    Once the holes are drilled, place two small jumper wires crossing your new holes and an open space on the breadboard. Slide the nails into your drilled holes all the way through - this should be a tight fit that holds your jumper wire in and makes a solid contact.

  • 3
    Step 3

    Add a jumper wire going from the row adjacent to one of the nail leads to the row attached to the other nail lead. Have the 4.7k Ohm resistor jump the median between the former row (the one adjacent to the nail lead) and the fourth row on the opposite side. This will go to ground on the Trinket.

View all 9 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates