Author Topic: Microcontroller with low active/run current  (Read 8540 times)

0 Members and 1 Guest are viewing this topic.

Offline slugrustleTopic starter

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Microcontroller with low active/run current
« on: December 14, 2017, 03:09:16 pm »
I'm working on a project where the microcontroller runs for long periods of time (white noise generator with m-LFSR). The requirements on the microcontroller are very minimal, only that it needs to run at least 0.5 MIPS; what micros have low active run current?

Best I've seen to date is the PIC10F202, with 175uA to 275uA at 2V supply. It has a non-configurable 4MHz clock (1 MIPS).
Page 59 of http://ww1.microchip.com/downloads/en/DeviceDoc/40001239F.pdf

Even the PIC10LF320 at 1.8V has 213uA to 290uA at 500kHz/0.125MIPS (below my spec) and 330uA to 500uA at 8MHz/2MIPS.
Page 162 of http://ww1.microchip.com/downloads/en/DeviceDoc/40001239F.pdf

I'm open to others, AVR, ARM, MSP430, STM8, EFM8, RL78, Holtek, etc. From what I recall about looking at this before, most micros optimize the sleep current and have higher active/run currents than the above two. Current values using external oscillators are often much lower, but I can't find oscillators more efficient than the internal ones.


« Last Edit: December 15, 2017, 03:44:51 am by slugrustle »
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: Microcontroller with low active/run current
« Reply #1 on: December 14, 2017, 03:24:18 pm »
Low current consumption is only half truth. Energy efficiency is what you are after. If you have a tiny 8-bit processor and a 32-bit processor both consuming 1uA when in sleep mode waiting for a timer interrupt, and the 8-bit microcontroller consumes only 100 uA active current and it takes 50 us to process each sample and the 32-bit process consumes 500 uA when in active and it takes 5 us to process each sample, you should be able to compute which one is more energy efficient solution to your design.
 

Offline RES

  • Regular Contributor
  • *
  • Posts: 109
  • Country: 00
Re: Microcontroller with low active/run current
« Reply #2 on: December 14, 2017, 03:28:30 pm »
ATtiny4/5/9/10 active mode 200uA at 1.8V at 1MIPS.

Offline slugrustleTopic starter

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Microcontroller with low active/run current
« Reply #3 on: December 14, 2017, 03:34:36 pm »
RES: Thank you. I'll definitely check that out.

Kalvin: In this particular application, the microcontroller will remain in active mode for long periods of time (hours), as it is operating as a white noise generator.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Microcontroller with low active/run current
« Reply #4 on: December 14, 2017, 03:56:19 pm »
You can also get devices with hardware random number generators, often included in crypto peripherals. PIC24FJ64GA/GB202 as a quick example. Depending on the application, together with DMA, you might be able to switch off the CPU completely.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7374
  • Country: nl
  • Current job: ATEX product design
Re: Microcontroller with low active/run current
« Reply #5 on: December 14, 2017, 04:02:44 pm »
STM32L4 series, have so-called Low power run mode. Ac coding to an appnote, it is using some 100uA @ 500 KHz
http://www.st.com/content/ccc/resource/technical/document/application_note/5c/cb/90/97/4b/84/4e/81/DM00216518.pdf/files/DM00216518.pdf/jcr:content/translations/en.DM00216518.pdf
Maybe other ST has this.
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: Microcontroller with low active/run current
« Reply #6 on: December 14, 2017, 04:10:39 pm »
Kalvin: In this particular application, the microcontroller will remain in active mode for long periods of time (hours), as it is operating as a white noise generator.

Sure, but you will be processing the signal as discrete samples ie. you will be outputting the noise signal only at specified sample rate. For example, you will be having a periodic timer running at some sample rate, let's say like 48 kHz or 32 kHz. Each time the timer expires it will produce an interrupt. As this application is very simple one, you can perform all processing in this interrupt routine. In the interrupt routine you need to output one noise sample and perform some computation for the next noise sample value [in order to minimize the jitter]. When the processor returns from the interrupt routine, the processor will enter very low power sleep mode consuming only 1 uA - 2 uA. Thus, it is a matter of energy efficiency vs. current consumption. Of course, you can select a small microcontroller with low current consumption, but it may not be optimal solution energy-wise.

You can calculate a duty cycle for your microcontroller affecting the energy consumption: Let's assume that you are running at sample rate of 32 kHz, so the time between each sample is 31.25 us.

1. Lets assume that your little 8-bit controller is consuming 100 uA and it manages just compute the next sample in this 31.25 us. Thus, your duty cycle is close to 100% and your noise generator is obviously consuming 100 uA as the 8-bit microcontroller is busy processing the samples.

2. Next, you want to evaluate a 32-bit controller consuming 500 uA when it is active, and 1uA when it is the sleep mode, but you find out that it takes only 5 us to compute each sample. So, your duty cycle is 5:31.25 = 0.16, thus effectively your 32-bit microcontroller is consuming 1 uA + (500uA * 0.16) = 1 uA + 80 uA = 81 uA.

From this simplified example you can see that a 32-bit controller may be 20% more energy-efficient than a smaller 8-bit microcontroller, although the 32-bit microcontroller consumes 5 times more power when it is in active state.
« Last Edit: December 14, 2017, 04:36:16 pm by Kalvin »
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 711
  • Country: us
Re: Microcontroller with low active/run current
« Reply #7 on: December 14, 2017, 04:23:26 pm »
This could be an interesting use case for a [very!] tiny FPGA, e.g.
https://www.digikey.com/product-detail/en/lattice-semiconductor-corporation/ICE40LP384-SG32/220-2646-ND/3974680
Static power 21 uA @ 1.2V.
« Last Edit: December 14, 2017, 04:33:39 pm by mark03 »
 

Offline slugrustleTopic starter

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Microcontroller with low active/run current
« Reply #8 on: December 14, 2017, 04:26:40 pm »
NANDBlog: Cool! The smaller STM32L011D3 has something similar, 67uA to 91uA with code running from flash and 524kHz MSI clock. Page 55 of http://www.st.com/content/ccc/resource/technical/document/datasheet/42/c0/ab/e5/71/7a/47/0b/DM00206508.pdf/files/DM00206508.pdf/jcr:content/translations/en.DM00206508.pdf

Kalvin: Those specs are about right. I'm doing this: https://pages.mtu.edu/~suits/LFSR.html in a microcontroller to save board space. The m-LFSR is 31 bits with two taps, and I update it around 32,000 times per second. I had started with 8 bit micros, so I didn't think about micros which could do that calculation a lot more quickly. The hard part is extracting the tap bits and XORing them to perform the update, as there is no simple instruction for this. It either requires a lot of shifts (I think M0+ has a barrel shifter) or some bit tests and conditional branches.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Microcontroller with low active/run current
« Reply #9 on: December 14, 2017, 09:40:36 pm »
What are you interfacing to? A codec, or a simple parallel DAC, or something else?

And what power is that taking? (I’m trying to figure out the benefit of squeezing out another 50uA if the rest of the application is taking, say, 10mW).
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Microcontroller with low active/run current
« Reply #10 on: December 14, 2017, 10:26:47 pm »
AFAIK MSP430 is still king of the hill. What also matters (and often isn't specified on the cheaper parts) is the time between the wake-up event and until the microcontrollers starts to actually do something. A couple of years ago I did a redesign of a circuit which used a PIC controller. The MSP430 based circuit needed 25% of what it was before so the device ran longer or could do with a smaller (cheaper) battery.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13745
  • Country: gb
    • Mike's Electric Stuff
Re: Microcontroller with low active/run current
« Reply #11 on: December 14, 2017, 10:35:04 pm »
If all you want is an LFSR, it might be worth looking at low power CPLDs - I don't know how they compare, but in principle you'll only be clocking the parts that are doing something, not a whole processor.

You may also want to look at optimising your code, maybe writing in assembler, so you can run at lower clock rates.
C isn't good  at using things  like carry flags efficiently, so for bit-twiddly things assembler may help a lot, and wouldn't be hard to do.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13745
  • Country: gb
    • Mike's Electric Stuff
Re: Microcontroller with low active/run current
« Reply #12 on: December 14, 2017, 10:41:02 pm »
NANDBlog: Cool! The smaller STM32L011D3 has something similar, 67uA to 91uA with code running from flash and 524kHz MSI clock. Page 55 of http://www.st.com/content/ccc/resource/technical/document/datasheet/42/c0/ab/e5/71/7a/47/0b/DM00206508.pdf/files/DM00206508.pdf/jcr:content/translations/en.DM00206508.pdf

Kalvin: Those specs are about right. I'm doing this: https://pages.mtu.edu/~suits/LFSR.html in a microcontroller to save board space. The m-LFSR is 31 bits with two taps, and I update it around 32,000 times per second. I had started with 8 bit micros, so I didn't think about micros which could do that calculation a lot more quickly. The hard part is extracting the tap bits and XORing them to perform the update, as there is no simple instruction for this. It either requires a lot of shifts (I think M0+ has a barrel shifter) or some bit tests and conditional branches.
I don't recall details but there is an LFSR variant where you simply shift the register,  and conditionally XOR the whole register with a constant if the carry-out was set by the shift. This is trivially easy to do, and very fast on pretty much any micro - on an ARM with its conditional instructions you can do it in about 4 cycles.
On an 8 bit PIC it would be about 10 instructions, probably similar on an AVR.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13745
  • Country: gb
    • Mike's Electric Stuff
Re: Microcontroller with low active/run current
« Reply #13 on: December 14, 2017, 10:57:16 pm »
I can't immediately find any power figures but if it's for a moderate volume, it may be worth looking at the Silego Greenpak devices
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14465
  • Country: fr
Re: Microcontroller with low active/run current
« Reply #14 on: December 15, 2017, 01:36:40 am »
STM32L4 series is pretty good in that respect. You could select the smallest in the series (such as the STM32L431) and could probably get away with a run current of approx. 50 µA at 500 kHz (in low-power run mode, running code from SRAM). You may be able to improve on that further with having it run at the lowest Vdd possible (1.71 V) and using an ultra-low power step-down regulator to generate this voltage from your energy source if it's nominally higher than 1.71 V.

On a side note, if you need to generate white noise, STM32L4 microcontrollers have a "random number generator" built-in which may allow you to make the µC sleep between each sample and reduce the average power draw drastically. Since the random generators are analog-based, they are probably much better than simple LFSR.

An interesting reference when looking for low-power microcontrollers is: http://www.eembc.org/ulpbench/

Ambiq microcontrollers are what I think the lowest power 32-bit microcontrollers (ARM-based, Cortex M4F). I've evaluated the Apollo 1 which is fantastic. Not tried the Apollo 2 yet, but it's supposed to be even better.
 

Offline slugrustleTopic starter

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Microcontroller with low active/run current
« Reply #15 on: December 15, 2017, 01:43:04 am »
I did write the initial test in assembler for the PIC10F322 (attached as WNoise.asm). The main loop that runs the LFSR is about 16 cycles, which on the PIC is 64 clocks. The output is just one of the LFSR bits sent to a pin on each iteration of the main loop. For testing, I loaded the pin with a 19.4kHz low-pass filter, followed by a unity-gain LM358 and a 16Hz high-pass filter, the output of which went to the line-in on my PC.

Attached are spectrum plots (smooth line is average) of the noise when running the PIC at various clock frequencies. The plots are just screen shots of SpecAn_3v97c, which I found at http://www.techmind.org/audio/specanaly.html.

In the final application, I plan to use several MCP6411 opamps (35uA-55uA quiescent each) to filter the noise such that the 100Hz-1kHz region is flat on an A-weighted scale and the output rolls off at about 20dB/decade starting at 5-7kHz. This will be followed by a digital potentiometer and two LMV611 opamps (116uA-210uA quiescent each) to drive a stereo headphone jack. I'm thinking to run the micro from an AP2138 linear regulator supplied by a 10440 Li-Ion cell and power all of the opamps at 5V with an MCP1640C boost converter. The micro will disable the boost converter and sleep when the power button is pressed off.

For now, I'm wiring a protoboard with LM358s in the filter topology I want to use and trimpots in place of various gain and filter resistors. Once I have a noise output that sounds "pleasant", I will make an SMD version with the above listed parts.

 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Microcontroller with low active/run current
« Reply #16 on: December 15, 2017, 09:14:55 am »
I wonder what it is that you are driving, i.e., what is the power taken by the load?

 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7374
  • Country: nl
  • Current job: ATEX product design
Re: Microcontroller with low active/run current
« Reply #17 on: December 15, 2017, 02:24:13 pm »
I wonder what it is that you are driving, i.e., what is the power taken by the load?

Probably
Quote
to drive a stereo headphone jack
so headphone. A typical headphone has about 100dB/mW, so they take 1mW to drive loud. High end models are less efficient.

So, are you making a headphone burn-in device?
 
The following users thanked this post: Howardlong

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8642
  • Country: gb
Re: Microcontroller with low active/run current
« Reply #18 on: December 15, 2017, 04:17:59 pm »
I wonder what it is that you are driving, i.e., what is the power taken by the load?

Probably
Quote
to drive a stereo headphone jack
so headphone. A typical headphone has about 100dB/mW, so they take 1mW to drive loud. High end models are less efficient.

So, are you making a headphone burn-in device?
Why would power consumption be an issue for that? On the other hand, if its some application where someone would listen to the headphones you'd think the statistics, as well as the spectrum, of the noise would be important.
 

Offline slugrustleTopic starter

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Microcontroller with low active/run current
« Reply #19 on: December 15, 2017, 04:38:21 pm »
Thanks for all the replies. I'm looking at two options for the final project:

1. Using an STM32L011D3P6 in the manner Kalvin suggested with an ISL23415 digital potentiometer (separate logic and analog supplies). One micro for noise generation, power button, 5V boost enable, vol up/down buttons, and SPI to digital potentiometer.
2. Using PIC10F202 or ATTiny4 for noise generation, power button, and 5V boost enable. Using a PIC12F1571 or ATTiny13A on the 5V side to read volume up/down buttons and connect to MCP1451 digital potentiometer over SPI.

Interesting find: The EM Microelectronic EM6580 has 60uA run current at 0.4MIPs. http://www.emmicroelectronic.com/products/microcontrollers/flash-based-mcu/em6580. That company has some really neat low power chips, including 4 bit chips that run at 32kHz. They are too niche to be practical for my purposes.

I am indeed driving headphones with this. Given that I am planning on using a single 10440 Li-Ion cell as the supply (http://www.batteryspace.com/li-ion-10440-cylindral-cell-aaa-size-3-7v-350mah-lc-10440a-button-top---un-38-3-passed.aspx), I want to at least consider my options for reducing operating current. Noise drives me a little crazy sometimes (dogs, lawnmowers, whistling, loud talking in adjacent cubicles, etc.) so I plan to pair this with some Shure noise-isolating earbuds. I have played white/brown/pink noise on large headphones while wearing 33dB earplugs before, and the subsequent total absence of sounds that annoy me is such a relief. Making that more portable and discrete would be nice.

 
The following users thanked this post: ebclr

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7374
  • Country: nl
  • Current job: ATEX product design
Re: Microcontroller with low active/run current
« Reply #20 on: December 15, 2017, 06:53:02 pm »
Thanks for all the replies. I'm looking at two options for the final project:

1. Using an STM32L011D3P6 in the manner Kalvin suggested with an ISL23415 digital potentiometer (separate logic and analog supplies). One micro for noise generation, power button, 5V boost enable, vol up/down buttons, and SPI to digital potentiometer.
2. Using PIC10F202 or ATTiny4 for noise generation, power button, and 5V boost enable. Using a PIC12F1571 or ATTiny13A on the 5V side to read volume up/down buttons and connect to MCP1451 digital potentiometer over SPI.

Interesting find: The EM Microelectronic EM6580 has 60uA run current at 0.4MIPs. http://www.emmicroelectronic.com/products/microcontrollers/flash-based-mcu/em6580. That company has some really neat low power chips, including 4 bit chips that run at 32kHz. They are too niche to be practical for my purposes.

I am indeed driving headphones with this. Given that I am planning on using a single 10440 Li-Ion cell as the supply (http://www.batteryspace.com/li-ion-10440-cylindral-cell-aaa-size-3-7v-350mah-lc-10440a-button-top---un-38-3-passed.aspx), I want to at least consider my options for reducing operating current. Noise drives me a little crazy sometimes (dogs, lawnmowers, whistling, loud talking in adjacent cubicles, etc.) so I plan to pair this with some Shure noise-isolating earbuds. I have played white/brown/pink noise on large headphones while wearing 33dB earplugs before, and the subsequent total absence of sounds that annoy me is such a relief. Making that more portable and discrete would be nice.
Oh, it is for relaxing! OK. I totally understand that. So here is what I have:
3M Peltor X5A
https://www.3m.com/3M/en_US/company-us/all-3m-products/~/3M-PELTOR-X5-Earmuffs-X5A-37274-AAD-Over-the-Head-10-EA-Case?N=5002385+3294326317&rt=rud
-31dB it makes everything quiet. I kid you not, sometimes I go to sleep with this.

Also, I would try using a phone with an app for white noise. There are several apps for this, you can change the tone/pitch apply filters, etc...
 

Offline slugrustleTopic starter

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Microcontroller with low active/run current
« Reply #21 on: December 15, 2017, 07:57:24 pm »
Quote
Also, I would try using a phone with an app for white noise. There are several apps for this, you can change the tone/pitch apply filters, etc...

Ah, the easy solution. Once I get the protoboard version where I want it, I plan to record a long MP3 and put that on a small MP3 player.

I was also considering looking up the WAV file format and synthesizing the spectrum I want with FFT and digital filters, but I realized that at the end of the day, I like making electronic stuff. When I found out you could generate broad spectrum noise with an m-LFSR, I just had to do it. I fully understand this is not practical.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8642
  • Country: gb
Re: Microcontroller with low active/run current
« Reply #22 on: December 15, 2017, 10:54:58 pm »
When I found out you could generate broad spectrum noise with an m-LFSR, I just had to do it. I fully understand this is not practical.
Generating a broad flat spectrum is trivial. There are many ways to do that. However, the simple ways leave you with flat statistics, which is a highly unnatural kind of noise, and not very pleasant. You really want to add enough separate streams together, so you start to approximate Gaussian statistics before the noise starts to sound pleasant. 5 to 10 of them is usually enough for a pleasing result.
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 2765
  • Country: us
Re: Microcontroller with low active/run current
« Reply #23 on: December 15, 2017, 11:01:01 pm »
RES: Thank you. I'll definitely check that out.

Kalvin: In this particular application, the microcontroller will remain in active mode for long periods of time (hours), as it is operating as a white noise generator.
Is this ALL the micro is doing?  It might make sense to use either an FPGA or CPLD for this.  Xilinx's CoolRunner II CPLDs can run on really low current as they are pure CMOS, and if the number of gates/FFs that are changing state are small, the current should be less than a microcontroller.  The clock could be turned down to the LFSR bit rate, which sounds like it might be in the 10's of KHz, which should drop the power into the 10's of uA, maybe.

Jon
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Microcontroller with low active/run current
« Reply #24 on: December 16, 2017, 04:53:39 am »
Isn't the 300uA current that most of the microcontrollers will beat, still much less than you'll end up needing to drive into your headphones?  Or are they separately powered?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf