Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Which are the *best* NRF24L01+ modules?

Which are the *best* NRF24L01+ modules?

Scheduled Pinned Locked Moved Hardware
310 Posts 42 Posters 259.2k Views 37 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • YveauxY Yveaux

    @NeverDie Thanks, but it has quite some dependencies: Mirf, MirfHardwareSpiDriver & u8glib... I guess I have to strip it first.
    Furthermore, which nrf24 library did you use? The one from tmrh20?

    NeverDieN Offline
    NeverDieN Offline
    NeverDie
    Hero Member
    wrote on last edited by NeverDie
    #115

    @Yveaux said:

    @NeverDie Thanks, but it has quite some dependencies: Mirf, MirfHardwareSpiDriver & u8glib...
    Furthermore, which nrf24 library did you use? The one from tmrh20?

    Mirf is the nrf24 library. It's what the RFToy example used, so I started with it, because it "just worked" out of the box. It just happens to be as far as I've gotten so far. I haven't yet converted to tmrh20, which would look more familiar to you.

    The start loop is just a left-over from when I was doing echo testing. I removed the OLED for this test because it was a potential source of interference, so any code related to that could be deleted. Obviously, most of the global variables aren't needed either. As far as transmitting once every 10ms, all the action happens in the main loop, which is pretty simple. It's all fairly basic, because up until I actually did it, I wasn't sure I could even get a sufficiently noiseless signal to measure. Luckily, running the RFtoy on a coincell, and because it's compact and without dangling wires, made that possible.

    So, in terms of which library to install, at the moment the easiest would be to load the RFToy library.

    Or you can wait until I convert over to tmrh20, and then you can follow along that way. I'll need to do that to do the sleep measurement, and because TMRH20 is currently the leading library to use--at least that's what ManiacBug seems to think.

    Or, if you already know tmrh20, you could code it yourself. The pseudo-code is quite simple:

    1. Note the time in microseconds.
    2. Send a packet with a 4 byte data payload (i.e. a LONG)
    3. Wait until the current time exceeds the time in step 1 by at least 10,000 microseconds.
    4. Goto Step 1

    What I don't know are the defaults for ACK's and # of retries, if any, in Mirf and in TMRH20. Aside from that possible difference, I would imagine the current draws are going to be the same in either library, wouldn't you?

    Perhaps the cleanest thing would be to skip the libraries entirely and do it all purely by register manipulations. That'd probably be a diversion from where I want to go, but maybe not a huge diversion. After all, how hard could it be? Since the guys doing the mysensors library for the attiny85 appear to be stuck, I may eventually have to do it that way if I want to use an attiny85 (which I do).

    1 Reply Last reply
    0
    • YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #116

      @NeverDIe I committed a small sketch + NRF24 library which should essentially do the same as your sketch.
      Please find it at https://github.com/Yveaux/NRF24_CurrentFingerprint.
      I verified its behavior using the NRF24 sniffer:

      upload-c8184e00-67be-43e9-af4c-43242e39b830

      Maybe we could compare register settings to be absolutely sure settings are identical:

      upload-1418cfa7-5a26-40ff-9531-7221378b1875

      Maybe you can repeat one of your measurements with this sketch, just to make sure we're measuring in the same way?

      Currently I'm having a hard time measuring the actual current during transmit. I've not been able to get the individual spikes on the scope, not by using a uCurrent nor a single 1ohms resistor.

      This is a uCurrent plot, set at 1mV/uA:

      upload-2a6efb00-7e6a-462f-b3ce-f3a179b80ae6

      That boils down to 1.3mA peak during transmission... That can't be right?!

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • YveauxY Offline
        YveauxY Offline
        Yveaux
        Mod
        wrote on last edited by Yveaux
        #117

        Small update: using a 10ohms resitor, the current profile looks like:

        upload-fe4a379b-9a19-4e5d-ba78-086f1906e86b

        10mV/mA, so my module peaks at 11.7 mA. This module contains a 100% genuine Nordic nRF24L01+.

        A module containing a proven fake nRF24L01+ (marked 1242AF), reveals following current profile:

        upload-916e4d87-e4f8-4262-bef9-fd82dbfbca1d

        This one peaks at 19.8mA !!

        Register settings and on-air packets are identical.

        For completenes my measurement setup:

        • Lab supply, which powers USB isolator
        • USB isolator between PC & Arduino (otherwise ground-loops mess things up when using a USB scope on the same PC)
        • 10 ohms resistor

        upload-3ba85b97-4e4a-40af-86f6-00f38b5d545b

        http://yveaux.blogspot.nl

        1 Reply Last reply
        0
        • NeverDieN Offline
          NeverDieN Offline
          NeverDie
          Hero Member
          wrote on last edited by NeverDie
          #118

          That's great!

          The red module I tested (above) also used 1242AF. So, asuming the NRF chip in the Itead is genuine (which seems increasingly likely), then proportionately speaking, we're getting similar measurements.

          Aside from the Picoscope, what is your test setup? You don't seem to be experiencing the fat scope lines that I am. Where is the NRF module in your photo? Is it being levitated by the wires in the photo? I'm surprised the wires don't seem to be picking up noise.

          YveauxY 1 Reply Last reply
          0
          • NeverDieN NeverDie

            That's great!

            The red module I tested (above) also used 1242AF. So, asuming the NRF chip in the Itead is genuine (which seems increasingly likely), then proportionately speaking, we're getting similar measurements.

            Aside from the Picoscope, what is your test setup? You don't seem to be experiencing the fat scope lines that I am. Where is the NRF module in your photo? Is it being levitated by the wires in the photo? I'm surprised the wires don't seem to be picking up noise.

            YveauxY Offline
            YveauxY Offline
            Yveaux
            Mod
            wrote on last edited by Yveaux
            #119

            @NeverDie I added it to my previous post.

            Overview of whole setup:

            upload-f518c490-0a0f-4376-899d-14af8966192a

            I never had issues with the wires picking up noise; at least not enough to distort communication. They're approx. 20cm long.

            One more:

            upload-972e72b1-ed33-4440-8f4f-602ac91263bf

            Module with nRF marked 1322DQ, supposedly genuine.
            Also 11.2mA

            Tried it with another, random 1242AF, which gave 21.4mA

            http://yveaux.blogspot.nl

            1 Reply Last reply
            1
            • NeverDieN Offline
              NeverDieN Offline
              NeverDie
              Hero Member
              wrote on last edited by
              #120

              Exactly which USB isolator are you using? Sounds like I should get myself a couple in case I ever need to do this again.

              YveauxY 1 Reply Last reply
              0
              • NeverDieN NeverDie

                Exactly which USB isolator are you using? Sounds like I should get myself a couple in case I ever need to do this again.

                YveauxY Offline
                YveauxY Offline
                Yveaux
                Mod
                wrote on last edited by Yveaux
                #121

                @NeverDie A Chinese clone of this circuit: https://www.circuitsathome.com/measurements/usb-isolator
                The power socket is used to power the isolated USB side.
                Beware this isolator ca only handle FullSpeed (12MBit/s), so not USB 2.0 HighSpeed (480MBit/s).
                This prevents me from isolating my USB scope with it...

                http://yveaux.blogspot.nl

                1 Reply Last reply
                1
                • NeverDieN Offline
                  NeverDieN Offline
                  NeverDie
                  Hero Member
                  wrote on last edited by NeverDie
                  #122

                  Your setup roughly resembles my first attempt, where I was also using an Uno. However, I was overwhelmed with noise, which made me try the RFToy. I wasn't using isolators, though. I'm glad you got yours working, because it means that just about anyone with isolators and a scope can maybe do this test for themselves. As illustrated by you, the setup if pretty easy to follow. Good job!

                  P.S. Does using ribbon cable, as you are doing, rather than individual Dupont wires (as I did when I tried using the Uno) also help with controlling noise?

                  1 Reply Last reply
                  0
                  • NeverDieN Offline
                    NeverDieN Offline
                    NeverDie
                    Hero Member
                    wrote on last edited by
                    #123

                    Interestingly, the USB cable that came with my Rigol has big ferrite cores on both ends of it. So, that probably helps as well.

                    1 Reply Last reply
                    0
                    • NeverDieN Offline
                      NeverDieN Offline
                      NeverDie
                      Hero Member
                      wrote on last edited by
                      #124

                      Actually, you could just power that arduino using a battery. Right? Having the isolator is nice, in that you can monitor what's happening, but not strictly necessary.

                      So, really, I guess anyone with an o-scope can do this test, which is great!

                      YveauxY 1 Reply Last reply
                      0
                      • NeverDieN NeverDie

                        Actually, you could just power that arduino using a battery. Right? Having the isolator is nice, in that you can monitor what's happening, but not strictly necessary.

                        So, really, I guess anyone with an o-scope can do this test, which is great!

                        YveauxY Offline
                        YveauxY Offline
                        Yveaux
                        Mod
                        wrote on last edited by
                        #125

                        @NeverDie correct!
                        With some simple hardware the uno could measure the current by itself and determine the maximum current used!
                        This has potential!

                        http://yveaux.blogspot.nl

                        NeverDieN 1 Reply Last reply
                        0
                        • YveauxY Yveaux

                          @NeverDie correct!
                          With some simple hardware the uno could measure the current by itself and determine the maximum current used!
                          This has potential!

                          NeverDieN Offline
                          NeverDieN Offline
                          NeverDie
                          Hero Member
                          wrote on last edited by NeverDie
                          #126

                          @Yveaux said:

                          @NeverDie correct!
                          With some simple hardware the uno could measure the current by itself and determine the maximum current used!
                          This has potential!

                          Which hardware would that be?

                          YveauxY 1 Reply Last reply
                          0
                          • NeverDieN Offline
                            NeverDieN Offline
                            NeverDie
                            Hero Member
                            wrote on last edited by NeverDie
                            #127

                            It turns out my scope can do better than I thought. Here's the blob module again, but this time at 5mv/div.

                            blob1x_1.jpg

                            blob1x_2.jpg

                            So, I may be able to use an even smaller resistor, because now I can go down to 1mv/div, whereas before it seemed it wouldn't let me go lower than 10mv/div. Hopefully that will help improve my measurement accuracy.

                            YveauxY Z Nca78N 3 Replies Last reply
                            0
                            • NeverDieN NeverDie

                              @Yveaux said:

                              @NeverDie correct!
                              With some simple hardware the uno could measure the current by itself and determine the maximum current used!
                              This has potential!

                              Which hardware would that be?

                              YveauxY Offline
                              YveauxY Offline
                              Yveaux
                              Mod
                              wrote on last edited by
                              #128

                              @NeverDie shunt resistor & opamp. Not sure about the sampling speed of the AtMega yet. Have to dive into its data sheet first....

                              http://yveaux.blogspot.nl

                              1 Reply Last reply
                              0
                              • NeverDieN NeverDie

                                It turns out my scope can do better than I thought. Here's the blob module again, but this time at 5mv/div.

                                blob1x_1.jpg

                                blob1x_2.jpg

                                So, I may be able to use an even smaller resistor, because now I can go down to 1mv/div, whereas before it seemed it wouldn't let me go lower than 10mv/div. Hopefully that will help improve my measurement accuracy.

                                YveauxY Offline
                                YveauxY Offline
                                Yveaux
                                Mod
                                wrote on last edited by
                                #129

                                @NeverDie transmission takes 233us in my measurements. What's the hdiv on your scope? 500/200us?

                                http://yveaux.blogspot.nl

                                NeverDieN 1 Reply Last reply
                                0
                                • YveauxY Yveaux

                                  @NeverDie transmission takes 233us in my measurements. What's the hdiv on your scope? 500/200us?

                                  NeverDieN Offline
                                  NeverDieN Offline
                                  NeverDie
                                  Hero Member
                                  wrote on last edited by
                                  #130

                                  @Yveaux said:

                                  @NeverDie transmission takes 233us in my measurements. What's the hdiv on your scope? 500/200us?

                                  Which chip? The 1242AF (presumed fake), or the one that might be genuine (the one on the Itead module)?

                                  YveauxY 1 Reply Last reply
                                  0
                                  • NeverDieN NeverDie

                                    @Yveaux said:

                                    @NeverDie transmission takes 233us in my measurements. What's the hdiv on your scope? 500/200us?

                                    Which chip? The 1242AF (presumed fake), or the one that might be genuine (the one on the Itead module)?

                                    YveauxY Offline
                                    YveauxY Offline
                                    Yveaux
                                    Mod
                                    wrote on last edited by Yveaux
                                    #131

                                    @NeverDie any chip. Transmission time is identical every time.

                                    http://yveaux.blogspot.nl

                                    NeverDieN 1 Reply Last reply
                                    0
                                    • YveauxY Yveaux

                                      @NeverDie any chip. Transmission time is identical every time.

                                      NeverDieN Offline
                                      NeverDieN Offline
                                      NeverDie
                                      Hero Member
                                      wrote on last edited by
                                      #132

                                      @Yveaux said:

                                      @NeverDie any chip. Transmission time if identical every time.

                                      Here's my best picture of the start of the transmission cycle for the blob module. I'm not sure where to call the actual start of it though, but we need to agree on that if we're going to compare numbers without pictures.

                                      blob_halfOhm.jpg
                                      It's labeled on the upper bar (just to the right of the red "STOP") 50us/div
                                      I modified the resister to be 1/2ohm, so now the vertical is 4ma/div, because it's 2mv/div vertical. Make sense?

                                      YveauxY 1 Reply Last reply
                                      0
                                      • NeverDieN NeverDie

                                        @Yveaux said:

                                        @NeverDie any chip. Transmission time if identical every time.

                                        Here's my best picture of the start of the transmission cycle for the blob module. I'm not sure where to call the actual start of it though, but we need to agree on that if we're going to compare numbers without pictures.

                                        blob_halfOhm.jpg
                                        It's labeled on the upper bar (just to the right of the red "STOP") 50us/div
                                        I modified the resister to be 1/2ohm, so now the vertical is 4ma/div, because it's 2mv/div vertical. Make sense?

                                        YveauxY Offline
                                        YveauxY Offline
                                        Yveaux
                                        Mod
                                        wrote on last edited by Yveaux
                                        #133

                                        @NeverDie your horizontal scale is very different from what I measure.
                                        The initial low-level part in the last scope picture shows only part of what you identify as transmission time, while it already lasts roughy 250us. That's more than the whole transmission time I measure!
                                        We're definitely measuring differently.
                                        Quickly off my head: a single message is 14 bytes long (see the sniffer capture above). At 1mbit this will take 14*8/1mbit=112 us. Add some time for startup, preamble, shutdown etc. and I think total time will be in the order of 233us, as I measured.

                                        Could you try running the sketch I put on github to compare things? Probably you will only have to change cs/ss pins to run it (I stick to the default mysensors connections)
                                        It will also toggle a digital output on pin 3 before/after transmission which you can put on the scope together with the current measured, to have a reference when actual transmission takes place.

                                        Tonight (in 12 hours or so) I can do some more measurements if necessary.

                                        http://yveaux.blogspot.nl

                                        1 Reply Last reply
                                        0
                                        • NeverDieN Offline
                                          NeverDieN Offline
                                          NeverDie
                                          Hero Member
                                          wrote on last edited by NeverDie
                                          #134

                                          I just now noticed where you put your markers on your o-scope plot. There are two voltage increases, the second settles out higher than the first, and it looks like you're counting both. I would guess transmission doesn't really start until the higher voltage is reached, though, wouldn't you? That also is a better match to your 112us number. Perhaps the lower voltage corresponds to loading the buffer or something like that that doesn't need the higher transmit power.

                                          If you don't mind my asking, why the interest in the transmission length? Doesn't it have to be pretty similar from one type of chip to another, or else they won't interoperate?

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          20

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular