Moisture Sensor Project with GrovePi and Hologram Nova
This project uses the Grove Moisture Sensor that can be used to detect the moisture of the soil or there exists water around the sensor.
The sensor can just simply be inserted into the a plant’s soil and measure the moisture in the soil. Based on the data, it is possible to determine if the soil is humid or dry and it can send a notification ‘Feed me some water’ to the owner of the plant.
This project shows how to use a cellular modem purpose built for IoT development from Hologram to send alerts/notifications.
Things used in this project:
Things used in this project:
Hardware components:
Software Apps:
- GrovePi
- Python
- Hologram CLI
Grove Moisture Sensor measures soil moisture based on soil resistivity. It has the following specifications to determine if the soil is dry of humid based on the sensor output value.
Output Value
|
Sensor in dry soil
Sensor in humid soil
Sensor in water
|
0
300
700
|
-
|
300
700
950
|
-
|
GrovePi Zero is a HAT from Dexter Industries that allows Grove Gas Sensor (MQ2) to connect to Raspberry Pi zero with out needing soldering or breadboards. One can plug in the Grove water sensor start programming.
Grove sensor sensor works with analog I/O pins and it can be connected to A0 port Grove Pi Zero as shown below.
The installation instructions for Grove Pi zero and Hologram SIM are provided here .
The following program (moisture_sensor.py) checks the moisture sensor output sends notifications using Hologram.
First a cellular connection is established using the credentials that uses a devicekey obtained from Hologram dashboard.
Grove sensor sensor works with analog I/O pins and it can be connected to A0 port Grove Pi Zero as shown below.
The installation instructions for Grove Pi zero and Hologram SIM are provided here .
First a cellular connection is established using the credentials that uses a devicekey obtained from Hologram dashboard.
import time
import grovepi
from Hologram.HologramCloud import HologramCloud
# Provide Hologram device key
credentials = {'devicekey': 'XXXXXX'}
hologram = HologramCloud(credentials, network='cellular')
# Connect the Grove Moisture Sensor to analog port A0
# SIG,NC,VCC,GND
sensor = 0
while True:
try:
if ( grovepi.analogRead(sensor) < 18):
response_code = hologram.sendMessage("Feed me some water")
time.sleep(20)
time.sleep(1)
except KeyboardInterrupt:
break
except IOError:
print ("Error")
Configure routes in Hologram dash board to send the notifications (e.g., SMS, email etc).
With widespread availability, reasonable prices, and a satisfaction guarantee, Ace Handyman offers customers a high level of confidence and consistency on a variety of handyman services. handyman in Manchester
ReplyDeleteThis blog is really helpful to deliver updated affairs over internet which is really appraisable. handyman services ottawa
ReplyDeleteEnjoyed reading the above article, in fact everything is explained here, the article is very interesting and effective. Thanks, and good luck for the upcoming articles. inventory management software
ReplyDeleteLabel printers are devices or machines designed to print labels, which are adhesive-backed pieces of paper or other materials used for various purposes, including product labeling, shipping, barcoding, and organization. label printers near me
ReplyDelete