Electronics > Projects, Designs, and Technical Stuff

Cheap, ultra low power RTC to periodically wake microcontroller from power-down?

<< < (7/8) > >>

I wanted a rude username:
I lack the fundamental electronics knowledge to understand how that would work.  :o

Fortunately in my applications the quiescent currents are so low that waking the microcontroller directly by interrupt is good enough.

floobydust:

--- Quote from: I wanted a rude username on December 07, 2019, 12:01:03 am ---
--- Quote from: floobydust on December 06, 2019, 11:03:15 pm ---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.

--- End quote ---

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?

--- End quote ---

PCF8583 is a 22 year old part, along with the PCF8563. These are antiques. I don't know where the erratas have gone to, but that was when I realized it was never going to work properly and stop killing myself looking for a firmware bug. NXP has Freescale/Kinetis and LPC ARM erratas but no others do I see. Check out a Microchip MCP7940M one. Note RTC's are not always great, always look at the RTC erratas, some are pretty awful.

I didn't do the original hardware/firmware design, but it landed on my lap when there were problems. The datalogger did once or twice a day wakeup and take readings, flash storage and then radio call-outs, then back to sleep. It was not constantly talking to the RTC. Just a read for timestamp, setup the next alarm time next day and then the MCU went to sleep.... forever... sometimes...

My point is, I got burned by the chip and would not use again. Especially an antique. Gotta wonder, if you're freezing the time counters for a read and can't splurge on a secondary buffer/holding register to read the time from, YUCK. Look mom, we saved a few dozen flip flop$.
Otherwise, it might be cheaper to make your own RTC with a MCU. ARM parts do have that code.

GeorgeOfTheJungle:

--- Quote from: I wanted a rude username on December 07, 2019, 02:06:04 am ---I lack the fundamental electronics knowledge to understand how that would work.  :o

Fortunately in my applications the quiescent currents are so low that waking the microcontroller directly by interrupt is good enough.

--- End quote ---

It takes a few ms to charge C1 through R1 => the gate is below Vcc => the mosfet is ON:

I wanted a rude username:

--- Quote from: floobydust on December 07, 2019, 02:14:29 am ---Check out a Microchip MCP7940M one.

--- End quote ---

Oh. Oh wow. This would be funny to read if you didn't have to actually use it ...


--- Quote ---If the RTCWKDAY register is written while the oscillator is stopped, it is possible that the value will read back as a different value when the oscillator is started.
--- End quote ---

floobydust:
With the same parts you can implement a latching power switch, which is good if the MCU takes a while to boot. Circuit shamelessly taken from a Fluke DMM with 9V battery.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod