Go Down

Topic: NRF2401L High Power Issues (Read 274 times) previous topic - next topic

jstamp

Good morning,

I'm looking for some advice on where to go with troubleshooting.  I have a simple 1 way communication set up with NRF Radios (purchased here:

https://www.amazon.com/gp/product/B072BLN8SZ/ref=oh_aui_search_detailpage?ie=UTF8&psc=1)

I am using the breakout voltage adapter and feeding it 5v (the advice I read was that it was more stable to feed it 5v and let the regulator bring it down rather than trying to give it 3.3 out of the arduino).  The amazon page says the regulator breakout will use up to 12v.

When  I swap out the standard NRF radio for a high power version (https://www.amazon.com/MakerFocus-nRF24L01P-Transmission-Interface-Anti-Interference/dp/B07BNDKFXP/ref=cm_cr_arp_d_product_top?ie=UTF8) the program hangs.  It makes it through until "trying to send" in my debugging and then just stops.  If I disconnect the high power NRF radio it seems to take off again (of course it doesn't send a message, but at least it lets it by the loop).  I am NOT getting a "Message Failed" debugging print when the high powered NRF radio is connected.

Any ideas?  I've tried two different High Power NRF chips (admittedly the two they sent me in one package) to try and rule out a bad chip.  If I plug in the low power one it works fine.  I'm stumped as to where to go next.  I'm including the code for reference (although since it works with one chip but not the other I'm pretty sure the issue isn't in the code). 

Thanks for your advice.

Code: [Select]
#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>

#include <SPI.h>

RF24 radio(7,8); // Activate Radio
byte addresses[][6] = {"1Node","2Node"};
   int count = 0;
void setup() {
   Serial.begin(9600);
   Serial.println("Starting Setup");
      radio.begin();
        radio.setPALevel(RF24_PA_MAX);
   radio.openWritingPipe(addresses[1]);
    radio.openReadingPipe(1,addresses[0]);
    Serial.println("Done with Setup");
 
 
       

}

void loop() {
   Serial.println("Stopping Listening");
    radio.stopListening();
    Serial.println("Trying to Send");
    if(!radio.write(&count, sizeof(count))){
    Serial.println("Message sent");
    Serial.println(count);
    }
    else
    {
      Serial.println("Message Failed");
    }
   
    count = count + 1;
    delay(1000);

}

Robin2

If the HighPower device is very close to the other nRF24 it can overwhelm it. Try moving it away, perhaps 5 metres.

...R
Simple nRF24L01+ Tutorial
Two or three hours spent thinking and reading documentation solves most programming problems.

jstamp

i didn't know that they could overwhelm each other that way. But- this will happen even if the other device isn't powered on. And I'm having the problem at the transmitter side, not the receiver side.

jstamp

Ps- Robin2- I spent a lot of time reading your tutorial when I was figuring out the low powered radios. Thanks for all of that detail (it's actually still open in another tab to reference your pin diagrams because one of the radios I bought doesn't have the pins labeled)

jstamp

And I'll update- I separated the two units in opposite corners of my house (30ish feet) and no communication. Swapped in the low power nrf module and it took right off.

Robin2

And I'll update- I separated the two units in opposite corners of my house (30ish feet) and no communication. Swapped in the low power nrf module and it took right off.
An obvious possibility is that the high-power device is faulty. The only way to be sure is to try a different one.

Have you tried the connection test program in my Tutorial?

Make some simple pencil drawings showing how you have everything connected and post photos of the drawings. See this  Simple Image Guide

Post the code that YOU have uploaded to the Arduinos. It will be easier to help with the code from my tutorial that I am familiar with.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

jstamp

I have posted my code above. Note that it works perfectly fine with the low power device (in fact, I can swap the low power device in and my receiver starts displaying numbers counting up).  If I plug in the high power device then the transmitter hangs.

I'm on my phone right now so I can't do a pencil drawing (will do tonight when I get home). I'm using a regulator chip that has an 8 pin connector for the nrf module so I'm reasonably confident in the wiring (since it works with the low power unit and it's hard to screw up a single plug).

Because it works when I have the low power unit plugged in but not the high power unit (and I've swapped back and forth several times, so I'm pretty confident in my connections) I'm feeling good about both code and wiring. Unless there's something in the code or wiring that I'd have to do differently with the high power units. They appear to be advertised as direct replacements so that doesn't make sense.
Any idea what the significance is that the program is hanging up instead of throwing the "failed to send" error in response to my if(!radio.write) test?  When I unplug the power to the high power unit, I get the failed to send error at my serial monitor. When I plug it in, the program just hangs up after setup (specifically, I get "stopping listening" on my monitor once, but no further messages.  I put all those serial.println calls in to let me see exactly where I was hanging up. ).
I've tried both of the two high power units that were sent to me. Admittedly it could be a bad batch or damage in shipping. Maybe I'll try ordering a different one.
Still stumped.

Robin2

#7
Dec 14, 2018, 11:27 pm Last Edit: Dec 14, 2018, 11:28 pm by Robin2
I have posted my code above.
I know. But I am not familiar with that code and I have no plans to become familiar with it when I am already familiar with the code in my Tutorial.

By the way I am inclined to your view that the problem is not in the code - but one can never be certain :)

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

jstamp

Unfortunately at this point I'm probably not going to be able to test your code until Monday. And I might very well use the free Amazon prime shipping to get myself a different unit in the meantime. (I've got the code pared down to the bare bones and I'm wondering if I just got bad shipment, or possibly some damage in shipping).

I'll let you know how it turns out after Monday.

jstamp

Just wanted to post an update. I bought another batch of high powered NRF radios. Plugged them in, everything worked as expected. Apparently I either received a bad batch or they were somehow damaged during shipping. Problem solved!

Robin2

Thanks for the update. Good to hear you have a solution.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up