User Tools

Site Tools


Home Environmental Sensor Array


Summary Status

Making progress on phase 2. Installed a DHT-22 in the HESA to read temperature and humidity in the basement. Temperature and pressure readings are being added to the database.

Click here to read the latest updates on my blog.

Phase 1


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.


  • Check for water in the basement. If found:
  • Shut off power to water softener
  • Send email to mail address
  • Auto-startup on power up
  • All components mounted in enclosure that is mounted on wall and connected to 120v power

External Features

  • Email address that forwards mail to several email addresses as well as texting



  • 120v to 5v USB power converter and USB cable for Raspberry Pi
  • Duplex power outlet
  • Power plug for input with power cord for PC
  • Power switch
  • Powerswitch tail to control power
  • Water sensor cable
  • Connector plugs (2)
  • Ethernet cable
  • Enclosure


  • 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

Python Code


  1. Order Raspberry Pi and its components – Done
  2. Order Powerswitch tail – Done
  3. Setup Raspberry Pi with basic configuration – Done. View the blog entry.
  4. Create email group on my website to redirect email to multiple accounts – Done. View the blog entry.
  5. Write Python module to send email – Done. View the blog entry.
  6. Assemble Powerswitch tail – Done. View the blog entries here, here, and here.
  7. Write Python module to control Powerswitch tail – Done
  8. Write Python program to incorporate all features for phase 1 – Done
  9. Design a sensor to detect water – Done. Decided to go with bare wires.
  10. Design portable test system – Done
  11. Obtain materials for portable test system – Done
  12. Ensure that the basic design works 100% – Done
  13. Design enclosure – Done
  14. Obtain materials for enclosure – Done
  15. Build enclosure – Done
  16. Mount device in basement and test – Done
  17. Install FTP on raspberry pi – Done
  18. Install website files to the raspberry pi – Done

Follow-up tasks

  1. Make a backup of the SD card – Done
  2. Publish on Instructables – Done
  3. Install Avahi to be able to access the pi by its host name rather than IP address – Done
  4. Print a raspberry pi base on the 3D printer – Done
  5. Replace ethernet faceplate with one with one or two openings rather than four – Done
  6. Make HESA python program start as a service rather than in the rc.local script – Not started
  7. Install MySQL administration tool – Done
  8. Populate MySQL tables – Done
  9. Test development web server – Not started

Phase 2


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.


  • 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

  • Web site that displays reading results in tabular and graphical form


  • 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


  1. Obtain Beaglebone Black – Done
  2. Obtain 4gb or larger mini-SD card – Done
  3. Update O/S on BBB – Done
  4. 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.
  5. Obtain power supply for BBB – Done. An old Linksys PPP device had an appropriate PSU.
  6. Install Debian image on eMMC – Done
  7. Make support / case for BBB – Done
  8. Get HESA python program working on BBB – Not started
  9. Make HESA start automatically when BBB boots up – Not started
  10. Create MySQL tables to store status updates – Done
  11. Make HESA program update status in MySQL table – Done
  12. Make web page on to display HESA status Done
  13. Find working 16×2 LCD display – Done
  14. Get LCD display working with BBB – Not started
  15. Add LCD code to HESA python program – Not started
  16. Install LCD screen in HESA enclosure front panel – Not started
  17. Design circuit that includes reset button – Not started
  18. Obtain components for reset button circuit – Not started
  19. Install reset button circuit in HESA enclosure – Not started

Phase 3


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.


  • 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


  • Battery power supply
  • Device that detects primary power outage
  • Temperature sensor
  • Carbon monoxide sensor
  • Radon sensor

Members: Ken Becker

projects/home_environmental_sensor_array.txt · Last modified: 2014/09/05 19:16 by kennethsbecker