nRF24L01 and transmission speed

All things pertaining to wireless and RF links

Moderator: phalanx

nRF24L01 and transmission speed

Postby jconradt » Tue Sep 11, 2007 4:36 pm

Hi spark-fun community!

According to the data sheet, nRF24L01 can transmit up to 2MBit/sec over air. That's impressive :-) I understand that some fraction of this will go to protocol overhead, error correction, etc; but all the SparkFun test boards (break-out boards) only list 250KBps transmission speed. How comes?

I am planing to use two times NXP2103+nRF24L01 to create a "wireless serial cable", and I was hoping to achive high baud rates of almost 2Mbps (one way transmission). Is this reasonable? Has anyone used such high transmission speeds with nRF24L01? What's the max throughput I can expect?

Thanks a lot!

Jorg
jconradt
 
Posts: 30
Joined: Sun Jul 01, 2007 9:06 am

Postby brennen » Tue Sep 11, 2007 5:05 pm

The 24L01's will do in-air transmissions at 2Mbps, but at the absolute best, the actual data throughput is around 1.75Mbps. This is running with no CRC, 3 address bytes, 32 byte packets, no acknowledgements, and assumes no retransmits. In real life, you need at least one byte of CRC, and often 2, because you will pick up a ton of noise packets without CRC. More address bytes will also help. You will also need some sort of acknowledgement/retransmit mechanism since simulating a real hardware serial port will require really reliable data transfer.

Sparkfun's site is wrong - the 24L01 won't even transmit or receive at 250 kbps (only 2 Mbps and 1 Mbps).
brennen
 
Posts: 678
Joined: Wed Nov 09, 2005 8:37 am

Postby lucicop » Wed Sep 12, 2007 3:17 am

I think you also need to take into account the interrupt latency of the processor sending the data (and receiving), so you will have much lower throughput in real life.
Lucian
lucicop
 
Posts: 36
Joined: Wed Feb 04, 2004 12:11 am
Location: Bucharest, Romania

Postby brennen » Wed Sep 12, 2007 5:35 am

lucicop wrote:I think you also need to take into account the interrupt latency of the processor sending the data (and receiving), so you will have much lower throughput in real life.

This is very true. I was basically just giving an upper bound on the wireless throughput, but overall data throughput will be determined to a large extent by the limitations of your LPC2103. With two 24L01's and very well-designed software, I see no reason that you couldn't get full-duplex 115 kbps throughput overall at the serial link.

Since you are using two 24L01's basically side by side, make sure your receive and transmit channels are spread very far apart so the have minimal interference on one another if you are attempting to do true full-duplex communication. You will also have to use two antennas per box unless you are a really spiffy RF engineer and can put both 24L01's onto one.

I would recommend starting out with just one 24L01 and trying to get things working with that setup. Once you get that going, build from there and add the second 24L01 because this will increase your complexity immensely. I have seen several people who are building wireless serial ports with the 24L01, but no one I've seen so far have gone with 2 24L01's for a true full-duplex solution. Hats off to you if you can get it working. You're welcome to do a short write-up that I'll post to my website if you want to release the design to the public. :)
brennen
 
Posts: 678
Joined: Wed Nov 09, 2005 8:37 am

Postby jconradt » Wed Sep 12, 2007 8:27 am

Hi there!

Thanks for all the replies!

Just to get things correct: I was not planning to use 2 nRF24L01 next to each other; but two separate boards, both having a single LPC2103 and a single nRF24L01 to work as two end of a "wireless cable". However, now that you mentioned this... Maybe I'll investigate :-)

It's not clear to me why the LPC2103 will cause such a large overhead. I am currently using the LPC2103's serial port at 2Mbaud (ok, ser-port has a 16 byte build-in fifo) to talk to a USB-serial converter (FTDI232R), and it seems just fine. The chip is not doing much else; the design I am imagining (a dedicated LPC2103 that "translates" a serial port to SPI) should be much faster than 125KBaud, shouldn't it?

In a different project am using bluetooth modules for wireless data transmission; I get around 250Kbps throughput. If you guys expect I won't be much faster, I'll probably stop the effort...

Thanks! J
jconradt
 
Posts: 30
Joined: Sun Jul 01, 2007 9:06 am

Postby brennen » Wed Sep 12, 2007 10:31 am

You could probably get higher than that, but I doubt you could really get too much higher than 1 Mbps on data throughput. And that's in very optimal conditions. Keeping in mind that you absolutely have to acknowledge data in some way to keep a robust link, your throughput will go down quite a bit.

The LPC2103 shouldn't cause too much overhead as long as you're not doing much (if any) processing to the data (just accepting data from/sending data to the UART). The biggest overhead IMHO is going to be the wireless protocol to ensure that you don't lose packets. It is paramount to getting high speed that you design the ways you send, receive, acknowledge, and retransmit well to get maximum throughput. You can do this in hardware on the 24L01, but doing it in software using your own method is also possible (and may even save you time depending on how you do it).
brennen
 
Posts: 678
Joined: Wed Nov 09, 2005 8:37 am


Return to Wireless/RF

Who is online

Users browsing this forum: No registered users and 2 guests