My inspiration is to save my plants from drying and depletion
Smart planter to irrigate the dry soil and plants by using the water pump and moisture sensor where the LCD provides us with reading in %.
Fusion 360 (2d Sketches)
Creating a component for each side of the design.
Design the suitable points for T-slots on each side.
Placing the LCD by detecting the proper side and I added 2 small opening below the LCD to add 2 LEDs. I used Varner calliper to find the external circumference of the LED which is 4.8 mm.
In the Arduino side I left places for USB port, power sources of both Arduino and adaptor and finally for the On/Off switch.
Fusion 360 (3d Sketches)
Extrude all fully defined sides of my design 3mm typically such as plywood thickness.
unhide all bodies to connect them as a final form.
using joint feature to assembly the sides.
starting to assembly the design sides
Assembly all sides by using rigid joint feature
Soft ware tools
Fusion 360
Arduino IDE
Tinker CAD
RDworks for laser cutting.
Laser cutting process
Converting all sides on Fusion 360 to DXF files.
Make a final check on the RDWorks program to follow all lines are properly selected and closed to be cut or engraved by laser.
set black lines for laser cut with power 30 and speed 55.
Red lines for engraved shapes at the top and on left side of the design at power 20 and speed 300.
I made all drawings to be closed together to save time and energy during laser cutting process, in addition to check that all lines are single lines without duplicaation.
Inputs and Outputs actions
Inputs are
Moisture or Soil sensor to read moisture in %
DHT 11 as temperature sensor to read temperature in Celsius.
On/Off switch to control open and close the circuit.
Power socket supplied by 9 volts to power Arduino .
Outputs are
LCD I2C to present the incoming data from both sensors (DHT11 & Moisture)
RED and Green LEDs to alert according to temperature in Celsius of the atmosphere. Where the RED LED light up at temperature greater than 30 Celsius however the Green one lights up at temperature less than 30 C.
Water pump transfers water from the basin to the plant or dry soil.
All components are in their suitable places
testing moisture sensor and the water pump after mounting them.
Testing temperature sensor
The final product after fixing all sides
Integration phase
Upload the code on Arduino Uno through USB cable.
Connect Both On/Off switch and the power socket on a series connection.
connect the +ve of 9 volt to the VN of Arduino
on bread board connect 5 V wire to Arduino to supply all components with required power.
Connect wire from the GND of Arduino to bread board to generalize all grounds.
Moisture sensor connection
VCC to the 5 volt on the bread board and GND to the ground on the board.
Data wire is connected on pin A0.
Pump connection
One terminal is connected on the GND.
+ve is connected on pin 8.
DHT 11 sensor
GND and +ve typically such as Moisture sensor.
Data on pen A1.
LCD connection
GND and + Ve connected on the board.
SDA to pin A4 and SCL to pin A5.
LEDs connection
GND or the short terminal is connected to the GND on the bread board.
Green LED is connect connected to resistor 220 Ohm on pin 5 Arduino while the RED LED to pin 6.
software tools
for design I used Fusion 360
for Circuit I used Tinker Cad
For Coding I used Arduino IDE (Explained in programming section in more details)
Circuit on TinkerCad
Power source is 9 volt wall adaptor as it is recommended to power Arduino with 9 Volts.
Selecting the suitable power source according to the components in the project.
LCD is powered by 5v via VCC.
Both sensors DHT 11 & Moisture are powered by 5V
Pump is powered by 5 V
2 LEDs are powered by less than 5 volts but I used 2 resistors each one has 220 Ohm value.
Soft ware fabrication (Coding)
a- Testing components
Testing each component alone because some components need a library .
Testing the moisture sensor to record the range of reading.
Testing the LCD I2C library.
Testing water pump
Testing DHT 11 sensor to detect the temperature of the surrounding atmosphere of the plant.
Printing on serial monitor
b- Modification process
I modified some reading
Mapping Moisture sensor by specific values map(output_value, 550, 10, 0, 100);
Modify the cursor for LCD to start at (0,0).
Modify the DHT 11 temperature reading to give reading in Celsius in stead of Fahrenheit by using the conversion f = (t*1.8) +32;
Both f and t are variables where f returns reading in Fahrenheit and t returns reading in Celsius.
b- Run all code
Run all code to debug all errors.
Double check if there is any code with a logic error or text error.
Before void setup
Void setup
void loop
Void loop
The code starts as the following
Read the moisture from the soil, if the moisture = 0 or < 20 .
Allow the water pump to watery the plant and if the sensor reads > 50, the water pump stops to transfer water.
At the same time if the temperature returned by DHT 11 sensor is < 20 makes the Green Led to lit up and if the temperature is > 30 makes the Red Led to lit up.
All data returned by the both moisture and temperature sensors are clearly presented on the LCD.
Testing components
Connecting the sensor to the Arduino and check the reading for both dry and wet media.
Connecting the LCD to present the data in addition to the serial monitor.
Connecting the water pump to check its ability to pump water.
Connecting LED to work during the reading of temperature.
Modification my design
The first design had some mistakes such as big size and the top of design was not suitable to place hinge and there was no suitable places for Arduino data, power and power source.
Second design
One of peer suggested to fix the left and right cap stone and to open it from its center , I found it good Idea and I already went through this modification.
Changing my design after sharing ideas
Soft ware challenges
After adding the DHT 11 sensor to measure temperature in addition to the moisture sensor to measure moisture from the soil. I stuck to convert the temperature from Fahrenheit to Celsius degrees.
Solution
I googled the problem and then I found different forms to convert I have tried them until I got the proper one.
Hardware challenges
First challenge to design a completely closed design, but I found it is not practical as the plant will be placed at the top of the system which is not safe for the electronic components.
solution
I changed the design before the laser cut step to be a horizontal irrigation system instead of vertical one.
I would add a bluetooth module to control watering plant or even to stop pump from working according to the user's need.
I would add more moisture sensors to act as a multiple irrigation system.