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. Announcements
  3. Sensebender Micro

Sensebender Micro

Scheduled Pinned Locked Moved Announcements
584 Posts 84 Posters 401.8k Views 35 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.
  • ximinezX ximinez

    A general question regarding these types of boards that are generally designed to be used on battery power. Is there a reason to not power the ATSH204A and Si7021 from AVR pins? The pins can source far more than what these devices can sink (even when using the heating on the Si7021), and it would allow squeezing a tiny bit more out of the battery life by selectively powering down the devices.
    Eg., if I'm not using the ATSHA204A at all, I can save 150nA continuous current. The power saving from disabling the Si7021 is less at about 60nA, so that might just be eaten up by having to wait up to 80ms before a full conversion.

    I'm aware that we're talking about saving a tiny ~200nA here, but over the span of two years that adds up to about 350mAh.

    So what I'm wondering is simply, is there a technical reason saying that this really isn't a Good Idea (tm)? Should I avoid doing so if I design my own similar device?

    tbowmoT Offline
    tbowmoT Offline
    tbowmo
    Admin
    wrote on last edited by
    #392

    @ximinez @LastSamurai

    That is indeed a good question. The straight answer is that I didn't think about that when I designed the board.

    In theory you could also power the radio from a digital pin on the avr, and power that down completely.

    BTW. If you turn on the heating element in the si7021 at full power, I think the power drain exceeds what the avr can deliver on a digital pin. But one could just avoid that.

    ximinezX 1 Reply Last reply
    0
    • AnticimexA Offline
      AnticimexA Offline
      Anticimex
      Contest Winner
      wrote on last edited by
      #393

      I have been thinking about this as well. But I discarded parts of the idea because I needed the IO for other stuff (MYSX in my case). Instead I designed a switched rail where one could attach sensor power sinks. It's not io powered but it is io controlled.
      Though I did not attach the si or atsha to this switch function as I decided to make it an optional feature but wanted to make sure authentication and temp/hum would always be available.

      Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

      1 Reply Last reply
      1
      • tbowmoT tbowmo

        @ximinez @LastSamurai

        That is indeed a good question. The straight answer is that I didn't think about that when I designed the board.

        In theory you could also power the radio from a digital pin on the avr, and power that down completely.

        BTW. If you turn on the heating element in the si7021 at full power, I think the power drain exceeds what the avr can deliver on a digital pin. But one could just avoid that.

        ximinezX Offline
        ximinezX Offline
        ximinez
        wrote on last edited by
        #394

        That is indeed a good question. The straight answer is that I didn't think about that when I designed the board.

        Oh, I thought it was a design decision :)

        In theory you could also power the radio from a digital pin on the avr, and power that down completely.

        I've been wondering about the radio in particular. Does the radio keep any state locally, and will it have to be reinitialized upon powerup?

        BTW. If you turn on the heating element in the si7021 at full power, I think the power drain exceeds what the avr can deliver on a digital pin. But one could just avoid that.

        The heating element eats a measly 3.1mA according to the datasheet, so even that would be well within the limits for a single in on a 328p.

        Now, I don't have Eagle installed on this laptop, and my bandwidth is limited right now. Is there a picture of the PCB traces available? Wondering if atleast some of this can be hacked on by cutting traces.

        1 Reply Last reply
        0
        • tbowmoT Offline
          tbowmoT Offline
          tbowmo
          Admin
          wrote on last edited by
          #395

          @ximinez

          Nope, there are only the eagle design files.. (Or gerbers, you could use a gerber viewer)

          I have 4 sensors operating for almost a year on two AA batteries, they all report around 73% battery left. So in my opinion, it's not that necessary to do extra optimization on the power drain..

          ximinezX 1 Reply Last reply
          0
          • tbowmoT tbowmo

            @ximinez

            Nope, there are only the eagle design files.. (Or gerbers, you could use a gerber viewer)

            I have 4 sensors operating for almost a year on two AA batteries, they all report around 73% battery left. So in my opinion, it's not that necessary to do extra optimization on the power drain..

            ximinezX Offline
            ximinezX Offline
            ximinez
            wrote on last edited by
            #396

            @tbowmo
            While 73% after one year is good, it doesn't mean that it can't get better. The ATSHA204a and Si7021 draw about 350mAh from the battery over two years from idling alone. The NRF24L01+ draws around 1500mAh.
            Remember, you will never get close to emptying out the battery before the voltage drops below working voltage. Using alkaline batteries, you'll get around 2000mAh before the batteries reach 2v (which, if you're using battery voltage as a pure percentage, is 66%), at which point the voltage curve drops sharply - and your sensors die. The radio and sensors have drawn more than 900mAh from your battery during the year you have run the device (and that's just idling) - close to half your battery life.

            Assuming your battery percentage is correct, and you started at 100% one year ago, I'm betting your sensors will die sometime during this summer. While you may think that extra optimization isn't worth it, I do. The nanoAmp draws may not seem like much, but drawn out on a timescale like this, it is a major power draw.

            AnticimexA 1 Reply Last reply
            0
            • ximinezX ximinez

              @tbowmo
              While 73% after one year is good, it doesn't mean that it can't get better. The ATSHA204a and Si7021 draw about 350mAh from the battery over two years from idling alone. The NRF24L01+ draws around 1500mAh.
              Remember, you will never get close to emptying out the battery before the voltage drops below working voltage. Using alkaline batteries, you'll get around 2000mAh before the batteries reach 2v (which, if you're using battery voltage as a pure percentage, is 66%), at which point the voltage curve drops sharply - and your sensors die. The radio and sensors have drawn more than 900mAh from your battery during the year you have run the device (and that's just idling) - close to half your battery life.

              Assuming your battery percentage is correct, and you started at 100% one year ago, I'm betting your sensors will die sometime during this summer. While you may think that extra optimization isn't worth it, I do. The nanoAmp draws may not seem like much, but drawn out on a timescale like this, it is a major power draw.

              AnticimexA Offline
              AnticimexA Offline
              Anticimex
              Contest Winner
              wrote on last edited by
              #397

              @ximinez That depend on how you define battery percentage. I have chosen to adjust my measurements to let 0% mean when voltage drops below the highest requirements of the onboard devices. Since that particular device will fail when voltage goes lower, it serves no purpose to provide a false battery percentage. 0% is when the node no longer operates according to specs. But this is of course hw/sketch-dependent.

              Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

              ximinezX 1 Reply Last reply
              0
              • AnticimexA Anticimex

                @ximinez That depend on how you define battery percentage. I have chosen to adjust my measurements to let 0% mean when voltage drops below the highest requirements of the onboard devices. Since that particular device will fail when voltage goes lower, it serves no purpose to provide a false battery percentage. 0% is when the node no longer operates according to specs. But this is of course hw/sketch-dependent.

                ximinezX Offline
                ximinezX Offline
                ximinez
                wrote on last edited by ximinez
                #398

                @Anticimex The point still stands however. The discharge graph is far from linear, and your sensors and radio have already drawn close to half of your battery life by idling alone. A colleague of mine has had to replace the batteries in his two sensors already.

                AnticimexA 1 Reply Last reply
                0
                • ximinezX ximinez

                  @Anticimex The point still stands however. The discharge graph is far from linear, and your sensors and radio have already drawn close to half of your battery life by idling alone. A colleague of mine has had to replace the batteries in his two sensors already.

                  AnticimexA Offline
                  AnticimexA Offline
                  Anticimex
                  Contest Winner
                  wrote on last edited by
                  #399

                  @ximinez I do not recall sharing my statistics, so I assume you refer to @tbowmo's stats?

                  Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                  ximinezX 1 Reply Last reply
                  0
                  • AnticimexA Anticimex

                    @ximinez I do not recall sharing my statistics, so I assume you refer to @tbowmo's stats?

                    ximinezX Offline
                    ximinezX Offline
                    ximinez
                    wrote on last edited by
                    #400

                    @Anticimex Ah, yes. sed /your/@tbowmo's/g. I blame lack of caffeine.

                    AnticimexA 1 Reply Last reply
                    0
                    • ximinezX ximinez

                      @Anticimex Ah, yes. sed /your/@tbowmo's/g. I blame lack of caffeine.

                      AnticimexA Offline
                      AnticimexA Offline
                      Anticimex
                      Contest Winner
                      wrote on last edited by
                      #401

                      @ximinez makes sense. I'm sure you can cut down on power consumption by cutting power to those peripherals. I do not know how signing would be affected by this though, as I have not tested it with switching the atsha on and off between calls. I would like to hear from you on that topic if you choose to try it though :)

                      Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                      ximinezX 1 Reply Last reply
                      0
                      • AnticimexA Anticimex

                        @ximinez makes sense. I'm sure you can cut down on power consumption by cutting power to those peripherals. I do not know how signing would be affected by this though, as I have not tested it with switching the atsha on and off between calls. I would like to hear from you on that topic if you choose to try it though :)

                        ximinezX Offline
                        ximinezX Offline
                        ximinez
                        wrote on last edited by
                        #402

                        Ok, I've been looking at the image and my spare sensor. It looks like:
                        Power to the NRF can be cut between C3 and VCC pin.
                        ATSHA204a power can be cut on the trace that goes from the atsha and beneath the flash.
                        Si7021 power can be cut at the trace that goes from C4.

                        I just might have to dig out my scalpel and iron for this. If the components magically work without any extra initialization on powerup, modifying the code looks easy.

                        I'll report back with my findings

                        1 Reply Last reply
                        1
                        • tbowmoT Offline
                          tbowmoT Offline
                          tbowmo
                          Admin
                          wrote on last edited by
                          #403

                          @ximinez

                          For my battery reporting, I have set 1.9V as 0%, 3.3V is 100%..

                          While you're at it, also power down the external flash, as it might also contribute a bit..

                          ximinezX 1 Reply Last reply
                          0
                          • ximinezX Offline
                            ximinezX Offline
                            ximinez
                            wrote on last edited by
                            #404

                            Well that went south pretty fast. Was wondering why my sensebender was acting up. Took a while to see that I had plugged in an ESP8266 module instead of one of my NRF24 modules. Those modules look far too much alike :rage:

                            Serial output now looks like this: "Sånsebåndåò Micro FW 1.3" with random characters corrupted. I think I've killed it ;)
                            I can still flash firmware to it via serial, so it's not completely dead.

                            I can however confirm that both the SHA204A and SI7021 self-tests OK being powered on in-sketch:
                            (Flash seems to randomly fail or test OK, not sure why yet)

                            þSånseâånder Micòo F× 1.3 - TesôÍoäe
                            Tåstiîg påòipheraló!
                            -> ÓÉ7021 : ok!
                            -> Æìasè : æailed!
                            -> SÈA204 : Ïk (seòéal : 01234ÂBAÅ259E8AÄÅE)
                            Tåót fiîésheä
                            ----> Óelftest æaiìåä!

                            AnticimexA 1 Reply Last reply
                            2
                            • ximinezX ximinez

                              Well that went south pretty fast. Was wondering why my sensebender was acting up. Took a while to see that I had plugged in an ESP8266 module instead of one of my NRF24 modules. Those modules look far too much alike :rage:

                              Serial output now looks like this: "Sånsebåndåò Micro FW 1.3" with random characters corrupted. I think I've killed it ;)
                              I can still flash firmware to it via serial, so it's not completely dead.

                              I can however confirm that both the SHA204A and SI7021 self-tests OK being powered on in-sketch:
                              (Flash seems to randomly fail or test OK, not sure why yet)

                              þSånseâånder Micòo F× 1.3 - TesôÍoäe
                              Tåstiîg påòipheraló!
                              -> ÓÉ7021 : ok!
                              -> Æìasè : æailed!
                              -> SÈA204 : Ïk (seòéal : 01234ÂBAÅ259E8AÄÅE)
                              Tåót fiîésheä
                              ----> Óelftest æaiìåä!

                              AnticimexA Offline
                              AnticimexA Offline
                              Anticimex
                              Contest Winner
                              wrote on last edited by
                              #405

                              @ximinez If possible, try to check if signing and verification of signatures work as well. I have tried to implement the use of the ATSHA to be atomic in nature, but it could be that some state is retained which is cleared on power down which might break the calculations.

                              Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                              1 Reply Last reply
                              2
                              • ximinezX Offline
                                ximinezX Offline
                                ximinez
                                wrote on last edited by
                                #406

                                What is the easiest and fastest way to sign and verify? I don't have a gateway set up quite yet.
                                (And, is any part of setting this up dependent on serial integrity? If so I might have to adjust baud quite a bit)

                                AnticimexA 1 Reply Last reply
                                0
                                • ximinezX ximinez

                                  What is the easiest and fastest way to sign and verify? I don't have a gateway set up quite yet.
                                  (And, is any part of setting this up dependent on serial integrity? If so I might have to adjust baud quite a bit)

                                  AnticimexA Offline
                                  AnticimexA Offline
                                  Anticimex
                                  Contest Winner
                                  wrote on last edited by
                                  #407

                                  @ximinez Well, without a gw the only option is to use node peer to peer transmissons to test signing. How to do it is described in the signing documentation, assuming you use development branch, you can see here. For master, look here.

                                  Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                  1 Reply Last reply
                                  1
                                  • ximinezX Offline
                                    ximinezX Offline
                                    ximinez
                                    wrote on last edited by
                                    #408

                                    I have an Uno with an ethernet shield and nrf24 hooked up, so I will have to get around to write a sketch for that purpose.
                                    But to get signing to work, I'll have to personalize the atsha? That sketch doesn't compile for me.

                                    1 Reply Last reply
                                    0
                                    • AnticimexA Offline
                                      AnticimexA Offline
                                      Anticimex
                                      Contest Winner
                                      wrote on last edited by
                                      #409

                                      Yes, you have to personalize it. What is failing? I don't have an Uno myself, but according to Jenkins the personalizer compiles ok for Uno on both master and development. You don't have any local changes?

                                      Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                      1 Reply Last reply
                                      0
                                      • ximinezX Offline
                                        ximinezX Offline
                                        ximinez
                                        wrote on last edited by
                                        #410

                                        The personalization fails to compile for my sensebender micro. There's a few undeclared:

                                        Personalizer:225: error: 'EEPROM_SIGNING_SOFT_HMAC_KEY_ADDRESS' was not declared in this scope
                                        Personalizer:225: error: 'hwReadConfigBlock' was not declared in this scope
                                        Personalizer:236: error: 'EEPROM_SIGNING_SOFT_SERIAL_ADDRESS' was not declared in this scope
                                        Personalizer:247: error: 'EEPROM_RF_ENCRYPTION_AES_KEY_ADDRESS' was not declared in this scope
                                        Personalizer:697: error: 'hwMillis' was not declared in this scope

                                        I'm trying to compile this against master however. Do I have to have dev branch to compile that sketch?

                                        1 Reply Last reply
                                        0
                                        • ximinezX Offline
                                          ximinezX Offline
                                          ximinez
                                          wrote on last edited by
                                          #411

                                          Fails with the same errors on Uno for me.

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


                                          14

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular