One of the coolest things announced at this year’s Google I/O was the Android Open Accessory Kit, which allows Android devices to interact with accessories over USB. As an attendee, I received the Arduino-based ADK DemoKit board, which I’ve used to build an app to monitor my Aerogarden.
[youtube style=”text-align:center” width=”472″ height=”290″]3GPnpmZnUjE[/youtube]
The garden monitor project was built with the following components:
- Arduino-based Open Accessory Kit
- LM34DZ temperature sensor
- HS1101 humidity sensor
- 0.5″ force sensing resistor
- Analog servo
The force sensing resistor is mounted below the Aerogarden’s water tank to measure the weight of the water, and the servo is used to open and close the tank door.
The Arduino firmware reads the values from the temperature, humidity, and force sensors and sends them to the attached Android device over USB using the Open Accessory protocol. It also accepts commands over USB from the Android app to open and close the door.
The Android app reads the sensor data from the Arduino and broadcasts them over the wifi network using xPL so they can be monitored by MisterHouse, which can alert me via email and text-to-speech when the water level is low. When the water level is below 20%, the app signals the Arduino to open the door as a visual indicator that the tank needs to be refilled. After the tank is filled, the app automatically closes the door again. The app also snaps a photo every hour, which I’ve used to create the time lapse video below.
The source code for the Arduino sketch and the Android app are available on github.
This video was created by combining the hourly snapshots taken by the Nexus One using ffmpeg and then edited in iMovie ’09.