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. OpenHardware.io
  3. 💬 NModule

💬 NModule

Scheduled Pinned Locked Moved OpenHardware.io
mysensorsnmoduletemperaturedoorlightpirhumidityrelaymilighttouchaccelerometer
89 Posts 12 Posters 17.8k Views 10 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.
  • D Offline
    D Offline
    dakipro
    wrote on last edited by
    #30

    for best battery life it is advisable to burn bootloader mentioned in the text.
    How much would a battery lifetime be, for example one single temp sensor reading every 5min?
    When using custom bootloader, then over the air updates cannot be used? Or could the MYSBootloader be configured to take most of the cr2025 battery?

    C: OpenHAB2 with node-red on linux laptop
    GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
    GW: Arduino Mega, RFLink 433Mhz

    Nca78N 1 Reply Last reply
    0
    • D dakipro

      for best battery life it is advisable to burn bootloader mentioned in the text.
      How much would a battery lifetime be, for example one single temp sensor reading every 5min?
      When using custom bootloader, then over the air updates cannot be used? Or could the MYSBootloader be configured to take most of the cr2025 battery?

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

      Hello @dakipro,

      what is necessary is to remove the default BOD limit, it is set at 2.7V and that is too high :

      • even if CRxxxx cells were running like alkaline cells, this would waste a big share of the capacity, around 30% I think
      • CRxxxx are not like alkaline cells, they have a high internal resistance and can supply only a limited amount of current, else the voltage drops. Meaning that in fact you will reach this 2.7V much faster if you have several RX/TX in a row

      That is the main limit. I also advise to change the frequency to 1MHz and use internal oscillator if you have no calculation to do: door sensor, all basic I2C sensors etc etc because at 1MHz the power consumption is significantly lower. With NRF24 and I2C sensors it will not slow the "on" time much, data sent to/from radio and sensors takes very little time to transfer and main time is for waiting for radio reply or data from sensor: not affected by frequency so better have consumption as little as possible.

      For battery lifetime if you remove leds and regulators with si7021 it will be way over 1 year. I have not tested those sensors for long enough, but I've had some round "puck" sensors with si7021 running for a few months on chinese CR2032 and I have not seen any voltage drop. Interval time is set to 1mn, it's not sending 5x more than 5mn interval (because often in one minute temp/hum don't change) but probably 2-3 times more, and with that I have no doubt the batteries will last way over a year.

      My entrance door sensors is my oldest sensor, also running on pro mini (and still have it's TX led) and chinese CR2032, it uses the normally opened + normally closed reed swich and after 14-15 months of use is still at 85% of battery.

      You can check that on battery life calculators anyway :

      • with WDT disabled (= when you are not waking up periodically) consumption of board is below 2uA
      • with WDT enabled and si7021 I measured it below 6uA
      • when on with radio enabled for transmit/receive, at 1MHz power consumption is around 15mA when battery is new, a bit lower

      This is a worse case scenario with battery capacity lowered to account for chinese battery (brand name is 220), and long wake up time with radio considered always on, sending data every 5 mns.
      In reality radio is switched on only when data must be sent so time for reading voltage and sensor value is done consuming around 1mA at 1MHz.
      0_1499308138647_wcs.png

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dakipro
        wrote on last edited by
        #32

        thanks for detailed explanation, I was always a bit skeptical towards those small batteries, but your module (and documentation) clears all doubts :)
        Do you have any experience with OTA updates? I understand that it also needs custom boot-loader (sorry still not having enough understanding about all the things that are involved in making one node, a lot of new terms for me :) )

        C: OpenHAB2 with node-red on linux laptop
        GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
        GW: Arduino Mega, RFLink 433Mhz

        Nca78N 1 Reply Last reply
        1
        • D dakipro

          thanks for detailed explanation, I was always a bit skeptical towards those small batteries, but your module (and documentation) clears all doubts :)
          Do you have any experience with OTA updates? I understand that it also needs custom boot-loader (sorry still not having enough understanding about all the things that are involved in making one node, a lot of new terms for me :) )

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

          @dakipro no sorry I'm not (yet) using OTA.
          But yes you need a specific bootloader that will download the new code from the controller and update flash memory of the atmega. There are 2 solutions for this (sorry forgot the names of bootloaders but check the documentation):

          • a bootloader that needs an external flash chip to store the downloaded code. It's a constraint, but it allows the sensor to continue running during download and it will be "offline" only for a short time during memory copy & reboot
          • a bootloader that will copy directly the new code to the flash memory. It means as soon as the sketch started to download your node is offline until all the sketch is downloaded. And if update fails, your old sketch is still gone

          OTA also need some specific code to check for the updates.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dakipro
            wrote on last edited by
            #34

            Thanks :)
            Then I guess all that is left is to motivate you to start OTA and improve it (finetune) it to nmodule :)
            I used it for regular modules and it is really practical, but I never had much luck with optimizing modules for battery performance. I would get a half year/year with 2 AA batteries, which is not that good comparing with your tweaks for CR battery.

            Keep us updated on other modules, people are waiting for your tests to start ordering :)

            C: OpenHAB2 with node-red on linux laptop
            GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
            GW: Arduino Mega, RFLink 433Mhz

            Nca78N 2 Replies Last reply
            1
            • D dakipro

              Thanks :)
              Then I guess all that is left is to motivate you to start OTA and improve it (finetune) it to nmodule :)
              I used it for regular modules and it is really practical, but I never had much luck with optimizing modules for battery performance. I would get a half year/year with 2 AA batteries, which is not that good comparing with your tweaks for CR battery.

              Keep us updated on other modules, people are waiting for your tests to start ordering :)

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

              @dakipro for OTA I don't think there's much to do with batteries & OTA' Either the batteries allow continuous load (CR123, AAA, li-ion etc) or you just can't do it.

              For battery life it's pretty simple but people keep choosing the wrong options and end up with poor battery life/instability etc etc. That's the reason I created the NModule: cheap and sure way to get a good battery life. Then I got a bit wild with the "shields" but that's another story :D

              For other shields I'm making (slow) progress but I hope to take NModule, TH, Light/SSR, dual touch button, MiLight bridge and PWM boards out of the "work in progress" status during the next 2 weeks.

              0_1499479885941_IMAG1807~2.jpg

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dakipro
                wrote on last edited by
                #36

                Hey @Nca78 I received the boards and components (yay!)
                But... I connected three modules, and none of them works :(
                They all have transport (radio?) fail like

                32 TSM:INIT
                49 TSF:WUR:MS=0
                81 !TSM:INIT:TSP FAIL
                98 TSM:FAIL:CNT=1
                114 TSM:FAIL:PDT

                I tried connecting radios from two different batches, I tried connecting only the radio and arduino, I tried powering it from separate powersupply and only debug via serial. I tried provided sketch and also tried dummy sketch from the examples. I tried using the CR battery, node works fine except that the radio doesn't start communicating.
                I do measure 3V on the radio pins. I tried with and without radio cap.

                I am using chinese silicon mat to solder components on, I read somewhere that you use something similar *(not that I am spying on you :) ) but could it be that I am frying all the radios with static electricity?
                I have used the mat before and it works fine with regular radios, nothing fried so far, but there is something preventing nodes from working :(

                Do you have any suggestions on how I can debug them and see what seems to be the problem?

                C: OpenHAB2 with node-red on linux laptop
                GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
                GW: Arduino Mega, RFLink 433Mhz

                Nca78N NeverDieN 2 Replies Last reply
                0
                • D dakipro

                  Hey @Nca78 I received the boards and components (yay!)
                  But... I connected three modules, and none of them works :(
                  They all have transport (radio?) fail like

                  32 TSM:INIT
                  49 TSF:WUR:MS=0
                  81 !TSM:INIT:TSP FAIL
                  98 TSM:FAIL:CNT=1
                  114 TSM:FAIL:PDT

                  I tried connecting radios from two different batches, I tried connecting only the radio and arduino, I tried powering it from separate powersupply and only debug via serial. I tried provided sketch and also tried dummy sketch from the examples. I tried using the CR battery, node works fine except that the radio doesn't start communicating.
                  I do measure 3V on the radio pins. I tried with and without radio cap.

                  I am using chinese silicon mat to solder components on, I read somewhere that you use something similar *(not that I am spying on you :) ) but could it be that I am frying all the radios with static electricity?
                  I have used the mat before and it works fine with regular radios, nothing fried so far, but there is something preventing nodes from working :(

                  Do you have any suggestions on how I can debug them and see what seems to be the problem?

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

                  Hello, @dakipro, can you show a picture of one of the board ?
                  Did you short the jumpers (JPOWER and JRDIO) if you're not using any regulators ?

                  Yes I use a cheap silicon mat because it's so convenient, and I never had any problems with it all my radio worked.

                  1 Reply Last reply
                  0
                  • D dakipro

                    Hey @Nca78 I received the boards and components (yay!)
                    But... I connected three modules, and none of them works :(
                    They all have transport (radio?) fail like

                    32 TSM:INIT
                    49 TSF:WUR:MS=0
                    81 !TSM:INIT:TSP FAIL
                    98 TSM:FAIL:CNT=1
                    114 TSM:FAIL:PDT

                    I tried connecting radios from two different batches, I tried connecting only the radio and arduino, I tried powering it from separate powersupply and only debug via serial. I tried provided sketch and also tried dummy sketch from the examples. I tried using the CR battery, node works fine except that the radio doesn't start communicating.
                    I do measure 3V on the radio pins. I tried with and without radio cap.

                    I am using chinese silicon mat to solder components on, I read somewhere that you use something similar *(not that I am spying on you :) ) but could it be that I am frying all the radios with static electricity?
                    I have used the mat before and it works fine with regular radios, nothing fried so far, but there is something preventing nodes from working :(

                    Do you have any suggestions on how I can debug them and see what seems to be the problem?

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

                    @dakipro
                    I get the impression that not all radio modules use the same pinouts. You may want to confirm that yours are the same as @Nca78's in that regard.

                    Nca78N 1 Reply Last reply
                    1
                    • NeverDieN NeverDie

                      @dakipro
                      I get the impression that not all radio modules use the same pinouts. You may want to confirm that yours are the same as @Nca78's in that regard.

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

                      @NeverDie is right. Some modules like those from CDEByte are different from the classic SMD modules from AliExpress and must be soldered on the "pa/lna" pinout (the one closest to the edge of the board).

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

                        Looks as though the PA/LNA part of the silkscreen warning got largely obliterated by the solder pads.

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          dakipro
                          wrote on last edited by
                          #41

                          Must I have a radio cap?
                          I connected the jumpers now quickly for a test (missed the part that I need them), but still same error

                          49 TSF:WUR:MS=0
                          81 !TSM:INIT:TSP FAIL
                          98 TSM:FAIL:CNT=1
                          114 TSM:FAIL:PDT
                          10158 TSM:FAIL:RE-INIT
                          10174 TSM:INIT
                          10207 !TSM:INIT:TSP FAIL
                          10240 TSM:FAIL:CNT=2
                          10256 TSM:FAIL:PDT

                          Here is the photo of the board (a bit blurry, I can take it again if it helps)
                          0_1506263553498_IMG_0702-800.jpg

                          I am missing the radio cap as I was testing lest night without them, but I can solder them in a few hours and test again if you think it will help.

                          I connect power to the vcc pin of the "connection pins" right?

                          Radio is the one linked in the BOM from aliexpress

                          C: OpenHAB2 with node-red on linux laptop
                          GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
                          GW: Arduino Mega, RFLink 433Mhz

                          NeverDieN 1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            dakipro
                            wrote on last edited by
                            #42

                            I put the radio cap back (4.7uf the largest I have in smd), but still same error :(

                            C: OpenHAB2 with node-red on linux laptop
                            GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
                            GW: Arduino Mega, RFLink 433Mhz

                            1 Reply Last reply
                            0
                            • D dakipro

                              Must I have a radio cap?
                              I connected the jumpers now quickly for a test (missed the part that I need them), but still same error

                              49 TSF:WUR:MS=0
                              81 !TSM:INIT:TSP FAIL
                              98 TSM:FAIL:CNT=1
                              114 TSM:FAIL:PDT
                              10158 TSM:FAIL:RE-INIT
                              10174 TSM:INIT
                              10207 !TSM:INIT:TSP FAIL
                              10240 TSM:FAIL:CNT=2
                              10256 TSM:FAIL:PDT

                              Here is the photo of the board (a bit blurry, I can take it again if it helps)
                              0_1506263553498_IMG_0702-800.jpg

                              I am missing the radio cap as I was testing lest night without them, but I can solder them in a few hours and test again if you think it will help.

                              I connect power to the vcc pin of the "connection pins" right?

                              Radio is the one linked in the BOM from aliexpress

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

                              @dakipro

                              Your photo seems to show some hair-like filaments. Don't know if they're conductive, but, if so, maybe they're bridging some of your solder pads? Have you checked with a continuity meter?

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                dakipro
                                wrote on last edited by
                                #44

                                checked between the pins, no radio pins are touching each other. Those hairs er most likely from the cat, got them cleaned after the photo.
                                I will try to make one more module in a few days and test.

                                But to confirm, for the simplest module I need >4.7uF cap, pro mini and the radio, two jumpers (jpower and jrdio) and some mock sketch, and it should all work?
                                Have I missed some other jumper or resistor or some other component maybe?

                                C: OpenHAB2 with node-red on linux laptop
                                GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
                                GW: Arduino Mega, RFLink 433Mhz

                                Nca78N 1 Reply Last reply
                                0
                                • D dakipro

                                  checked between the pins, no radio pins are touching each other. Those hairs er most likely from the cat, got them cleaned after the photo.
                                  I will try to make one more module in a few days and test.

                                  But to confirm, for the simplest module I need >4.7uF cap, pro mini and the radio, two jumpers (jpower and jrdio) and some mock sketch, and it should all work?
                                  Have I missed some other jumper or resistor or some other component maybe?

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

                                  @dakipro no you're not missing anything now.
                                  Cap is not even necessary at the moment don't worry about it.

                                  Problem is connection with radio so you have to make sure :

                                  • VCC and GND pins of radio are correctly connected (seems it's done)
                                  • SPI pins are correctly connected to the radio, check the "connecting the radio" page for the pinout on the pro mini, and radio module pinout. Then check continuity from radio connector to matching pin on radio side, you might have a soldering problem.
                                  1 Reply Last reply
                                  0
                                  • Nca78N Offline
                                    Nca78N Offline
                                    Nca78
                                    Hardware Contributor
                                    wrote on last edited by
                                    #46

                                    @dakipro you can also check the continuity between adjacents pins of the radio modules, it should be in MOmhs, if lower that could be a reason for failing communication too.

                                    Nca78N 1 Reply Last reply
                                    0
                                    • Nca78N Nca78

                                      @dakipro you can also check the continuity between adjacents pins of the radio modules, it should be in MOmhs, if lower that could be a reason for failing communication too.

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

                                      @Nca78 said in 💬 NModule:

                                      @dakipro you can also check the continuity between adjacents pins of the radio modules, it should be in MOmhs, if lower that could be a reason for failing communication too.

                                      Just reading on computer instead of phone and I see you did it already, so except a connection problem with the SPI pins I don't see any reason for failure...

                                      1 Reply Last reply
                                      0
                                      • D dakipro

                                        Thanks :)
                                        Then I guess all that is left is to motivate you to start OTA and improve it (finetune) it to nmodule :)
                                        I used it for regular modules and it is really practical, but I never had much luck with optimizing modules for battery performance. I would get a half year/year with 2 AA batteries, which is not that good comparing with your tweaks for CR battery.

                                        Keep us updated on other modules, people are waiting for your tests to start ordering :)

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

                                        @dakipro said in 💬 NModule:

                                        Thanks :)
                                        Then I guess all that is left is to motivate you to start OTA and improve it (finetune) it to nmodule :)

                                        Just did OTA on a main powered NModule with MYSBootloader and it worked like a charm.
                                        I will test with a battery (CR123) module at 1MHz now, and post a tutorial later.

                                        NeverDieN 1 Reply Last reply
                                        1
                                        • Nca78N Nca78

                                          @dakipro said in 💬 NModule:

                                          Thanks :)
                                          Then I guess all that is left is to motivate you to start OTA and improve it (finetune) it to nmodule :)

                                          Just did OTA on a main powered NModule with MYSBootloader and it worked like a charm.
                                          I will test with a battery (CR123) module at 1MHz now, and post a tutorial later.

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

                                          @Nca78 said in 💬 NModule:

                                          post a tutorial

                                          That would be awesome.

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


                                          11

                                          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