Tweetpot uses Twitter to notify followers when the kettle boils. It does this using a humidity sensor, and doesn’t require any modification to the kettle.
How it Works
A wireless humidity sensor mounted above the kettle periodically transmits humidity readings, which are sent to a computer running the tweetpot application, which sends a tweet automatically when it detects high-humidity.
Twitter is a great tool for these types of projects. Followers can subscribe or unsubscribe at any time, and mobile notifications can be enabled to send free SMS messages for near real-time updates. This is similar to Amazon’s SNS service, but much simpler and more user-friendly.
The humidity sensor is an HIH4031 sensor wired to an XBee radio. A second XBee is attached to a computer. A Java program receives the output of the sensor using the xbee-api, converts it to a relative humidity value using hih4030-java, then sends a tweet using twitter4j.
Visit http://github.com/angryelectron.com/tweetpot for the latest code.
How to Build
Assembling your own tweetpot involves some hardware and software, but isn’t too complicated and makes a great starter-project for building home sensor networks. Some experience working with XBee radios will help.
The following hardware is available from sources like Adafruit, Sparkfun, Digikey, and/or Mouser:
- 2 XBee radios. Sparkfun has a good buyers guide to help you choose a suitable module.
- 1 XBee to Serial adapter, like the XBee Adapter with an FTDI 3.3V cable, or an XBee Explorer.
- 1 XBee breakout board or a second XBee to Serial Adapter
- 1 HIH-4031-003 humidity sensor or break-out-board
- An Internet-connected computer running Java on a platform supported by RXTX.
- XCTU software (windows) or a serial terminal like minicom (linux).
- tweetpot (see Downloads above)
Build the Sensor
How you power your XBee will depend on the break-out board you are using (USB, FTDI, etc.). I recommend an AC-to-DC 3.3V adapter attached to Pin1 (VCC) and Pin 10(GND).
To simplify: assuming your break-out board is supplying 3.3V:
- tie XBee Pin 14 and HIH4031 Pin 3 to XBee Pin 1
- tie HIH4031 Pin 1 to XBee Pin 10
- tie HIH4031 Pin 2 to XBee Pin 20
Program the XBees
If you don’t know how to program XBees, there is a good explanation here. Both the Receiver and Sensor XBees must have the same network ID (ATID=xx) and use API Mode (ATAP=2).
The Receiver XBee can use any baud rate, but the default (both in firmware and software) is ATBD=3 (9600).
The Sensor XBee must be configured to use D0 as an Analog Input (ATD0=2), and to transmit an IO Sample periodically (ATIR=1388 to sample every 5 seconds). A faster sample rate provides more accuracy but consumes more power, which may be a consideration if your sensor is battery-powered.
Mount the sensor above or beside the kettle. It doesn’t need to be too close. The underside of a cupboard is a good spot. As the kettle boils, the humidity increases. Tweetpot tweets once as soon as the humidity rises above 80%. The humidity must fall below 60% before it will tweet again. This prevents a slew of tweets being sent as you replace the kettle after filling the teapot.
Sometimes there is a delay in the Twitter network, but you should see a tweet from your Twitter account within moments of the kettle boiling. To receive a text message each time the kettle boils, enable mobile notifications.