Usually I like to write up on my blog the things that go well. Today, I’ll write about a mistake–one that meant my latest iTeadStudio PCB order was totally wasted. Sad for me, but hopefully you can learn from it!
Category Archives: RF Radio
Here’s my latest obsession: A clock-driven intervalometer with an LCD interface for both still and video cameras (with remote control!) I call it the ‘Multicam’ board. Its mission is to run all of my camera control software on a single board, plus provide a nice interface to control it.
This has been the most complicated hardware project for me so far, involving two separate PCB’s (one for the system, one for the interface) and fitting into a case.
I’ve just now got the first PCB’s back from iTeadStudio, and brought up the first unit. Now I can start testing it in the real world. Results of those tests and more details on the software will be topics for future posts. For now, the hardware…
RF24Network is a network layer for Nordic nRF24L01+ radios running on Arduino-compatible hardware. It’s goal is to have an alternative to Xbee radios for communication between Arduino units. It provides a host address space and message routing for up to 6,000 nodes. The layer forms the background of a capable and scalable Wireless Sensor Network system. At the same time, it makes communication between even two nodes very simple.
Today, I managed to get 17 nodes running on a single network. Now I need to build some more nodes, because the system worked great with 17, and could likely handle thousands of nodes.
Sparkfun sells a nifty little gadget to control your project remotely using nRF24L01+ radios. It’s a small key fob with 5 buttons, which transmits codes when you press each button. Today we’re going to explore how to receive those signals using the RF24 library. This is all thanks to Kirk Mower who sent me these units for Christmas. Thanks, Kirk! 🙂
Last weekend, I got a Maple Native board from Leaf Labs. This is a somewhat-Arduino-compatible board running a STM Cortex-M3 processor with 512k flash and 1M of external RAM. I figure it will ease the wait for the Arduino Due.
Nordic’s nRF24L01+ 2.4GHz RF radios are a great way to communicate wirelessly between Arduino’s. They’re cheap, and powerful. Unfortunately, they can be a little daunting to beginners to get started. Today, I want to make it easy for total beginners to get up and running on nRF24L01+ radios quickly and easily.
Stuff we need
First, we have to go shopping. A great place to start is the iTeadStudio store. Here’s what you need. Obviously, you’ll want to buy two of the radios and protoboards because what good is a radio that can only talk to itself?
- 2.4G Wireless nRF24L01+ Module $4.00
- 2.54mm 2x4Pin Female Header (5Pcs) $1.50
- 2.54mm 40Pin Male Header (5 Psc) $1.50
- Double Side ProtoBoard 5cm * 7cm $0.99
- Solder cable – 7cm (10pcs) $0.50 (Or get some wire at Home Depot and cut it yourself)
Reasonable substitutes for this stuff can also be found at Sparkfun if you like spending a lot more money. Also the radios are at MDfly.com.
My goal today is to create a sensor node which can be used in a wireless sensor network, to capture environmental information and send it back to the base. My main goals are for the nodes to: Be cheap, and last for a year.
How cheap and how low-power can we go? In the end, I got down under $12 for a very capable Arduino-compatible node with a 2.4GHz radio running ~2.6V that should last a year and a half on 2 AA’s, or 5 months on a coin cell.
I’m looking for something powerful enough to take advantage of the Zigduino hardware, while at the same time open source and supported by an active community. Is that Contiki? Early signs are promising. I have put up a specialized avr-zigduino platform for Contiki, which contains tested and proven code and a Zigduino-specific walk-through to use it.
This week, I got my hands on a pair of Zigduino units. This is Pierce Nichols’ creation of a Arduino on steroids plus a Zigbee-compatible RF radio, all in one unit. From a hardware perspective, this replaces an Arduino, Xbee Shield and Xbee all at once. On top of that, there are a few more advantages: It’s compatable with further shields, unlike normal Xbee shields which don’t allow you to stack. And best of all, it uses the Atmega128RFA1 chip instead of the Atmega328p found on the Uno. This MCU brings 128KB of flash and 16KB of RAM to the party, plus a bunch of other great features for the power user (onboard AES, among others).
The biggest thing it lacks is a ready software stack. Xbee is easy for even the most non-technical user to bring up, which explains its popularity in the Internet community. So this what I’ve been working on, at least the beginnings of it. The most straightforward way to use Zigduino today is to get Atmel’s IEEE 802.15.4 MAC stack implementation of the IEEE 802.15.4 MAC standard. This is an extensible multi-layer stack that makes available the full power of this SoC. The source is available, it’s well-documented, and it comes with exhaustive examples.
What’s the problem? First, the licensing. While the source is available, it includes no redistribution rights, so it’s not something you can hack on and go share your changes. Second, the build system. For someone comfortable with GCC and Gnu Make, all is well. For folks who take comfort in the simplicity of the Arduino IDE, it’s a problem.
ZMAC is my solution to this problem, available at github.com/maniacbug/ZMAC. First, you download the Atmel MAC distribution yourself, sign up with Atmel, agree to the license, etc. Then you get ZMAC, and run the fileprep script. This will copy and modify the files as needed to organize them so the Arduino library can pick them up. It will even translate some of the examples into a form that will load and compile and run using the Arduino IDE.