3D Printed Automatic Plant Waterer W/ Arduino

by Showblown in Circuits > Arduino

107 Views, 2 Favorites, 0 Comments

3D Printed Automatic Plant Waterer W/ Arduino

sigma.jpg

In this instructable, you will learn how to design, wire, and create a self watering pot that can house 2 plants, with a notification if it needs watering. My name is Shyamak, I'm a sophomore in high school and this is my second instructable to date. Let's get started!

Supplies

  • A 3D design tool such as fusion 360

Any works, but I used fusion 360.

  • Access to a 3D printer

A 3D printer is required to print the parts for the pot

  • A breadboard with jumper wires and a way to supply the battery

I would suggest getting a kit such as this one because it has everything you need for this and future projects

  • A plant soil detector

You can find them easily online

  • An Arduino

I used the Arduino nano, but you could use the uno or any unofficial boards that are Arduino compatible.

Brainstorming

Before we design the part, we need to think about what we want from the pot. The best way to do this is to look at other 3D printed pots and see what they did. This self watering pot is one of the most popular on Thingiverse, with over 65,000 likes. As you can see in the picture, the pot portion of the pot has holes on the bottom to allow drainage, so the water doesn't get pooled up. We can do the same thing, with a section for water and holes for drainage.

Designing the Base of the Pot

fusionbox.png

The first thing we want to do is make a simple box for the dirt. This will be the framework we use for everything else. We will add the specifics in the next steps.

Adding a Divider

fusionbetterbox.png

Now that we have our box, we'll add the divider for one plant and the other, and we'll have to put soil in both of them separately. If you're wondering why the divider doesn't go all the way through the box, it's because the portion to the left will be used as a reservoir to put the water in.

Adding Drainage to the Pot

fusionboxholes.png

As discussed prior, a pot needs proper drainage for the plant to live the healthiest life possible. Now, we'll need to design a divider with holes in it for the water reservoir, but as a separate file. If you don't want to go through the process of designing the 3D printed box, then the files are attached here as well.

Downloads

Making the Divider

sigger.png

We're making the divider for the pot in a separate file for reasons we'll get to later. What I did was make the holes in the divider not so big that dirt would fall out the other side, but large enough for water to freely flow. Again, the file is included. I just glued this to the main pot with superglue, but you could use any method you like.

Downloads

Why Have the Water Reservoir Divider As a Different Print?

OIP.jpg
OIP.jpg

When printing holes vertically, the resolution and quality of the holes are worse than printing them horizontally. This is because 3D printing happens in layers. Essentially, a 3D printer has to print one layer, and then it puts another layer on top of that one to make a creation. The thickness of these layers is called layer height. A higher layer height (0.4 mm) takes less time because the 3D printer has to put less layers while a lower layer height takes longer because it has to print more layers (e.g if your printing something 1.6 millimeters tall, a layer height of 0.4 would mean you need just 4 layers while a layer height of 0.1 would mean the 3D printer would have to apply 16 layers). On the flip side, layers with a lower layer height have a finer resolution. If a 3D printer has to make a hole through multiple layers of different lengths as opposed to just drawing a hole at the bottom and making multiple layers of that, then the resolution of the hole will be impacted. You can see this in the images provided.

Why Have the Water Reservoir Divider As a Different Print, Continued

poor-bridging-1024x1024-1.jpg
download.jpg
OIP.jpg

Another reason why you wouldn't want to print circles vertically is because of bridging. Bridging is essentially when a 3D printer has to print filament between the gap between 2 points, creating a bridge between both points hence the name. Bridging is something that most 3D printers struggle with to some degree, and while the high-end ones don't struggle as much, for the most precise circles its always best to print circles and holes horizontally. In the last 2 pictures you can see the difference between both. The top right image is printed vertically, while the bottom right is printed horizontally. Note the imperfections on the vertically printed one as compared to the horizontally printed one. Now all we have to do is print the part and start working on the project!

Working on the Electronic Parts

i.jpg
d.jpg

For the electronic part of the project, what we'll be doing is getting an Arduino nano and hooking up a soil moisture sensor to it, and configuring it so that when the soil is less than a certain moisture value, an LED starts shining, reminding you to put water in it. First thing we'll need to do for this is understand how a breadboard works, and from there on we'll be able to wire it.

How a Breadboard Works

dw about this.png
sigma.png

A breadboard is a device that allows people to quickly connect electronics together, and also lets them take them apart easily. The slots on the outside (marked light blue on the picture) are generally used for power, while the ones on the inside can only travel horizontally. Another way to understand it would be to look at the copper wires on the other side of the breadboard in the picture on the right, and how currents can only travel through those copper panels.

Wiring Up the Project

20240812_230300.jpg
cap_soil_sensor_arduino_wiring.png

Now that we know how a breadboard works, all we have to do is wire up our Arduino Nano to the breadboard and connect the soil moisture sensor + the led to the Arduino nano. A soil moisture sensor uses a gravity cable, and has 3 cables you need to connect: GND (the ground, or where the current can flow out), VCC (the power), and AOUT (the output for the moisture level). These are black, red, and blue respectively, and you'll have to put them in the corresponding slots on the Arduino.

Program the Arduino

To program the Arduino, we have to define the pins, get the sensor value and make an led blink when the soil becomes too dry to alert the person.

// Define the pin for the sensor
const int sensorPin = A0;
const int LedPin = 1;


void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(LedPin, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  int sensorValue = analogRead(sensorPin);
 
  Serial.print("Soil Moisture Value: ");
  Serial.println(sensorValue);


  if (sensorValue >= 460) {
    for (int i = 0; i <= 5; i++) {
      digitalWrite(ledPin, HIGH);
      delay(500);
      digitalWrite(ledPin, LOW);
   }
  }
 
  // Wait for a second before reading again
  delay(1000);

As you can see in this code, what this does is read the soil moisture level, and if it's above or equal to 460, then it blinks an LED for 0.5 seconds 5 times, waits one second, and then loops it again. This is done in the loop() function, which loops the Arduino code and can be done thousands of times per second. The setup() function is where code is run once and not again until the program is stopped and run again.

Congratulations!

sigma.jpg

Congratulation! You've just made a self watering pot that alerts you when it isnt watered!