Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrf.send( ) sending successfully but return failed or time out #19

Closed
akeelwall opened this issue Oct 14, 2020 · 8 comments
Closed

nrf.send( ) sending successfully but return failed or time out #19

akeelwall opened this issue Oct 14, 2020 · 8 comments
Labels
question Further information is requested

Comments

@akeelwall
Copy link

akeelwall commented Oct 14, 2020

Awesome library, I am using it with RPi 4 and RPi zero and all fine. however, when i was testing with the master mode ( sending ) in simple test script I always get send() failed or timed out dispite the fact that the sending is successful. Any Idea why this is happening?
many thanks
Adam

@2bndy5
Copy link
Member

2bndy5 commented Oct 15, 2020

Usually this symptom means that the slave() node is not able to send ACK responses back to the master() node. Usually this is because of a power problem; make sure that you have a parallel capacitor of 100 microfarads between (& as close as possible to) the nRF24L01's VCC and GND pins.

what type of nRF24L01 modules are you using (store link please)?

I ask because recent testing for the nRF24L01+PA+LNA modules don't work as master() nodes (nor send ACK responses as slave() nodes). The nRF24L01+PA+LNA also require electromagnetic shielding (which is not added by manufacturers). See my test results as noted in the docs. Note that the RPi (any version) doesn't supply enough current on the 3V pin to allow using the nRF24L01+PA+LNA.

@akeelwall
Copy link
Author

Thanks for getting back on this.
I got the module from amazon, here is a link to the product page https://www.amazon.co.uk/gp/product/B06WD17WLS/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
I will add capacitor and shield the module and see how it goes.
Many thanks

@2bndy5
Copy link
Member

2bndy5 commented Oct 15, 2020

@adamedan thanks for the store link. Those modules will most definitely require a separate power source. The RPi's 5V and 3V pins do not provide enough current for TX operations with that specific module (I spent a lot of time trying to make those work before releasing v1.2.0 of this library). You need to wire up a 3V regulator with a current limit of more than 500 mA to a separate power source. It is IMPORTANT that you remember to tie the RPis GND pin with the 3V regulators GND pin.

If you feel that wiring a 3V regulator is beyond your skill level, you can use a specially designed breakout board for the nRF24L01+PA+LNA modules. Those breakout boards use a AMS1117 3V regulator. I recently purchased a pack from amazon, but they haven't come in yet (I'm not a prime member and I opted for the cheapest shipping 😄 ). Be careful to not purchase a breakout board designed for the ESP8266-01 modules as it doesn't look like they have a 3V regulator soldiered in (and the pinout concerning VCC & GND pins is incompatible with the nRF24L01 anyway).

Shielding is also required even with a 3V regulator.

You're the first person to raise this common issue on this library. Would you find it more helpful if I added a note to the repo's README? I just want this info to be known before other people raise the same issue.

@2bndy5 2bndy5 pinned this issue Oct 15, 2020
@2bndy5
Copy link
Member

2bndy5 commented Oct 15, 2020

@adamedan Did you run master() on the RPi4 or the RPi0? I find it a little surprising that the payloads from the master() node were transmitted at all. Maybe the RPi4 has more current on the 3V pin than my RPi2's 3V pins?!

@akeelwall akeelwall reopened this Oct 18, 2020
@akeelwall
Copy link
Author

Hi @2bndy5
sorry for the late reply, I was waiting for the adapters as suggested. So ok I added the adapters to both master and salve and all working fine without shielding. I am planning to make RPi communicate with Arduino, finger-cross it works on Arduino as I used radio head library and I couldn't get it to compile with my UNO WIFI so will use TMRh20 and see what happens.

Many thanks

@2bndy5
Copy link
Member

2bndy5 commented Oct 18, 2020

so will use TMRh20 and see what happens

Yes! I often recommend TMRh20's library as an alternative to this CircuitPython library. I've also recently started helping that library. HINT: I've written an example script that demonstrates how to use this library with the TMRh20 library, but the v1.2.3 updates to that example have more explanations (about different library behaviors) in the comments.

So ok I added the adapters to both master and salve and all working fine without shielding

I still highly recommend to add shielding (it would only improve performance). I used electrical tape with foil wrapped around the electrical tape. Be sure that the foil does not touch any current carrying parts (like the GPIO pins and the soldier joints for the antenna and the antenna connector).
image
image

@akeelwall
Copy link
Author

akeelwall commented Oct 18, 2020

Hi @2bndy5. amazing many thanks very clear shielding instruction.
what I was saying in my last comment is that I will use TMRh20 only on Arduino, on RPi I will continue using this python library as all my code on RPi is python also I like what you did, Awesome work many thanks.

@2bndy5
Copy link
Member

2bndy5 commented Dec 9, 2020

@adamedan can I close this? Did you have any further questions? I have pinned this issue so it can still attract attention (even if it is closed).

@2bndy5 2bndy5 added the question Further information is requested label Dec 9, 2020
@2bndy5 2bndy5 closed this as completed Jan 1, 2021
@nRF24 nRF24 locked and limited conversation to collaborators Oct 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants