Smart Garden Monitoring System

Various sensors, like light, temperature, and moisture detectors, monitor the conditions of your garden. Based on the moisture level, the device can be water your garden.

Engineer

Amy K.

Area of Interest

Electrical Engineering, Computer Programming

School

Cupertino High School

Grade

Rising Junior

Final Milestone

Final Milestone Video

Bill of Materials

https://docs.google.com/spreadsheets/d/1_R-Tf_-WvsT9OaUphAE8XOXDCee20tbX5Hz6Mlx7Jx0/edit#gid=0

Circuit Schematic

Accomplished

In this milestone, I added an additional sensor, connected my sensors to an app, and got my water pump to turn on and off based on the readings from the moisture sensor. I set up a water tank for my water pump using an inverted plastic water bottle with a hole drilled in the lid. The tube that connected to the ‘in’ side of the water pump went into lid and the tube that connected to the ‘out’ side of the pump flowed into the plant’s pot. I decided to add a water level sensor that lets the user know when the water tank is running low on water. The sensor is comprised of long metal strips that run vertically and rely on the conductivity of water to detect the level of the water. I also designed an app using Blynk that would read data from the sensors via wifi and display the readings so users can check on the conditions of their garden from their phone. I also coded my water pump to respond to readings from the moisture sensor. When low water levels are detected, the water pump will turn on for 10 seconds and then check a minute later to see if the soil is still dry. If it is, the pump will turn on for another 10 seconds, and repeat the process until the soil is sufficiently watered.

Problems I Encountered

One issue I ran into whilst completing this milestone was connecting an app to my circuit board. Initially I tried downloading prewritten code for a web app that someone else designed. However I received several errors that I eventually determined to be a result of outdated programs and deleted files. I decided to switch over to using Blynk, which provided an easy way to design an app and connect it to a microcontroller through wifi. However, this path came with its own set of difficulties, the most prominent of which was when I tried to connect my circuit board to the wifi, I received an error that read “packet too big”. In the end, I switched to a different wifi network, and this solved the problem. Another problem I had was with setting up the water tank for my water pump. I had difficulty sealing the connection between the water tank and the water tube, and thus a lot of water leaked out. Even after adding a considerable amount of duct tape and hot glue, the connection still was not water tight. However, with a great deal of back and forth between taping and gluing and testing, I managed to patch all the major leaks.

Overall Project Reflection

Through this project, I learned a lot about engineering, as well as about problem solving in general. This experience gave me the opportunity to become familiar with many basic components and fundamental engineering concepts. I got the chance to work with breadboards, microcontrollers, and a variety of sensors, which are components that can be used to create a multitude of different projects. I also learned how a voltage divider circuit works and how voltage, current, and resistance relate to each other in the equation V=IR. My experience has given me the confidence to continue making modifications to the project on my own, like making it solar powered or adding a light that turns on when low light is detected. Working on this project also taught me how to deal with challenges that come up during the process. I learned how to troubleshoot and take advantage of the resources available. I also began to properly appreciate the learning opportunity that these problems present and to recognize that without these roadblocks along the way, the process would be far less enriching to my personal growth.

Title

First Milestone

First Milestone Video

Circuit Schematic

Accomplished

In this milestone, I managed to get all my sensors– light, temperature, and moisture — to read and display accurate data on the Serial Monitor of the Arduino IDE. The light sensor, also called a photocell or photoresistor, acts as a resistor. The more light it received, the lower the resistance, and thus, higher the voltage. The number displayed on the Serial Monitor indicates the voltage across the resistor, so the larger the number, the more light the sensor is receiving. The temperature sensor measures the voltage it receives, with a higher voltage corresponding to a higher temperature. My code converts the output from the sensor into Celsius. The moisture sensor relies on the conductivity of water to measure the moisture content of its surroundings. The more water present, the higher the conductivity and lower the resistance. The number on the Serial Monitor represents to resistance across the moisture sensor, with a lower number meaning higher water content. In addition to my sensors, I also got my water pump motor set up and connected to a relay that turns the motor on and off based on signals sent from my Arduino.

Problems I Encountered

One of the problems I encountered was with converting the output from the temperature sensor to Celsius. In order to convert the data from the sensor into standard temperature units, I had to scale the number to volts, and from there I was able to easily convert to Celsius as 0.1v is equivalent to 10 C. The temperature I was receiving after my conversion was unreasonably high. After testing with a voltmeter, I realized my Arduino only outputted 3.3v rather than 5v as I had originally thought. This meant I had to scale my conversion accordingly to obtain the accurate voltage. Another issued I ran into was when I was setting up the circuit for my water pump. Initially, I tried using a mosfet as the switch to turn on and off the motor, however the motor was unable to run when connected to the circuit. I later learned that the amount of power that is able to flow through the mosfet is dependent on the voltage that is sent into the gate to open it. The Arduino only outputs 3.3v, which is insufficient to allow enough voltage to power the motor.

Next Steps

For the future, I plan to connect my water pump to my sensors, and get my system working as a cohesive whole. My intent is for the water pump to dispense water when low moisture level is detected. I also plan to get my sensors connected to an app that will display the readings through the wifi.

Starter Project

Starter Project Video

Why I Chose This Project

I chose to make a motion alarm for my starter project because it provided me with an opportunity to become familiar with many fundamental concepts that I felt would help me when I started my main project. For instance, the motion alarm project involved connecting an ultrasonic distance sensor to the Arduino, and then reading the output and controlling other components based on the information. Reading output from sensors is the foundation for a wide range of projects and is a crucial part of my main project where I would have to read output from three sensors. This project also involved working with digital pins and analog pins which allowed me to become familiar with the difference between the two. Furthermore, I was able to gain some basic knowledge on how to wire a circuit on a breadboard and what the different wires do.

Problems I Encountered

The primary challenge I encountered whilst completing this project was understanding the function of the various wires on my circuit board. I followed the schematic provided for my project kit, but I did not truly understand what each wire did. While I also copied the code directly from the source, I had some past coding experience so I was able to reason out what each line of code did. On the other hand, I had absolutely know prior knowledge in engineering so I struggled to understand what each wire in the circuit did. I was able to overcome this challenge by looking for patterns between the circuits for each component. For example, I noticed that all the components had one wire that connected to the negative rail (which I later learned was called “ground”) and either had a wire that connected to the positive rail or the Arduino. From this I deduced that these wires were connected to the power source. I also noticed that each component had at least one wire that connected to the Arduino and some even had to or three wires. I noticed a correlation between the number of wires connected to the Arduino and the number of functions that my code called. For example, the distance sensor had two wires that connected to the Arduino and my code calls for the sensor to output a signal and take in a reading. Based on this observation, I reasoned that those wires relayed signals to and from the Arduino.

How My Project Works

My project is comprised of an ultrasonic distance sensor, a piezo buzzer, RGB LED, and a servo motor. The distance sensor sends out sound waves and tracks the amount of time that it takes the wave to bounce of an object and back to the sensor. Based on the time that elapses and the speed of sound, you can determine how far away the object is. The RGB LED light uses various combinations of red, green, and blue light to emit a range of colors. The piezo buzzer contains a piece of metal that vibrates at the desired frequency, while the servo motor turns at exact angles. When the distance sensor detects an object to be far away, which I defined to be over 20 inches away, the LED will shine green. When an object is between 10 and 20 inches from the sensor, the LED will turn yellow. If an object is detected at a close range (less than 10 inches away) the LED will turn red, the piezo buzzer will sound, and the servo motor will move until an object moves out of range.

STEM Summer Camps Coding & Robotics Classes For Kids San Francisco Coding & Robotics Classes For Kids New York Coding & Robotics Classes For Kids Denver Coding & Robotics Classes For Kids Palo Alto STEM Summer Camps For Kids in New York STEM Summer Camps For Kids in Palo Alto STEM Summer Camps For Kids San Francisco STEM Classes For Kids in New York STEM Classes For Kids in Palo Alto STEM Classes For Kids in San Francisco Code Classes For Kids Code Classes For Kids in New York Code Classes For Kids in Palo Alto Code Classes For Kids in San Francisco STEM Summer Camps For Kids

Leave a Comment

Start typing and press Enter to search