-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Sending data from multiple #764
Comments
You could be suffering from ambient interference (use scanner.ino to find the interference to avoid). You could also have a look at how the multiceiverDemo.ino example uses the |
Thanks Brendan. I set I set retry delay to ID so i can put more transmitters. is it better to increase delay between transmitter? like in the example For the moment i have not used differents pipes for each transmitter as it did not work well with the same retries set. Will this improve data reception? Thanks again. |
Sounds like you should read the docs about the
Think of pipes as parking spots. You don't get any speed benefit from choosing a different pipe. Any reception affect from changing pipes would only be directly related to the address set for that pipe.
This radio can only listen up to 6 devices at once. |
Hi Brendan, thank you for your reply. I've try to configure the radio without success (testing on 4 sensors). This is whats i've done:
As result, i'm still missing some samples depending on the writing frecuency and sensing time, for example sensing data from 4 sensors at 60Hz works pefectly for the first 2 minutes and then start missing data (transmission began to be coupled?), same with sending data at 100Hz, works only for 30 seconds an then started missing data. This only work when setting data rate to 2mbps and failed at 1mbps and 250kbps, i would appreciate if you could tell me why as my sending/receiving data rate is far below (i think). It would be ideal to use 250kbps as i need the maximum range possible. On the other hand, i´ve been thinking in adding an external flash memory to the nano board so i can send the data after sensing it which lead me to become interested in the new Raspberry Pi Pico that has 2MB flash (enough for sensing 20 to 30 minutes in this case). I've found a driver for the module and recently Arduino IDE include the board to their list. I've also read you are adjusting the library to work with RPi Pico, which i would like to use. As I could use Flash memory instead of real-time sending I would also like to include RF24Network library which will enables to enlarge my sensor network and range. So, is this library available to use with RPi Pico on Arduino IDE? I would be grateful to read your comments (sorry if i use the wrong words to explain myself, hope you understand) |
Have you looked into my suggestion about avoiding ambient interference (using The fact that 1Mbps and 250kbps fail is strange as hell. Usually 250kbps would fail if your radio module is not a plus variant (
Yes. They added the RPi Pico to MBED OS support and then extended/ported that MBED support to the ArduinoCore-mbed repo (it has to be installed via board manager in the IDE). I personally don't actually own a board that the ArduinoCore-mbed supports, so I can't testify as to weather or not the RF24 libs work for those boards yet. I have a couple Adafruit variants that employ the rp2040 chip (all Adafruit boards using the rp2040 have a 8MB flash storage), but to test the RF24 libs for those boards under the Arduino IDE, I'd have to use a 3rd party Arduino core (though it wouldn't be official because Adafruit hasn't released their own Arduino IDE support for their rp2040 based boards). The driver you hyperlinked to is for MicroPython, and it is only meant as a proof of concept (not a deployable library). Personal experience tells me, "you can't beat the speed of C++" (which directly affects transmission performance). The python wrapper we provide is actually an exception to my observation because it is a C extension module.
I like your idea to workaround the data degradation using a cache on flash memory. It would pollute the RF spectrum less for scenarios like using the RF24Network lib. Flash storage usually uses a form of SPI called QSPI (which is faster than normal SPI because it uses multiple data lines), but QSPI may occupy an SPI bus just for the flash storage; this really depends on the board manufacturer. |
Forgot to mention that the rp2xxx branch on this RF24 repo is mostly stable, but we're still working out the CMake integration (for Linux and the PicoSDK). I say "mostly" because the manualAcknowledgement.cpp example spits out a false-positive result for the RX role on the rp2040 based board. Although, this experience may be specific to my radio modules and/or wiring/setup. RF24Network and RF24Mesh also require a patch to integrate those libs into the PicoSDK build system (for CMake compatibility). |
Thanks again for your reply!
I've change channel once but i'll try with more options
i'm using E01-ML01DP5 module from ebyte which should work at 250kbps perhaps i´m programming RPi (master) on python
QSPI is optional? If so it will not work on arduino nano as i intended😢 unless i use softSPI on RF24 but this might be too slow for my porpose i guess. I had in mind using W25Q128FV 128Mb flash module with this library.
Nice! found Adafruit Feather RP2040, looks promising for my porpose. Once again, I would be grateful to read your comments. I'll keep you informed any progress. |
@rbp9802 Thank you for the fine details!
Coincidentally, someone else recently asked me about using similar PA/LNA module from ebyte with my CircuitPython lib. I posted some preliminary research on that discussion's thread. Important: Note that the power requirements for those ebyte modules tend to be higher than the usual open source PA/LNA modules' requirements (likely because they use a different PA/LNA muxing chip). From the "User Manual" provided by ebyte:
It would seem that QSPI commands are optional using that particular flash storage module (I skimmed the datasheet provided by the site you linked). From what I've heard, flash storage modules are not drop-in compatible with each other. This is (one reason) why Lady Ada went with an 8MB flash storage chip on all her/Adafruit RP2040 based boards (she usually only uses 2MB) - I also suspect that buying those things in bulk didn't affect the price point either.
You're in luck! That's the exact board I've been testing the rp2xxx branch with! |
@rbp9802 I was reading further into the ebyte user manual, and I found this peculiar info:
This actually does apply to the Arduino Nano (which uses 5V logic) concerning the SCK, MOSI, MISO, CSN, & CE pins. Additionally, the user manual specifically says:
which basically means you should call ps - There is a lot of places where the user manual insists the power supply be "well grounded" and "stable" (which begs the use of capacitors). |
Thanks for your prompt response!
I lost the thread with that, if it's not a bother, could you explain?
Found this for resistors, perhaps, are logic level converter recommended or too slow/power consuming?
Found 10uF a common value for nRF24L01, this will work with E01-ML01DP5 module power consumption? With this adaptations it will be spected to work ar 250kbps or is a separate issue? |
SPI commands used for 1 flash storage module aren't guaranteed to work on a different flash storage module. Also, the pin arrangements could be different depending on what the manufacturer decided.
First, I would try what the manual says and attach a resistor in series with the radio module. I can explain what "in series" means if you want me to. Personally, I'd use a 1.5 k-ohm on each line (except the VCC and GND pins) because that's what I have lying around and it falls within the suggested range of resistance values. The resistors are just there to consume excess voltage, so this shouldn't slow anything down. Same goes for logic level converters: they won't slow anything down, but (unlike regular resistors) logic level converters might consume some amperage to operate (you need as much amperage as you can get for the PA/LNA modules).
This really depends on the power supply being used. 2 identical boards can have the same voltage regulator on them, but the nature of transistors dictates that the efficiency can vary - meaning 1 board's power supply could be noiser (this is often also called efficiency or ripple) than the other identical board's power supply. It won't hurt to try using more capacitance if you don't have a oscilloscope to see how much the voltage varies from the power supply.
Only time can answer that. Try the resistors and extra capacitance suggestions on what you have working now. If it improves anything, then try using 250kbps. I really don't know why that is an obstacle for this module you're using, but I'd like to isolate all other problems first (I'm secretly hoping it does help using 250kbps). |
Thanks for your explanation!
Ooopss. i've been using 3v3 output pin from arduino following common nRF24L01 tutorials 😆. until now it has worked with 2mbps and PA level max using this pin (which supports 50mA(?)). I've just switch to 18650 UPS module and started working with multiple sensors at 250kbps. I have and INA219 adafruit module but i can only measure RX current (24mA) and not instant TX current so i can verify current consumption, sleep current was 2mA (don't now if this measure is real beacuse even if nothing it's connected INA219 measure 2mA). Until now it has work with 4 sensors for now, but still missing data as acumulated time from retry attempt is more than sampling time. Anyway i'll try resistors for SPI and capacitor to make it more "healthy". Perhaps, i'm still planning to move to RPi Pico or Adafruit Feather RP2040.... or external flash memory. I'll keep you update if you're interested. Thanks again for you help, I really appreciate it!! |
Hello Brendan, just got a pair of RPi Pico which i'm trying to program with arduino IDE. I have installed Arduino IDE official support and 3rd party support and test your getting started code without success . I imported RF24-rp2xx as a new library but i don´t really know what to do with the files and how to use them (I don't really undestand the different between I connected RF24 module like following;
Hope you can help me with this (again) 🙏 |
I should've been more clear. The cpp files are specifically for using only the PicoSDK - not an easy task for beginners because of the absolute granular control over everything including how the device enumerates when plugged into the PC. If you have the actual RPi Pico board, then you can install Arduino-MBED support (from the Arduino IDE's board manager), and then run the RF24 examples as you would on any other board. The same should go for the 3rd-party Arduino-pico core: After you get it installed in the Arduino IDE, you should be able to run the RF24 examples from the Arduino IDE's File->Examples->RF24 menu. To run the cpp files in the examples_pico folder (which are not designed for Arduino IDE), you need to build them with CMake and have the Pico SDK saved in a directory adjacent to the RF24 lib directory. To hasten this, you can download the RP2xxx build's workflow artifact for the pico board, and just upload the UF2 file to your pico board while it is in bootloader mode. But be warned that the pins are assumed to be the default about what pins to useThis seems to have changed recently with the 3rd-party arduino-pico core. Thankfully, Earl also updated the docs about using different pins for peripheral interfaces. See also his docs about using the SPI or SPI1 classes As for the default SPI pins used, these are defined in the arduino-pico core's variant directory (select the board you have and look at the I have no knowledge about using the Arduino-MBED core because it is so much more limited than the 3rd-party arduino-pico core. This support in the Arduino-MBED core was literally released by Arduino folks about a month ago, and it is rather incomplete at this time. |
I tried uploading the getting starded example on both, Arduino-MBED support and 3rd-party Arduino-pico core and got compilation erros in both cases (i'm using Arduino IE 1.8.15): for the Arduino-MBED support:
for earlephilhower support:
Same goes to other examples. I also include this lines in the setup code to set up SPI0 pin:
Also try |
Stop using the cpp files in the arduino IDE. Use the ino files in the examples folder for the arduino IDE. |
yes, i used GettingStarted.ino |
earlephilhower's 3rd party arduino-pico core doesn't support using |
This means you are somehow using the cpp files. There should be no cpp files in the directory where the ino files are. The arduino IDE will automatically include any other c++ compatible files it finds with the ino file. EDIT: this error's folder structure is weird (that gettingStarted.cpp file should be in examples_pico folder). @rbp9802 UNDO whatever you did to the RF24 lib folder. The rp2xxx branch is not needed for the arduino IDE. The latest stable release of the RF24 lib should still work fine with any arduino core lib. |
Thanks for your explanation Brendan! Finally, I moved all Pins
Radio
|
From what you just described, no - probably not. The
There are some getter functions in the RF24 API ( For a more immediate fix, you'd have to look at the Arduino core's code and find out what is needed to use pgmspace.h and These functions do work when used with only the Pico SDK (and not the Arduino IDE). |
Also per pins_Arduino.h the default pins are:
Miso: 4
Mosi: 3
Sck: 2
Can and ce are user specified.
… On May 24, 2021, at 3:19 PM, Brendan ***@***.***> wrote:
Does this function works on RPi Pico (or RP2040) at the moment?
From what you just described, no - probably not. The printDetails(), printPrettyDetails(), and errNotify() functions don't work on all platforms. The current solution implemented was only meant to work on AVR and Linux platforms (but it has been patched for a few other capable platforms). We are currently working on a logging library that should address that problem, but it isn't ready for release yet.
Are there other ways to 'manually' get details?
There are some getter functions in the RF24 API, but they won't provide all the data output (like the STATUS byte and addresses assigned to the pipes) by printDetails().
For a more immediate fix, you'd have to look at the Arduino core's code and find out what is needed to use pgmspace.h and printf(). Instead of doing this for each platform, we have chosen to start a new RF24Log lib to achieve this for all platforms.
These functions do work when used with only the Pico SDK (and not the Arduino IDE).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@TMRh20 There are different pins_Arduino.h definitions for different rp2040 board variants (depending on the arduino core being used). The SPI lib allows optionally specifying the CSN pin for either the official ArduinoCore-MBED (for RPi Pico - personally not recommended) and the 3rd party arduino-pico core (by EarlePhilhower for all RP2040 based boards - personally recommended). The current implementation in RF24 does not make use of this feature, so you are right - they are user-specified. I doubt there is any performance improvement when using the SPI lib to manage the CSN. @rbp9802 I recently installed the 3rd-party arduino-pico core and ran GettingStarted.ino (with no modifications) on my Adafruit Feather RP2040, and it worked. I can also confirm that |
This issue got a bit off track after talking about switching to the RP2040-based boards. Is sending data from multiple radios still experiencing problems? |
Hello, i'm developing an acceletometer sensor network (Arduino) and i'm having problem receiving data on the master node (Raspberry Pi), slaves are identified sensing an ID byte on the message and send data at the same time to the master and data is being lossed (from what i have research this is not ideal here) but i don't have other options since saving data on SD (to send it later) is too slow and power consuming for my porpose. I also tried sending data from different pipes but data is recieved at any pipe, not specifically at the one i send it to.
Are ther any way to avoid data losses? Hope you can help me, thank you for your time.
Here is part of my code:
Raspberry Pi
As i'm sending data every 20ms (50Hz) i should receive 1500 messages from each sensor every 30 seconds on raspberry but i'm receveing from 1400 to 1500 which affects data processing.
When i run de system with only 1 sensor i receive 1500 messages always.
My plan is to have 10 sensor (at least) sendind data
The text was updated successfully, but these errors were encountered: