Skip to content
  • 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. My Project
  3. nRF5 action!
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

nRF5 action!

Scheduled Pinned Locked Moved My Project
1.9k Posts 49 Posters 630.8k Views 44 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.
  • NeverDieN Offline
    NeverDieN Offline
    NeverDie
    Hero Member
    wrote on last edited by NeverDie
    #721

    So, under this theory, the only time when the radio is not disabled is when it is actively transmitting or receiving. There's no need to manually disable it, because that appears to happen automatically anyway.

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

      So, to move forward with this, I took a super-stripped down nRF52832, and loaded it with a super stripped down sketch that never initializes the radio and pretty much just jumps directly into a long RTC 12 hour slumber using the MySensors sleep routine. Measuring the current drawn while in that slumber using a uCurrent Gold, I'm reading about 9.3ua. So, to confirm that, I'm running the same stripped down setup from a 10F supercap, and I'll see at what rate the supercap voltage drops with time, and whether that appears to agree or not with these initial measurements.

      Hopefully the current draw will remain low, and there will be no surprises. In that case, I'll add stuff back in until I find the culprit that was previously causing the higher current draw.

      rmtuckerR NeverDieN 2 Replies Last reply
      2
      • NeverDieN NeverDie

        So, to move forward with this, I took a super-stripped down nRF52832, and loaded it with a super stripped down sketch that never initializes the radio and pretty much just jumps directly into a long RTC 12 hour slumber using the MySensors sleep routine. Measuring the current drawn while in that slumber using a uCurrent Gold, I'm reading about 9.3ua. So, to confirm that, I'm running the same stripped down setup from a 10F supercap, and I'll see at what rate the supercap voltage drops with time, and whether that appears to agree or not with these initial measurements.

        Hopefully the current draw will remain low, and there will be no surprises. In that case, I'll add stuff back in until I find the culprit that was previously causing the higher current draw.

        rmtuckerR Offline
        rmtuckerR Offline
        rmtucker
        wrote on last edited by
        #723

        @NeverDie
        I can not understand why you are drawing 9.4uA in the first place?.
        My nrf51822 seems to consistently only draw 4-5uA with no strip down of software when in mysensors sleep mode.
        Fair enough i have not got your measurement equipment but i don,t see it being that far away.
        The data sheets seem to point to under 5uA.

        NeverDieN d00616D 2 Replies Last reply
        0
        • rmtuckerR rmtucker

          @NeverDie
          I can not understand why you are drawing 9.4uA in the first place?.
          My nrf51822 seems to consistently only draw 4-5uA with no strip down of software when in mysensors sleep mode.
          Fair enough i have not got your measurement equipment but i don,t see it being that far away.
          The data sheets seem to point to under 5uA.

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

          @rmtucker said in nRF5 Bluetooth action!:

          I can not understand why you are drawing 9.4uA in the first place?.

          Yes, it is puzzling. I don't have a good answer as to why it measures so high. Maybe the crystal oscillator? What else is there that might be causing it?

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

            After this initial run completes, I'll try reprogramming it to use the internal resonnator instead and see if that makes any difference.

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

              Indeed, reprogramming the Ebyte nRF52832 to use the internal oscillator dropped the sleep current consumption down to 5.4ua. :)

              I wonder whether physically removing the crystal oscillator would result in additional savings, or if that's as low as it goes?

              I also wonder whether the datasheet cheats a bit by not counting the current consumed by the external crystal oscillator when that's being used? Otherwise, I don't see how Nordic can claim a <2ua sleep current for the nRF52832.

              rmtuckerR 1 Reply Last reply
              0
              • NeverDieN NeverDie

                Indeed, reprogramming the Ebyte nRF52832 to use the internal oscillator dropped the sleep current consumption down to 5.4ua. :)

                I wonder whether physically removing the crystal oscillator would result in additional savings, or if that's as low as it goes?

                I also wonder whether the datasheet cheats a bit by not counting the current consumed by the external crystal oscillator when that's being used? Otherwise, I don't see how Nordic can claim a <2ua sleep current for the nRF52832.

                rmtuckerR Offline
                rmtuckerR Offline
                rmtucker
                wrote on last edited by
                #727

                @NeverDie

                Stranger still my 4-5uA is using the external crystal??.

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

                  I have to amend what I just said, because I took a measurement short-cut that in retrospect I shouldn't have: namely, I did the measurements on two different modules.

                  I went back and changed the 5.4ua module using the RC internal oscillator to use the external crystal oscillator, and it measures about the same.

                  So... The difference I was reading was a difference in the way the two modules measure. I'm not sure why one reads higher than the other, except perhaps that I didn't clean the solder flux off the higher reading module, and I did clean off the solder flux on the lower reading module.

                  I'll try cleaning the solder flux off the higher reading module and see if that drops the current consumed.

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

                    I cleaned off the solder flux and... no real difference. Go figure. Maybe it's just random variation among the Ebyte Modules? I guess I'll have to wire up more of them and see how they all compare.

                    1 Reply Last reply
                    0
                    • NeverDieN NeverDie

                      @rmtucker said in nRF5 Bluetooth action!:

                      I can not understand why you are drawing 9.4uA in the first place?.

                      Yes, it is puzzling. I don't have a good answer as to why it measures so high. Maybe the crystal oscillator? What else is there that might be causing it?

                      Nca78N Offline
                      Nca78N Offline
                      Nca78
                      Hardware Contributor
                      wrote on last edited by
                      #730

                      @NeverDie did you select the option with internal crystal ? 1s accuracy after 12h like you said before sounds more like a precise external crystal than an internal one.

                      NeverDieN 1 Reply Last reply
                      0
                      • Nca78N Nca78

                        @NeverDie did you select the option with internal crystal ? 1s accuracy after 12h like you said before sounds more like a precise external crystal than an internal one.

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

                        @Nca78 said in nRF5 Bluetooth action!:

                        @NeverDie did you select the option with internal crystal ? 1s accuracy after 12h like you said before sounds more like a precise external crystal than an internal one.

                        Up until today I was using just the external crystal on the Ebyte nRF52832's. It was only for comparison purposes of current consumption that today I switched to the internal resonator. It's about the same current consumption. Maybe if I now remove the external crystal, it will save some current? I just don't know.

                        KoreshK 1 Reply Last reply
                        0
                        • rmtuckerR rmtucker

                          @NeverDie
                          I can not understand why you are drawing 9.4uA in the first place?.
                          My nrf51822 seems to consistently only draw 4-5uA with no strip down of software when in mysensors sleep mode.
                          Fair enough i have not got your measurement equipment but i don,t see it being that far away.
                          The data sheets seem to point to under 5uA.

                          d00616D Offline
                          d00616D Offline
                          d00616
                          Contest Winner
                          wrote on last edited by
                          #732

                          @rmtucker said in nRF5 Bluetooth action!:

                          I can not understand why you are drawing 9.4uA in the first place?.
                          My nrf51822 seems to consistently only draw 4-5uA with no strip down of software when in mysensors sleep mode.

                          While developing the nRF5 port, I had no chance to measure the current of the nRF52 accurate. With my original nRF51 dev kit I I have a sleeping current matching the data sheet.

                          Now I can measure currents in the µA range. With all nRF52 I have, I measured sleeping currents around 10µA. This is to much. We have to see 2-3µA. I have no original nRF52832 dev kit to compare. The reason of this sleeping current can be either an error in the layout or there is a component which is not required in active state while sleeping.

                          At the moment I have no time to analyse this. There is a bug in the radio code, which I have to fix. When transport debug is disabled no packages are received. In my opinion this has more priority.

                          1 Reply Last reply
                          1
                          • NeverDieN NeverDie

                            @Nca78 said in nRF5 Bluetooth action!:

                            @NeverDie did you select the option with internal crystal ? 1s accuracy after 12h like you said before sounds more like a precise external crystal than an internal one.

                            Up until today I was using just the external crystal on the Ebyte nRF52832's. It was only for comparison purposes of current consumption that today I switched to the internal resonator. It's about the same current consumption. Maybe if I now remove the external crystal, it will save some current? I just don't know.

                            KoreshK Offline
                            KoreshK Offline
                            Koresh
                            Contest Winner
                            wrote on last edited by
                            #733

                            @NeverDie Just my two cents. Leakage current through non ideal capacitors can be 1-10uA.

                            1 Reply Last reply
                            1
                            • NeverDieN NeverDie

                              So, to move forward with this, I took a super-stripped down nRF52832, and loaded it with a super stripped down sketch that never initializes the radio and pretty much just jumps directly into a long RTC 12 hour slumber using the MySensors sleep routine. Measuring the current drawn while in that slumber using a uCurrent Gold, I'm reading about 9.3ua. So, to confirm that, I'm running the same stripped down setup from a 10F supercap, and I'll see at what rate the supercap voltage drops with time, and whether that appears to agree or not with these initial measurements.

                              Hopefully the current draw will remain low, and there will be no surprises. In that case, I'll add stuff back in until I find the culprit that was previously causing the higher current draw.

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

                              @NeverDie said in nRF5 Bluetooth action!:

                              So, to move forward with this, I took a super-stripped down nRF52832, and loaded it with a super stripped down sketch that never initializes the radio and pretty much just jumps directly into a long RTC 12 hour slumber using the MySensors sleep routine. Measuring the current drawn while in that slumber using a uCurrent Gold, I'm reading about 9.3ua. So, to confirm that, I'm running the same stripped down setup from a 10F supercap, and I'll see at what rate the supercap voltage drops with time, and whether that appears to agree or not with these initial measurements.

                              Hopefully the current draw will remain low, and there will be no surprises. In that case, I'll add stuff back in until I find the culprit that was previously causing the higher current draw.

                              It turns out that the culprit was the mere act of using pinmode to designate a pin as an input pin, even if it's not connected to anything. Then, during sleep, the current consumption is an order of magnitude higher. This is quite different behavior than on, say, an Arduino pro mini, where the input pins are high impedance and there's neglible current draw.

                              Not sure what to do about it though. Any ideas?

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

                                The same sort of thing happens if pinmode is used to designate a pin as an output pin--again, even if nothing is connected to it.

                                This is a potential show stopper. This module is useless to me if I can't connect it to anything.

                                As a workaround, is there some way to designate a pin as undefined again after having used pinmode to define it as either an input pin or an output pin?

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

                                  Well, setting the pinmode to OUTPUT and then digitalwriting it to LOW seems to help considerably--at least when it's not connected to anything.

                                  [Edit: Setting it to HIGH also helps similarly.]

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

                                    Anyhow, I'm relieved that the radio isn't the source of these power drain problems. This pinmode stuff is a bummer, but it looks like I can at least partially work around it.

                                    1 Reply Last reply
                                    0
                                    • NeverDieN NeverDie

                                      Well, setting the pinmode to OUTPUT and then digitalwriting it to LOW seems to help considerably--at least when it's not connected to anything.

                                      [Edit: Setting it to HIGH also helps similarly.]

                                      d00616D Offline
                                      d00616D Offline
                                      d00616
                                      Contest Winner
                                      wrote on last edited by
                                      #738

                                      @NeverDie said in nRF5 Bluetooth action!:

                                      Well, setting the pinmode to OUTPUT and then digitalwriting it to LOW seems to help considerably--at least when it's not connected to anything.
                                      [Edit: Setting it to HIGH also helps similarly.]

                                      Thank's. I check this after I fixed the Radio.

                                      Actually, I have this board running. I measure a voltage of 0.13mV=6,6µA at the shunt with a simple sleep sketch. When I switch two pins into INPUT_PULLUP, then I measure 0.15mV==7,5µA.

                                      When I switch on the LED then I measure 12.75mV == 0,6375mA, One pin in OUTPUT_H1H0 mode. With LED off I measure 0.15mV==7,5µA.

                                      My MCU is nRF52832 QFAAB0 1615AX

                                      P.S.: I have no documentation about the board. When I measure the boards current, then I have an shunt factor of 22,5. I think calculating with 20 is ok.

                                      NeverDieN 1 Reply Last reply
                                      1
                                      • d00616D d00616

                                        @NeverDie said in nRF5 Bluetooth action!:

                                        Well, setting the pinmode to OUTPUT and then digitalwriting it to LOW seems to help considerably--at least when it's not connected to anything.
                                        [Edit: Setting it to HIGH also helps similarly.]

                                        Thank's. I check this after I fixed the Radio.

                                        Actually, I have this board running. I measure a voltage of 0.13mV=6,6µA at the shunt with a simple sleep sketch. When I switch two pins into INPUT_PULLUP, then I measure 0.15mV==7,5µA.

                                        When I switch on the LED then I measure 12.75mV == 0,6375mA, One pin in OUTPUT_H1H0 mode. With LED off I measure 0.15mV==7,5µA.

                                        My MCU is nRF52832 QFAAB0 1615AX

                                        P.S.: I have no documentation about the board. When I measure the boards current, then I have an shunt factor of 22,5. I think calculating with 20 is ok.

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

                                        @d00616
                                        Thanks! I just now ordered one of your boards so that in the future we can share a common platform for comparing numbers. :)
                                        https://www.aliexpress.com/item/NRF52832-Mini-Development-Board-Gold-Core-board-Wireless-Bluetooth-Transceiver-Module/32798618219.html?spm=2114.search0204.3.1.GUmybP&ws_ab_test=searchweb0_0,searchweb201602_4_10152_10065_10151_10130_5490020_10068_5430020_5410020_10307_10137_10060_10155_10154_10333_10334_10056_5370011_10335_10055_10336_10054_10059_10332_100031_10099_5400020_10103_10102_10052_10053_10107_10050_10142_10051_10324_10325_5380020_10326_5390020_10084_10083_10080_10082_10081_10178_10110_10111_10112_10113_10114_10312_10313_10314_10316_10078_10079_10073_5420011-10332_10333,searchweb201603_5,ppcSwitch_4_ppcChannel&btsid=78a27a2f-4aa5-49a0-a538-502a2c86d8f2&algo_expid=598ae4bb-6401-4529-89ad-6e8d8a90af12-0&algo_pvid=598ae4bb-6401-4529-89ad-6e8d8a90af12&transAbTest=ae803_3

                                        [By the way, I did my measurements on an Ebyte nRF52832 module]

                                        d00616D 1 Reply Last reply
                                        0
                                        • scalzS Offline
                                          scalzS Offline
                                          scalz
                                          Hardware Contributor
                                          wrote on last edited by scalz
                                          #740

                                          in that case, you need to set it as a floating input i think, like it's generally at reset.
                                          In datasheet, section 20 (p111), is explained how works the GPIO. You have a Bit for disconnecting it. See the PIN_CNF[n] registers. For instance, p.140, you can see how it looks for the P0.10, and the Bit 1.
                                          This should do the job..

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


                                          14

                                          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
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular