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. Low Power: How much current? [Solved]

Low Power: How much current? [Solved]

Scheduled Pinned Locked Moved Hardware
109 Posts 10 Posters 68.6k Views 11 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.
  • scalzS Offline
    scalzS Offline
    scalz
    Hardware Contributor
    wrote on last edited by scalz
    #49

    For disabling radio, I use P-Mosfet. So I cut off the power. Then in datasheet, it is explained it is best to set output=0. And you are right, when I need the radio, I have to reconfigure and reinit it. But I don't reinit all the mysensors presentation stuff, just the radio itself. But maybe I should do the presentation too.
    This is for radio with mosfet. when I use this tech, with another mosfet for sensors. i2c for example, it needs others tricks too. output=0 won't work, you need to pinmode input. and set i2c registers rightly....lots of tricks. low power I think is not an exact science which works same in all case. I could post some codes, but it is not beautiful for the moment, and all this stuff will be managed by ulpnode lib. So I am waiting...

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

      What kind of battery (type and configuration) or other means (supercap?) are you guys using to power your node? Over what voltage ranges? Are yo using the arduino to decide when to cut-out, or some other means? Are you running straight from the battery, or are you using a converter or regulator of some kind? Or, is it all yet to be determined?

      Even though LiPo looks like it would be a good choice (voltage ranges and energy storage and low self discharge), I don't want there to be even a remote chance of a fire starting, so I'm having to think about alternatives.

      Also, with respect to Mosfets, which ones specifically have you found that are a good match for the task at hand? Plainly it needs to have very low leakage, and I presume operates at TTL voltage?

      I haven't researched what's possible as far as low leakage Mosfets are concerned. Do they still leak, and if so how much? I'm guessing little to nothing based on your grand total for the deep sleep current, since it presumably covers everything, including mosfets. Right?

      I have some latching relays in case I ever need to turn something completely, 100% off, if it turns out Mosfets are too leaky. I haven't ever used them though.

      1 Reply Last reply
      0
      • OitzuO Oitzu

        @NeverDie said:

        They have very high sensitivity, which is great. I'm told much of it might be wastedl in a home environment, where the noise floor tends to be higher.

        Hm.. okay. I'm asking because i'm currently trying to build an outdoor high range / low power network.
        I don't find any of these cc1200 available on the market, so i will stick to my way of testing some nrf24L01+ with high gain directional antennas. :)

        SparkmanS Offline
        SparkmanS Offline
        Sparkman
        Hero Member
        wrote on last edited by Sparkman
        #51

        @Oitzu said:

        Hm.. okay. I'm asking because i'm currently trying to build an outdoor high range / low power network.
        I don't find any of these cc1200 available on the market, so i will stick to my way of testing some nrf24L01+ with high gain directional antennas. :)

        Have you looked at these as an option: http://www.d6labs.com/Store? They are a bit pricey compared to some of the alternatives. I supported their Kickstarter campaign last year. Although the campaign was just short with reaching their goal, they proceeded with the development anyways. The modules have started to ship and I'm supposed to be getting mine in the next few weeks. Once I get them, I'll see if there's a way to integrate with MySensors.

        Cheers
        Al

        1 Reply Last reply
        0
        • scalzS Offline
          scalzS Offline
          scalz
          Hardware Contributor
          wrote on last edited by
          #52

          As ulpnode is not released yet. I tried to reproduce how it works and get it! If you want to understand Please, I can't advise you enough to read this post on ulpnode engine management http://hallard.me/ulpnode-low-power-secret/ so you will understand. It is based on a dc booster and a voltage supervisor. This is what I am doing.
          And for my tests : 2xaaa battery so 3V. for mosfets, I tried with si2399, CJ2305 very cheap on ali. And BS250 on breadboard worked too.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            brolly759
            wrote on last edited by
            #53

            Lets put this all in perspective. a CR2025 coin cell is 165mAh.

            If we are sleeping forever @ 6uA that means the circuit will last for: 27,500 hours or 1,145 days. The question I guess we need to figure out is what is "good enough" for coin cell applications?

            My goal is to figure out a way to sink the total circuit to around 1uA. That should be possible if Arduino is 100nA and NRF is 800-900nA.

            So why does the NRF draw so much current when connected to Arduino? I know its been touched on already but is there a cleaner way in software without adding mosfets or extra hardware to have the NRF in sleep mode but not drawing any current from Arduino?

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

              @brolly759 said:

              Lets put this all in perspective. a CR2025 coin cell is 165mAh.

              If we are sleeping forever @ 6uA that means the circuit will last for: 27,500 hours or 1,145 days. The question I guess we need to figure out is what is "good enough" for coin cell applications?

              My goal is to figure out a way to sink the total circuit to around 1uA. That should be possible if Arduino is 100nA and NRF is 800-900nA.

              So why does the NRF draw so much current when connected to Arduino? I know its been touched on already but is there a cleaner way in software without adding mosfets or extra hardware to have the NRF in sleep mode but not drawing any current from Arduino?

              Even if you wanted to turn the NRF completely off using just software, I don't see that it's even possible. It may require a hardware switch to pull its plug.

              Here's some brainstorming:

              According to the datasheet, NRF Powr Down state is defined as "All register values available are maintained and the SPI is kept active, enabling change of configuration and the uploading/downloading of data registers."

              You need something to keep the NRF's memory alive in the registers, unless you prefer to pay the price of a full startup cycle (which is an option).

              In theory you could lower the NRF's supply voltage to 1.9V, because that is the minimum specified in the NRF datasheet. Current might be similar, but I'm guessing that with lower voltage it would be using less energy in total?

              If so, then notionally maybe you could dial down the NRF's voltage by putting a cap across across ground and its Vcc, and then sending it just enough PWM to make the capacitor voltage hover at 1.9V? Perhaps there's a more elegant way to do it, but lowering its voltage seems like the only avenue not yet explored that might yet payoff, short of just turning it off. Unfortunately, capacitors tend to be lossy, so it might be a net loss.

              Or, if using Scalz's boost converters, maybe you could lower all voltages to the minimum 1.9V by simply not boosting them higher than that? You'd need an adjustable boost converter for that, assuming you run at a nominal 3.3V when the arduino isn't sleeping. Adjustable boost converters do exist, so I see no problem with that approach. The Atmeg328p can function even down to 1.8V, although you may need to operate it at 4Mhz if doing so (says the arduino spec sheet). If awake, would the arduino datalines still need to operate at 3.3V, or could they work just fine at 1.8-1.9v also? Important question: does awful boost conversion efficiency at such low voltages more than ruin the potential NRF energy savings from this approach, as outlined above?

              If you could turn off the NRF's SPI, and later turn it on again, without losing the registry values, that might be worth exploring also. I don't know if that's feasible though. However, the arduino's SPI is turned off, so there's nothing for the NRF's SPI to talk to anyway during the Arduino's power-down sleep, so if you could turn off the NRF's SPI too (again, it may be impossible), it would make sense to do so. Correct?

              Out of the above spitballing, the prospect of adjusting voltage to 1.91v through the boost converter to me sounds the most promising. A lot would hinge on the efficiency curves of the boost converter though. If the numbers don't support that, then maybe running the NRF's supply voltage separately at 1.91v would work?

              Maybe there's a pony in there somewhere. :smile:

              1 Reply Last reply
              0
              • scalzS Offline
                scalzS Offline
                scalz
                Hardware Contributor
                wrote on last edited by
                #55

                dc booster sequence is not my idea! It is first Charles. But these type of sequence are well explained in app notes of supervisors and dc boosters.

                In my case, I turn off nrf by mosfet . so all registers are lost I think. So I power and reinit it on wake up. and no problem of transmission, I didn't see any fails.

                for dc booster, maybe you don't understand the concept of Charles ulpnode. This is a fixed 3v dc booster with true enable. you charge a capacitor on vcc. Turn off dc booster and go to sleep. Let the capa discharge. When capa vcc is < 2V. a supervisor chip irq toggle the enable pin of dc bosster and d3 int on arduino. You have a hardware watchdog which consumes very small current. On wake up maintain enable on booster. . of course, with the capa discharge 3v to 1.8v, you will have less power consumption. but the useful thing is the hw watdchdog generated by capa. choose right capa and adapt your cycles..

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

                  @brolly759 Is your design finished or still evolving? Are you planning to say how you did it in exacting detail, or just in general terms? At the moment I see your results (above), but at the moment I'm not sure exactly what you did, other than it involved starting with a Pro Mini, removing the Power LED, removing the power regulator, and invoking a sleep cycle. Is the following the best summation to date? http://forum.arduino.cc/index.php?topic=341958.0 If so, please let me know, and I'll give it a more careful read. On the other hand, if something else is a better summation, please let me know what that is, and I'll add it instead to the round-up.

                  Yesterday I placed an order with Great Wall Electronics for 10 Arduino Pro Mini's. That may take anywhere from two to four weeks to arrive. Meanwhile, I should receive the three red Pro Mini's from Amazon (above) tomorrow. With those I plan to start with the same three steps as before and then see how the measurement numbers look. If promising, I guess I'll next proceed based on what I find in the links you and scalz provided:
                  http://forum.arduino.cc/index.php?topic=341958.0
                  http://www.gammon.com.au/power
                  hallard.me
                  jeenode
                  lowpowerlab

                  and see where that gets me. At the moment, those are the only guides I have that are reasonably detailed. If in addition anything else should be on that list, please let me know.

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    brolly759
                    wrote on last edited by brolly759
                    #57

                    @NeverDie I will rewrite everything up again. The numbers I posted about was me just unplugging wires and seeing what my current draw was.... haha the link is where my dual post is located where I am talking to Gammon about this problem :)

                    @everyone So Gammon said this about our problem:

                    "I am guessing you are parasitically powering the NRF. Before sleeping make sure you set the connections to it to high-impedance. For example, SPI.end() followed by making sure the SPI (and other two) pins are inputs (or maybe outputs and LOW). For example, a snippet from my code with that gadget:"

                     bool ok = radio.write (&reading, sizeof reading);
                      radio.startListening ();
                      radio.powerDown ();
                      SPI.end ();
                      // set pins to OUTPUT and LOW  
                      for (byte i = 9; i <= 13; i++)
                        {
                        pinMode (i, OUTPUT);    
                        digitalWrite (i, LOW); 
                        }  // end of for loop
                      ADCSRA = 0;  // disable ADC
                      power_all_disable();
                    

                    I am looking in the library to see if we do SPI.end() before sleep but cant find anything...

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      brolly759
                      wrote on last edited by
                      #58

                      So an update, you can find all the sleep functions in the MySensor.cpp file.

                      1 Reply Last reply
                      1
                      • scalzS Offline
                        scalzS Offline
                        scalz
                        Hardware Contributor
                        wrote on last edited by
                        #59

                        yes. Gammon is right. I needed to do pinmode output=0 when I tested. I didn't do the spi.end but I think is good thing to do.
                        @Neverdie: I hope and am sure you will get it!
                        in the mean time I am redesigning my board with some feedbacks you gave me. thx.
                        it will be 0805/atmel solderable version, no mini pro. and will be 5cmx2.3. same specs as I did on my other board. so far so good but now 4layer. only for rfm for the moment. can't do magie. but two boards on a 5cmx5cm. not expensive at elecrow... I hope I will get it finished for this week...

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          brolly759
                          wrote on last edited by
                          #60

                          YESSSSSSSSSSSSSSS!!!!! I got sleep down to 1.5ua - 1.6uA with NO hardware changes!!!!! WOOOT sorry, kinda excited here lol

                          1 Reply Last reply
                          1
                          • scalzS Offline
                            scalzS Offline
                            scalz
                            Hardware Contributor
                            wrote on last edited by
                            #61

                            great I'm happy for you.

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              brolly759
                              wrote on last edited by
                              #62

                              Okay, so originally I was getting 2.7-2.9uA with Arduino/NRF. Stock MySensors library and Arduino 1.0.6 IDE. ( I am using the BinarySwitchSleep Sketch from MySensors lib)

                              To get even lower power.... If you open up mysensors.cpp the sleep function is there. For the BinarySwitchSleep sketch you are looking for this sleep function as there are a few:

                              You want to add this:

                              SPI.end();	
                              	for (byte i = 9; i <= 13; i++)
                                  {
                                  pinMode (i, OUTPUT);    
                                  digitalWrite (i, LOW); 
                                  }  // end of for loop
                              

                              to this:

                              bool MySensor::sleep(uint8_t interrupt, uint8_t mode, unsigned long ms) {
                              	// Let serial prints finish (debug, log etc)
                              	bool pinTriggeredWakeup = true;
                              	Serial.flush();
                              	RF24::powerDown();
                              	attachInterrupt(interrupt, wakeUp, mode);
                              	if (ms>0) {
                              		pinIntTrigger = 0;
                              		sleep(ms);
                              		if (0 == pinIntTrigger) {
                              			pinTriggeredWakeup = false;
                              		}
                              	} else {
                              		Serial.flush();		
                              		LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
                              	}
                              	detachInterrupt(interrupt);
                              	return pinTriggeredWakeup;
                              }
                              

                              and it will look like this:

                              bool MySensor::sleep(uint8_t interrupt, uint8_t mode, unsigned long ms) {
                              	// Let serial prints finish (debug, log etc)
                              	bool pinTriggeredWakeup = true;
                              	Serial.flush();
                              	RF24::powerDown();
                              	attachInterrupt(interrupt, wakeUp, mode);
                              	
                              	SPI.end();
                              	
                              	for (byte i = 9; i <= 13; i++)
                                  {
                                  pinMode (i, OUTPUT);    
                                  digitalWrite (i, LOW); 
                                  }  // end of for loop
                              
                              	if (ms>0) {
                              		pinIntTrigger = 0;
                              		sleep(ms);
                              		if (0 == pinIntTrigger) {
                              			pinTriggeredWakeup = false;
                              		}
                              	} else {
                              		Serial.flush();		
                              		LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
                              	}
                              	detachInterrupt(interrupt);
                              	return pinTriggeredWakeup;
                              }
                              

                              Because you are shutting off and turning all pins low, you will need to add this to the beginning of your program loop to reinitialize the NRF:

                              void loop() 
                              {  
                                sensor_node.begin();
                              

                              If you add just the SPI.end(); your current will be 2uA.
                              If you add both SPI.end(); and LOW pin loop, your current will be 1.5uA

                              1 Reply Last reply
                              1
                              • B Offline
                                B Offline
                                brolly759
                                wrote on last edited by brolly759
                                #63

                                Some more facts here:

                                If you ONLY do the for/loop to shut off PIN9-13 in the sleep function and do NOT shut off SPI... you do NOT need to reinitialize the radio on wake-up.

                                The current draw for For/Loop LOW w/o shutting off SPI is 2.1uA-2.2uA.

                                This is a good and bad. If you have a sensor that is going to be switched on and off a lot, the re initialization time is noticeable on a fluke meter. You can see it staying high much longer. So, if someone knows how long it takes to initialize, then we can determine if shutting off SPI is worth it. ~600nA savings vs high reconnect time.

                                NeverDieN 1 Reply Last reply
                                0
                                • B brolly759

                                  Some more facts here:

                                  If you ONLY do the for/loop to shut off PIN9-13 in the sleep function and do NOT shut off SPI... you do NOT need to reinitialize the radio on wake-up.

                                  The current draw for For/Loop LOW w/o shutting off SPI is 2.1uA-2.2uA.

                                  This is a good and bad. If you have a sensor that is going to be switched on and off a lot, the re initialization time is noticeable on a fluke meter. You can see it staying high much longer. So, if someone knows how long it takes to initialize, then we can determine if shutting off SPI is worth it. ~600nA savings vs high reconnect time.

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

                                  @brolly759 said:

                                  So, if someone knows how long it takes to initialize, then we can determine if shutting off SPI is worth it. ~600nA savings vs high reconnect time.

                                  I have an o-scope, so once I get everything set up, I can try measuring that time duration for you if you like.

                                  Really the comparison should be an energy comparison, which might be roughly::

                                  ((~600nA)(# microseconds powered-down)) vs ((arduino's current draw while powered up)(# microseconds extra setup time if NRF was turned off))

                                  1 Reply Last reply
                                  0
                                  • B Offline
                                    B Offline
                                    brolly759
                                    wrote on last edited by brolly759
                                    #65

                                    I have an O-scope just dont know how to use it completely lol. Leaving work now. Stayed extra 2 hours to play with power settings lol

                                    @NeverDie did you still need me to write up what I did or you followed it pretty much?

                                    NeverDieN 1 Reply Last reply
                                    0
                                    • B brolly759

                                      I have an O-scope just dont know how to use it completely lol. Leaving work now. Stayed extra 2 hours to play with power settings lol

                                      @NeverDie did you still need me to write up what I did or you followed it pretty much?

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

                                      @brolly759 said:

                                      I have an O-scope just dont know how to use it completely lol. Leaving work now. Stayed extra 2 hours to play with power settings lol

                                      @NeverDie did you still need me to write up what I did or you followed it pretty much?

                                      I'd prefer to have a nice consolidated write-up for two reasons:

                                      1. So I can be sure I'm following it right. If I do it differently, then any measurements I might get won't do you much good, if any. And,
                                      2. So others, including noobs, can follow along to both understand it as well as replicate it for themselves, because then you leverage the true power of open source. It's well proven: the mores eyes on something, the better it gets, and the more everyone benefits from the experience. For that to work, the clearer the "something" is, the better. The more details the better too.

                                      OK, finished editing. :smile:

                                      1 Reply Last reply
                                      0
                                      • B Offline
                                        B Offline
                                        brolly759
                                        wrote on last edited by
                                        #67

                                        I keep watching you edit your post, its freakin me out! lol

                                        1 Reply Last reply
                                        0
                                        • scalzS Offline
                                          scalzS Offline
                                          scalz
                                          Hardware Contributor
                                          wrote on last edited by
                                          #68

                                          @Neverdie @brolly759 : I will follow your progress with interest and help if I can. For the moment, I have a lot of work before playing with my uCurrent. And for respect for Charles work, I am waiting his release. But when I will receive my boards (at then end of the month), if lib is not released yet, I will clean my code. And don't forget, I am using boosters and mosfets, so it is different. but roads are crossing of course. with booster what I like is, I will have 3.3v vcc during the whole battery life too.
                                          Too late for me! 2am, lol. time to powerdown. See you soon:smiley:

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


                                          15

                                          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