Green House Monitoring With IOT

by SultanM24 in Circuits > Electronics

1672 Views, 2 Favorites, 0 Comments

Green House Monitoring With IOT

Green House IOT Monitor

When it comes to agriculture, monitoring the temperature & humidity of plants is an important factor for their survival. Currently, people use thermometers attached in a greenhouse so the farmers can measure temperature. However, this manual approach requires the farmer to be physically present in that location which is not possible every time. So I developed this compact device at VeggiTech to solve this problem.

This is a greenhouse monitoring system that can sense temperature, humidity, heat index & send it on an online dashboard through wifi. It is a self-charging device that runs on solar panels and has a buzzer when environment goes beyond the threshold.

Supplies

The total cost of this project is 270 AED (73$)

Materials Required:-

  1. Nodemcu
  2. Arduino Uno
  3. 10W Solar Panels
  4. 12V Solar Charge Controller
  5. 12V Lead Acid Battery
  6. DHT22 Sensor
  7. 16x2 LCD i2c
  8. Wood Drawer
  9. 5V Relay

Circuit Diagram

circuit.png

The device has the above connection for the full program to work. Below is the connection in details:-

  • Solar panels terminals to charge controller
  • Battery terminals to charge controller
  • Charge controller output to buck converter & buzzer
  • Buck converter (5V output) to arduino, relay, lcd, dht22 & nodemcu
  • LCD SDA, SCL to A4 & A5
  • Arduino Rx,Tx to nodemcu Tx,Rx
  • Relay in between charge controller output to buzzer

Create Account at Pubnub With App Key

download.png
Annotation 2020-02-07 170955.png

Create your account at Pubnub so that data is transferred successfully. Make a new app on the top right corner and copy pub/subkey information. This key will be transferred to the Arduino code which you will upload on nodemcu.

Upload Code at Nodemcu & Arduino

81U4jvpGnYL._SL1500_.jpg
arduino-uno-r3_pose1.jpg

Download the below code. Put pub/subkey from your PubNub account to the greenhouse_iot code just above the setup function. 'greenhouse_iot' code will be uploaded on nodemcu and 'arduino_slave' code will be uploaded on arduino.

Create Freeboard Dashboard

M5vqXJunZfx8wRdts-original.png

Create your freeboard.io and this is where your data will be displayed in an attractive visual form. First, the data will be uploaded from nodemcu to pubnub server, pubnub can be integrated to freeboard easily which is the reason we are using both of these services together. Follow these steps to setup the online dashboard:-

  1. Choose data sources on top right corner as Pubnub
  2. Create new panels each for temperature, humidity & Heat Index
  3. Choose any type of panel display that you need. A popular one is Gauge meter for this application
  4. Within panel, choose data source as JSON. It will lead you to text editor where you can type [dashboard name][variable name from arduino IDE]. If you want to get temperature reading then type 'Temperature' since that is the JSON formate name when it was uploaded from nodemcu to server. Same for all panels.

Conclusion

green house monitor.jpeg

It was a useful project overall but here are a few limitations which I faced:-

  1. Lack of dust protection:- I should have added an IP67 casing box for electronics protection and better reliability.
  2. Dangers of Lithium battery:- Instead of using a Lithium battery, lead-acid battery is safer since during high-temperature lipo battery can catch fire. That's how I burned this project actually so I learned this in a hard way.
  3. power dependent on sunlight:- Sunlight is the main source of power. Without it, the system will stop so an alternative source is needed. Not to forget that solar systems increase the cost.
  4. the operating cost of Freeboard service:- 12$ per month needs to be spent on freeboard.io service. A better alternative is needed to reduce the cost.

Now my next step is to add wireless LoRa sensors in the greenhouse, collect the readings through WiFi gateway and upload it on a custom-designed dashboard using Node-Red. This system has long battery life (8-10 years) and more reliability so all the above limitations are eliminated.