Growhome
Some kind of plants requires to have a special conditions of growing. For example: Lemon tree requires to get a lot of sunlight, temperature of air should be around 17-30 degrees of celsius (62 - 86F). A coffee tree requires the similar conditions. It's impossible to control it itself. This is why I made this project. The Growhome project can help you to control conditions of growing, like humidity, air temperature, ground temperature. The waterproof DS18B20 can help you to control the ground temperature, DHT22 will show you air humidity and air temperature. The DHT22 sensor has a large diapason of information, this is why I chose it.
In this instructable, I'll help you to assemble your own Growhome.
Supplies
- Raspberry Pi Pico x1;
- 4k7 resistor x7;
- EC11 Rotary Encoder x1;
- DS20B18 x1;
- DHT22 x1;
- TFT LCD ST7735 display 1.8 inch x1;
- 100nf capacitors x2;
Install and Configure Arduino IDE *Optional
If you have never used Arduino IDE, you will need to download and install it. We'll need to download and install Arduino IDE to upload the code into a microcontroller.
ATTENSION!!! Do not download 2.x versions, at the moment of 10/6/2023 there are still a lot of bugs. It better to download a 1.8.19 version.
Download it here - https://www.arduino.cc/en/software
- After Installing, navigate to File > Preferences
- Find Additional Boards Manager URLs, and paste this link into a text field - https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
- Then, navigate to Tools > Board: > Boards Manager
- Type the "Raspberry Pi Pico" in a search field, find and Install.
Install Arduino-Pico-Littlefs-Plugin
The primary purpose of the arduino-pico-littlefs-plugin is to let you upload the files into the RPI's flash memory. In this tutorial, the purpose of this tool is to format the RPI's flash.
Download the file called PicoLittleFS-0.2.0.zip from https://github.com/earlephilhower/arduino-pico-littlefs-plugin/releases/tag/0.2.0
And then extract the content of the archive into the "...\Arduino\Tools\" folder.
After that, restart the Arduino IDE.
Install Libraries
Install libraries is necessary to work with the microcontrollers, encoders, displays, thermometers, other components, and get the information from there.
- Navigate to Sketch > Include library > Manage Libraries
- Type every single library one by one and download:
- Adafruit_ST7735
- SPI
- EncButton
- Adafruit_GFX
- microDS18B20
- DHT
Download Firmware
The Firmware folder is the main folder of the project because it contains the code, that we'll upload into a microcontroller.
GitHub Growhome Repository: https://github.com/NickProgrammerOffical/Growhome
- Download the .zip on my GitHub.
- Extract the Growhome folder, then open Firmware.ino file with Arduino IDE.
Assemble Growhome
Assembling is the most interesting part. I'd recommend you to begin assembling with TFT screen.
Upload the Firmware
The last step of assembling is upload code into microcontroller.
- Navigate to Tools > Board: > Raspberry Pi RP2040 Boards > Raspberry Pi Pico;
- Hold BOOT button on Raspberry Pi Pico board and plug it to the computer;
(The step is necessary to be able to see the boot port)
- Navigate to Tools > Port > UF2 Board;
- Click upload button in the left top corner;
Tutorial
When you plug, you will see the Growhome logo and plant on the TFT screen.
- Turn or press encoder to skip the preview screen;
- Turn encoder left to get the forward screen;
- Turn encoder right to get the back screen;
- Press encoder to change screen to "show all data", a screen with all information, but in integer format.
- Press encoder to get back (sometimes it doesn't work because data updates in time of pressing)
Screen changes when temperature changes.