I have a weird problem with my NRF24 modules. I want to build custom control for my drone where I will have something like "ground station": joystick will be connected to PC where Node.js script will handle inputs and pass it to the Arduino transmitter. Then the TX side will transmit and wait for acknowledge payload from the drone receiver for flight data.
On one side I have Arduino Uno with NRF24L01+ (with ext. antenna) as the main transmitter and on the other side, I have Arduino pro micro with small NRF24 module as a receiver. Basically what I'm doing is that I'm sending data from TX to RX and from the RX side I'm sending back payload as a acknowledge data.
An NRF module on Uno (TX) is powered from Arduino connected directly with PC and for Pro Micro (RX) and NRF module on it I'm using standard 9V battery. Both NRF modules are using an adapter with a voltage stabilizer.
And everything worked like a charm, until last night when I started to get a lot of mysterious issues. First, it started with periodic printing ack payload (on TX side I always print ACK from RX as connection status, and "TX Failed" if ACK is not received), where on almost perfect intervals I got 1 ACK package and then 9 "Tx Failed" errors (rate of sending a signal is 10 times per second).
After little checking cables, pins, resetting both Arduinos, plugging in the RX side with USB instead of standalone power, I managed to get connection back between modules, and rates of the signal was 10/10 (10 commands sent, 10 ack payloads received).
Then, I wanted to play around with different radio settings. Radio instance on arduinos is created with 250Kbps bandwidth, default PA, without setting channels. And I wanted to play a little with bandwith and PA level. I set on both arduinos rate of 1Mbps and PA level to HIGH/MAX and then my nightmare started. I couldn't create a connection between NRF modules. I reverted code changes and the same happened. Bandwidth was returned to 250Kbps, default PA level, removed setChannel method call...I just couldn't make it to work like it worked before. There is only one scenario when I can get ack payload on TX side, and that is in the moment when I power on my RX side with battery. And after that, I get only "Tx Failed" errors...
I'm not sure where I'm wrong, but how can something that worked and after a little playing around with code and reverting everything back, the same code, the same setup, no longer work?