Introduction: UCL-IIoT-Greenhouse-with-wifi
This is a school project for 3 semester on UCL. We decided to keep on working on our greenhouse but this time with collecting data
Made by adam0220 and mort340d
Step 1: Overview
Which garden entusiast is not dreaming about having a "smart house" where the plants gets watered automatic, when the soil moisture level is getting to low or be able to give your plants the required "sunlight" automatic even at night?
Our goal is to make a greenhouse that can do that for you.
This instructable will explain how we made a greenhouse that is capable of sustaining itself, through arduino.
We have used a DHT11 to measure the temperature and humidity. Our moisture soil sensor is used to measure soil moisture. Our water pump is used to water the soil, when soil becomes too dry. The LCD monitor is used to show what the soil moisture and temperature are. The leds are used to illustrate the sun. We have used the node red to see all our values we get from arduino. WeMos D1 R2 is used to send the data through wifi. MySQL is used to view the data through a web page.
Step 2: Flowchart + How to Install Node-red and Add MySQL to Node-red
Here is our flowchart of the greenhouse
1. Install node-red on your computer.
2. Install "dashboard, node-remysql and node-serialport"
3. Go in to manage palette
4.Then click on install
5.Then search after the modules
6.Install wampserver on your computer, to open MySQL
7.Open phpMyAdmin
8.Setup a block exampel "nodered"
9. Create a tabel, write the name of the thinges "moist aso" you will like to have.
10. Insert MySQL block into node-red
11. The block in node-red "Mysql" need to be refered to the name of our sql Database in our case "nodered"
Step 3: Parts List
1 x Arduino uno
1 x WeMos D1 R2
2 x Breadboard
1 x Waterpump 12v
4 x Leds
1 x LCD screen
1 x DHT 11
1 x Moisture soil sensor
1 x Relay songle ky-019
1 x Battery holder
8 x Battery (AA)
4 x 220 ohm resistance
Hose
Wires
Additionally we used
Soil and plants
3D printer + laser cutter
Step 4: 3D Print of the Project
Mainframe is made in a 3D printer
Roof is made of plexiglass with a laser cutter
The walls are made og wood with a laser cutter
You can get the files from https://www.instructables.com/id/Greenhouse-Overview-On-Going/
Step 5: Wiring on Fritzing
Attachments
Step 6: Arduino Code
Here are some images from the WeMos D1 R2 code. It shows how we connect to the wifi and how we send data from arduino to node-red
Picture 1. In picture the WeMos reads the libraries and connceting the wifi and shows which pins are in the arduino
Picture 2. Prints to serial monitor that it have recieve the packet and shows how we use "udp" to send the data to the computer through node-red.
Picture 3. Shows how many char we can send to node-red and the void setup
Picture 4. Makes the temperature, moisture and humidity to float, then remaps the moisture into 0-100%. After that they are made into strings then send to node-red.
Step 7: How to Install the ESP8266 Board in Arduino IDE
To install the ESP8266 board in your Arduino IDE, follow these next instructions:
1) Open the preferences window from the Arduino IDE. Go to File > Preferences
2) Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into the “Additional Board Manager URLs” field as shown in the figure below. Then, click the “OK” button.
3) Open boards manager. Go to Tools > Board > Boards Manager…
4) Scroll down, select the ESP8266 board menu and install “esp8266” we use 2.3.0
5) Choose your ESP8266 board from Tools > Board > Generic ESP8266 Module
6) Finally, re-open your Arduino IDE
Step 8: I/O List
This is our I/O list for UNO and WeMos D1 R2
Step 9: Node-red
The first two image is where the data is through the wifi and show the output on node-red. The second image is the node red program where it runs through the computer port. The last picture is using the WeMos D1 R2
Setup node-red https://nodered.org/docs/platforms/windows
Step 10: MySQL
SQL is a website we use to store the data that we get from Arduino.
To get connected to MySQL you have to use wamp. You can download wamp on http://wampserver.aviatechno.net/