Author Topic: Cheap, ultra low power RTC to periodically wake microcontroller from power-down?  (Read 8969 times)

0 Members and 1 Guest are viewing this topic.

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
Some microcontrollers have excellent power-down current consumption, but this gets orders of magnitude worse when they are running, even at low frequencies. E.g. at 3.3 V the Padauk PMS134 draws 100 nA in power-down but 40 µA on its internal low-speed oscillator. This would completely drain a CR2032 in less than a year.

There are excellent RTCs like the Micro Crystal RV-8803-C7 which can be used to periodically wake the microcontroller from power-down via an interrupt, avoiding this waste of power. The RV-8803-C7 draws roughly 250 nA, and is even temperature compensated. However, at $1.60 per unit in volume it nukes all the cost saving of the 10¢ Padauk.

Is there a budget RTC for this purpose, in the < 1 µA range, which isn't in a big (SOP) package? Temperature compensation is a nice-to-have but definitely not required. Internal crystal preferred but also not required.
 

Offline krish2487

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: dk
Is the RTC a necessity or will periodically waking up the micro sufficient?

Is something like this
https://www.digikey.com/product-detail/en/texas-instruments/TPL5110DDCT/296-38830-2-ND/5130143
a viable solution for what you are wanting to do??
:-)
If god made us in his image,
and we are this stupid
then....
 
The following users thanked this post: Howardlong

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3930
  • Country: 00
  • STM32, STM8, AVR, 8051
Why do it complicated?

Use an MCU with a low power timer (or even the RTC) suited for periodic wakeup in the first place.

For example STM32L011, if you want something small with low consumption.
 
The following users thanked this post: Howardlong, Xenoamor

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5424
  • Country: gb
Is the RTC a necessity or will periodically waking up the micro sufficient?

Is something like this
https://www.digikey.com/product-detail/en/texas-instruments/TPL5110DDCT/296-38830-2-ND/5130143
a viable solution for what you are wanting to do??
:-)

Nice device, I wasn't aware of those, thanks for the info.

To the OP: I was discussing these super cheap MCUs the other day with some colleagues, and the end result of the conversation was that in many cases, the family feature sets are limited compared to more mature and industry standard product lines. If you need to spend $0.50 to add the right functionality to a $0.10 MCU, it quickly negates the cost benefit.

Furthermore, there are plenty of mainstream options that can provide <1uA 32kHz crystal clock on chip and if you don't mind doing your RTCC in software they're cheap. You can use low power watchdogs if it's not time critical.
 

Offline jhpadjustable

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
  • Salt 'n' pepper beard
Is there a budget RTC for this purpose, in the < 1 µA range, which isn't in a big (SOP) package? Temperature compensation is a nice-to-have but definitely not required. Internal crystal preferred but also not required.
How about the PCF85063? Run current 0.22µA (typical) 0.6µA (max), available in a variety of small packages from SO-8 down, 80¢/1 or $54/100 at Digi-Key. The bad news is you have to bring your own tuning fork crystal.

Maybe the Padauk route isn't the best route. If I understand correctly, you don't really need the core to be running, just the RTC and its oscillator. The tinyAVR 0-series seems worth a look. Typical power consumption at 3.3V in standby mode, with just the RTC and external (EDIT: no, internal) low-speed oscillator running and most other interrupt sources available, appears to be less than 2µA under 85°C. The actual retail price from Digi-Key is 40¢/1.
« Last Edit: December 03, 2019, 02:24:30 pm by jhpadjustable »
"There are more things in heaven and earth, Arduino, than are dreamt of in your philosophy."
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5424
  • Country: gb

How about the PCF85063? Run current 0.22µA (typical) 0.6µA (max),


FWIW I've never understood why so many RTCC devices only provide an I2C interface plus open drain INT pins: the pull-up requirement necessitates unnecessary power consumption overhead to my mind.
 

Offline kamtar

  • Regular Contributor
  • *
  • Posts: 62

FWIW I've never understood why so many RTCC devices only provide an I2C interface plus open-drain INT pins: the pull-up requirement necessitates unnecessary power consumption overhead to my mind.

because I2C is cheaper, and I don't see the issue with open-drain outputs they consume any noticeable (for most use-cases) power only when used, all these devices aren't designed for constant communication.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5424
  • Country: gb

FWIW I've never understood why so many RTCC devices only provide an I2C interface plus open-drain INT pins: the pull-up requirement necessitates unnecessary power consumption overhead to my mind.

because I2C is cheaper, and I don't see the issue with open-drain outputs they consume any noticeable (for most use-cases) power only when used, all these devices aren't designed for constant communication.

I'd have thought SPI would be cheaper to implement. Either way, an option for either plus optional push pull on the INT pin.
 

Offline kamtar

  • Regular Contributor
  • *
  • Posts: 62
I'd have thought SPI would be cheaper to implement. Either way, an option for either plus optional push pull on the INT pin.

speed communication and extra pins are what increases price I guess. Again pull-ups matter only when that line is held LOW by something, for something as an interrupt from RTC I don't see the problem in that extra 0.3 mA (3V/10k pull-up) for few microseconds from time to time in most applications.  I2C could be a problem if you communicate really often, but these types of chips arent designed for that usecase, you cant have ICs which can do everything for everyone and this is good enough for most uses (even low-power ones).
« Last Edit: December 03, 2019, 04:56:24 pm by kamtar »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr

FWIW I've never understood why so many RTCC devices only provide an I2C interface plus open-drain INT pins: the pull-up requirement necessitates unnecessary power consumption overhead to my mind.

because I2C is cheaper, and I don't see the issue with open-drain outputs they consume any noticeable (for most use-cases) power only when used, all these devices aren't designed for constant communication.

I'd have thought SPI would be cheaper to implement.

Well, yeah. I2C is definitely more complex to implement and takes more logic. I can't see how it would be "cheaper". Besides, if I'm not mistaken, I2C used to be licensed, so you had to pay for a license to include it in an IC. I don't know for sure whether it's still the case or if it's in the public domain now?
 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1265
  • Country: nz
I have heard - and might be wrong! - that IO pin drivers need quite a lot of silicon area. So the extra I2C logic is probably quite cheap compared to 2 IO pins and a larger plastic package required by SPI.

I think that quite a few MCUs offer separate crystal oscillators and Real Time Clock logic so that the device can wake up from RTC.

We’ve done that with the deeper sleep modes in an STM32.  MSP430 devices also offer it (but I haven’t tried myself).
 

Offline jhpadjustable

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
  • Salt 'n' pepper beard
I just checked that the tinyAVR 1-series, particularly ATtiny(2|4|8)14, does have an external 32k oscillator and typically, at <85°C, consumes about 1-1.5µA in standby mode with that and the RTC running. Active current can be as small as 8µA (but there are minimum speed requirements to access the RTC registers, if you're not just using the periodic interval timer to wake up). Still only 54¢/1 from Digi-Key, looks like 4mm-wide SO-14 only.
"There are more things in heaven and earth, Arduino, than are dreamt of in your philosophy."
 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
Thanks for the feedback, kind people.

https://www.digikey.com/product-detail/en/texas-instruments/TPL5110DDCT/296-38830-2-ND/5130143

If the period of waking the microcontroller is known in advance, for 30¢ this is a good solution. Also its brother the TPL5010, which wakes the microcontroller directly over an interrupt line.

For example STM32L011, if you want something small with low consumption.

540 nA with RTC and full RAM retention for 70¢ is very nice. You're right, this looks like a better approach overall.

in many cases, the family feature sets are limited compared to more mature and industry standard product lines. If you need to spend $0.50 to add the right functionality to a $0.10 MCU, it quickly negates the cost benefit.

Agreed. The window for suitable applications is narrow. They are good for things like toys and appliances in which the user wakes the microcontroller through a button press or other hard interrupt. Step outside this range and the best recourse is a more richly featured microcontroller.

I was trying to see how far I could push that window open, but clearly not far enough to squeeze my far arse through.  ;D
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1407
I once built some data loggers.   I used a cheap micro (can't say which one) that supported using a watch crystal.  That micro's only purpose was to periodically wake up the main  instrument.   One of these loggers was lost for over 25 years.   When it was recovered it was still ticking and logging.   The log memory was sized for 3 years of data and was expected to be retrieved and dumped every year or two... the log queue wrapped around over 8 times.  The wakeup clock had drifted less than a hour.   The power for the loggers was a lithium primary "F" sized cell.
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2245
  • Country: us
If the processor doesn't sleep very soundly, or if there are other circuit components that have the same problem, then it seems you could use an RTC module or similarly efficient tiny processor, powered by its own coin cell, to periodically turn on the power to the main circuit instead of just waking it up.  Then the main processor would maintain the power on while it's doing its thing, then shut off the power.  The power switching circuit would just be a P-channel mosfet, an NPN and a couple resistors, and use one GPIO pin.  And then you wouldn't really have to worry about sleep current or a regulator's quiescent current or current used in dividers since the whole thing would only be powered up briefly.
« Last Edit: December 04, 2019, 03:44:09 pm by Peabody »
 
The following users thanked this post: GeorgeOfTheJungle

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
The power switching circuit would just be a P-channel mosfet, an NPN and a couple resistors, and use one GPIO pin.

Or run the target device directly from the GPIO.  ;D

 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Quote

Well, yeah. I2C is definitely more complex to implement and takes more logic. I can't see how it would be "cheaper". Besides, if I'm not mistaken, I2C used to be licensed, so you had to pay for a license to include it in an IC. I don't know for sure whether it's still the case or if it's in the public domain now?

No, pretty sure the Philips patents have expired.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
The lowest power afaik is the PCF8563 (250nA @3V).
A CR2032 150mAH will last for 68 years  :D
Readers discretion is advised..
 
The following users thanked this post: I wanted a rude username

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Quote

Well, yeah. I2C is definitely more complex to implement and takes more logic. I can't see how it would be "cheaper". Besides, if I'm not mistaken, I2C used to be licensed, so you had to pay for a license to include it in an IC. I don't know for sure whether it's still the case or if it's in the public domain now?

No, pretty sure the Philips patents have expired.

I took a look. https://en.wikipedia.org/wiki/I%C2%B2C

1. No license fees required since Oct. 2006 (probably explains why the number of ICs with an I2C interface has risen significantly in the last 10 years or so);
2. NXP apparently still has a program for allocating slave addresses, and there are fees, although I couldn't find any precise information on this. According to the I2C specs, "Assignment of addresses within a local system is up to the system architect", thus we can understand that registering slave addresses is optional and not required. I guess most vendors don't bother to register these days, all the more that there are only a very limited set of possible addresses, and that the usual addresses used for various types of devices are relatively easy to find.

For anyone interested, the latest rev. specs: https://www.nxp.com/docs/en/user-guide/UM10204.pdf
 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
The lowest power afaik is the PCF8563 (250nA @3V).

For 20¢ per unit in volume (or 10¢ for the HuaGuan Semiconductor PCF8563M, a copy/clone claiming identical characteristics), this is perfect! It can be used in countdown mode without ever needing to set the time and date, and the countdown interrupt can be set to either latch on or reset. The maximum countdown duration of 4.25 hours is certainly acceptable since the microcontroller can wrap it in a counter loop for longer durations. A brief I2C transmission would only be required when changing the countdown duration.

https://www.nxp.com/docs/en/data-sheet/PCF8563.pdf
https://datasheet.lcsc.com/szlcsc/1910291305_HGSEMI-PCF8563M-TR_C434478.pdf
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
The lowest power afaik is the PCF8563 (250nA @3V)
The power switching circuit would just be a P-channel mosfet, an NPN and a couple resistors, and use one GPIO pin.  And then you wouldn't really have to worry about sleep current or a regulator's quiescent current or current used in dividers since the whole thing would only be powered up briefly.

 :clap:

I think I'm going to borrow the idea :) the PCF8563 /int pin can drive the high side switch :-+
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
And as its final action, the microcontroller clears the timer flag.



How would you switch on the MOSFET after a power-on/reset though?
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7678
  • Country: ca
I had a datalogger product using PCF8583T and it was unreliable for the wakeups. Set the alarm and no interrupt occured, some of the time. The flag just didn't get set.
Found the silicon errata sheet and screamed for quite a while at that bug in 118 or 112. So I will never again use a PCF family RTC. They are cheap because they are primitive, quirky state-machines that need careful software considerations.
Enjoy how complicated the read events are: NXP Semiconductors AN10652 Improved timekeeping accuracy using external temperature sensor PCF8563
More info: NXP RTC UM10301 User Manual for NXP Real Time Clocks PCF85x3, PCF85x63, PCA8565, PCF2123, and PCA21125
 

Offline I wanted a rude usernameTopic starter

  • Frequent Contributor
  • **
  • Posts: 662
  • Country: au
  • ... but this username is also acceptable.
I had a datalogger product using PCF8583T and it was unreliable for the wakeups. Set the alarm and no interrupt occured, some of the time. The flag just didn't get set.

I can't find the errata (do NXP publish them?), but did the bug occur because the alarm was used in seconds mode, and the microcontroller's reads/writes of the time/date registers were causing the PCF8583 to stop the clock for one second (to allow atomicity) and thus miss the interrupt?
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
The key message with this kind of RTC is: "when the read or write I2C operation takes more than 1 second you loose 1 second". Normally your read or write I2C operation takes a few milliseconds with 100kHz I2C clock..
PS: 1 second is lost because the I2C operation stops the internal "seconds" counter thus if the operation is longer than 1 second your RTC will show 1 second less.
« Last Edit: December 07, 2019, 12:15:13 am by imo »
Readers discretion is advised..
 
The following users thanked this post: GeorgeOfTheJungle


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf