-
1Gather Components
You should find all the major components in the "Components" tab of this project. Additionally, all of the models in the OnShape document linked on the project homepage should be printed, and the custom PCB provided in the project documents should be manufactured.
Additionally, you will need to have some 12V source available. This may be something like a solar setup, or a simple 12V line from an AC adapter. In order to drive the pump this will need to be able to source at least a few amps.
Things such as wire, bolts, screws, and nuts are assumed.
-
2Solder Electronics
Electronic components must be soldered to the custom PCB. Additionally, a four pin connector to go between the ESP32 board and the micro:bit must be created. This can be seen as the ribbon cable in the project images, and includes a VCC, GND, RX, and TX line.
You will also need to attach a long wire to the soil moisture sensor. Length of this cable will depend on your application.
-
3Wind/Rainfall Sensors
If wind or rain sensors are being used in the projecet, these should be mounted in a raised location, where the wires can still reach the micro:bit board.
-
4Water System
Some form of water reservoir must be connected to the system. Your pump needs to be able to pump water out of a tank, and into irrigation lines when powered, and stop water flow when not powered.
-
5ESP32/micro:bit Configuration
In order to provide an interface, the ESP32 must be connected to the desired network, and the micro:bit must transmit data.
micro:bit code can be found on the left side of the project homepage, along with the GitHub and OnShape links. This code just needs to be uploaded to the micro:bit via USB. If you want to add/remove data from the interface, you may need to adjust the serial output in this code.
ESP32 code can be found in the project GitHub. Before uploading this to the microcontroller, the wireless network details need to be modified, and the SPIFFS memoruy needs to be flashed. In order to use this project, PlatformIO is required. This is available as an extension for many major text editors, or as a commandline tool. The PlatformIO extension for VSCode is a really good way to utilise the platform.
To change the network details, edit the "ssid" and "password" constants on lines 32 and 33 of main.cpp, in PlatformIO/src/.
SPIFFS memory can be flashed via platformio commandline. Navigate to the root directory of the PlatformIO project provided, and run the following command:
pio run --target uploadfs
This will upload all web files in the data directory to the SPIFFS memory, allowing the microcontroller to access them as a file system.
These instructions can also be found here, with more detail.
-
6Check Functionality
The ESP32 should print its IP address to the serial monitor. Navigating to this address in a web browser on the same network as the ESP should show an interface. If the micro:bit is connected, the interface should refresh approximately every second with new sensor data.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.