Вы находитесь на странице: 1из 9

This is a report outlining the fault found with the Nordic nRF24l01+

I (onlinebuyer2011) ordered a pair of Nordic nRF24l01+ 2.4 Ghz radio transceiver and found that they were not working as expected. As an electrical engineer I had all test and measurement equipment available to fault find what the problem is. After a bit of work I narrowed the problem down to one of the transmitters. This transmitter was not transmitting and so no data link could be established ( packet transmission was not working) between the radio transceiver pair.

Results of the analysis


This was the first piece of code I tried. The following is for the transmitter
// Nrf24L01 connected to Mega 2560 // Nrf24L01 connection details http://arduino-info.wikispaces.com/Nrf24L012.4GHz-HowTo // Transmit constant test value from transmitter to the receiver #include #include #include #include int rate; void setup(){ Serial.begin(9600); Mirf.cePin = 48; //ce pin on Mega 2560 Mirf.csnPin = 49; //csn pin on Mega 2560 Mirf.spi = &MirfHardwareSpi; Mirf.init(); Mirf.setRADDR((byte *)"clie1"); Mirf.payload = sizeof(rate); Mirf.config(); } void loop(){ rate = 22; <SPI.h> <Mirf.h> <nRF24L01.h> <MirfHardwareSpiDriver.h>

// transmit 22 to receiver to display in serial monitor.

Mirf.setTADDR((byte *)"serv1"); Mirf.send((byte *) &rate); while(Mirf.isSending()){ } }

For the receiver I used the following code. (from this Arduino we can read the value through the serial monitor)
// Nrf24L01 connection details http://arduino-info.wikispaces.com/Nrf24L012.4GHz-HowTo // Receives analog value from transmitter and display it on serial monitor

#include #include #include #include int rate;

<SPI.h> <Mirf.h> <nRF24L01.h> <MirfHardwareSpiDriver.h>

void setup(){ Serial.begin(9600); Mirf.cePin = 48; //ce pin on Mega 2560 Mirf.csnPin = 49; //csn pin on Mega 2560 Mirf.spi = &MirfHardwareSpi; Mirf.init(); Mirf.setRADDR((byte *)"serv1"); Mirf.payload = sizeof(rate); Mirf.config(); } void loop(){ while(!Mirf.dataReady()){ } Mirf.getData((byte *) &rate); Serial.println(rate); delay(1000); }

instead on finding the value of 22 on the monitor, I was met with the constant value on 0 on the serial monitor which means the transmitter was not transmitting any values.

Getting a constant stream of zeros because the transmitter is not transmitting the value which was programmed into it (22).

After double checking the connections and making sure the code was being written into the arduino I tested with another very standard piece of code this code is used to test the nRF24l01+. This is the getting started code found in the rf24 library.

/** * Example for Getting Started with nRF24L01+ radios. */ #include <SPI.h> #include "nRF24L01.h" #include "RF24.h" #include "printf.h"

// // Hardware configuration //
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10 RF24 radio(9,10); // // Topology //

// Radio pipe addresses for the 2 nodes to communicate. const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };

// Radio pipe addresses for the 2 nodes to communicate. const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL }; // // Role management // // Set up role. This sketch uses the same software for all the nodes // in this system. Doing so greatly simplifies testing. // // The various roles supported by this sketch typedef enum { role_ping_out = 1, role_pong_back } role_e;

// The debug-friendly names of those roles const char* role_friendly_name[] = { "invalid", "Ping out", "Pong back"};
// The role of the current running sketch role_e role = role_pong_back; void setup(void) { // // Print preamble // Serial.begin(57600); printf_begin(); printf("\n\rRF24/examples/GettingStarted/\n\r"); printf("ROLE: %s\n\r",role_friendly_name[role]); printf("*** PRESS 'T' to begin transmitting to the other node\n\r"); // // Setup and configure rf radio // radio.begin(); // optionally, increase the delay between retries & # of retries radio.setRetries(15,15); // optionally, reduce the payload size. seems to // improve reliability //radio.setPayloadSize(8); // // Open pipes to other nodes for communication // // This simple sketch opens two pipes for these two nodes to communicate // back and forth. // Open 'our' pipe for writing // Open the 'other' pipe for reading, in position #1 (we can have up to 5 pipes open for reading)

// This simple sketch opens two pipes for these two nodes to communicate // back and forth. // Open 'our' pipe for writing // Open the 'other' pipe for reading, in position #1 (we can have up to 5 pipes open for reading) //if ( role == role_ping_out ) { //radio.openWritingPipe(pipes[0]); radio.openReadingPipe(1,pipes[1]); } //else { //radio.openWritingPipe(pipes[1]); //radio.openReadingPipe(1,pipes[0]); }

// // Start listening //
radio.startListening(); // // Dump the configuration of the rf unit for debugging // radio.printDetails(); } void loop(void) { // // Ping out role. Repeatedly send the current time // if (role == role_ping_out) { // First, stop listening so we can talk. radio.stopListening(); // Take the time, and send it. This will block until complete unsigned long time = millis(); printf("Now sending %lu...",time); bool ok = radio.write( &time, sizeof(unsigned long) ); if (ok) printf("ok..."); else printf("failed.\n\r"); // Now, continue listening radio.startListening();

// Wait here until we get a response, or timeout (250ms)

Please note that this not the en tire piece of code I just put this little snippet to show this is what I used. This code is freely available online for you to test. This is where the first indication of the problem occurred. This program initializes the hardware an so it is possible to see if there is a problem with the hardware .

The results
Test setup This is a confirmation of the voltage that is being supplier to the radio transceivers. It is created by a very stable lab power supply. Both the transceivers are being powered a tthe same voltage.

This is a setup used for the arduino and the transceivers.

These are the 2 arduinos.

Dictated 3.2 volt rail for the transceivers. Power Distribution board for transceivers with smoothing caps to smooth out voltage variance. Connected to computer for monitoring the output on serial monitor . Shown in the picture are the nrf24l01+ modules that I purchased. The radio transceiver in the top of the picture is faulty.

This is a picture of a properly initialized transceiver. As we can see all the address locations have been initialized properly. And the transceiver is placed into proper working operation.

As we can see in this picture when the second Transceiver is initialized, we get the default values which are all 0. This is occurring because the Nordic chip is faulty and cannot be brought into the correct mode of operation.

As we can see, because the initialization failed (due to the faulty Nordic chip) , data packets are being sent but are not able to be received again. This is because the other transceiver is not working properly.

To ensure that chip itself is faulty and not the arduinos, we must test whether or not information is being sent to the Nordic nRF24l01+. This can be done by checking data wave forms on the spi bus.

When we probe the spi lines ( the sck and the miso lines. We can clearly see that the microcontroller is actively sending out signals to the nRF24l01+ board. This rules out the possibility that the spi bus on the microcontroller is faulty. Hence, we can conclude that The fault lies in the nRF24l01+ chip.

Conclusion
As I have clearly shown in this report the nRF24l01+ module that was sent to me was faulty. Through the
process of elimination we see that the Nordic nRF24l01+ chip in the center of the transceiver is faulty. This could occur through many reasons but most likely reason being the batch of chip produced was not monitored for quality of operation before dispatching. I would like to ask you to have a look at all the evidence yourself and do one of two things, 1) Send me another 2 radio transceivers (from a different batch) 2) Refund my money.

or

Thankyou
Onlinebuyer2011.

Вам также может понравиться