Table of Contents
- Assemble the Parts
- Configure the Radio
- Prepare the Cymbal Monkey
- Wire up the Circuit
- Use it!
Need your alerts noticed? How about a crash of cymbals followed by the insistent screeching of an agitated ape? That will certainly catch attention faster than a little blinking light. Make an incomparable wireless alarm by triggering a comical cymbal chimp with an XBee radio!
By pairing an XBee with your percussive primate, you create an unmistakable alarm that gets immediate attention. It's a first-rate way to present alerts that cannot be ignored. Web server down? Customer service queue climbing beyond your comfort? Kids ignoring their chores? This easy hack will put a monkey on their back, and he won't let go until the warning is heeded!
2) Assemble the Parts
To make an XBee-enabled wireless monkey, you will need:
3) Configure the Radio
If you're not familiar with configuring radios using AT commands, review the steps in the Basic XBee 802.15.4 Chat tutorial, which walks you through configuring CoolTerm to program the radios.
- Insert the XBee into the Explorer USB and connect it to your computer.
- Launch CoolTerm and connect to the XBee.
- Here are the commands we're going to use to configure the radio:
||N/A (resets the radio to its factory settings)
||3001 (any address from 0 to FFFE will do)
|Pin 0 I/O configuration
||4 (digital output, LOW on startup)
|I/O input address
||FFFF (address of any transmitting radio)
|Write to memory
||N/A (save the settings to flash memory)
- Here's what your terminal session might look like. The user input is in bold:
Note: Remember to issue the ATWR command when you're done so that the settings are saved in the radio's flash memory. If you don't issue this command, the radio will revert to its old settings when it loses power.
4) Wire up the Circuit
- Place the XBee adapter into the breadboard and wire up the power buses to each other. Next, connect the VCC terminal of the XBee adapter to the positive rail and the ground terminal to the negative rail.
- We made it easier to attach the battery holder to the breadboard by soldering some male headers onto its positive and negative wiring leads.
- Connect the battery pack directly to the ground and power rails.
- Insert the relay into the breadboard, making sure that it's oriented so that each pin goes into a different row. This reed relay goes crosswise to the trough but other brands might go lengthwise. There will be two coil pins and two switch pins. One wire can attach a coil pin to ground. The other wire should connect the other coil wire to the XBee's AD0, physical pin 20 in the upper right of the radio. For this type of relay, the polarity through the coil doesn't matter.
- Here's the second wire from the coil attached to the XBee's physical pin 20 (AD0).
- Insert the wires from the cymbal monkey into the breadboard. Connect one wire to one of the relay's switch pins.
- ...and connect the other wire to the remaining relay switch pin.
- And finally, insert the XBee into the breakout board and load the batteries into the battery pack. If there's a switch on the battery pack be sure to switch it to the on position. The Cymbal Monkey is now ready for wireless action!
- Above is a breadboard layout and a diagram of the circuit for your reference. Here's how it works electrically:
- When pin AD0 on the XBee goes high, it triggers the coil on the relay to close the reed switch.
- The reed switch then brings two contacts together that connect the cymbal monkey's wires to each other, completing the circuit that sends battery power to its mechanism.
- You could use this type of circuit to apply power to almost any simple battery-operated device, creating a wireless method for turning it on and off.
Note: We've kept this example as simple as possible. The same effect could also be accomplished with a more sophisticated circuit, using a transistor or MOSFET to regulate the flow of power. Also, different kinds of devices will require different connections, but many will be similarly easy to connect to an XBee in this way. Don't be afraid to try something new!
5) Use it!
Now that you know how to trigger a cacophony with an XBee radio, take a look at our input tutorials for activation ideas. Just be sure that the the transmitter's address is set as the receiver's I/O input address setting (ATIA). The video above was made with a pushbutton switch acting as a direct remote control. You can also hook up to the XBee Internet Gateway to fire off monkey madness from anyplace on the Internet.
For an escalating alert why not start with a scent, and then move to a light? After that if your stock is still going down, or your freezer temperature is still going up, then let loose with a primate performance that is certain to seize attention!