Soil Moisture Sensor
Blip firmware reads the analog data of moisture sensor and writes to a ble service characteristic periodically every minute. A node.js script is running on a raspberry pi which connects to blip and subscribes to moisture service notification. When it gets the moisture data, it appends that to the time series graph on Web UI and write to MongoDB database as well.
Hardware components Used
- Analog Soil Moisture Sensor
- Raspberry Pi 3 B+
- Zephyr OS
Software and visualization
- Node.js, Express.js
- socket.io, mongoose
To make use of this project, you should have a Blip board and a generic soil moisture sensor, connections should be as follows:
|Blip||Soil Moisture sensor|
V0 is amplified analog output of conductivity between electrodes which changes with the moisture level.
Compiling and Flashing the Firmware
Firmware is developed using the Zephyr SDK, Please install zephyr from here and then execute following commands.
cd firmware mkdir build && cd build cmake -GNinja -DBOARD=nrf52840_blip .. # Compile ninja # Flash ninja flash
Running Node.js script and visualization
Node.js scripts extract the soil moisture data from ble packets and visualize the feeds on web browser. Please install Node.js and run these commands.
cd scripts sudo node index.js
Here is the video of project in action.
Firmware, node.js script and visualization code is available here.