You may have heard about “Internet Of Things”, platforms mixing hardware and software projects to publish and share data accross the web. The idea is to have some hardware collecting data, and publishing it on a website. One successful example, open source & free, is ThingSpeak, used here in this post.
So, Jaluino Bee is cheap (~$10 if you build your kit yourself) and that was one main goal while designing it. A reason is the cheaper it is, the more you can put Bees as things in the internet. This is the idea here: collecting electrical consumption from a power device and publish it on ThingSpeak.
Flashing LED (between the two blue buttons)
How does it work ? My electrical counter device had a LED flashing every 1W/h. A photo transistor is used to detect and count these flashes, using interrupts. RTCC peripheral collects timestamps and an alarm triggers another interrupt type every minute. Data is sent over serial, through a bluetooth module.
Photo transistor mounter on power device (ok, quick & dirty)
Photo transistor with small plastic cylinder to focus light from LED.
Bluetooth module plugged on Bee
Application shield, from a Crumboard shieldÂ (prototyping area on which you can solder components)
The whole solution: Bee + Bluetooth + Shield, powered by USB
On a server, a python script is receiving data through serial, format it and publish it to ThingSpeak using its API. Python script also initializes RTC date & time on Bee’s side.
Results: on this video, white LED is triggered by flashing LED on electrical counter device. Blue lights are coming from bluetooth module, meaning it’s alive.
Data published to ThingSpeak can be viewed thanks to a very nice web API:
One data point every minute
Does it work ? More or less. The main problem here is the bluetooth link. Server often lost connection, definitely loosing data collecting, mainly due to the distance. Even if few meters away, signal doesn’t seem to be strong enough. A true Xbee module should be tested in order to check performances. As improvement, in order to fully exploit Bee’s capabilities, SD-card should be used to store data in case server isn’t available, then publish them when back. On the previous graph, there seems to be two bad data point showing an extreme consumption, probably not realistic. This probably means flash detection needs some kind of debounce logic (interrupts can be triggered multiple time for one flash…). Finally, features should be added to firmware in order to better configure Bee’s behavior.
More later, for sure…