Low Power "Green" Battery Operation Solutions For The Teensy 3.

Status
Not open for further replies.
Hi Froeber,
The Teensy3 is fantastic for a production article, and the support to make it work with the Arduino IDE, and the libs like Duff are doing - all based on the amazing infrastructure by Paul.
I also really appreciate your posting for alerting me again to the difficulty of low power, and its a project assumption for me to get there.
I'm getting a FRDM-MK20D to prototype the low power, as well as using the Teensy3.1. My target board can't use the Teensy3.1 - though it would have been really nice if it had worked for what I wanted it to and I could have used it straight away.

However, there are tradeoff's made in designing something - and sometimes its recognizing them. Teensy3 is evolving and Paul has been hinting online he is coming up with a new product - so maybe it will be informed by this discussion. Also OpenSDA is slowly evolving/pioneering, a simple concept and Freescale is using a tiny MK20 hw to implement it OpenHwSDA, and letting Segger do the software - so its not Open(sw)SDA - and Segger commercially restrict its use in production.

EmBlocks.org is using another open source paradigm to intergrate OpenSDA methods into an IDE, though just for the STM32 line of processors so far.
Eclipse for Freescale is becoming more stable and integrates with OpenSDA SWD/JTAG. So lots happening and the Open Source movement is really making a lot of tools accessible. Thank you to the tools guys for doing that

The whole thing about LOW POWER in the uW is it takes system design and effort. If the cost of the external power source is minimal (ie USB) or externalized to the customer, then its not worth the software (and hardware) effort.
The hierarchy of power sources I'm seeing is - "free" as in USB or wall wart, largeSolarPanels(10W)+12VSLA, Solar(1W)+LiXxxStorage, DDD-->AAA ReplaceableBattery, low power Harvesting+SuperCap

LOW POWER also requires a programming paradigm shift to event based programming and that appears a bit specialist in the Arduino community.
Eric Styger from my reading is a Professor at Lucerne Univ, and also has some sort Freescale recognition with an employee#. Wonderful that Freescale are encouraging that type of support and Eric as Lecturer is publishing simple approaches. :)
 
Last edited:
Hey guys, I am looking to use the Duff's library in a slightly different way and am seeking some feedback.

We are taking analog_reads on a detector, using the 16 bit pins (I think A10 and A11). There's a good amount of noise in the ADC itself, and while we've tracked some of it down there's still some left. I know the ADC isn't actually 16 bit capable so I'm not shooting for the moon here, but I was wondering if there were any low power modes which I could enter to reduce noise on the ADC. I saw in the old low_power library for Teensy 2.0, there is a specific call for adcNoiseReduction() . However, there's no similar call that I can find in the new lowpower_teensy3 library.

I thought the sleep() call in the teensy3 library may work but I saw it hasn't been implemented yet. When I tried the LP.Run(LP_RUN_ON) and ...OFF function, I lost the USB Serial connection, even if I attempted to reconnect using Serial.begin(115200) after the LP.Run(LP_RUN_OFF) call, so that won't for in my application.

So, in short, any ideas for power adjustments to lower ADC noise on a Teensy 3.1?
 
but I was wondering if there were any low power modes which I could enter to reduce noise on the ADC. I saw in the old low_power library for Teensy 2.0, there is a specific call for adcNoiseReduction() . However, there's no similar call that I can find in the new lowpower_teensy3 library.
Yes, there is not a function named that specifically but basically they are just shutting off the CPU and turning it on and taking a measurement soon after to reduce the CPU noise imposed on the ADC.

I thought the sleep() call in the teensy3 library may work but I saw it hasn't been implemented yet.
This is implemented on the latest version. https://github.com/duff2013/LowPower_Teensy3

When I tried the LP.Run(LP_RUN_ON) and ...OFF function, I lost the USB Serial connection, even if I attempted to reconnect using Serial.begin(115200) after the LP.Run(LP_RUN_OFF) call, so that won't for in my application.
yes it will lose usb but this is old version, the latest library actually you can dynamically go into other CPU speeds, there are MACROS (TWO_MHZ, FOUR_MHZ, EIGHT_MHZ, SIXTEEN_MHZ and F_CPU) that you would use for the function parameter, The github page has examples in the readme. Also you can set the CPU speed using the Arduino IDE.

So, in short, any ideas for power adjustments to lower ADC noise on a Teensy 3.1?
what frequency are you sampling the ADC? You can use DeepSleep function and use the LowPower Timer to wake it up, It has millisecond resolution currently. Or use the Sleep function which you can use your own interrupt source to wake it like Interval Timer and get sub milliseconds sleep if needed.

That being said I'm working on an update to work with the 1.20 core better and an advanced feature to get around ~10uA sleep so any feature request should be directed now. I didn't like the AVR sleep library, it would really limit the many sleep features that the teensy can do. I'm sure that paul will probably port the AVR style sleep modes which is probably fine for many application but I wrote this library to get to all the cool teensy sleep mode features.
 
Hello everyone.

I've been researching how to further reduce power consumption of Teensy 3.1. Currently Deep sleep and Hibernate both use ~0.23mA of current in my case.

However, I've found out that when I upload the program and go to Deep sleep or Hibernate (with Hibernate it happens only the first time), I get ~0.13mA consumption. But if I reapply power (or Hibernate again), I get ~0.23 mA consumption. I think the main issue here is MINI54 chip, which is using less power when in some (program?) mode.

Would it be possible to further reduce the consumption of MINI54? Or as last resort cut the power to MINI54 right before 3.3V pin and make a connection only when uploading (connect both 3.3V pins)?

It would be really great if we could achieve less than 10uA...
 
Back in April in this thread, Massel reported that he was having trouble with the GPIO_WAKE part of the DeepSleep_Simple example for the LowPower_Teensy library. I'm running into this same problem. LPTMR_WAKE works as expected, but GPIO_WAKE behaves as if it never goes to sleep. I can tell it never goes to sleep because the USB port stays alive (it normally drops after the Teensy goes to sleep).

I'm using a Teensy 3.1, and Teensyduino 1.18 and version 4 of the LowPower_Teensy library.

Anyone else run into this?

Greg
 
Back in April in this thread, Massel reported that he was having trouble with the GPIO_WAKE part of the DeepSleep_Simple example for the LowPower_Teensy library. I'm running into this same problem. LPTMR_WAKE works as expected, but GPIO_WAKE behaves as if it never goes to sleep. I can tell it never goes to sleep because the USB port stays alive (it normally drops after the Teensy goes to sleep).

I'm using a Teensy 3.1, and Teensyduino 1.18 and version 4 of the LowPower_Teensy library.

Anyone else run into this?

Greg

I would suggest you upgrade to Teensyduino 1.20 since there are many new features and important fixes! If you do that you can check out my new low power library Snooze since I'm not developing the old LowPower_Teensy3 anymore.

That being said what are you doing before you are going to sleep? Make sure any communications are finsihed before calling any sleep functions as an example.
 
I would suggest you upgrade to Teensyduino 1.20 since there are many new features and important fixes! If you do that you can check out my new low power library Snooze since I'm not developing the old LowPower_Teensy3 anymore.

I'll do that and let everyone know how it goes.

That being said what are you doing before you are going to sleep? Make sure any communications are finsihed before calling any sleep functions as an example.

I'm just running the stock example with no changes.
 
I would suggest you upgrade to Teensyduino 1.20 since there are many new features and important fixes! If you do that you can check out my new low power library Snooze since I'm not developing the old LowPower_Teensy3 anymore.

That being said what are you doing before you are going to sleep? Make sure any communications are finished before calling any sleep functions as an example.

Duff I'm super happy to see that you wrote and shared the code that allows us to put the Teensy 3.1 into super duper low 15uA hibernate mode!!!!!:cool:

I'm building a portable product that runs on batteries and has a sharp memory LCD that consumes like 12uA when the screen is showing a static image. So with your new snooze code I will be able to update the battery status on the Sharp LCD screen once every 24 hours and then put the Teensy 3.1 back to sleep for 24 hours. I can do this for 30 days and only consume about 20 mA which is really low power consumption. Your snooze library is perfect for my application.

Great news Duff! Glad I check back in here to see if any changes have been made to this and surprise surprise the low power problem has been solved ;)

I'll report back once I start testing all this together.
 
Last edited:
Gorsha,
As I recall, Paul cut down on power consumption by the mini 54 quite a bit. You could theoretically power it such that it only gets power via usb, but this would likely be limited to self made boards where you can add a small VREG just for the Mini54.
 
Hi,
I am using a Teensy 3.1 with Teensyduino 1.20 and Snooze. During "Snooze.hibernate" the 3.3V Pin reads only 3.20V. If a load (0.5mA) is apllied to the 3.3V line, then the voltage drops even further to 3.11V.
This was a quick measurment with a standard Multimeter, but before investigating this further I just wanted to know if Snooze "allows" to use the 3.3V during hibernating or if the voltage regulator is powered down.
Thanks!

Best regards,
Martin
 
Ok, it seems, that in Snooze.hibernate() the voltageregulator is set to standby, and in Snooze.deepSleep() the voltageregulator is working normal.

Best regards,
Martin
 
Missing library?

you can download my library and check out the examples: https://github.com/duff2013/LowPower_Teensy3

regards,
duff
duff,

Any chance you could add the final stableversion of LowPower_Teensy3 back to your GitHub repository (or attach a .ZIP file of it here as an archive)? I have a teensy 3.2 sketch that uses it to run a solar powered snow depth sensor and it works very well. I'm in the process of rebuilding my Arduino/teensyduino environment on a new PC and with that library missing from GitHub I'm stuck now. I have not been successful in porting my sketch over to use your new Snooze library yet. Too many complications with serial communications, watchdog timers, EPROM writes and dynamic CPU speeds...

Thanks, Fred
 
Status
Not open for further replies.
Back
Top