The idea behind this project was to build an enclosure to grow microgreens or small plants indoors and make it automated. So the Arduino was a proper fit but I wanted to view the enclosure even if I was outside my home. So here comes the Bolt IoT Module to rescue. I hooked it up to the Arduino Nano using the UART connection and attached the relay and sensors to Arduino.
The Setup:For the setup I used a full ITX size CPU case. As I was having one lying around and it was quite aesthetic to the décor, it was a great fit. The Power Supply unit was damaged so I removed the power internals and hooked up the Arduino Nano, The bolt module, relays and power distribution inside the Power supply unit. The enclosure was great way to hide all the wonky and dangling wires reducing the risk of short circuit or Electrostatic discharge damaging any component. Inside the SATA Drive bay, I fixed a Water bottle connected to a 5V water pump and placed the saplings in the area where the motherboard would be.
Using the standoff for the Motherboard, I screwed in the sensors and attached the modules to it making a tight fit and did proper cable management to make it look good and clean.
Working:Well there are five things which happen during the loop function of the Arduino
- Getting Humidity and Temperature: The Arduino collects the temperature and humidity value from DHT11. Then it checks if the humidity is more than 80% or Temperature is more than 37 C. If true, it powers a relay which powers an exhaust fan that removes humid air from the enclosure. This creates negative pressure inside sucking in fresh air reducing indoor humidity and temperature.
- Getting ambient brightness: Then Arduino collects the Ambient light levels. Here I have used an LDR Module instead of directly using LDR alone. This module directly gives a digital output in form of HIGH or LOW instead of analog value. Based on the input received (HIGH stating Darkness / LOW stating Bright), a relay is powered which in turn powers an auxiliary LED lamp. This LED lamp acts as an alternate source of light and accelerated the growth cycle of the microgreens.
- Getting soil moisture: Thereafter Arduino uses soil moisture to detect amount of moisture available in soil. If it is less than 70% (as microgreens use lot of water), the relay is triggered which triggers the pump to send more water to the plants.
- Uploading to Bolt Cloud: Well after 5 minute interval, the bolt sends a serial message to Arduino to send data. As Arduino gets this message it sends this all the four values (temperature, humidity, ambient brightness, soil moisture) to the Bolt as CSV format (values in string separated by commas).
- Bolt Cloud: The javascript file on the bolt device converts the input string to separate values and makes four different graphs allowing to view the trends.
- Connect all the sensors to the Arduino Nano as per the schematics
- Later connect the relay module to the Arduino Nano as per the schematics
- Then connect the Bolt IoT Device to Arduino Nano as per the schematics.
- Run your 12v wires from the relay to the place where the devices (fan, LED light, and water pump) will be mounted in the enclosure. Hide the cables and use zipties for clean cable management.
- Upload the code to the Arduino Nano using Arduino IDE. After success uploading of the code, use the Serial Monitor to check if all the sensors and relays are working properly. (PS The Arduino IDE.ino file is in the attachments section).
- Open Bolt Cloud, Login and go to Products section and click on Add Product. Later give a product name, choose Input Devices and UART. After you are done click on Done.
- Next click on Configure This Product, and Choose CSV values as 4, and by default the upload rate is 5 minutes. Click on Save icon to save changes.
- Click on Code and enter the javascript code (also given in the attachments section. you're welcome! & don't forget to choose filetype as.js). Click on Save icon and click on close.
- Now go to Device's page and choose the device, click on Link product and choose the Indoor_farm product. Click on Deploy configuration and then click on view this device. Voila! you have you own indoor farm monitoring in real time on your smart phone.
This system is for my personal use and I wanted it to be simple and functional as it should not fail or breakdown often. Adding more sensors and variables would make it difficult to operate as well consume lot of power (not much compared to other device but you get the point...). Also I wanted to remote monitor it without my phone being connected to the same network or connecting it via Bluetooth. That is why I refrained from using MIT App Inventor to make a custom App because the Bolt IoT app offered a lot more and there was no point in "reinventing the wheel again". Also this had to be redundant system and would be used regularly, so a purely tried and tested method was only going to make a cut.
Hope you liked this project. Please watch the below video to get an overview of the build.
Comments
Please log in or sign up to comment.