Hello all - I'm still learnign my way forward with this Arduino stuff but feeling more and more comfortable.
My daughter and I just finished building the wireless weather station (just temp and humidity from a DHT22) as laid out by HowToMechatronics. It seemed like the outdoor info wasn't transmitting so I began troubleshooting it.
I loaded up a Sketch to verify the DHT was working and it is. I then found my way to the Simple nRF24L01+ Tutorial which is not working for me. On the first test sketches I'm getting an error on the Tx side "Data Sent Message 0 Tx Failed". The Rx Side jut displays "Simple Rx Starting" in the Serial monitor and nothing else (I'm assuming because it's not receiving anything?).
I'm using two Nano clones and the connections (same for both) are as follows:
CE - D10
CSN - D9
SCK - D13
MOSI - D11
MISO - D12
IRQ - D6
The reason CE and CSN are swapped from the Simple nRF24L01+ Tutorial is only because that's where they connected for the weather station project. I made sure to swap them in the define section of the sketch. To be sure, I switched the plugs and uploaded the code without any changes at all and got the same error.
Can someone help me troubleshoot this somehow? I appreciate the wisdom housed on this forum. I'll keep trying to catch up to all of you!
Just start with the supplied simple Tx/Rx samples supplied and skip connecting and reading the sensor for now.
Does that work?
What type of Arduino board are you using? Edit: Nano, sorry you did say.
How are the radios powered? Supply circuit diagrams. Edit: The 3.3v from the nano may not be able to supply enough current for the radio modules. I think it’s 50mA max. You may need an external 3.3v supply.
Have you added decoupling capacitors at the radio end?
Exactly what type of radio modules are they? Just the normal PCB trace antenna ones, or high power external antenna versions?
Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.
The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work
There is also a connection test program to check that the Arduino can talk to the nRF24 it is connected to.
A common problem with nRF24 modules is insufficient 3.3v current from the Arduino 3.3v pin. The high-power nRF24s (with the external antenna) will definitely need an external power supply. At least for testing try powering the nRF24 with a pair of AA alkaline cells (3v) with the battery GND connected to the Arduino GND.
If you are using the high-power nRF24s (with the external antenna) make sure there is sufficient distance between the two nRF24 so that the signal does not overwhelm the receiver - try 3 metres separation. If you are new to nRF24s it may be better to start with a pair of low power modules with the pcb antenna.
Yes, that is exactly the tutorial resource I was working with but having no luck.
I was powering both Nanos via the USB connection on the computer but have since tried two 12v 1.5A power supplies and given them more than 3 meters of separation but the little weather station still isn't receiving the outdoor data. I had to put it back together just for now so my daughter can show it to her teacher for her last day of school tomorrow (she's very proud of it even though we need to troubleshoot the wireless). I'll take them apart again this weekend and try JUST the tutorial steps again.
MacboyCanada:
Yes, that is exactly the tutorial resource I was working with but having no luck.
I was powering both Nanos via the USB connection on the computer but have since tried two 12v 1.5A power supplies
It’s not the power supply to the Arduino that’s the problem.
It’s the pissant little 3.3v regulator that converts the incoming power supply down to the 3.3v output that you’ve presumably used to power the NRF24 module directly from the Arduino Nano board.
I think it can supply like 50mA tops on most Nanos.
You probably either need an external 3.3v regulator, or power the NRF24 from 3v supply from AA/AAA batteries. Anything which can supply more than 50mA.
Oh! Sorry - yes. I missed that bit above. I'll try the batteries direct to the nRF when next I troubleshoot. Thanks for highlighting the suggestion again.
Am I a bad dad for editing the sketch tonight to write the current temp and humidity for the outdoor unit manually? I'll upload the sketch an hour before her "class time" so I should be close within a degree or two if anyone fact checks it ; )
MacboyCanada:
Am I a bad dad for editing the sketch tonight to write the current temp and humidity for the outdoor unit manually? I'll upload the sketch an hour before her "class time" so I should be close within a degree or two if anyone fact checks it ; )
Maybe.
The worst problem is if someone tries the receiver with the transmitter turned off. You’ll have a hard time explaining how that works.
You just have the NRF24 module with 8 pins 2x4, and not also an adapter board? The adapter boards have 3.3v regulators on them - so they can be powered from 5v.