Prototyping rapidly is key to developing a new concept and delivering it on time. In the Toylab we have been tinkering recently with a bunch of cool wireless and remote control ideas, but have consistently been held back by the difficulty of implementing them. Although there are many relatively simple wireless solutions available to hobbyists, we couldn’t find anything that quite fit our criteria:
- capable of transmitting arbitrary data
- bi-directional
- small
- cheap
- quick to setup
- easy to use
So, we set out to make some tools. A little research revealed that there were several single-chip radio transceivers available for very low prices, but most of them required special printed circuit board layouts and additional components to function properly. Luckily however, the talented folks over at Sparkfun have already tackled this issue. The company sells their own, and third party tools that make integrating these complicated miniature radio systems into a project all but trivial. We decided to use their line of breakout boards and modules based on the Nordic Nrf2401 transceiver as there are several configurations available varying in size and transmission range.

The only remaining piece to this puzzle was software. There are a few libraries out there for using this equipment with familiar controllers like the PIC and AVR, but none of them seemed to “just work” easily with Arduino – the popular AVR based open source platform that we use the most. Accordingly we have built a simple and straightforward interface that we hope everyone can make use of.
Want to build your own wireless prototypes? Check out our library on the Arduino Playground.




Gregor van Egdom
11/05/2009 at 2:30 am // PermalinkGreat work again. I’ve been toying around with a cheap unidirectional module but could only get it to work at 300bps (not K!)…
What are your experiences with these transceivers regarding range and noise? Will the chip check if the packets came through allright?
Jesse
11/05/2009 at 1:27 pm // PermalinkNoise in a typical indoor environment is very strong in the 2.4GHz range. The hardware offers a 16 bit CRC and 40 bit addressing which the library makes full use of, but even so you will (very) occasionally drop a packet. For applications demanding accurate data 100% of the time, you would want to implement a positive acknowledgment with retransmission scheme similar to TCP on top of this library. I believe newer versions of Nordic equipment like the nRF24L01 can do this automatically, but I have not experimented myself. Range depends on a lot of different factors – http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=48.
vB
19/05/2009 at 11:32 pm // PermalinkHi Jess, thanx a ton for this library, i intend to use it with nRF24L01 module. COuld you kindly tell me is it necessary to connect “CS” to pin 4, as i’ll be connecting DR to pin 2 (need to use RCV int) and I also need atleast one hardware interrupt for certain other features in my project. Can I define some other digital pin for “CS”? if yes are there any preferences or can it any other pin?
thank you for your time and effort
Jonathan Moore
22/05/2009 at 9:07 pm // Permalinkyou should check out xbee it is reasonably priced and you can even reprogram the arduino wirelessly with it. We have this set up on our big LED board at noisebridge. You can check it out at Maker Fair where we will have a table.
Gregor van Egdom
25/05/2009 at 3:31 pm // PermalinkThe Xbee’s are indeed a nice alternative. Both seem to be about the same price, and the xbee’s have a broader user group and support…
Is there any reason to use the nRF2401 over xbee’s?
Jesse
25/05/2009 at 4:34 pm // Permalink@vB: I would be very surprised if the library works with the nrf24L01 out of the box, it was not designed with this hardware in mind.
Xbee is an awesome alternative, and allows one to use the built in Serial library for a more familiar approach to communications. The biggest factor in choosing this hardware over Xbee was physical size – not only is the Xbee module considerably heavier and larger, but in order to use it with Arduino you need additional circuitry! Adafruit’s breakout is pretty small: http://www.adafruit.com/index.php?main_page=product_info&products_id=126
but when your project turns aerial – the weight savings could be just the ticket…
calmconviction
23/06/2009 at 10:07 pm // Permalink@vB, Jesse
This library will only work with nrf2401 and not the nrf24l01 or even the nrf2402.
pjwerneck
21/01/2010 at 8:31 pm // PermalinkI’ve been using the nrf2401 and your library for some time, but now I have to use it with the Arduino Mega but I’m not having much luck in getting it to work. I try the same code with absolutely no differences, but it looks like something must be changed. Any ideas?
nugroho
05/06/2011 at 4:12 am // Permalinknrf2401A
can I change the pin connection?
DR1 -> 2 to pin Digital 10
CE -> 3 to pin Digital 11
CS -> 4 to pin Digital 12
CLK -> 5 to pin Digital 13
DAT -> 6 to pin Analog 0
thanks,
best regards,
nugroho budi.
P.S.:
sorry for my bad english.
Mac Office 2011 Product Key
18/07/2012 at 11:38 am // PermalinkHi my friend! I wish to say that this post is amazing, nice written and come with approximately all important infos. I would like to see extra posts like this .http://www.getwindows7productkeys.net/