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 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.
  • Nca78N Nca78

    @korttoma said in nRF5 Bluetooth action!:

    @nca78 still not getting anywhere with this. Would you mind ziping your sketch folder, then I should have all the correct files (right?). If I still have issues to compile I must be missing some library or are using the wrong version of something.

    Sure, but unfortunately I cannot upload a zip file here, please send me your email by private message.

    Ok here is a google drive link, it should be easier:
    https://drive.google.com/open?id=1IhLIx0nHd5KZR9dJ9qA0-_SMGmjEpbKj

    korttomaK Offline
    korttomaK Offline
    korttoma
    Hero Member
    wrote on last edited by
    #1565

    @nca78 I have now measured the current consumption of the small bluetooth beacon device (N51822 QFABC0) using your code and the results are encouraging.

    With your code I get around 4uA sleep current compared to 800-4000uA with my old code :D

    Measurements done with an Micro (nano) ampere meter (double) that has not been calibrated against a reliable meter so do not take the measured values so seriously but more as a comparison.

    Device

    • Tomas
    Nca78N 1 Reply Last reply
    3
    • korttomaK korttoma

      @nca78 I have now measured the current consumption of the small bluetooth beacon device (N51822 QFABC0) using your code and the results are encouraging.

      With your code I get around 4uA sleep current compared to 800-4000uA with my old code :D

      Measurements done with an Micro (nano) ampere meter (double) that has not been calibrated against a reliable meter so do not take the measured values so seriously but more as a comparison.

      Device

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

      @korttoma I was going to ask you for some news. This is great news as it confirms the problem is solved even with older versions of the chip.
      Time to start work on a clean library...

      PS: I think you will have a reliable measurement with a simple multimeter, as the nrf51 by default is using an internal LDO, whether you feed it with 3.3V or (3.3V - burden voltage) in the end the chip will run at the same 1.8V voltage and use the same current. Of course it won't be the case if you have extra sensors on the board but it's not the case here.

      T 1 Reply Last reply
      1
      • Nca78N Nca78

        @korttoma I was going to ask you for some news. This is great news as it confirms the problem is solved even with older versions of the chip.
        Time to start work on a clean library...

        PS: I think you will have a reliable measurement with a simple multimeter, as the nrf51 by default is using an internal LDO, whether you feed it with 3.3V or (3.3V - burden voltage) in the end the chip will run at the same 1.8V voltage and use the same current. Of course it won't be the case if you have extra sensors on the board but it's not the case here.

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

        @nca78 BTW, HolyIoT makes a similar beacon but nrf52 based. Should be much more energy efficient. The price is about $7

        1 Reply Last reply
        2
        • Mars WarriorM Offline
          Mars WarriorM Offline
          Mars Warrior
          wrote on last edited by
          #1568

          I see a lot of nice assembled PCB's on this forum, and just out of curiosity, but do you guys do your own SMT assembly?

          I looked at the PCBA options, but just a small batch of 10 PCB's starts somewhere around $140 excluding components.
          It would save me I think a lot of work, but on the other hand it feels expensive...

          My ebyte modules & STM32 programmers are on there way from AliExpress, so no problem in that area.

          T 2 Replies Last reply
          0
          • Mars WarriorM Mars Warrior

            I see a lot of nice assembled PCB's on this forum, and just out of curiosity, but do you guys do your own SMT assembly?

            I looked at the PCBA options, but just a small batch of 10 PCB's starts somewhere around $140 excluding components.
            It would save me I think a lot of work, but on the other hand it feels expensive...

            My ebyte modules & STM32 programmers are on there way from AliExpress, so no problem in that area.

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

            @mars-warrior it depends on quantities of both PCBs and components on the PCBs.
            If you have lets say 10 pcbs with 20 components and potentially will have to do it again, the best bet is get a small oven (kitchen type) with PID regulator.
            If you just need 2-3 pcbs with 5-6 componets, hot air gun is your choice.
            In my current project, I solder ebyte module by hand (very easy) and then LED, resisttors and capacitors with hot air and solder paste.
            Looks pretty neat.

            Mars WarriorM 1 Reply Last reply
            1
            • T Toyman

              @mars-warrior it depends on quantities of both PCBs and components on the PCBs.
              If you have lets say 10 pcbs with 20 components and potentially will have to do it again, the best bet is get a small oven (kitchen type) with PID regulator.
              If you just need 2-3 pcbs with 5-6 componets, hot air gun is your choice.
              In my current project, I solder ebyte module by hand (very easy) and then LED, resisttors and capacitors with hot air and solder paste.
              Looks pretty neat.

              Mars WarriorM Offline
              Mars WarriorM Offline
              Mars Warrior
              wrote on last edited by
              #1570

              @toyman Thanx for that info!

              Never worked (yet) with a hot air station/pencil.

              Found some reviews here: https://wiki.ezvid.com/best-soldering-stations. Both the Kendal 853D and the Ayyue 968+ are stations I can afford to buy. I assume the cheaper ones ($50) are the ones to avoid...

              Looking at some youtube vids about this subject, it seems doable, even for a novice like me ;-)

              Of course, any recomendations about hot air stations are appreciated!

              1 Reply Last reply
              0
              • Mars WarriorM Mars Warrior

                I see a lot of nice assembled PCB's on this forum, and just out of curiosity, but do you guys do your own SMT assembly?

                I looked at the PCBA options, but just a small batch of 10 PCB's starts somewhere around $140 excluding components.
                It would save me I think a lot of work, but on the other hand it feels expensive...

                My ebyte modules & STM32 programmers are on there way from AliExpress, so no problem in that area.

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

                @mars-warrior

                something like this:

                https://store.reflowster.com/products/reflowster

                1 Reply Last reply
                0
                • gohanG Offline
                  gohanG Offline
                  gohan
                  Mod
                  wrote on last edited by
                  #1572

                  140$ it is quite expensive compared with a simple small oven
                  #192 Aldi Hack: Simplify SMD Soldering with a Cheap Aldi Oven. Nothing else – 06:09
                  — Andreas Spiess

                  T 1 Reply Last reply
                  0
                  • gohanG gohan

                    140$ it is quite expensive compared with a simple small oven
                    #192 Aldi Hack: Simplify SMD Soldering with a Cheap Aldi Oven. Nothing else – 06:09
                    — Andreas Spiess

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

                    @gohan I am not telling you to buy this. Just a direction.
                    I've created a PID sous vide machine. It's relatively easy project. SMD oven is absolutely the same. All you need is Arduino, thermoprobe and a relay.

                    1 Reply Last reply
                    0
                    • alowhumA Offline
                      alowhumA Offline
                      alowhum
                      Plugin Developer
                      wrote on last edited by
                      #1574

                      Quick question: when programming the eByte module (or any module really):

                      Should I select "reset enable or not? What does that do exactly?
                      Should I select clock: "Crystal oscillator" for the eByte module?

                      NeverDieN 2 Replies Last reply
                      0
                      • alowhumA alowhum

                        Quick question: when programming the eByte module (or any module really):

                        Should I select "reset enable or not? What does that do exactly?
                        Should I select clock: "Crystal oscillator" for the eByte module?

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

                        @alowhum "Reset enable" determines whether pin21 acts as a reset pin or not.

                        1 Reply Last reply
                        1
                        • alowhumA alowhum

                          Quick question: when programming the eByte module (or any module really):

                          Should I select "reset enable or not? What does that do exactly?
                          Should I select clock: "Crystal oscillator" for the eByte module?

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

                          @alowhum IIRC, the crystal oscillator is only required by Bluetooth. For everything else, the internal resonator is sufficient.

                          S 1 Reply Last reply
                          1
                          • alowhumA Offline
                            alowhumA Offline
                            alowhum
                            Plugin Developer
                            wrote on last edited by
                            #1577

                            Thanks!

                            I received two new eByte modules. I can't even connect to either one, both with BMP or ST-Link V2. Very strange. I'm going to try not powering them from the USB stick but from a second 3.3v source.

                            T 1 Reply Last reply
                            0
                            • alowhumA alowhum

                              Thanks!

                              I received two new eByte modules. I can't even connect to either one, both with BMP or ST-Link V2. Very strange. I'm going to try not powering them from the USB stick but from a second 3.3v source.

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

                              @alowhum did you manage to flash them?

                              NeverDieN 1 Reply Last reply
                              0
                              • alowhumA Offline
                                alowhumA Offline
                                alowhum
                                Plugin Developer
                                wrote on last edited by alowhum
                                #1579

                                @toyman No. I don't understand what's going on, as I was able to flash one succesfully before. I did find [this a bit unnerving].(https://devzone.nordicsemi.com/f/nordic-q-a/19943/nrf52832-unable-to-connect-to-the-target).

                                Could it be that the EByte chips need the DCDC stuff before they can be connected to? Or that the exact moment on power-on (reset) matters?

                                One thing I have found is that I had installed OpenOCD on my laptop to turn a ST-Link V2 into a Black Magic Probe. That version of OpenOCD was overruling the hacked version that Sandeep Mistry had created for the NRF5.

                                But even with that removed, the problem remains this:

                                "TARGET: nrf52.cpu - Not halted".

                                Apparently this is a sign that the chips are protected. I was able to remove that protection before (by selecting "Burn Bootloader"), but it doesn't work now.

                                Nca78N 1 Reply Last reply
                                0
                                • T Toyman

                                  @alowhum did you manage to flash them?

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

                                  @alowhum said in nRF5 Bluetooth action!:

                                  Could it be that the EByte chips need the DCDC stuff before they can be connected to?

                                  No.

                                  1 Reply Last reply
                                  0
                                  • alowhumA alowhum

                                    @toyman No. I don't understand what's going on, as I was able to flash one succesfully before. I did find [this a bit unnerving].(https://devzone.nordicsemi.com/f/nordic-q-a/19943/nrf52832-unable-to-connect-to-the-target).

                                    Could it be that the EByte chips need the DCDC stuff before they can be connected to? Or that the exact moment on power-on (reset) matters?

                                    One thing I have found is that I had installed OpenOCD on my laptop to turn a ST-Link V2 into a Black Magic Probe. That version of OpenOCD was overruling the hacked version that Sandeep Mistry had created for the NRF5.

                                    But even with that removed, the problem remains this:

                                    "TARGET: nrf52.cpu - Not halted".

                                    Apparently this is a sign that the chips are protected. I was able to remove that protection before (by selecting "Burn Bootloader"), but it doesn't work now.

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

                                    @alowhum have you tried the menu item to write softdevice ? If I remember well it will unlock the chip and after that you will be allowed to write code to it.

                                    1 Reply Last reply
                                    0
                                    • O Offline
                                      O Offline
                                      Omemanti
                                      wrote on last edited by Omemanti
                                      #1582

                                      Hey,

                                      somehow I cant change the pins on my Ebyte module. Im trying to test with MockMysensors.
                                      I want te TX set to pin nr. P0.06

                                      I changed: MyBoardNRF.h and included nrf.h

                                      #define PIN_SERIAL_RX (8)
                                      #define PIN_SERIAL_TX (6)

                                      but somehow the TX pin stays P0.25.

                                      Can someone point me in the right direction?

                                      The node connects to the gateway, so thats also working.

                                      Seems like that if you put the MyBoardNRF5 files into the example map and you change some things in that file using the Arduino IDE, it doenst get uploaded. When I changed the MyBoardNRF5 file using Brackets it working as intended.

                                      1 Reply Last reply
                                      0
                                      • alowhumA Offline
                                        alowhumA Offline
                                        alowhum
                                        Plugin Developer
                                        wrote on last edited by
                                        #1583

                                        @Nca78 Thanks, but it didn't work either :-(

                                        Some notes from my adventures with the eByte module:

                                        I've been playing with OpenOCD and the ST-Link v2. The ST-Link V2 that I turned into a Black Magic Probe doesn't see the modules.

                                        I went into the Arduino's folder that has OpenOCD, created .cfg file, and then:

                                        ./openocd -d2 -f nrf52832.cfg
                                        

                                        This started the OpenOCD server. Then I opened another terminal window and did

                                        telnet localhost 4444
                                        

                                        Now I could manually issue some OpenOCD commands. The goal was to do a manual mass erase.

                                        Some OpenOCD commands and their output:

                                        flash probe 0                                                                 c Unknown device (HWID 0x00000000)
                                        
                                        > flash banks
                                        #0 : nrf52.flash (nrf51) at 0x00000000, size 0x00000000, buswidth 1, chipwidth 1
                                        #1 : nrf52.uicr (nrf51) at 0x10001000, size 0x00000000, buswidth 1, chipwidth 1
                                        
                                        > flash probe 1
                                        Unknown device (HWID 0x00000000)
                                        flash 'nrf51' found at 0x10001000
                                        
                                        > nrf51 mass_erase 0
                                        Target not halted
                                        

                                        This command actually resulted in OpenOCD ballooning to 8Gb in ram. Then after 5 minutes of seemingly being busy, I got the 'target not halted' command.

                                        > flash info 1
                                        Unknown device (HWID 0x00000000)
                                        #1 : nrf51 at 0x10001000, size 0x00000100, buswidth 1, chipwidth 1
                                        	#  0: 0x00000000 (0x100 0kB) not protected
                                        Target not halted
                                        error retrieving flash info
                                        

                                        Here is says "target not protected".

                                        > nrf52.cpu curstate
                                        reset
                                        

                                        Weird: the processor says it is in reset state? Could it be that it is not so much protected, but that it is constantly being reset? But then why is this with all the chips?

                                        Once the OpenOCD server is running I also tried getting into the chip with

                                        telnet localhost 3333
                                        

                                        But then I get "Error: attempted 'gdb' connection rejected"

                                        The OpenOCD documentation mentions the chip protection:

                                        Flash Driver: nrf5
                                        All members of the nRF51 microcontroller families from Nordic Semiconductor include internal flash and use ARM Cortex-M0 core. Also, the nRF52832 microcontroller from Nordic Semiconductor, which include internal flash and use an ARM Cortex-M4F core.
                                        flash bank $_FLASHNAME nrf5 0 0x00000000 0 0 $_TARGETNAME
                                        Some nrf5-specific commands are defined:
                                        Command: nrf5 mass_erase
                                        Erases the contents of the code memory and user information configuration registers as well. It must be noted that this command works only for chips that do not have factory pre-programmed region 0 code.
                                        http://www.openocd.org/doc/html/Flash-Commands.html

                                        I also got out my voltmeter. Pin 21 and pin 25 have 3v on them, the rest don't.

                                        YveauxY T M 3 Replies Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          maciekczwa
                                          wrote on last edited by
                                          #1584

                                          I have the same problem with brand news ebyte modeules.

                                          Here are my openocd logs:

                                          Open On-Chip Debugger 0.10.0-dev-gdc53227 (2016-04-09-13:45)
                                          Licensed under GNU GPL v2
                                          For bug reports, read
                                          http://openocd.org/doc/doxygen/bugs.html
                                          debug_level: 2
                                          0x4000
                                          Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
                                          adapter speed: 10000 kHz
                                          Info : Unable to match requested speed 10000 kHz, using 4000 kHz
                                          Info : Unable to match requested speed 10000 kHz, using 4000 kHz
                                          Info : clock speed 4000 kHz
                                          Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
                                          Info : using stlink api v2
                                          Info : Target voltage: 3.241270
                                          Info : nrf52.cpu: hardware has 0 breakpoints, 2 watchpoints
                                          Error: timed out while waiting for target halted
                                          TARGET: nrf52.cpu - Not halted
                                          in procedure 'program'
                                          in procedure 'reset' called at file "embedded:startup.tcl", line 478
                                          in procedure 'ocd_bouncer'

                                          embedded:startup.tcl:454: Error: ** Unable to reset target **
                                          in procedure 'program'
                                          in procedure 'program_error' called at file "embedded:startup.tcl", line 479
                                          at file "embedded:startup.tcl", line 454
                                          wybrany port szeregowy at file "embedded:startup.tcl", line 454
                                          nie istnieje albo Twoja płytka nie jest podłączona

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


                                          17

                                          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