top of page

Week 13 & 14 (April 2nd - April 13th)

  • verticalfarmprojec
  • Apr 10, 2018
  • 2 min read

During this last two weeks, we were working on the Mobile App. This part of the project was a big challenge for us due to the lack of possibilities for the Arduino to connect to the internet. Furthermore, the complications were also encountered during the incorporation of transmission code to the state machine program that we already had for the system.


During this process, we realized that we needed to change the Arduino UNO for an Arduino MEGA because the ESP8266-01 (Wi-Fi Module) work better with Hardware Serial than Software Serial. In other words, we were trying to use a software serial for Arduino UNO, but during the transmission of data , the module would timeout and lose the firmware.


Changing to the Arduino MEGA 2560 helped us have a better performance not only for the system, but for the transmission of data through a Wi-Fi network.


Regarding the Mobile Application, we have come across a third-party mobile app called Blynk. This app was created to help users to easily keep track of the projects using any kind of microcontroller (Arduino, Raspberry PI, ESP8266 Standalone, and so forth).


Although this app provides an Arduino library, a lot of programming was required to merge the libraries into our state machine code. Some issues were encountered during this process because we found that Blynk App was not meant for big codes. However, we found a solution on the very last weekend:


- Disconnecting Blynk app when one of the trays required water

- Reconnecting Blynk app after the watering and re-positioning process

- Sending data to app while Arduino MEGA listens to the trays from RF modules


Arduino MEGA 2560

Since we had to change the microcontroller from Arduino UNO to Arduino MEGA, pins layout also changed. Rewiring the system was not complicated. The following list show the pins and the devices that were connected to them.


2 ---- Water Flow Sensor

4 ---- Relay for Laser

5 ---- Relay for Motor

6 ---- Relay for Water Pump

7 ---- CE for RF

8 ---- CSN for RF

9 ---- Relay for Ultrasonic Sensor

18 ---- RX for Wi-Fi Module (ESP8266-01)

19 ---- TX for Wi-Fi Module (ESP8266-01)

22 ---- Ultrasonic Echo Pin

24 ---- Ultrasonic Trigger Pin

26 ---- Laser Input

28 ---- Temperature Sensor

50 ---- MISO for RF

51 ---- MOSI for RF

52 ---- SCK for RF

Mobile App (Blynk)

Below, you will find a picture of a screenshot made to the app when was customized and working.




As it can be seen, the app contains four gauges. Top gauges are for the soil moisture for tray one (left) and two (right) displayed in percent (%). Other gauges are for temperature (top) in Fahrenheit and relative humidity (bottom) in percent (%).


The blue vertical level is a simulation of the 5-gallon water tank. It will lose blue color whenever water is used so that user is able to check the water level without opening the tank.

DEMO

For the final demo of the project, please click here or go to Demo tab on top of the website.



Report

We completed the report and submitted online on April 13th, 2018



 
 
 

Comments


bottom of page