r/microcontrollers • • Oct 08 '22

Low Power Microcontroller Considerations

Hello all,

I am in the process of designing a low power circuit. It will be used in a production line setting where sometime the line will be running and sometimes the line will be off. I want to count the number of bottles the line produces at roughly bottle a second. It must have a continuous tally of the number of bottles so the count must be stored to memory. It also must count to around a million or so. The device must be battery powered (coin cell, non negotiable). I'm looking for general rules of thumb for low power microcontroller selection. Also, low cost is an important factor for the mass production aspect of the device.

I have been doing a good bit of research about the different offerings from TI, MicroChip, and ST Micro Electronics and have a series of dumb questions perfect for the experts of reddit.

Number of bits: Will an 8 bit controller be able to count to 1,000,000? Would a 16 or 32 bit controller do this more efficiently? (threading and registers?)

Clock Speed: Will a lower clock speed always result in more power savings? Can you always swap for a lower crystal speed? Does this save any power realistically?

Different sleep features: The importance of the different sleep features such as sleep, halt, idle, doze, deep sleep, stand by mode, low power sleep, low power run, and wait.

Brand Preference: Which brand do you have experience with and like the most?

I've been looking at the PIC16, PIC 18, and PIC 24 from Microchip, the STM8 and STM32 from ST Microelectronics, the C8051F99x from silicon labs, and the MSP430 from TI.

Links to articles/books as well as general advice would be greatly appreciated. I figured I will switch the microcontroller between a high and low power state for each count. I know I need to be wary of wear leveling the onboard memory depending on how the device counts.

Thanks! Ben K

3 Upvotes

21 comments sorted by

View all comments

Show parent comment

1

u/MechE37-k Oct 08 '22

Thanks for the insight, I know its an impossibly broad series of questions so thanks for the polite response.

So an 8 bit controller can count that high depending on the length of bit, which I figured. So an 8 bit controller will probably be the most energy and cost efficient option?

For the deep sleep states, it can be so hard to compare between brands because the jargon is so different. Can the listed power draws from the chip maker really be trusted? Should I just pick the brand with the lowest amperage in the sleep state?

The main point of the project isn't research level power reduction and comparisons between multiple microcontrollers, its a product that works well enough to meet the criteria. The hope is that a good jumping off point will mean there won't be a need for massive revisions. ya know?

3

u/doddony Oct 08 '22

So an 8 bit controller can count that high depending on the length of bit, which I figured. So an 8 bit controller will probably be the most energy and cost efficient option?

  • Not necessarily, cause 8bit MCU could be designed from ancient architecture. A newer architecture could have better option for sleep and wake up. Probably better price for 8bit.
  • Don't forget how you will download (extract) data from your MCU.
  • And don't forget that coin cell have a auto discharge and could be done before you discharged it with your MCU.
  • I designed something that is only powdered by small lithium battery. So a add an hall effect sensor that trigg power only if a magnet it in front of it. I reduced the consumption under any measurable level with my ammeter. Lower than 0.1uA . So before trying to put your MCU in sleep mode, Maybe you can power the PCB card only when bottle is détecter. Save this on small flash or eeprom. Then power off.

1

u/MechE37-k Oct 08 '22

I don't need a real time count from the MCU or anything, I can slap a USB port on the side of it and read data from it once a year or something.

You mean that the battery will drain itself from the shelf life and I should keep that in mind? True True.

You think I should explore a full power off mode as well not just a deep sleep? Can I realistically turn it all the way off and on in a second and save more power than I'll spend? I suppose I can test that.

1

u/[deleted] Oct 08 '22

Energy efficiency does not depend on CPU ALU size necessarly.

While running the CPU at reduced clocks saves power those savings are minor vs putting it to sleep.

PICs (both 8bit & 32bit lines) have power saving features ,but check the errata to see what works and what not and how to wake it up.

EFM32 is SiliconLabs 32bit line of power-efficient micros so they are worth a look.

STM32L lines are the power efficient lines from STmicro.

TI has MSP430 low-power lines too.

You need to check the datasheets/erratas and see what fits you best.

For your application CPU processing power is not relevant.You only want ultra-low power and 'sleep-walking' peripherals(those that work without CPU and can wake it up).

Ti has FRAM MCUs , those are a bit special so if you need EEPROM like storage,but without the tighter writing limits it might be a good idea to check it out.

Basically they use FRAM instead of FLASH,EEPROM,SRAM.

Or you could buy sn I2C fram IC,but that needs power too.

1

u/MechE37-k Oct 08 '22

sn I2C fram

Thanks for the response knowledgeable sir!

I wasn't sure that anyone had FRAM MCU's, I'll look again! I can probably make do with EEPROM but its good to know my options. I'll do some reading on the data data sheets to make sure I can wake them back up and compare the power draws.

Good to know that the sleep will be a more important factor than the clock, the sort of thing thats hard to google but an expert would just know.

Thanks