Sage Smart Gardens -- Automated Indoor Plant Watering System

640

2

Sage Smart Gardens is a startup company focused on creating solutions for gardeners of all skill levels. Focusing mostly on outdoor garden monitoring, they are now putting together an indoor plant watering prototype that will soon be available on their website as a kit.

The link to their Shopify website is here:

https://sage-garden-store.myshopify.com/

This instructable will give you a complete guide to build a plant watering system for your own indoor potted plants, complete with a mobile application through the Blynk app that will allow you to have real time updates of your plants from your mobile phone.

Supplies:

Step 1: Purchasing Materials

Sage Smart Gardens will soon provide all of the materials required to make this kit on their website. However, until then, all of the individual components are listed below with a link to each of the items. (The links to some of the items in this kit bring you to links that sell more of the material than needed for this project.)

Electrical Components:

1) Arduino MKR1000 - Microcontroller with WiFi capabilities

https://www.amazon.com/ARDUINO-MKR1000-WiFi-WITH-H...

2) Power Supply Components-- Wall Outlet to System Connection

2a) Dual Port Wall Outlet

https://www.amazon.com/Nekmit-Dual-Ultra-Charger-S...

2b) USB to terminal block connector (1 needed)

https://www.amazon.com/Terminal-Connector-terminal...

2c) Usb to MicroUSB power cord

https://www.amazon.com/RAMPOW-Tangle-free-Braided-...

3) Bread Board - Wires and Connections

3a) Bread board (1 needed)
3b) Small Solid Core Wires

https://www.amazon.com/eBoot-400-Point-Solderless-...

3c) Long Solid Core Wires on a Spool

https://www.amazon.com/Houseables-Electrical-Elect...

3d) Screw terminals compatible with breadboard (2 needed)

https://www.amazon.com/Bestsupplier-100PCS-Pitch-M...

4) DC 3.5V -9V 3W USB Submersible Water Pump

https://www.amazon.com/Doublelife-3-5V-6V-Submersi...

5) Gravity: Analog Capacitive Soil Moisture Sensor- Corrosion Resistant

https://www.amazon.com/DFROBOT-Gravity-Capacitive-...

6) WINGONEER Water level sensor for Arduino (1 needed)

https://www.amazon.com/Sensor-module-Detection-Sur...

7) DRV8838 Single Brushed DC Motor Driver Carrier (Motor Controller for the Pump)

https://www.pololu.com/product/2990

Mechanical Components

1) 10 Feet - 5/16" ID 7/16" OD Clear Vinyl Tubing FDA Approved Food Grade Multipurpose Tubing

https://www.amazon.com/10-Feet-Multipurpose-Kegera...

2) 2.5 Quart Tall Plastic Container (1 needed)

https://www.amazon.com/Plastic-Canisters-capacity-...

3) Black Plastic Electrical Enclosure

3a) Screws to close plastic enclosure (x4 screws included with enclosure)

https://www.digikey.com/product-detail/en/hammond-...

4) Brown Plastic Potted Plant Mounting Clip (1 needed)

https://www.amazon.com/Pot-Latch-Hangers-3-pack-Br...

4a) Screws and Bolts to attach mount to enclosure(x2 bolts needed)

https://www.amazon.com/Accessbuy-347pc-Screw-Washe...

In addition to the contents of this kit, to use this Instructable as it is written, you will also need:

1) A potted plant of your choice

2) An Apple or Android Smartphone

3) Ability to solder, Solder and a Soldering Gun

4) Access to a Drill, will drill bits of 3/8" and 1/4"

5) Small Flathead Screwdriver

6) A Ruler

Step 2: Mechanical Setup 1

First we will set up the mechanical aspects of the system including: enclosure, water reservoir, and mount.

For this step please get together all of the needed parts:

1- A black plastic enclosure.

2- A brown plastic hook.

3- Hand Held Drill

4- Drill Bits of 3/8" and 1/4"

5- 3/8" bolts and nuts.

6- 1/4" bolts and nuts.

7- The white lid to your water reservoir.

Step 3: Mechanical Setup 2 - Drilling Wiring Holes on Black Enclosure

In this step you need your black enclosure, a ruler, and a drill. We will be making holes in the bottom side, left side of the enclosure and at the back of the enclosure.

In the bottom side you would need to make two holes, one 3/8' and another 1/4'. It is not important the specific location on the bottom, they are just for running wires into the enclosure. An example picture is shown above of what these two holes should look like. (The first hole is a 3/8' diameter so it can fit the usb power cord of the Arduino MKR1000 and the second hole on the right of it with a 1/4' diameter so it can fit the wires for the breadboard.)

After drilling two holes in the front of the enclosure. Then you need to make three 1/4' diameter holes on the left side of the enclosure using your drill. Again the specific locations of these holes is not important. (These will be to run wires out of to connect to sensors and the water pump in later steps.)

Lastly you need to make two 1/4' diameter holes on the back of the enclosure; the back is the same side that the four small screws go into. For this step, the location of these holes is important. These holes are so you can attach the enclosure with the hook using 1/4' bolts; for this reason we want them to be centered on the enclosure. We also want them to be 3" apart


At the end of this step you should have 7 holes in your black enclosure. (Two on the bottom, three on the left side, and two on the back.)

Step 4: Mechanical Setup 3 - Drilling Additional Mounting Hole on Clip

For this step you will need the brown plastic clip and your drill with a 1/4" drill bit.

We will be drilling an additional hole in the clip so that it can be attached to the enclosure. We need the additional hole so that the attachment is secure and stable.

The clip already has a hole in it, so measure down 3" from the original hole in the clip and drill an additional hole with the 1/4" drill bit. We need these two holes to line up with the two holes drilled in the back of the enclosure.

If needed, to make sure your holes line up: since in the last step you drilled holes in the back of the enclosure, you can take the back off of the enclosure and mark locations on the clip through the previously drilled holes with a pen or marker.


At the end of this step you should have a clip with two holes in it that aligns with the two holes on the back of the enclosure.

Step 5: Mechanical Setup 4 - Attaching the Clip to the Enclosure

In this step we will be attaching the brown clip to the back of the black plastic enclosure. For this step we will need the back piece of the enclosure (with two drilled holes) and the brown plastic clip (with two holes). Also we will need two screws and two nuts.

Align the two parts, the clip and the back of the enclosure, and put a screw through each hole. Then on the other side, screw on a nut until it holds the connection tight.

At the end of this step you should have a connected mount and enclosure.

Step 6: Mechanical Setup 3 - Water Reservoir Lid Modification

In this step we will be drilling the holes on the water level reservoir lid. Inside of the reservoir we will have both the pump and the water level sensor.

We need to drill three small holes in the lid to be able to access both components inside. First, we need a 3/8" hole, ideally in the middle of the lid but the location is not important. (This main hole is for the tubing to come out of, which will bring the water from the reservoir to your plant.)

Then we need two smaller holes around the edges of the lid, these are for:

1) Wires going from the breadboard to the water level sensor

2) Power Cord going from the motor controller to the pump

Do not worry about the electrical connections yet, they will be explained in later steps. For this step we are just drilling the holes.

At the end of this step you should have 3 holes drilled in your white water reservoir lid.

Step 7: Motor Driver Soldering

In this step we will be soldering the pins into our motor driver. For this step you will need the motor controller, a soldering gun and some solder. (Shown in the images is a before and after of what this should look like when placed on a breadboard.)

In order for the connections to the motor driver to be secure and permanent, we need to solder the pins in place. If we do not, the connections could come lose and cause a malfunction in the system.

If you have never soldered before, we recommend that you watch an instructional video before beginning. There are many videos on this topic on youtube, such as this one:

The goal of this step is to solder all pins of the motor driver to the driver itself. Once all 10 pins have been soldered correctly. You are ready for the next step.

Step 8: Modifying the Pump

In this step, we will be modifying the pump so that it can be attached to the motor driver. This step will require a pair of scissors.

The goal of this step is to change the pump's power supply from a USB port to just a positive and negative wire, so that we can plug into the bread board and attach it to the motor driver in the next step. Inside the pumps power cord there are two wires, a positive and a negative wire. In order to access these wires you will need to cut the USB port end of the wire.

Before you cut the wire, IT IS VERY IMPORTANT THAT THE PUMP IS NOT PLUGGED IN WHEN YOU CUT THE CORD.

When the pump is unplugged, and you are ready to modify the power cord, select a spot on the wire a few inches above the USB port on the wire and cut it. Expose both of the internal wires and separate them, you should see a black (negative) wire, and a red (positive) wire. The end with the USB plug is no longer important for this project and can be disposed of at this point.

The wires will most likely look frayed out when you first take them out. Just twist them together at the ends so that you have two clean ends that you can attach to your breadboard in the next step. (twisting each wire to itself, not red to black together).

At the end you should have a pump with two power cords coming out of the end of the attached wire, one red one black.

Step 9: Applying Heat Shrink to the Water Level Sensor

In this step we will be applying some heat shrink over some of the exposed electrical parts of the water level sensor. We recommend doing this to increase the lifetime of your water level sensor and to prevent the corrosion of any of these exposed electrical components, as it will be resting submerged, or partially submerged for an extended period of time for this application.

For this step you will need a piece of heat shrink, a water level sensor, and a way to heat the heat shrink up.

This step is simple; just take the heat shrink and bring it to the top of the sensor over the exposed metal. Before heating the heat shrink and making it tight and permanent, make a note of the labels for each metal prongs "S","+", and "-" as they will be important in later steps.

Once your heat shrink covers the metal, heat it up until it is shrunken tight over the exposed metal. This should ideally be waterproof.

At the end of this step you should have a water level sensor which only has the three metal prongs exposed as shown in the picture.

Step 10: Electrical Wiring

The following steps will be explaining how to wire all of the electronic components together on your breadboard. For these steps you will need basically all of the electric components. This includes: your breadboard, Arduino MKR1000, solid core wires, screw terminal, USB to terminal adapter, moisture level sensor, water level sensor, and pump. You will also need a pair of scissors to make an alteration to the pump power cord.

If you feel comfortable following a wiring diagram, you can feel free to follow the wiring diagram attached to this step. If not, the following steps will break it down for you step by step.

If you wish to do all of the wiring yourself, you may skip to the step titled: Arduino Interface - Part One. If not, proceed to the next step when you have all of your electronics ready to go.

Step 11: Arduino MKR1000 Part One

In this step we will be testing the Arduino MKR1000, making sure that it is functioning and able to be powered from your wall outlet.

First take the Arduino MKR1000 and place it on the breadboard. Insert the pins into the breadboard as shown in the picture below, so that the microUSB power cord hangs over the side of the breadboard. This will allow more room for other electronics in later steps.

Next, plug the microUSB into the microUSB port located at the top of the device. Plug the USB connector of the USB to microUSB cord into the wall adapter and plug that into a wall outlet. You can also test this by plugging the USB into your laptop.

At this point you will see the green light on the Arduino MKR1000 turn on. This means that your microcontroller is functional, and you are ready for the next step.

Step 12: Arduino MKR1000 Part Two

In this step we will be setting up the power supply from the Arduino MKR1000 to the positive and negative busses on one side of the breadboard. Busses are in reference to the long vertical strips on the breadboard that run up and down both sides. There should be both a red positive bus and a blue negative bus on both sides of your breadboard. The side of the breadboard is not important, but it is very important to keep track of which wires are connected to positive and negative.

On the Arduino MKR1000, locate the pins that are labeled VCC and Ground. With a breadboard wire, connect the VCC to the positive bus on the breadboard (shown as tan wire). Connect the Ground pin to the negative bus with a different colored breadboard wire (shown as grey wire).

When these wires are connected, you are ready for the next step.

Step 13: Motor Controller - Part One, Placing on Breadboard

In this step we will be placing the motor controller on the breadboard.

The motor controller is used to turn on and off the power flow to the pump. Unlike the soil moisture level sensor, the motor controller has too high of a power draw to be powered by the microcontroller itself. Flow of power from the battery pack will be turned off and on from a signal from the Arduino MKR1000.

Place the motor controller pins and module as shown in the picture. Try to maximize room on the breadboard so that there is room to put wires in on both sides of the motor controller. The purposes of each pin are shown on the bottom of the motor controller module. It is important that they are aligned correctly, or it will not work as intended.

To make referring to the motor controller(motor driver) easier, we will refer to the right side as the side that has pins, from top to bottom: GND, VIN,O2, O1, VM. We will refer to the left side as the side that has pins, from top to bottom: GND, VCC, EN,PH, SLP. Make sure that you understand these sides and where these sides are on your breadboard when you place the motor driver on your breadboard.

At the end of this step you should have your motor controller attached to your breadboard.

Step 14: Motor Controller - Part Two, Making Connections on the LEFT Side

In this step we will connect all of the connections on the LEFT side of the motor driver. (Refer to last step for LEFT/RIGHT.)

We will need to connect the GND and PH pins to the ground(negative) bus on the board. This must be the same bus that runs to the Arduino MKR 1000 that we set up in a previous step. This is shown in the first picture, with connections being made with the grey wires.

Next, we need to connect the VCC and SLP pins to the high(positive) bus. Again, this must be the same bus that runs to the Arduino MKR 1000 that we set up in a previous step.

The last pin on the LEFT side of the motor driver that needs to be connected is the EN pin. This pin needs to be connected directly to a digital output pin on the Arduino MKR1000. Connect a wire from pin 0, labeled '0' on the Arduino MKR 1000, to this EN pin.

At the end of this step you should have a connection for every pin on the LEFT side of your motor driver.

Step 15: Motor Controller - Part Three, Making Connections on the RIGHT Side

In this step we will connect all of the connections on the LEFT side of the motor driver. (Refer to "Motor Controller: Part One Making Connections" for LEFT/RIGHT.) You will need a small screw driver for this step.

First, we will be connecting pins to the other positive and negative busses on your breadboard. This is not the same busses that are attached to the VCC and GND pins of your Arduino MKR1000, these busses should not be connected to anything at the beginning of this step.

For the first connection in this step connect pin GND (on the RIGHT side) to the negative bus. This is shown with the grey connection. Next, connect the Vin pin to the positive bus. This is shown with the tan connection.

Now we will be connecting the screw terminal to the breadboard. Because of the shape of the screw terminal, there is a gap of one row between the two pins when connecting it to the breadboard. For this reason we can not connect it directly plugging it into the motor driver connection and must make a small jump on the breadboard.

Place the screw terminal on the board, and take note of the rows that its pins are connected on. Take a wire and connect from pin O1 to the left side of the screw terminal. This will be for the positive power supply going to the pump. Now take another wire and make a connection from the O2 pin to the right side of the screw terminal. This will be for the negative side of the power supply going to the pump.

In this step, we recommend to screw in the power cords for the pump to the screw terminals to see what it will look like and to get familiar with the screw terminals. However, the pump power cord will ultimately need to run through the hole in the white lid of the reservoir and a hole in the side of the black electronics enclosure. For this reason if you screw them in at this stage they will need to be unscrewed and re-screwed in a later step. It is your choice.

Take your positive, red, wire from the pump that you exposed from the internal wire in the last step and screw it into the screw terminal's left side, the one connected to the pin O1. Then take the negative, black, wire that you exposed from the internal wire in the last step and screw it into the screw terminal's right side, the one connected to the pin O2.

There is no needed connection for pin VM on the RIGHT side of the motor driver.

At the end of this step you should have all of the connections made on the motor driver. There is nothing yet connected to the busses connected to the GND and VIN pins on the right side, they will be connected to an external power source in later steps.

Step 16: Electrical Connection of Sensors

If you are at this point, you have completed the bulk of the wiring, congratulations you deserve a pat on the back for your electrical skills. The last two sensors to connect are easily connected, you're almost there!

In this step we will connect both the water level sensor and the soil moisture sensor.

Both of these sensors will need to have some length of extension wires attached to them. The soil moisture level sensor needs to be long enough to reach from the electrical enclosure to the base of the plant. For a 12" pot, we recommend a length of about 8-10". Cut three of your solid core wires to this length.

For the water level sensor, we need a wire length that can reach from the electrical enclosure to the water reservoir, and then down about 2/3 of the way into the reservoir. The length of the three wires running from this sensor to the enclosure will be up to you, the user of the system. Make them as long as you need to so that you can place your water reservoir as far from the plant as you need to.

Once you have your six wires cut to length, 3 for the soil moisture level sensor and 3 for the water level sensor, we are ready to plug in the two sensors. Like in the last step, these wires will ultimately need to be placed through the holes of the enclosure; the wires of the water level sensor will also run through a hole in the lid of the water reservoir in addition to through the hole in the enclosure.

First for the soil moisture level sensor notice on the sensor the three labels on the pins attached to the wires coming off on the sensor, they are: "A", "+", "-". Attach the positive wire to the positive bus on your breadboard that is connected to the Arduino MKR1000 power supply. Attach the negative wire to the negative bus on your breadboard that is connected to the Arduino MKR1000 power supply. Connect the "A" wire to the pin A1 on the Arduino MKR 1000. This wire allows us to get the signal of the status of the sensor.

Next for the water level sensor notice on the sensor the three labels on the pins attached to the wires coming off on the sensor, they are: "S", "+", "-". Attach the positive wire to the positive bus on your breadboard that is connected to the Arduino MKR1000 power supply. Attach the negative wire to the negative bus on your breadboard that is connected to the Arduino MKR1000 power supply. Connect the "S" wire to the pin A2 on the Arduino MKR 1000. This wire allows us to get the signal of the status of the sensor.

At the end of this step you should have all of the sensors that you need connected to the wiring of the system.

Troubleshooting: For this step, the images shown for the water level sensor are connected with the solid core wires going into a "female to female" wire connection which slides over each of the three male prongs of the water level sensor. If you would like to, you can solder a connection to these male pins on the water level sensor directly to the solid core wires. However, this makes the wires you attach more permanent. The images have the "female to female" connection with the solid core wires plugged in so that the length of this connection can be altered at a later date. Both options work, it is up to you to chose which you would like to do.

Step 17: Power Supply Setup

In this step we will set up the power supply needed for this system to operate. For this we will need the dual port wall outlet plug, the USB to terminal connection adapter, two more solid core wires, the USB to microUSB power cord and a small screwdriver.

Before we start, make sure that the wall outlet is not plugged in and neither is the USB to terminal connector. It is dangerous to plug in wires to the terminal connector when it is connected to a power source.

First we will set up the power connection that will be used to power the pump. Take the USB to terminal connector and locate the two terminals labeled "+" and "-". These will be connected via solid core wires to the positive and negative busses that are connected to the motor driver, not the ones directly connected to the power supply of the Arduino.

We need two wires that are long enough to go from your enclosure to the closest wall outlet. The length that this needs to be depends on how far away you expect for your plant to be from the closest wall outlet. Also keep in mind that it does not make sense for these wires to be longer than the USB to microUSB cord that you have; the shorter length of these two power supplies will be the limiting factor in distance from the wall outlet that your system can be.

Once you have your length chosen, cut two solid core wires to this length. Screw in the wire you will use for the positive power supply to the "+" terminal of the USB to terminal adapter; run this wire to your breadboard and attach it to the positive bus connected to the motor driver's right side. Next, screw in the wire you will use for the negative power supply to the "-" terminal of the USB to terminal adapter; run this wire to your breadboard and attach it to the negative bus connected to the motor driver's right side.

You can now plug your USB to microUSB power cord into your Arduino MKR1000, and plug the dual USB port wall outlet into the wall. Nothing should be happening just yet, except you should see a green light turn on on the Arduino MKR1000. In the next step we will begin uploading the software to the board, so that it has the information needed to operate the system.

At the end of this step you should have a working connection between the wall outlet to the dual port USB hub to both your pump via the positive and negative busses on the RIGHT side of the motor driver and a connection from the second USB port on the dual port USB wall outlet to your Arduino MKR 1000.

Step 18: Arduino Interface - Part One

For the software section of this device, we will be using the Arduino interface to load code onto the Arduino MKR1000 board.

This requires a download of the Arduino IDE which can be found here:

https://www.arduino.cc/en/Main/Software

Please follow the directions on the website for your specific computer.

Once you have downloaded the Arduino IDE, open it on your desktop. You should see a window open up titled: "blink". This "blink" is completely unrelated to "Blynk", which will be explained in later steps. The "blink" sketch is the default test program that you can use with your Arduino board. For the purposes of this project, you do not need to run this code at all, but if you want to run it at all you can find the tutorial for this here:

https://www.arduino.cc/en/Tutorial/Blink

To load our code onto your Arduino MKR1000 board, you will first need to make a new sketch. A sketch what Arduino calls a program. To do this, in the Arduino menu go to file->new. This will open a new window.

Then, just copy and paste our code into this window. Our code for this project is attached to this step.

The code provided only needs to be changed in a few ways, which will be explained in the next steps. For now, you can just save the code as is.

At the end of this step you should have a sketch saved on your computer with our pre-written code in it.

Step 19: Blynk Part One

In this step we will begin the user to plant connection setup. To control the system, as well as receive updates about the soil moisture levels of your plant, you will need to download the Blynk app.

On your smartphone, you can find the Blynk app on the app store or play store. Download this app and make an account.

Once you have made an account, you can clone the custom "Sage Smart Gardens -- Indoor Plant Monitor" interface. In order to do this you will need to scan in the custom QR code for our specific Blynk interface. This is the QR code that is shown in the above image for this step. The way that the interface is set up is aligned with the wiring of your Arduino MKR1000, so for it to work correctly it is important that you followed the wiring of the sensors correctly in previous steps.

By clicking on the "Scan QR" button in the top right corner of the screen you will be brought to a screen where you can scan the QR code that is shown above. After scanning the QR code, you should be able to access the custom Sage Controller on your Blynk app.

At the end of this step you should have access to the custom Sage Controller in your Blynk app.

Trouble Shooting: If you are having trouble finding the "Scan QR" button, and instead see a nut (like bolt and nut) icon where the "Scan QR" button should be, you may need to press the back button in the top left corner of the screen within your Blynk app.

Step 20: Blynk Part Two

Once you have successfully cloned our interface, you must obtain your own custom authentication key. The authentication key should be sent automatically to your email address that you gave when initially setting up the application. You can also find the authentication key by clicking on the nut (like washer and nut) icon in the top right corner.

The authentication key is used to connect a specific smartphone to a specific device. This authentication key will be the bridge between your phone and your automated watering system.

Once you have found and copied your authentication key, you are ready for the next step.

Step 21: Arduino Interface - Part Two

In this step we will be modifying the code and uploading it to your Arduino MKR1000.

Before starting this step, make sure that you have the following:

1) Your custom authentication key from the previous step

2) WiFi information about the connection that you will be using for this system including:

a) WiFi Name

b) WiFi Password

3) Copied code that is saved in a new sketch, from step: Arduino Interface - Part One

When you have all of these things ready, open up the new sketch that you saved our copied code in.

First, referring to the picture given, copy your authentication key into the code replacing the one that is given. Make sure that it keeps the same format as before, with parenthesis around it and a semicolon after.

Second, below this in the subsequent lines of code, you have the option to give your plant a name. Chose a name and type it into the line: char plantName[] = "Plant-Name-Here"; replacing Plant-Name-Here with your chosen name.

Third, replace the given WiFi network name and WiFi password with your network information.

Fourth, choose how often you would like your plant to be checked on. This value is both how often you will get an update on your phone as well as how often your plant will get a chance to be watered. Please enter a whole number (not anything like 1.5), replacing the 1 in the line "int notification_frequency_in_hours = 1; //<--replace number here". If you would like to keep it at 1 for every one hour that is also fine.

If you would like to have push notifications on your phone or email, or both, this can also be edited in the code. The default is to have both types of notifications on, which is recommended. To turn these off, change the value of either "push_notifications_ON" or "email_notifications_ON" to false to turn either one off. If you would like email notifications, you will also need to type in your email into the line "char my_email[] = "Your-Email-Here", replacing "Your-Email-Here" with your own email.

Save the code with these changes. In the next step we will be uploading the code onto the board.

Step 22: Arduino Interface - Part Three

In this step we will be uploading the code that you modified onto the Arduino MKR1000.

To upload code to the board, you must first physically connect it to the computer. To do this we use the USB to microUSB cord. Plug the USB into the computer and the microUSB into the board. You should see a green LED turn on, this means that the board is successfully getting power.

First open up your Arduino IDE. To successfully communicate between board and computer, we need to set up the Arduino IDE environment for this specific type of board. There are many boards that work with the Arduino IDE, so we need to specify that we are using the MKR1000.

To begin this we go to Tools ---> Board.

If this is the first time that you are connecting to this type of board, you may need to go to boards manager and install the package that works with this type of board. Click on Boards Manager... under Tools -->Board. A pop up window should appear, and you can type "MKR 1000" in the line that says "filter your search". You will see an option below that says "Arduino SAMD Boards" and below that you can see that "Arduino / Genuino MKR 1000" is listed as a board included in the package. Install this by clicking the install button, installing the most recent version.

Now, we will be able to chose the MKR 1000 from the list of available boards in the Tools--> Board drop down menu. Go to Tools -->Board and select "Arduino/Genuino MKR1000". Make sure that the board is connected to the computer via microUSB to USB cord, and then go to Tools --> Port and select the port that has "(Arduino / Genuino MKR 1000)" in the name.

We are now ready to upload the code to the device. Before you do this, make sure that you have changed everything that you needed to update in the code explained in previous steps. Uploading code to the board is not permanent, so you can always upload modified code if you need to.

When you are ready to upload the code, press the check button in the top left of the Arduino IDE environment. After waiting a few moments for the code to compiles, make sure that you have no syntax errors. If something does go wrong, you will see it displayed in the bottom dialogue box of the Arduino IDE in red. If this is the case, then try to identify the source of the error. Because there is minimal changes to the code to be made, common errors may be forgetting either parenthesis or semi-colons after lines that you have edited. If you do get errors, fix them and then click the check mark button again.

Once you are able to verify the code with no errors, you can then upload the code to the board with the right arrow button which is right next to the check button.

Step 23: Assembly - Putting the Wires in the Box

Now it is time to put it all together. We have everything wired up, and you have everything loaded onto the Arduino MKR 1000. We are almost ready to sit back and watch our plant take care of itself! In this step we will be putting everything together and getting it to a point where you can place the system on your plant.

Grab your enclosure and place it on a flat surface. We need to thread all of the wires for the sensors and the pump through the three holes on the side; also the three incoming power wires (microUSB and two positive negative from USB to terminal connection) through the base of the enclosure. We found it easiest to do this one component at a time, instead of all at once.

Go through each component and take the connections for the component out of the breadboard, thread them through the respective hole in the enclosure, and then plug them back in where they were. Repeat this process for each component. (Water level sensor, soil moisture sensor, pump, Arduino power supply, pump external power supply.)

Make sure that the pump and water level sensor's wires are also being thread through the holes in the water reservoir.

At the end you should have something like what is pictured above. Once you reach this point you should have something like what is pictured above. Take the four small screws and screw on the back of the enclosure.

Your system can now be hung on the side of a pot!

Step 24: Assembly - Placement of Water Level Sensor

In this step the importance of the placement of your water level sensor is explained.

The water level sensor indicates to the system how much water is left in your reservoir. Where you have the bottom of the sensor in the reservoir will indicate to the system when the water reservoir is empty. The system knows not to dispense water when it senses there is no water left. It will also send you a notification that you need to refill the basin at this time.

We recommend for you to place the bottom of the water level sensor just slightly above the top of the pump. This is because it can be damaging to the pump to have it run when it is not submerged completely.

Once you have placed your water level sensor in your basin slightly above the top of the pump, as pictured above, you are ready for the next step.

Step 25: Controlling and Monitoring Your Plant

In this step you will learn the significance of each of the components of the Blynk user interface. There are 7 different components that you can see on your screen, each with a specific purpose.

When you cloned the user interface in a previous step, all of the buttons were automatically set up to work with both the software you uploaded and the physical wiring of your system. For this reason you do not need to modify any of these components.

At the top you will see a black box. This is the terminal, and is where you will see all of your updates coming in from your plant at the time frequency you chose (i.e. new update shown every hour). You will also see messages here when your plant is watered, it will show "Watering Plant-Name".

Next are three buttons that are below this. The one on the left is labeled Force Update. This button is a "push" button, which means it does not stay on when you press it but the system knows when it has been pushed. Every time you push this button, the system will give you an update. This button is used to get updates when needed between the scheduled updates that happen every so many hours.

The button on the right is labeled "Auto Watering Enable". This button, unlike the other two, is a "switch" button which means that when pressed it stays on until turned off. When this button is on, you are essentially giving the system the authority to water your plant for you. If this button is not turned on, you will only get updates about your plant and it will not actually be watering it for you. If you would like you can always keep this button off and chose when to water the plant yourself. This can be done with the middle button, the "Force Water" button.

The middle button is labeled "Force Water", it is also a "push" button. This button can be used to water the plant any time that you think your plant needs some extra water. However, it will only water if the last update of your plant indicates it is okay to water; this includes the system checking to see if there is water left in the reservoir and checking to see that the plant is not too wet. The main function of this button is to be able to have more control over the system.

In the middle, towards the bottom, you will see a button with a plus and minus labeled "Watering Time". This button can be used to change the time that the pump turns on for every time it waters your plant. The default is set to turn on for ten seconds, which is the maximum. In the next steps we can see how we can change this value to make sure your plant is being watered with the amount of water that you desire.

At the bottom of the screen you will see to components that look like a phone and a piece of mail. These require no interaction, ever. Both of these components are required by the Blynk app so that it can give you push notifications and email notifications. You don't have to worry about these, you already set your notification preferences in previous steps.

To turn on/ off your user interface you just need to press the "play/stop" button in the top right corner of the window. In the picture shown the user interface is not being used so you can see the "play" button shown in the top right next to the nut icon.

Now that you know how your user interface works you are ready for the last step.

Step 26: First Watering - Determining Minimum Water Amount

In this step we will determine how much water we want to be dispensed when the plant is dry. This is the last thing you need to do before your system will automatically water your plants for you!

To do this we will be using the Blynk application, at this point you should have everything set up and ready to run it on your phone. We will be modifying the volume of water dispensed by changing the amount of time that the pump turns on for in seconds. This is changed using the "Watering Time" button that was described in the last step.

Get your Blynk app up, and have your system plugged in and on your plant. For this testing step we recommend having a separate water basin, or sink, to run the hose into before putting it directly to your plant. Starting the application with the system, you only need to press the "Play button arrow" on the top right corner of your cloned Blynk interface.

With the system running, have your soil moisture sensor out of your plant in the air to simulate a very dry plant. Now, make sure the "Auto Water Enable" button is off, your water basin is full, your water level sensor is submerged, and your hose is aimed at a sink or other water basin.

Press the "Force Update" button, you should see a message in the terminal appear that says "Dry" for "Soil Status". Now, adjust the value of "Watering Time" to the value in seconds you want the pump to run for. Every time you change this value you should see it displayed in the terminal. When you have chosen your value, press the "Force Water" button. The pump should turn on and dispense water.

If this does not happen, please check the following things in this order, repeating this step after every change:

1) Is your soil moisture level sensor out of the plant, and does your last status update say "Dry" for "soil status"? If this is not the case, that is a problem.

2) Is your water level sensor submerged? If it is not, you will see a value of "Empty" for "Water Reservoir Status" in your last update.

If neither of these issues are the problem, you may have to go back to previous steps:

3) Is your device connected to Blynk? Did you provide Wifi information correctly and is your device within Wifi range?

4) Is your wiring correct within the system? Did a connection come undone?

Once you have successfully dispensed water with the "Force Water" button, you may repeat this step as desired until you have the system dispensing the desired amount of water for your plant.

At the end of this step you are all set. You can now set up the system on your plant: aiming the tubing into the pot, place the soil moisture sensor in the soil close to your plant, fill your water reservoir with the water level sensor inside, and turn on the "Auto Water Enable" button on your Blynk interface if you would like it to water the plant automatically.

Step 27: Congratulations on Your Completed System!

You have reached the end of this guide. At this point you should have a working system, congratulations!

Now you can sit back and watch your Sage Smart Garden Home Watering System in action.

Thank you for following this guide, we hope you enjoyed building the kit and we wish you the best of luck with your home garden!

Be sure to check out Sage Smart Gardens website for additional merchandise and services that they provide for outdoor gardens.

https://sage.garden/

Share

    Recommendations

    • IoT Challenge

      IoT Challenge
    • Gardening Contest

      Gardening Contest
    • Classroom Science Contest

      Classroom Science Contest

    Discussions