As an Embedded Software Engineer, I created my own library for the NRF24L01+ module to run on the STM32. However, I encountered an issue that wasn't worked for a week. So I decided to use Tmrh20's library on the Arduino to help with troubleshooting.
During my troubleshooting process, I noticed some unusual behavior that I couldn't find any information on the internet, so I wanted to share my solution with others. First, I'll outline the observations I made, and then provide the solution that worked for me.
Observation:
-Assuming that all connections were done correctly-
- Receiver only receives data from tranmitter when almost there is not enough power.
Condition:
-
I used the NRF24L01+ PA/LNA with a 5V adapter and an Arduino Uno for both the receiver and transmitter.
-
I used the least used band in 2.4GHz to have clear results (I scanned all 2.4GHz bands and found that the 10th band, which equals 2457 MHz, was clear, but there were pulses every 10 seconds that I didn't know the source of).
-
When 9V dead batteries used, It's Voltage drops to 6V when connected to Arduino. because it can't supply enough current. On NRF24 Adapter's input, 4.08 V is measured. On NRF24 module's input 2.78 V Measured. In this condition, receiver successfully receives data. RX Led barely blinks, my control Led for is data correct is barely lits.
-
If receiver connected to PC or Proper 9V Supply, receiver won't receive single data. If you supply receiver with almost dead battery (Supplies 7.3V to Arduino when connected), and when transmitter's antenna is covered by hand, sometimes it receives, sometimes not. If proper 5V was used for both the 5V trails on the Arduino and NRF24 with a shared common ground, the receiver wouldn't receive any data. If the voltage was dropped to 4.08V (using an adjustable step-down regulator), the receiver would start receiving data. If the voltage was dropped to 3.7V levels on 5V trail, nothing works (as expected).
-
In transmitter side, it doesn't matter you supply proper or dead battery, it transmits successfully. But if connected almost dead one, sometimes receives ACK. (In proper or dead batteries receives nothing.)
-
This is because, when I connected to proper supply, tranmitter side voltage drops from 3.3V to 2.78V in module's input. (And as I mentioned before, it works in low voltage level.)
-
Here comes to interesting part. If somehow receiver receives just one data while powered proper, it has to send ACK, so It's input voltage drops to 2.78V from 3.3V. If you Send data from transmitter fast enough, receiver almost act as tranmitter (to send ACK) and keep it's voltage to 2.78V. And transmittion going successfully. If transmitter misses transmitting data in almost half second, receiver quickly takes it voltage back to 3.3V level and stop receiving anymore. Till somehow it receives 1 data again, and so on. (To receiver receives, I touch everywhere, shorts some pins, sometimes use capacitor to mess with receiver)
I've spend days to gather data about my problem what can cause this. I was using modules with adapters, properly connected and coded. I've tried almost every condition that I forgot to mention here. Like soldering 100uF Capacitor across module's power input even with adapter etc.
And here comes the SOLUTION from nowhere:
I was trying to mess up with my receiver with "something that my hands close on", and when i connected 220 uF 16V capacitor to power line of module with adapter, it begins to receive data. I first thought that it is coincidence and tried again and again. It worked! so I soldered it and receiver no longer has communication problems (I was soldered 100uF before, but wasn't worked at all) then I soldered same capacitor to transmitter that some magic happenes and it starts receive ACK. So this was my solution, and here is some little guesses according my observations.
Even I have 6 of different NRF24 Modules with PA/LNA (3 pair from different shops) I think that they all counterfeit. Because for some registers in modules, I have errors when trying to read in my STM32 systems. And these counterfeit ones are not enough noise filtered. With spesific capacitor, I think that, somehow it manages to filter noise that is happened, and my communication works.
I really appreciate for your future feedbacks and thoughs why excatly this happened, and how to better guide others when faces same problem