Refer the schematic.
A simple ATMega328P interfaced with a nRF24L01 chip and a MOSFET used as a MCU controlled power switch to deliver 3.3V to the RF24 module.
I made totally 5 such ( double sided ) PCBs and sadly out of that, only one is working reliably. Another one works whenever it is in the mood for it. And balance 3 never work and when i say never work it means this :
- Program download : Possible
- LCD interface : Working
Its only the RF24 that simply refuses to work and not only that, at times it freezes the loop.
All usual and obvious diagnostics like swapping MCUs, RF 24 modules, Crystal , 22pF capacitor , tracing the tracks for any shorts, checking voltages right at the Vcc point of MCU and RF24 et all. done but to no avail to trace the issue.
So what i wanted to know is this :
Look at the schematic. The 3.3V to the RF24 module is switched by the MCU based on need. So when initial power up there will exist a situation where the RF24 SPI bus line is active but the Vcc to the module is not present.
And when the MCU powers up and completes setup() the RF24 module is powered up.
Is the above a reason for my issue ? The natural question then is how is the same code working on one of the PCBs ? For sure i have no answer to this …
Anyone can think of any other basic flaw in the circuit as shown ??