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. My Project
  3. nRF5 action!

nRF5 action!

Scheduled Pinned Locked Moved My Project
1.9k Posts 49 Posters 635.3k 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.
  • rmtuckerR rmtucker

    @NeverDie

    Sorry i have been a little distracted because my waveshare BLE400 and jlink just turned up.
    Took a little time to get it running but i loaded up the mockmysensors sketch with all the sensors un commented and pow all 30 odd sensors showed up in domoticz which made me chuckle.
    Anyway post your sketch for the consumption testing and i will put it in and see if it works on my board.
    The only problem is i can not unplug it from the Ble400 because i have no way of connecting wires to the core board because of the smaller pitch pins.

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

    @rmtucker said in nRF5 Bluetooth action!:

    The only problem is i can not unplug it from the Ble400 because i have no way of connecting wires to the core board because of the smaller pitch pins.

    For the current measurement, just program it with the above sketch on your Waveshare, then unplug your module from the BLE400 board and power it using a GND dupont wire and a Vcc dupont wire connected through your uCurrent Gold, or whatever it is that you're using to measure current. I should think that would work, wouldn't it?

    alt text

    Or do you only have the main board without the smaller plug-in module?

    It actually looks like a nice setup.

    rmtuckerR 3 Replies Last reply
    0
    • NeverDieN NeverDie

      @rmtucker said in nRF5 Bluetooth action!:

      The only problem is i can not unplug it from the Ble400 because i have no way of connecting wires to the core board because of the smaller pitch pins.

      For the current measurement, just program it with the above sketch on your Waveshare, then unplug your module from the BLE400 board and power it using a GND dupont wire and a Vcc dupont wire connected through your uCurrent Gold, or whatever it is that you're using to measure current. I should think that would work, wouldn't it?

      alt text

      Or do you only have the main board without the smaller plug-in module?

      It actually looks like a nice setup.

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

      @NeverDie

      When you unplug the little board it only has 1.27mm spaced pins and they are not standard dupont size so shy soldering to them which would mean i could not plug it back in to the BLE.
      Anyway i am only using a crappy multimeter and with it plugged in and running your sketch i am getting 140uA but i will find a way of unplugging it so hang fire.

      Nca78N 1 Reply Last reply
      0
      • rmtuckerR rmtucker

        @NeverDie

        When you unplug the little board it only has 1.27mm spaced pins and they are not standard dupont size so shy soldering to them which would mean i could not plug it back in to the BLE.
        Anyway i am only using a crappy multimeter and with it plugged in and running your sketch i am getting 140uA but i will find a way of unplugging it so hang fire.

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

        @rmtucker you could try to just solder 2 tiny wires on top of the board for vcc and gnd pins so you don't mess with the connectors for plugin it back on the main board ?

        NeverDieN 1 Reply Last reply
        1
        • Nca78N Nca78

          @rmtucker you could try to just solder 2 tiny wires on top of the board for vcc and gnd pins so you don't mess with the connectors for plugin it back on the main board ?

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

          @Nca78
          Agreed. It sounds as though the bigger problem is going to be his crappy multimeter, if that's all he has. Maybe a good time for an upgrade?

          1 Reply Last reply
          0
          • NeverDieN NeverDie

            @rmtucker said in nRF5 Bluetooth action!:

            The only problem is i can not unplug it from the Ble400 because i have no way of connecting wires to the core board because of the smaller pitch pins.

            For the current measurement, just program it with the above sketch on your Waveshare, then unplug your module from the BLE400 board and power it using a GND dupont wire and a Vcc dupont wire connected through your uCurrent Gold, or whatever it is that you're using to measure current. I should think that would work, wouldn't it?

            alt text

            Or do you only have the main board without the smaller plug-in module?

            It actually looks like a nice setup.

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

            @NeverDie
            Ok with my crappy multimeter i am getting 4-5uA with just Vcc and Ground connected.

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

              I'll try removing the 32.768Khz crystal from an infor-link module and then re-run the sketch that relies on an external interrupt to wake from sleep. Maybe that will get us closer to the theoretical minimum current of just the nRF52832 chip by itself.

              1 Reply Last reply
              0
              • NeverDieN NeverDie

                @rmtucker said in nRF5 Bluetooth action!:

                The only problem is i can not unplug it from the Ble400 because i have no way of connecting wires to the core board because of the smaller pitch pins.

                For the current measurement, just program it with the above sketch on your Waveshare, then unplug your module from the BLE400 board and power it using a GND dupont wire and a Vcc dupont wire connected through your uCurrent Gold, or whatever it is that you're using to measure current. I should think that would work, wouldn't it?

                alt text

                Or do you only have the main board without the smaller plug-in module?

                It actually looks like a nice setup.

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

                @NeverDie
                Just a little thought on this and a bit of googling.
                Just the system on consumption is 1-2uA without the rtc that is needed for wakeup so i don,t think the figures we are getting are that far away from the spec sheet?

                NeverDieN 1 Reply Last reply
                0
                • rmtuckerR rmtucker

                  @NeverDie
                  Just a little thought on this and a bit of googling.
                  Just the system on consumption is 1-2uA without the rtc that is needed for wakeup so i don,t think the figures we are getting are that far away from the spec sheet?

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

                  @rmtucker said in nRF5 Bluetooth action!:

                  @NeverDie
                  Just a little thought on this and a bit of googling.
                  Just the system on consumption is 1-2uA without the rtc that is needed for wakeup so i don,t think the figures we are getting are that far away from the spec sheet?

                  Agreed. We're in the ballpark.

                  rmtuckerR 1 Reply Last reply
                  0
                  • NeverDieN NeverDie

                    @rmtucker said in nRF5 Bluetooth action!:

                    @NeverDie
                    Just a little thought on this and a bit of googling.
                    Just the system on consumption is 1-2uA without the rtc that is needed for wakeup so i don,t think the figures we are getting are that far away from the spec sheet?

                    Agreed. We're in the ballpark.

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

                    @NeverDie
                    400,000 hours on 2xAA if we let it sleep.:smile:
                    That will do for me!.
                    Now a little playtime and maybe some range testing.

                    NeverDieN 1 Reply Last reply
                    0
                    • rmtuckerR rmtucker

                      @NeverDie
                      400,000 hours on 2xAA if we let it sleep.:smile:
                      That will do for me!.
                      Now a little playtime and maybe some range testing.

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

                      @rmtucker said in nRF5 Bluetooth action!:

                      @NeverDie
                      400,000 hours on 2xAA if we let it sleep.:smile:
                      That will do for me!.
                      Now a little playtime and maybe some range testing.

                      Yeah, I guess I won't amputate the xtal just yet. It can run for quite a while at 6ua. :)

                      rmtuckerR 1 Reply Last reply
                      0
                      • NeverDieN NeverDie

                        So, just did the experiment, and here are the results. Supplying 3.3v to the Ebyte Module, a voltage of 3.0 volts on A4 yields an analogRead(A4) of 4095. Less voltage on A4 yields a lower number.

                        So, generalizing, I suspect that the reference voltage for analogRead() is Vcc-0.3.

                        So, you either know Vcc, because of a voltage regulator or something, or else you must call hwCpuVoltage() to get what it is. Then, subtract 0.3v from that, and that's the reference voltage which corresponds to an analogRead() return value of 4095.

                        :)

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

                        @NeverDie said in nRF5 Bluetooth action!:

                        So, generalizing, I suspect that the reference voltage for analogRead() is Vcc-0.3.

                        The internal reference is 0.6V the nRF5 MCU's have an internal programmable divider. With Arduino this divider is programmed to 1/5. If you switch to the external reference the "gain" is 1/4.

                        I measure with my CDEByte 11-15µA for sleep without interrupt waiting. With a RedBear BLE Nano 2 I have measured 15µA. Both compiled as BLE Nano 2. I have used the VC165 multimeter.

                        1 Reply Last reply
                        1
                        • NeverDieN NeverDie

                          @rmtucker said in nRF5 Bluetooth action!:

                          @NeverDie
                          400,000 hours on 2xAA if we let it sleep.:smile:
                          That will do for me!.
                          Now a little playtime and maybe some range testing.

                          Yeah, I guess I won't amputate the xtal just yet. It can run for quite a while at 6ua. :)

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

                          @NeverDie

                          I2c is not working properly either.
                          Here is a test on a HTU21D sensor.

                          HTU21D-F test
                          Temp: -46.57		Hum: 84.10
                          Temp: 81.10		Hum: 59.68
                          Temp: 81.10		Hum: 26.48
                          Temp: -2.64		Hum: 26.48
                          Temp: 51.58		Hum: 26.48
                          Temp: 4.91		Hum: 25.02
                          Temp: 33.74		Hum: 25.02
                          Temp: 93.45		Hum: 25.02
                          Temp: 4.22		Hum: 26.48
                          Temp: 95.51		Hum: 116.81
                          Temp: -39.02		Hum: 116.81
                          Temp: 94.14		Hum: 25.02
                          Temp: 94.14		Hum: 116.81
                          Temp: 120.22		Hum: 116.81
                          Temp: -8.82		Hum: 111.44
                          Temp: 120.22		Hum: 19.64
                          Temp: 94.14		Hum: 111.44
                          Temp: -8.82		Hum: 116.81
                          Temp: 120.22		Hum: 111.44
                          Temp: 120.22		Hum: 111.44
                          Temp: 120.22		Hum: 116.81
                          Temp: -8.82		Hum: 19.64
                          Temp: 94.14		Hum: 116.81
                          Temp: 33.05		Hum: 111.44
                          Temp: 94.14		Hum: 19.64
                          Temp: 94.14		Hum: 19.64
                          Temp: 4.22		Hum: 19.64
                          Temp: 2.84		Hum: 111.44
                          Temp: 3.53		Hum: 111.44
                          Temp: -10.20		Hum: 19.64
                          
                          1 Reply Last reply
                          1
                          • NeverDieN Offline
                            NeverDieN Offline
                            NeverDie
                            Hero Member
                            wrote on last edited by NeverDie
                            #536

                            @rmtucker said in nRF5 Bluetooth action!:

                            I2c is not working properly either.

                            Seems like there's more than one library named "Wire" that's floating around at the same time. I wonder if perhaps the compiler is finding the proper Wire library inside Arduino-nRF5? Or maybe it's linking with an unrelated Wire library? To answer that, you could try inserting a Serial.println() into the proper library and see if it fires off when you run your code.

                            rmtuckerR 1 Reply Last reply
                            0
                            • NeverDieN NeverDie

                              @rmtucker said in nRF5 Bluetooth action!:

                              I2c is not working properly either.

                              Seems like there's more than one library named "Wire" that's floating around at the same time. I wonder if perhaps the compiler is finding the proper Wire library inside Arduino-nRF5? Or maybe it's linking with an unrelated Wire library? To answer that, you could try inserting a Serial.println() into the proper library and see if it fires off when you run your code.

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

                              @NeverDie
                              Yes checked that and it is using the correct wire.h.

                              NeverDieN 1 Reply Last reply
                              0
                              • rmtuckerR rmtucker

                                @NeverDie
                                Yes checked that and it is using the correct wire.h.

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

                                @rmtucker
                                Is there a mysensors demo sketch that involves i2c? I could try it on my end, though I expect I'd probably get the same as you.

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

                                  I see that Amazon is selling the Arduino Primo now: https://www.amazon.com/Arduino-A000138-low-power-coin-sized-wearables/dp/B073JN7XXR/ref=sr_1_12?ie=UTF8&qid=1501982634&sr=8-12&keywords=nrf52832

                                  First time I've seen it for sale anywhere.

                                  T 1 Reply Last reply
                                  0
                                  • NeverDieN NeverDie

                                    I see that Amazon is selling the Arduino Primo now: https://www.amazon.com/Arduino-A000138-low-power-coin-sized-wearables/dp/B073JN7XXR/ref=sr_1_12?ie=UTF8&qid=1501982634&sr=8-12&keywords=nrf52832

                                    First time I've seen it for sale anywhere.

                                    T Offline
                                    T Offline
                                    Toyman
                                    wrote on last edited by Toyman
                                    #540

                                    @NeverDie they also has started to sell "big" Primo

                                    NeverDieN 1 Reply Last reply
                                    0
                                    • T Toyman

                                      @NeverDie they also has started to sell "big" Primo

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

                                      @Toyman said in nRF5 Bluetooth action!:

                                      @NeverDie they also has started to sell "big" Primo

                                      Yeah, the big version has Wi-Fi, so I suspect it's meant to function much like a wireless serial gateway.

                                      For the convenience of other readers here, here's a link:
                                      https://www.amazon.com/Arduino-A000135-featuring-Nordic-processor/dp/B0721P6STJ/ref=sr_1_1?ie=UTF8&qid=1502011422&sr=8-1&keywords=arduino+primo

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

                                        Maybe you can get much of the same benefits--but at a lower cost--by combining an nRF5 with an ESP8266. Example:
                                        https://www.openhardware.io/view/443/nRF52832-ESP-LINK-Shield-for-ESP8266-Wemos-D1-Mini

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

                                          This is strange: now when I do the timed sleep on the infor-link module, it shows a current drain of about 60ua, whereas yesterday it was around 6ua. Maybe I somehow damaged it by connecting a couple of the input pins (A2 and A4) to Vcc? I wouldn't think so, though, because the datasheet says it should be safe to Vcc + 0.3v.

                                          I have one unused infor-link module left. I'll try wiring it up, but without the input pins this time, and measure it. I'm wondering now whether the sleep current will measure out to be 60ua, or 6ua.

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


                                          19

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 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