nRF24LE1 + MCU

Discussion about wireless devices

nRF24LE1 + MCU

Postby fintor » Thu Mar 01, 2012 7:28 pm

Hello,

I hava a project in which I want to use the nRF24LE1 to communicate with another device of the same sort.
The nRF24LE1 is to be connected to another MCU which will be the SPI master.

Now, for development purposes of the nRF24LE1, can't I use this product:
http://store.diyembedded.com/index.php?main_page=product_info&cPath=1&products_id=12

Then to upload a program to the device, I suppose I need to make the MAX3232 Circuit shown in the product site. But, since I only have a USB port on my computer, can't I use this product:
http://store.diyembedded.com/index.php?main_page=product_info&cPath=5&products_id=21

Then connect it to the MAX3232 circuit and it to the nRF24LE1 board? If so, which pins of the USB to serial board are connected to pins 13 and 8 of the MAX3232 circuit?

Also, if I I have two such devices programmed with the example given, how do I know that data is being sent and received?

with regards and hope that my questions can be understood,
fintor
fintor
 
Posts: 21
Joined: Thu Mar 01, 2012 9:08 am

Re: nRF24LE1 + MCU

Postby brennen » Thu Mar 01, 2012 7:55 pm

You can definitely use the nRF24LE1 breakout for your project. And you can also use the FT232R to program it. I have just been too lazy to add a connection diagram to the LE1 product pages on how to connect them to the FT232R (it's on my to-do list, of course ;) ).

Connect the boards like this (pin numbering assumes starting with pin 1 at the bottom left of the breakout board and then going in the counter-clockwise direction, like most DIP ICs do):

FT232R.RTS (pin 12) -> nRF24LE1_24.RESET (pin 10)
FT232R.TXD (pin 10) -> nRF24LE1_24.RXD (P0.6, pin 6)
FT232R.RXD (pin 14) -> nRF24LE1_24.TXD (P0.5, pin 5)

I would recommend putting a ~1k ohm resistor in series between FT232R.TXD and nRF24LE1_24.RXD . This ensures that the FT232R.TXD pin doesn't get damaged if the nRF24LE1_24.RXD pin direction gets set to an output.

You can also power the LE1 from the FT232R board by connecting FT232R.VUSB (pin 5) to nRF24LE1_24.VIN (pin 1).

With the example code, you would open a serial terminal on your PC at 38400 baud, 8-N-1 (this can be done in the programmer app on the nRF24LE1 product page). Then type characters in the serial terminal window, and if the same character appears as the one you type, then the data is being sent. If you see a question mark, then the devices are not communicating. It's the same code as in tutorial 1 that is discussed on my site.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: nRF24LE1 + MCU

Postby fintor » Fri Mar 02, 2012 7:14 am

Thank you kind sir for your reply :)

I will order a couple of those later then.

But will it be any trouble communicating with another MCU(ARM Cortex M3 in my case) as a SPI slave? Will I have to change the On-Chip bootloader or anything.

With regards,
fintor
fintor
 
Posts: 21
Joined: Thu Mar 01, 2012 9:08 am

Re: nRF24LE1 + MCU

Postby brennen » Fri Mar 02, 2012 2:05 pm

The one issue I see is the nRF24LE1_24.TXD and nRF24LE1_24.SCSN are on the same pin, P0.5. When you connect the three lines together (nRF24LE1_24.SCSN, EXTERNAL_MICROCONTROLLER.MCSN, FT232R.RXD), you will want to directly connect nRF24LE1_24.SCSN and FT232R.RXD together (i.e., short them with a wire). However, you will want to put a ~1k ohm resistor in series between nRF24LE1_24.SCSN and EXTERNAL_MICROCONTROLLER.MCSN. This is because, when you reset the device and enter the bootloader, P0.5 will be configured as TXD, which is an output. This will not play nice with EXTERNAL_MICROCONTROLLER.MCSN, which is also an output, hence the resistor between these two lines. Since FT232R.RXD is always an input, no resistor is needed for this pin. The connection would look like this:

Code: Select all
FT232R.RXD <-----+---------------------> nRF24LE1_24.P0.5
                 |
                 |
                 +-------/\/\/\--------> EXTERNAL_MICROCONTROLLER.MCSN
                         1k ohm
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: nRF24LE1 + MCU

Postby fintor » Thu Mar 08, 2012 1:09 pm

Thanks for the answer,

I am looking forward for receiving my breakoutboards :).

However, out of curiosity. What program are you using to create your schematics.

with regards,
fintor
fintor
 
Posts: 21
Joined: Thu Mar 01, 2012 9:08 am

Re: nRF24LE1 + MCU

Postby brennen » Thu Mar 08, 2012 1:17 pm

I use Cadsoft's Eagle to do schematic and layout.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: nRF24LE1 + MCU

Postby fintor » Wed Mar 14, 2012 10:37 am

Hi Brenner,

Thanks for all the help. I was wondering. Is it really necessary to use the converter, is it not possible to connect the D-(UART_TX right?) and D+(UART_RX right?) ports of the usb to ports P0.5 and P0.6 on the nRF24LE1 and convert the V+(5V right?) to 3.3V. Isn't that essentially what the FT232RQ chip does in this context?

I am just wondering this for when I make my own circuit, to minimize it in cost/size :)

with regards,
fintor
fintor
 
Posts: 21
Joined: Thu Mar 01, 2012 9:08 am

Re: nRF24LE1 + MCU

Postby brennen » Wed Mar 14, 2012 1:19 pm

D- and D+ for USB are very different pins than TX and RX for a UART. The data coming across those lines are very different for the two protocols, as well as the voltages and frequencies. The FT232R handles all of the USB communication, and translates that into a UART that can communicate to your chip. A MAX3232, on the other hand, only converts voltage levels from a serial port on your computer (which is also just a UART) to voltage levels that the nRF24LE1 can tolerate. The MAX3232 doesn't have a USB front-end like the FT232R, so it can't be connected to a USB port like the FT232R can. So, unfortunately, you do need some kind of converter for serial with the nRF24LE1, whether it's the FT232R (allows you to connect the nRF24LE1 to a USB port) or a MAX3232 (allows you to connect the nRF24LE1 to a serial port).

You do also have the option of using the nRF24LU1+. It can be connected directly to a USB port and doesn't need any kind of interface hardware. The only problem is that you have to handle all of the USB communication, including setting up the chip (in firmware) as a serial port, as well as providing (at the very least) a .inf file (Windows) or a udev rule file (Linux) to allow you to communicate to the device from the PC. You may also have to write a device driver for the PC to communicate with the nRF24LU1 over USB, as well, depending on the operating system and what the USB configuration is in the chip.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: nRF24LE1 + MCU

Postby fintor » Thu Mar 15, 2012 9:18 am

Okey... Thanks for the clarification.

Can you then upload the bootloader to the nRF24LE1 via usb?
fintor
 
Posts: 21
Joined: Thu Mar 01, 2012 9:08 am

Re: nRF24LE1 + MCU

Postby brennen » Thu Mar 15, 2012 12:06 pm

The bootloader is already present on our nRF24LE1 breakouts when they ship (we program the bootloader with our own custom programmer). However, if you are developing boards from scratch that use un-programmed nRF24LE1 chips, you will have to develop your own SPI programmer, as the nRF24LE1 has a blank program memory when it ships from Nordic Semiconductor. The nRF24LU1+, however, ships from Nordic with a USB bootloader already installed in program memory, so you can program it over USB as soon as you receive the IC from the factory.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Next

Return to Wireless

Who is online

Users browsing this forum: No registered users and 2 guests

cron