Here is a python script I have been using to test the analog pin functions on the Xbee with the TMP36 temperature sensor. (all from the Adafruit shop). This code is from the Tweet-a-Watt page with temperature reading at the very end
In case you’ve not heard, there is a Green Revolution in progress. To quote a popular commercial, “The way we use energy now can’t be the way we use it in the future. It’s not conservation, or wind, or solar. It’s all of it.” I have long kept a solar-energy project in the back of my mind, so I ordered a 12v/2A solar panel power supply from a vendor. As a first step project, I figured I would power up my Arduino, use my shiny new XBee modules, and relay some sort of meaningful data back from this wireless solar-powered microprocessor.
Have you ever wanted to monitor how much voltage/current your small PV solar panels are producing? It is easy enough with a multi-meter, but what if you just want to monitor it remotely and log the data on your computer. This high level overview shows a xbee setup remotely logging a PV panels volts/amps to a mac laptop. It makes use of only 10 ohm resistor and 2 ADC ports. No additional microcontrollers were necessary for this example. The PV solar panel is made by Voltaic Systems and costs only $30 (it peaks at 10.2V @ .133A)
from adafruit.com/xbee this is one half of a two-way radio data link. photo: oly e3, 50mm f2.0 macro lens, raw capture mode and 2 passes of ‘neatimage’ for noise reduction (gives it that almost-synthetic clean look). subject was shot inside a DIY lightbox with a sheet of black plastic (ABS) as the base.
Last month, I built NewsAlarm - a modified smoke alarm wired into the NYTimes NewsWire API. It can be configured to sound in response to any keyword or keywords coming over the wire at a specific frequency; for example, you might set it to alarm when 50% of the headlines coming in contain the words ’space aliens’ or if 10% of the headlines include the word ‘evil robots’. It’s a pretty ridiculous device, meant to embody the equally ridiculous alarmism (pun intended) that permeates mainstream media.
The orginal NewsAlarm was hard-wired to the computer via an Arduino. It worked quite well, but it’s not very convenient – it can only get as far away from the computer as the wires allow, which is only about 5 feet. I wanted the device to be able to be a long way away from the computer processing the NewsWire data, and I also wanted one computer to be able to trigger multiple NewsAlarms. So, I looked into ways that I could connect the devices and the computers wirelessly.
The solution turned out to be the XBee – a cute little device that allows signals to be sent via 802.15.4 wireless. XBees are small, cheap, and can be combined to create simple mesh networks. Perfect! For the wireless NewsAlarm, 2 Xbees act as a transmitter and a receiver. A very simple serial signal is transferred from one XBee to the other when the alarm is triggered. Our system uses two arduinos right now, though it could be re-configured to use one and an FTDI cable.
In this video we show you how we control two different types of relays, wirelessly, using Xbees (m4v & iTunes). If you’re on the wireless fence and want to jump over to the Xbee side, we have adapter kits, modules and more…
Parts used (all from digikey, but available elsewhere as well): Standard relay, latching relay, 1N4001 (standard), PN2222 (or any NPN transistor), hex inverter 74HC04 (any inverter or buffer will do, suggest HC family)
Parts used from adafruit: 2 XBee series 1, 2 XBee adapters.
To configure, see “Configuring radios to pass Digital I/O”
The receiver schematic is here but note that its pretty ‘basic’ in that you’ll probably want to tweak it for your design anyways.
The transmitter is just an XBee adapter with two buttons on DIO1 and DIO2 to ground (it has internal pullups by default)
Overview video on using 2 Xbee modules, Adafruit adapter kits and FTDI cable to transmit MIDI wirelessly. If you have a modern musical instrument, theres a good chance it has a MIDI port. MIDI is an ancient serial protocol that runs at 31.25Kbs, often they come in pairs an Input and Output. Setting up MIDI gear usually requires lots of cabling, tying inputs to outputs across a studio or stage. In this XBee tutorial we’ll show how to configure the XBee to talk at the MIDI baud rate, and then how to create a bi-directional wireless MIDI link… (m4v).
Using mightyohm’s tutorial to hack the ASUS router for use with the Tweet-a-watt – you don’t need a computer to report your power usage, just a hacked up Wi-Fi router (m4v).
Related:
The Tweet-a-Watt kit is a DIY wireless power monitoring system. The project uses an ‘off the shelf’ power monitor called the Kill-a-Watt and adds wireless reporting. Each plug transmits the power usage at that outlet to a central computer receiver. The receiver can then log, graph and report the data. This pack contains nearly everything* necessary to build a single outlet monitor and receiver. To monitor additional outlets, you will need an add-on transmitter pack. One outlet can monitor up to 1500 Watts.