Have you ever bought a green plant and forgotten about Them? Are you a plant and technology Amature? do you live in two cities and have plants in your two homes but your busy schedule does not allow you to take care of them? Search no more a connected pot is the solution to all of your problems.
The main goal of our project is to create a self or automated plant that can feed itself while its owner travels or does not have much time for the plant.the owner will be able to follow up by knowing the soil humidity, room temperature,plant brightness, and the tank level for the plant.
With this pot, we have a soil moisture sensor that senses the moisture level of the soil, an ultrasonic sensor to check the water reservoir level,a light sensor to check if the plant receives enough light and a water pump that gives water to the plant all this embedded on the things UNO card and can be followed u through a node-red dashboard
The project was made by Dinehs PETER-STEPHEN and Honoré MVUYEKURE as part of our engineering studies in computer networks and connected objects at UniLaSalle Amiens.
Our smart pot provides the user with the level of the water tank, the luminosity that the plant is receiving, the soil moisture, and the humidity and temperature of the room the plant is in.
How does it work?The light sensorThis sensor will be used to detect light and also measure the brightness of the ambient light. This is will help us know if the plant has enough light.
This sensor will be connected to the following pins on our Arduino card:
GND and VCC are connected to our breadboard pin and the A0 on our analog A0
- First, with the light sensor, we receive data ranging from 0-1024 bytes we then transform into volts by transforming into data that we want. we multiply it with (5.0/1024.0). 5 is the maximum value that we want.
- After the calculation we categorize the data into 3 types:
-(0-0.4) in volts we are receiving much light
-(0.4-2) in volts we are receiving light
if we don't receive data within this data range we say that there is no light
(These values can vary depending on how you set your potentiometer)
Ultrasonic Sensor- Second, we check for the water tank level using our ultrasonic sensor we then analyze the data by using an if condition. if we receive data greater than 14 then the water tank is empty and we turn on the red light and a message is sent to tell us that the tank is empty, (this depends on our tank capacity)
The LEDs
We have used 3 LEDs (red,blue, and yellow) they will allow us to know the capacity of the tank, and how water is decreasing.full or not.
the red one is turned on to show us that the system is running
the yellow to show us that the tank is almost empty
the blue that tank is in the middle or that we are watering the plant
- if data received from the ultrasonic sensor is between 8 and 14 then our tank is half empty we turn on the blue led,the soil moisture sensor to verify the humidity of the soil if it is too humid we then turn on the water pump otherwise we don't.
Humidity soil sensor
The Soil Moisture Sensor measures soil moisture grace to the changes in electrical conductivity of the earth ( soil resistance increases with drought ).
Due to the corrosive size of the soil moisture (electricity and water)the sensor is not always on. it is only turned on when we are about to water the plant to only check if we need to water it
- otherwise, the tank is full and we turn on the green led and check if the soil moisture is good if yes we don't turn on the pump otherwise the pump is turned on.
Temperature Humidity sensor
this is used to check for the ambient temperature in room and the Humidity.depending on the plants the Humidity and temperature will vary
- The relay
A relay is a programmable electrical switch,which can be controlled by Arduino.we are going to use it to power up our pump since it needs high voltage in order to work the relay will also help us control the pump.
3D pot
in order to create our 3d pot, we used a website called onshape. this is how we designed our pot. one part is for the plant,the other for water, andelectronics, and the other for a battery.
TTN
- Since we wanted to follow up with our plant we have used TTN which uses the Lorawan protocol.
the LoRaWAN protocol ensures the communication between our sensors and node-red via an MQTT server.
We have created an application on TTN and within we registered our device and sent our different data.
We send on TTN the temperature and humidity of the room, the soil humidity, the brightness level of the room, and the water tank level.
here a sample of our code that allows us to send data to TTN
uint32_t humidity=dht.humidity;
uint32_t temperature=dht.temperature;
uint32_t distance=distanceSensor.measureDistanceCm();
uint32_t luminosite=volt*10;
uint32_t sondeH = sonde;
debugSerial.print("Humidity:");
Serial.println(humidity);
debugSerial.print("temperature:");
debugSerial.println(temperature);
debugSerial.print("sonde:");
debugSerial.println(sonde);
payload[1]=humidity;
payload[2]=temperature;
payload[3]=distance;
payload[4]=luminosite;
payload[5]=sondeH;
ttn.sendBytes(payload, sizeof(payload));
On TTN they are formatted so that we get data that is easy to read
function decodeUplink(input) {
let lumo="";
if(input.bytes[4]>0&&input.bytes[4]<=4){
lumo = "il y a trop de lumière";
}else if (input.bytes[4]>4&&input.bytes[4]<=20){
lumo = "assez de lumière";
}else{
lumo= "Il fait noir";
}
sonde = input.bytes[5];
let hum_terre="";
if (sonde >= 310){
hum_terre ="Trop sec!!!!!";
}
else if ((sonde <= 180) && (sonde >=310)){
hum_terre="Parfait!!!!!";
} else if (sonde <= 180){
hum_terre ="Trop mouillé !!!!!";
}
if(sonde==0){
hum_terre="Mesure non faites"
}
return {
data: {
Temperature: input.bytes[2],
Humidite: input.bytes[1],
Distance:input.bytes[3],
Luminosite: lumo,
sonde:hum_terre
},
warnings: [],
errors: []
};
}
Our Dashboard in node-red
What is Node Red? –Node red is a Open Source flow based tool and IOT platform written in Node.js.
Node-red lets you easily build applications by joining together black-box functions (nodes) using a web interface
We used node-red because it is ideally suited for building IOT and Home control dashboards and because it is easy to use.
Node-red can be installed locally on Windows and Linux
We used node-red to capture data from TTN via our MQTT that we have already set up in TTN into our node-red dashboard
Here is the flows of our dashboard
To conclude I would like to say that this was an interesting project and we learned so much from 3d modelization we designed our pot but was too big even though we reduced the size it still managed to take more time than expected.
As for Arduino, it was very interesting to search for sensor values that were useful for our plant, Lora communication, and node-red. Some of the improvements that could be added are :
- motors to help the plant search for light while the owner is away, this is could be possible using the light sensors that are already on the plant.
- Be able to pilot the pump (turn it on and off from an app)
The project helped us to gain knowledge from the different subjects that we used and helped us identify a problem and come up with a solution, that was really interesting as some ideas,solutions came throughout the project.
Comments
Please log in or sign up to comment.