This is an old revision of the document!
Home Environmental Sensor Array
Progress
Summary Status
After experiencing a minor flood in the basement when the water softener turned on and the sump pump was not installed, I realized that my water softener runs without electricity. So, I changed the design of the HESA to turn on power to a submersible pump when it detects water rather then turn off power to the water softener. I also added graphing capability to the web page and made the code more reliable.
Click here to read the latest updates on my blog.
Final Solution
Features
Auto-startup on power up.
Auto-recovery on program failure
Check for water in the basement. If found:
Turn on power to submersible pump
Send email to mail address. If internet is down, wait until it is up to send message.
Update local status page and internet database
Send all clear email when water clears
Read temperature and humidity in basement
Store hourly readings to SQL tables on internet
Web-based status page with graphs
All components mounted in enclosure that is mounted on wall and connected to 120v power
External Features
Schematic
Code
Bill of Material
Components
Consumables
Wires to connect Raspberry Pi ports to devices
100k resistor for LED in enclosure
Flat edge connectors for electrical wires
Eyelet connectors for electrical wires
Wires to carry 120 volts of electricity
Solder
Phase 1
Description
Create a device that will sense when water is spilling in to the basement. The device will shut off power to the water softener and notify people that there is a problem.
Tasks
Order Raspberry Pi and its components – Done
Order Powerswitch tail – Done
-
Create email group on my website to redirect email to multiple accounts – Done.
View the blog entry.
-
Assemble Powerswitch tail – Done. View the blog entries
here,
here, and
here.
Write Python module to control Powerswitch tail – Done
Write Python program to incorporate all features for phase 1 – Done
Design a sensor to detect water – Done. Decided to go with bare wires.
Design portable test system – Done
Obtain materials for portable test system – Done
Ensure that the basic design works 100% – Done
Design enclosure – Done
Obtain materials for enclosure – Done
Build enclosure – Done
Mount device in basement and test – Done
Install FTP on raspberry pi – Done
Install website files to the raspberry pi – Done
Follow-up tasks
Make a backup of the SD card – Done
Publish on Instructables – Done
Install Avahi to be able to access the pi by its host name rather than IP address – Done
-
Replace ethernet faceplate with one with one or two openings rather than four – Done
Make HESA python program start as a service rather than in the rc.local script – Not started
Install MySQL administration tool – Done
Populate MySQL tables – Done
Test development web server – Not started
Phase 2
Description
Make the device more user-friendly and interactive. Replace the Pi with a Beaglebone Black to make it able to connect to more things. It should record daily data and statuses in a web-based database. It should check the internet connection regularly. If there are any non-standard conditions, alert the humans with email (if possible), lights, and sound until the problem conditions are gone.
Features
Record resistance readings multiple times a day in a web-based database
Record system statuses in a web-based database
Check internet connectivity
Display status on LCD screen
Turn on light if internet connection is lost
Turn on siren if flood condition recognized
Repeat messaging every 24 hours
External Features
Components
Beaglebone Black
Green LED for normal operating conditions
Yellow LED for internet lost
Red LED for hazardous condition
16×2 display
Siren
Manual power switch for siren
Reset button
External Links
Tasks
Obtain Beaglebone Black – Done
Obtain 4gb or larger mini-SD card – Done
Update O/S on BBB – Done
Figure out how to power up BBB without USB cable – Done. It needs a power supply that can provide 5v, 1A (or more), 2.1mm, CENTER POSITIVE.
Obtain power supply for BBB – Done. An old Linksys PPP device had an appropriate PSU.
Install Debian image on eMMC – Done
Make support / case for BBB – Done
Get HESA python program working on BBB – Not started
Make HESA start automatically when BBB boots up – Not started
Create MySQL tables to store status updates – Done
Make HESA program update status in MySQL table – Done
Make web page on rynok.org to display HESA status –
Done
Find working 16×2 LCD display – Done
Get LCD display working with BBB – Not started
Add LCD code to HESA python program – Not started
Install LCD screen in HESA enclosure front panel – Not started
Design circuit that includes reset button – Not started
Obtain components for reset button circuit – Not started
Install reset button circuit in HESA enclosure – Not started
Phase 3
Description
Add a battery backup feature so the system can send alerts and shutdown gracefully in case of a catastrophe. Detect other environmental problems, record regular readings and send alerts.
Features
Battery backup
Detect power outage and send email alert
Add a button to shutdown the Pi, then shutoff power
Add a button to reboot the Pi
Low temperature detector
Monitor carbon monoxide levels
Monitor radon levels
Components