Automatic Air Flow Regulation System for Exactum Greenhouse

The greenhouse is a glass container with very little openings. In summer when it is really hot inside, we need to blow cold air. A fan would be the best possible tool for that purpose. Nobody really has time to switch the fan on and off time to time, in the morning and at night, at sudden rise or fall of temperature. Therefore it is required to have a fan that switches on /off and also regulates automatically. Thanks to the Magical Flower Pot that already has a DS18B20 1-Wire temperature sensor which sends temperature readings to our Firebase database at regular intervals. I am reading those values after ten seconds and sending the temperature to Arduino, which controls the fan. When the temperature is below 20 degree centigrade the fan stays off. Above 20 degree centigrade it switches on and regulates upto three levels up.

The idea is to install two fans on two opposite side walls of the greenhouse so that air can flow properly. We will connect two fans with the same circuit. There will be a computer with the system which will run the Node Js code to fetch json data from Firebase and send to Arduino.

Components

  • 12+ V DC Fan
  • TIP 122 NPN Transistor (Datasheet)
  • Arduino UNO
  • USB Connector
  • Breadboard
  • Transistor, Capacitor (According to requirements)

Diagrams

Circuit Running FanCommunicationCircuit_diagram

 

Code

The code written for this is at

https://github.com/sayantanhore/Airflow-Regulator.git

Node js and npm package “serialport” is needed to run this code.

Problems Faced

I had a serious problem regarding communication from Arduino and Node Js frontend. The messages coming from Arduino appeared to be improper and I (with Samu) found out that the transfer is so fast that two subsequent messages were always colliding and spoiling both of them. We introduced a small delay from Arduino and that solved the problem.

Second thing is initially I made an incorrect circuit and “SUCCESSFULLY” fused the power source.

Conclusion

It was a great learning experience and I am looking forward for mode IOT courses in near future. THANK YOU ALL.