SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By jconradt
#35008
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
By brennen
#35009
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).
By lucicop
#35024
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.
By brennen
#35031
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. :)
By jconradt
#35038
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
By brennen
#35044
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).
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]