Introduction: Thirst Alert Plant Alarm
I’ve got to come clean — I am a horrible plant parent. It’s nice to get that one off my chest. I can’t figure it out, whether it’s hitting the photosynthesis a little too hard or going light on the old H2O. It seems nothing I do will keep these dudes alive! I love their company, the way they brighten up an otherwise bleak space, setting the mood in ways an Ikea painting just can’t. So I set out to change things for the better by building a device that helps all those quiet plant killers like me become proud plant purveyors.
Introducing the Thirsty Plant Detector, a device that speaks for your plants, telling you exactly when they are ready for a refill.
This project has been really exciting, using the Explorer Unoat its core, combined with a soil moisture sensor and piezo buzzer that produces a beautiful cricket “chirp” when the plant has run dry. Interesting fact about this buzzer — it uses a piezo element, which can both generate sound or detect vibrations such as a knock. The soil moisture sensor is dead simple. The two prongs or probes sit within the soil acting like a variable resistor, generating analog values between 0 and 1023, dependent on the amount of moisture in the soil. The more water in the soil means there will be better conductivity between the probes, resulting in a lower resistance.
Watch the video above to learn how to take your project from breadboard to PCB or follow along below to build your own!
Project Level: Beginner -- Time Needed: 2 Hours
- ATmega328P (Through-hole)
- 16 MHz Crystal
- 20 pF Ceramic Disc Capacitor (x2)
- 7805 5V Linear Regulator
- 5mm LED (x2)
- 10k Ohm Resistor
- 220 Ohm Resistor
- 470 Ohm Resistor
- Slide Switch
- Momentary Button
- 9V Battery Clip
- Piezo Buzzer
- 9V Battery
- Soil Moisture Sensor
- Arduino Uno
- 3D Printed Case
- Soldering Iron
- Lead Free Solder
- Wire Cutters
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Let's Breadboard Out the Project:
To get started, we are going to breadboard everything out to test the software before we design our PCB. I use an Arduino Uno to get everything up and running and, when ready, transfer the Atmega328 over into my PCB. I’ve included a diagram of how the components fit together to help build your own.
Step 2: The Moisture Sensor:
Note that we can use either an off-the-shelf moisture sensor (Sparkfun makes a great one) or simply build our own. If you choose to build your own, all you need are two metal “probes, ” some spare wire and a 47k ohm resistor. I used brass hobby rods. You can find them at any hobby store, usually next to the model car/train section.
Step 3: Upload the Software and Test:
Once you’ve got your breadboard put together, upload this code to your Arduino:
If all looks good, you should hear a cricket noise! Touch the probes to each other and the noise should stop.
Step 4: It's PCB Design Time!
First let’s log in to Patchr. If you haven’t created an account, go ahead and do that now. Here is a great 4 minute video to help you get started.
Check out these helpful keyboard shortcuts:
- Switch to top side of the PCB: Command + 1
- Switch to bottom side of the PCB: Command + 2
- Rotate a component: Command + R
- Toggle pad view vs component view: Command + P (removes all the components icons to reveal the component footprints)
- Show ghosted image of routes on the opposite side of the PCB: Command + H
Step 5: Select Your PCB Template
We will be using our Explorer Uno template to skip the step of designing the Arduino. Select the project, give it a name, and we can start designing.
Step 6: Adjust the PCB Footprint
The first thing we should do is change the board footprint a bit to give us a larger area to place our moisture sensor and buzzer. Let’s do this by grabbing one of these points on the corner and dragging it out. We can always come back and change the shape to fit our enclosure and the components we have added to it.
Step 7: Place & Route the Moisture Sensor
Next, let’s place our resistor. Remember from the breadboard, one end of the resistor will go into the 5V side and the other end will go into A0. When in doubt, select the header and it will show you the pin name on the left rail. I've placed the 5V route on the bottom side of the board (shortcut: command + 2) in order to prevent a cross over with the GND line on the top side of the board. We will also place a single through hole and connect it to the resistor to solder the moisture probe to. Let’s place another through hole for the other probe and route it into one of the ground pins.
Let’s take a quick break, pour some coffee, stretch a bit… and do a little file+save. We don’t want to lose all the progress you’ve made.
Step 8: Place and Route the Buzzer
Now it’s buzzer time! In looking at the breadboard, we notice that we need to connect two pins. One to GND and the other to digital pin 5.
Step 9: Export Your PCB
This is your chance to double check your connections with your breadboard circuit. If it appears to be the same as what you’ve designed on your PCB, you are ready to export! I suggest using Patchr Manufacturing because you are guaranteed a high-quality PCB. Use our promo code “GoPatchr” to get 15% off your first order. You can also download the finished PCB file attached to the post below.
Step 10: Designing the Enclosure
While your PCB is off getting manufactured, let’s design the enclosure. Take note of the footprint dimensions on the right rail under the BRD tab — this will help ensure you have enough room for the PCB in your final design. If you would like to use the one I designed, you can download it here or on Thingiverse. As for CAD software, my favorite is Onshape for more advanced designs or TinkerCAD when you need to get something done fast. If you don't have a 3D printer there are a lot of great sites you can use to get your 3D object printed, you can also build an enclosure using materials found around your house.
Step 11: Assemble Your PCB!
Use your Patchr project as a resource and the circuit diagrams to help you as you put things together. A few things to note, I wanted the buzzer to exist towards the top of the enclosure I designed so I am soldering wires between the buzzer and the PCB. If you want to place the buzzer directly on the PCB, just make sure you have allowed enough room for the component during the design phase.
Let’s hope the only crispy, crunchy, dried-out plants in your life are the dehydrated kale chips you had for lunch yesterday, thanks to the Thirst Alert Plant Alarm. As usual, hit me in the comments below with questions, cool gifs, dad jokes, or your favorite soldering jams.
Check out the build video here. Share your Plant Alarm hacks by tagging your projects #PoweredbByPatchr on social media.
Annnnd from my workbench to yours…happy building!
Step 13: All the Files You Need...
PCB Design File: ThirstAlertPCB.zip
3D Enclosure Files: Thirst_Top.stl, Thirst_Bottom.stl
Arduino Code: Thirst_Alert.ino