VBAT usage?

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
eduardo
Posts: 31
Joined: Mon Jan 05, 2015 6:48 pm

VBAT usage?

Post by eduardo » Fri Jan 09, 2015 8:35 pm

If I run a battery powered installation, I can connect the power to VIN.

But what is VBAT for then?

blmorris
Posts: 348
Joined: Fri May 02, 2014 3:43 pm
Location: Massachusetts, USA

Re: VBAT usage?

Post by blmorris » Fri Jan 09, 2015 9:55 pm

VBAT allows the Real Time Clock (RTC) to run on a small coin-cell backup battery while the rest of the processor is disconnected from a power supply. The VBAT domain also contains a small amount of RAM that can be used as data backup.
-Bryan

eduardo
Posts: 31
Joined: Mon Jan 05, 2015 6:48 pm

Re: VBAT usage?

Post by eduardo » Sat Jan 10, 2015 9:22 pm

So can I set an interupt to a certain time, and let the processor wake up from a complete halt?

blmorris
Posts: 348
Joined: Fri May 02, 2014 3:43 pm
Location: Massachusetts, USA

Re: VBAT usage?

Post by blmorris » Sat Jan 10, 2015 10:39 pm

You can probably do that (haven't tried myself, not sure if uPy supports RTC alarms yet.)
But that assumes that you have VDD on the processor, and the VBAT domain (RTC plus backup RAM) gets power from VDD whenever it's present anyway.
The reason to connect VBAT to a backup battery is so that the RTC can run continuously (several years) on a small watch cell even if the rest of the processor is only powered intermittently (think USB). It also means that there is a small segment of RAM (not flash) that can retain data even if power is lost abruptly - sometimes you just don't have time to write critical data to flash before power is lost, and with backup RAM you don't need to.
Typically an application that expects to use VBAT will have a battery holder on board; thee wasn't room for that on the pyboard, but Damien broke it out to a header so it can be connected by a user.

eduardo
Posts: 31
Joined: Mon Jan 05, 2015 6:48 pm

Re: VBAT usage?

Post by eduardo » Sat Jan 10, 2015 11:42 pm

Found myself an answer to my question in one email from Damien:

"If you turn everything off and go to sleep, then it's down to around 50uA or so. The RTC can wake it up (but this feature is not yet implemented in software, it will be soon)."

This email was from end of october.

So I hope that once my project will be finished, this feature will be available as it is a requirement to be able to run the system for as long from battery as it is required.

ed

Post Reply