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. my first nrf5 ... NRF51/NRF52 which is better for MySensors ?

my first nrf5 ... NRF51/NRF52 which is better for MySensors ?

Scheduled Pinned Locked Moved Hardware
31 Posts 10 Posters 5.4k Views 7 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.
  • rozpruwaczR Offline
    rozpruwaczR Offline
    rozpruwacz
    wrote on last edited by Nca78
    #1

    Hi,

    I want to start using nrf5 with mysensors. I'm looking for some easy to use nrf52832 modules that does not require much external components (if any). I found this:
    https://pl.aliexpress.com/store/product/Nordic-nRF52832-module-Bluetooth-low-energy-development-board-for-BLE-mesh/420533_32867403706.html?spm=a2g17.12010612.8148356.6.71c7caa2i1bdWy

    Is it good for use with battery powered node ? I'm not sure but it has the 32kHz oscilator and inductor for low power mode. The module exposes swdio ad swdclk pins for programming so it can be programmed with cheap st-link v2 compatible programmers ? I would like to power it directly from coincell battery. So after connecting just a battery could it already talk with other mysensors nodes ?

    rozpruwaczR 1 Reply Last reply
    0
    • rozpruwaczR rozpruwacz

      Hi,

      I want to start using nrf5 with mysensors. I'm looking for some easy to use nrf52832 modules that does not require much external components (if any). I found this:
      https://pl.aliexpress.com/store/product/Nordic-nRF52832-module-Bluetooth-low-energy-development-board-for-BLE-mesh/420533_32867403706.html?spm=a2g17.12010612.8148356.6.71c7caa2i1bdWy

      Is it good for use with battery powered node ? I'm not sure but it has the 32kHz oscilator and inductor for low power mode. The module exposes swdio ad swdclk pins for programming so it can be programmed with cheap st-link v2 compatible programmers ? I would like to power it directly from coincell battery. So after connecting just a battery could it already talk with other mysensors nodes ?

      rozpruwaczR Offline
      rozpruwaczR Offline
      rozpruwacz
      wrote on last edited by
      #2

      Oh, and could it be used as a gateway also ? I read somewhere that for low power nodes the low-frequency oscillator should be choosed and for normal nodes the high-frequency crystal should be should be choosed. So it seems like the hardware for low power node cannot be also used as a gateway. Is it true ?

      1 Reply Last reply
      0
      • rozpruwaczR Offline
        rozpruwaczR Offline
        rozpruwacz
        wrote on last edited by
        #3

        Hi,

        I'm looking through datasheets and it seems like there is not so much difference between the two. Of course the nrf52832 has more peripherials, memory and is a little bit more low power but those aspects are not so important for my use case. So what would make nrf52832 better for mysensors ? The nrf52832 has -96dBm sensivity at 1Mbps data rate (and do not have 250kbps data rate) and nrf51822 also have -96dBm sensivity at 250kbps data rate. Both have +4dBm transmit power. So for me it looks like if there is no peripherials or memory limitations both chips are equally good for MySensors network.

        Nca78N 1 Reply Last reply
        0
        • Nca78N Offline
          Nca78N Offline
          Nca78
          Hardware Contributor
          wrote on last edited by
          #4

          Hello, I have merged your 2 topîcs are they are relatively similar.

          1 Reply Last reply
          1
          • Nca78N Offline
            Nca78N Offline
            Nca78
            Hardware Contributor
            wrote on last edited by
            #5

            @rozpruwacz said in my first nrf5:

            Oh, and could it be used as a gateway also ? I read somewhere that for low power nodes the low-frequency oscillator should be choosed and for normal nodes the high-frequency crystal should be should be choosed. So it seems like the hardware for low power node cannot be also used as a gateway. Is it true ?

            If you are using MySensors, you don't care at the LF oscillator, as it is used to keep precise timing in bluetooth mode (node sleeps and has to wake up at a very precise moment to receive messages). In MySensors it's not the same the LF clock is not used. What you need to save power is inductor so the chip can use it's internal DC-DC converter and use much less power when sending/receiving with the radio.

            Regarding the high frequency clock you always need one, opposite to the atmega chips you can't set the frequency with the NRF5 chips, NRF51 will run at 16MHz and NRF52 at 64MHz, and for that they need their high frenquency clock. You can see it on the picture of the module, metallic rectangle with a gold "frame", it's written 32MHz on it.

            1 Reply Last reply
            0
            • rozpruwaczR rozpruwacz

              Hi,

              I'm looking through datasheets and it seems like there is not so much difference between the two. Of course the nrf52832 has more peripherials, memory and is a little bit more low power but those aspects are not so important for my use case. So what would make nrf52832 better for mysensors ? The nrf52832 has -96dBm sensivity at 1Mbps data rate (and do not have 250kbps data rate) and nrf51822 also have -96dBm sensivity at 250kbps data rate. Both have +4dBm transmit power. So for me it looks like if there is no peripherials or memory limitations both chips are equally good for MySensors network.

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

              @rozpruwacz said in my first nrf5:

              Hi,

              I'm looking through datasheets and it seems like there is not so much difference between the two. Of course the nrf52832 has more peripherials, memory and is a little bit more low power but those aspects are not so important for my use case. So what would make nrf52832 better for mysensors ? The nrf52832 has -96dBm sensivity at 1Mbps data rate (and do not have 250kbps data rate) and nrf51822 also have -96dBm sensivity at 250kbps data rate. Both have +4dBm transmit power. So for me it looks like if there is no peripherials or memory limitations both chips are equally good for MySensors network.

              There is a lot of difference in terms of RAM (16K/64K) and in terms of processing power (64MHz M4 vs 16MHz M0). Even the flash can make a difference as with OTA update you need to split the memory in different parts, so you have at best half of the memory available for your program (for current firmware, and other half for downloading firmware). In reality it's even less than that because you need bootloader, and some part for permanent storage.

              In terms of "low power" there's a significant improvement in transmit/receive power, and if you can transmit at 1M instead of 250k for the same sensitivity budget it means you need to transmit only 1/4 of the time, big improvement... With only 50% of sleep power also, there's no comparison NRF52832 is much better.
              NRF51 also have some limitations in terms of interrupt, it's a problem for low power nodes as over one interrupt you have to make relatively complex tricks to keep very low power in deep sleep.

              Given the low price difference between the 2 chips and all the extra stuff in the NRF52, there is no reason to chose NRF51 now, except if you're really, really tight on budget.

              rozpruwaczR 1 Reply Last reply
              0
              • Nca78N Nca78

                @rozpruwacz said in my first nrf5:

                Hi,

                I'm looking through datasheets and it seems like there is not so much difference between the two. Of course the nrf52832 has more peripherials, memory and is a little bit more low power but those aspects are not so important for my use case. So what would make nrf52832 better for mysensors ? The nrf52832 has -96dBm sensivity at 1Mbps data rate (and do not have 250kbps data rate) and nrf51822 also have -96dBm sensivity at 250kbps data rate. Both have +4dBm transmit power. So for me it looks like if there is no peripherials or memory limitations both chips are equally good for MySensors network.

                There is a lot of difference in terms of RAM (16K/64K) and in terms of processing power (64MHz M4 vs 16MHz M0). Even the flash can make a difference as with OTA update you need to split the memory in different parts, so you have at best half of the memory available for your program (for current firmware, and other half for downloading firmware). In reality it's even less than that because you need bootloader, and some part for permanent storage.

                In terms of "low power" there's a significant improvement in transmit/receive power, and if you can transmit at 1M instead of 250k for the same sensitivity budget it means you need to transmit only 1/4 of the time, big improvement... With only 50% of sleep power also, there's no comparison NRF52832 is much better.
                NRF51 also have some limitations in terms of interrupt, it's a problem for low power nodes as over one interrupt you have to make relatively complex tricks to keep very low power in deep sleep.

                Given the low price difference between the 2 chips and all the extra stuff in the NRF52, there is no reason to chose NRF51 now, except if you're really, really tight on budget.

                rozpruwaczR Offline
                rozpruwaczR Offline
                rozpruwacz
                wrote on last edited by
                #7

                @nca78 said in my first nrf5 ... NRF51/NRF52 which is better for MySensors ?:

                In terms of "low power" there's a significant improvement in transmit/receive power, and if you can transmit at 1M instead of 250k for the same sensitivity budget it means you need to transmit only 1/4 of the time, big improvement... With only 50% of sleep power also, there's no comparison NRF52832 is much better.
                NRF51 also have some limitations in terms of interrupt, it's a problem for low power nodes as over one interrupt you have to make relatively complex tricks to keep very low power in deep sleep.

                Ok, so the winner is nrf52832 :)

                regarding the low frequency oscillator, here it is written in the "Buying guide" section that "If you plan to make a battery powered sensor, you should choose a module including the low-frequency oscillator (32,768kHz) for precise low power sleep modes". So this is not true as the LF clock is not used by MySensors ?

                Nca78N 1 Reply Last reply
                0
                • rozpruwaczR rozpruwacz

                  @nca78 said in my first nrf5 ... NRF51/NRF52 which is better for MySensors ?:

                  In terms of "low power" there's a significant improvement in transmit/receive power, and if you can transmit at 1M instead of 250k for the same sensitivity budget it means you need to transmit only 1/4 of the time, big improvement... With only 50% of sleep power also, there's no comparison NRF52832 is much better.
                  NRF51 also have some limitations in terms of interrupt, it's a problem for low power nodes as over one interrupt you have to make relatively complex tricks to keep very low power in deep sleep.

                  Ok, so the winner is nrf52832 :)

                  regarding the low frequency oscillator, here it is written in the "Buying guide" section that "If you plan to make a battery powered sensor, you should choose a module including the low-frequency oscillator (32,768kHz) for precise low power sleep modes". So this is not true as the LF clock is not used by MySensors ?

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

                  @rozpruwacz said in my first nrf5 ... NRF51/NRF52 which is better for MySensors ?:

                  regarding the low frequency oscillator, here it is written in the "Buying guide" section that "If you plan to make a battery powered sensor, you should choose a module including the low-frequency oscillator (32,768kHz) for precise low power sleep modes". So this is not true as the LF clock is not used by MySensors ?

                  Maybe I'm wrong when I say it is "not used by MySensors". But the way it is used if it's used is different than in bluetooth mode. Without it with MySensors all you will have is less precise sleeping duration because it will use the internal oscillator. In bluetooth it will use internal oscillator and wake up regularly to calibrate it, resulting in something like 10uA average current consumption, so in that case it's really a big problem. But if you're only planning to use MySensors and not planning to switch to BLE later, you will have 0 real problem without the LF clock.

                  rozpruwaczR 1 Reply Last reply
                  0
                  • Nca78N Nca78

                    @rozpruwacz said in my first nrf5 ... NRF51/NRF52 which is better for MySensors ?:

                    regarding the low frequency oscillator, here it is written in the "Buying guide" section that "If you plan to make a battery powered sensor, you should choose a module including the low-frequency oscillator (32,768kHz) for precise low power sleep modes". So this is not true as the LF clock is not used by MySensors ?

                    Maybe I'm wrong when I say it is "not used by MySensors". But the way it is used if it's used is different than in bluetooth mode. Without it with MySensors all you will have is less precise sleeping duration because it will use the internal oscillator. In bluetooth it will use internal oscillator and wake up regularly to calibrate it, resulting in something like 10uA average current consumption, so in that case it's really a big problem. But if you're only planning to use MySensors and not planning to switch to BLE later, you will have 0 real problem without the LF clock.

                    rozpruwaczR Offline
                    rozpruwaczR Offline
                    rozpruwacz
                    wrote on last edited by
                    #9

                    @nca78 ok thaks, so in Your opinion does the module I linked is good for testing/prototyping nrf5 MySensors nodes ?

                    O Nca78N 2 Replies Last reply
                    0
                    • rozpruwaczR rozpruwacz

                      @nca78 ok thaks, so in Your opinion does the module I linked is good for testing/prototyping nrf5 MySensors nodes ?

                      O Offline
                      O Offline
                      Omemanti
                      wrote on last edited by
                      #10

                      @rozpruwacz it looks pretty workable for testing purposes. For a final product my choice is something lika fanstel or ebyte module. Those are just easier to get into smaller cases etc. (Just my personal preference)

                      1 Reply Last reply
                      1
                      • rozpruwaczR rozpruwacz

                        @nca78 ok thaks, so in Your opinion does the module I linked is good for testing/prototyping nrf5 MySensors nodes ?

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

                        @rozpruwacz said in my first nrf5 ... NRF51/NRF52 which is better for MySensors ?:

                        @nca78 ok thaks, so in Your opinion does the module I linked is good for testing/prototyping nrf5 MySensors nodes ?

                        It is good enough yes, it seems complete, but be careful it also seems to use 2mm headers, so you will need either 2->2.54mm adapters or a custom PCB to use it on breadboard.
                        Also, you will need a programmer. The cheapest option is making a black magic probe, check the nrf5 thread for that.

                        Another solution is a NRF52 DK to have both a jlink programmer and all pins broken out to 2.54mm headers (uno format) but it's over 30$.

                        O 1 Reply Last reply
                        0
                        • Nca78N Nca78

                          @rozpruwacz said in my first nrf5 ... NRF51/NRF52 which is better for MySensors ?:

                          @nca78 ok thaks, so in Your opinion does the module I linked is good for testing/prototyping nrf5 MySensors nodes ?

                          It is good enough yes, it seems complete, but be careful it also seems to use 2mm headers, so you will need either 2->2.54mm adapters or a custom PCB to use it on breadboard.
                          Also, you will need a programmer. The cheapest option is making a black magic probe, check the nrf5 thread for that.

                          Another solution is a NRF52 DK to have both a jlink programmer and all pins broken out to 2.54mm headers (uno format) but it's over 30$.

                          O Offline
                          O Offline
                          Omemanti
                          wrote on last edited by Omemanti
                          #12

                          @nca78 @rozpruwacz indeed the nrf52dk will cost you a bit more, but will save you the troubleshooting. It's all ready and setup, so you only need to worry about the software side.

                          I have one myself and I'm pleased I did buy one when I started this journey.

                          1 Reply Last reply
                          0
                          • wassfilaW Offline
                            wassfilaW Offline
                            wassfila
                            wrote on last edited by
                            #13

                            What about the nRF52840 ? Newer, better, bigger and back to the 250Kbps.
                            And if you get the j-link edu for example you can use some nice debug tools such as the Ozone, I wasted my time enough before running after $2 st-links.

                            rozpruwaczR 1 Reply Last reply
                            0
                            • wassfilaW wassfila

                              What about the nRF52840 ? Newer, better, bigger and back to the 250Kbps.
                              And if you get the j-link edu for example you can use some nice debug tools such as the Ozone, I wasted my time enough before running after $2 st-links.

                              rozpruwaczR Offline
                              rozpruwaczR Offline
                              rozpruwacz
                              wrote on last edited by
                              #14

                              @wassfila do You know any cheap, prototyping friendly nRF52840 boards ?

                              wassfilaW 1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                Toyman
                                wrote on last edited by
                                #15

                                @rozpruwacz I would strongly encourage you do start with nrf52832 ebyte mosule coupled with Nevrdie's breakout board. It is a) proven b) cheap c) breadboard friendly

                                1 Reply Last reply
                                1
                                • H Offline
                                  H Offline
                                  hugob
                                  wrote on last edited by
                                  #16

                                  I started with nRF52 a few days ago. I have the Nordic nRF52 SDK board (PCA10056) with a nRF52840 operational as a MySensors serial gateway together with Home Assistant on a RaspberryPI (with Hass.io). I am using the Arduino nRF5 and the sandeepmistry nRF5 board libraries.

                                  Some issues:
                                  - It looks like it only works in debug mode. But in debug mode, both debug messages and gateway messages appear on the usb port. Homes Assistant is not confused by the debug messages.
                                  - Leds are not working.
                                  - The programmer on the Arduino IDE is not working for me ("No J-Link" error, while there is a J-Link interface available), so I export a HEX fle form Arduino IDE and program the board with the nRFConnect tool from Nordic.

                                  In order to solve the issues above, I installed the Segger environment. With the board you get a free license from Nordic and you can do some fancy debugging. I also looked at Keil but that is a no-go for me. With Segger, I can upload a simple Blink example from Nordic to the board an debug it. I am now struggling with importing the MySensors library sources in Segger. If someone did this before, please let me know (!). Once this is done, I can debug the code on the hardware. May be I could fix the issues, like non blinking leds, by inspecting the code and watch for configuration issues of the ports (the addressing of the ports seems to be OK). But being able to debug would be a big plus in future development.

                                  Off course, once the gateway is working with blinking leds, I want to replace the development board with something cheaper from E-Bay et al. I want to give this one a try:
                                  https://www.aliexpress.com/item/Nordic-nRF52840-module-Bluetooth-low-energy-long-range-500-meters-bluetooth-5-0-PCB-IPX-Antenna/32953759053.html
                                  The plus of this board is that you can use an external 2.4 Ghz antenna. And it has the newest 52840. If you are creating a gateway, I suppose your budget will not depend on $3 price difference.

                                  Once all that is done, I want to turn my Nordic Thingy (https://www.nordicsemi.com/eng/Products/Nordic-Thingy-52) into a MySensors device. Seems like doable. But someone has to do it.

                                  T 1 Reply Last reply
                                  0
                                  • H Offline
                                    H Offline
                                    hugob
                                    wrote on last edited by
                                    #17

                                    Just discovered that this thread covers about the same topic I addressed:
                                    https://forum.mysensors.org/topic/9717/everything-nrf52840
                                    Sorry.

                                    1 Reply Last reply
                                    0
                                    • rozpruwaczR rozpruwacz

                                      @wassfila do You know any cheap, prototyping friendly nRF52840 boards ?

                                      wassfilaW Offline
                                      wassfilaW Offline
                                      wassfila
                                      wrote on last edited by wassfila
                                      #18

                                      @rozpruwacz yeah nRF52840 is here with reasonably priced boards. I got one from ali shop holyiot 18010 now for around 6.5 €, and as mentioned @hugob the nRF52-Dongle, which is by the way available at mouser for 9 € only. And you can follow his link for further nRF52840 discussion.
                                      I would not know how to help with the sw, in the projects I worked on, I simply used a similar environment to the Nordik SDK framework simply with makefiles. I do have a segger j-link debugger that allows using ozone, and I flash with the command line flashing utilities, even adding some fancy python scripts for user id based customisation.

                                      1 Reply Last reply
                                      0
                                      • H hugob

                                        I started with nRF52 a few days ago. I have the Nordic nRF52 SDK board (PCA10056) with a nRF52840 operational as a MySensors serial gateway together with Home Assistant on a RaspberryPI (with Hass.io). I am using the Arduino nRF5 and the sandeepmistry nRF5 board libraries.

                                        Some issues:
                                        - It looks like it only works in debug mode. But in debug mode, both debug messages and gateway messages appear on the usb port. Homes Assistant is not confused by the debug messages.
                                        - Leds are not working.
                                        - The programmer on the Arduino IDE is not working for me ("No J-Link" error, while there is a J-Link interface available), so I export a HEX fle form Arduino IDE and program the board with the nRFConnect tool from Nordic.

                                        In order to solve the issues above, I installed the Segger environment. With the board you get a free license from Nordic and you can do some fancy debugging. I also looked at Keil but that is a no-go for me. With Segger, I can upload a simple Blink example from Nordic to the board an debug it. I am now struggling with importing the MySensors library sources in Segger. If someone did this before, please let me know (!). Once this is done, I can debug the code on the hardware. May be I could fix the issues, like non blinking leds, by inspecting the code and watch for configuration issues of the ports (the addressing of the ports seems to be OK). But being able to debug would be a big plus in future development.

                                        Off course, once the gateway is working with blinking leds, I want to replace the development board with something cheaper from E-Bay et al. I want to give this one a try:
                                        https://www.aliexpress.com/item/Nordic-nRF52840-module-Bluetooth-low-energy-long-range-500-meters-bluetooth-5-0-PCB-IPX-Antenna/32953759053.html
                                        The plus of this board is that you can use an external 2.4 Ghz antenna. And it has the newest 52840. If you are creating a gateway, I suppose your budget will not depend on $3 price difference.

                                        Once all that is done, I want to turn my Nordic Thingy (https://www.nordicsemi.com/eng/Products/Nordic-Thingy-52) into a MySensors device. Seems like doable. But someone has to do it.

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

                                        @hugob said in my first nrf5 ... NRF51/NRF52 which is better for MySensors ?:

                                        • The programmer on the Arduino IDE is not working for me ("No J-Link" error, while there is a J-Link interface available), so I export a HEX fle form Arduino IDE and program the board with the nRFConnect tool from Nordic.

                                        if read sandeep's notes on Githun, you'll find you have to replace the driver with Zaddig but then Jlink will stop functioning in Keil.
                                        That's why I use BMP for Arduino-style programming as it has its own drivers and do not ruin jlink installation

                                        1 Reply Last reply
                                        0
                                        • T Offline
                                          T Offline
                                          Toyman
                                          wrote on last edited by
                                          #20

                                          how do you guys solder nrf52840 modules without reflow oven?
                                          they have many pads at the bottom

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


                                          22

                                          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