Voltage limit on Teensy 3.6 for RTC Vbat?

Status
Not open for further replies.

chipaudette

Well-known member
Hi,

I'm interested in using the RTC functionality that is (apparently) part of the Teensy 3.6. First, is there any documentation that speaks to how to do this? Is there any "Getting Started with RTC on the Teensy" kind of document or link?

If not, my searches on this forum seem to suggest that I just need to add a coin cell to the VBat terminal in the central area of the Teensy 3.6 board. Is this really all that I need to do? That's pretty easy!

My question is whether I'm only limited to a coin cell. What voltages will this pin tolerate? Currently, I've re-wired my Teensy to be powered by an Adafruit LiPo (https://www.adafruit.com/product/1578). I could easily shoot a wire over to the RTC Vbat pin as well. But, the voltage of this battery ranges up to 4.2V. Could 4.2V damage the Teensy?

Clearly, I'm a total newbie when it comes to RTC. I would appreciate any guidance that you can provide.

Thanks,

Chip
 
How to use it is documented here:

As it says on the page, the Teensy 3.5/3.6 chips already have the crystal installed.

As far as I know, powering Vbat with more than 3v (or 3.6v?) would damge it. The first generation of Adafruit Teensy Feather adapter tied the Vbat pin to the lipo voltage, and they needed to issue a redesign. Here is a thread over at the Adafruit forum about this (this is where I learned about the voltage issue with Vbat):

Note, the RTC in the Teensy is not temperature corrected (like a DS3231 is), so it may drift over time.

This thread talks about how the RTC is set up:
 
Thanks for the the software library.

I looked up the datasheet for the MK66FX1MOVMD18 and saw that the RTC VBat must be between 1.71V and 3.6V (firm do-not-exceed limits are -0.3 to 3.8V). So, as y'all said, putting raw LiPo voltage on this pin is not acceptable. But, I don't feel like consuming the space in my widget for a coin cell, either.

I'm thinking about still using the LiPo, but reducing the voltage through a diode or voltage divider. I'd need to know the current draw of the RTC to decide if these are feasible approaches. Continuing to look at the datasheet, I see numbers like 432-810nA (Table 6), but that might be current drawn from the main power supply for different RTC configurations. Being inexperienced, it's unclear to me. Turning to the "K66 Sub-Family Reference Manual" instead of the datasheet, I see more talk of the RTC, but no current draw numbers.

Still, if a coin cell is to work for the RTC, it must be a pretty small current draw. If I were to assume that I use a voltage divider that is 50K high-side (R1) and 150K low-side (R2), I'd get this kind of response:

Vbat = (V_LiPo - I_Vbat * R1) / (1 + R1/R2)

with results being:


Code:
V LiPo    VBat, No I_VBat        I_VBat that pulls VBat down to 1.71V
------    ------------------     -----------------------------------------
4.2V      3.2V (<3.6, Good!)     0.038 mA
3.3V      2.5V (>1.7, Good!)     0.020 mA

So, as long as the current into the VBat pin is < 0.02 mA, I can perhaps use a 50K/150K voltage divider from my LiPo to supply my Vbat RTC. Maybe I'll hack it up tonight!

Chip
 
I tried the resistor divider and I tried the Teensy time library. While my resistor divider is ugly (see below), it works great!

Picture1.jpg

As an aside, I actually used 50K / 125K for my resistor divider as that ratio would also protect the system in case 5V happened to appear on my LiPo terminals.

The RTC is pretty cool! Thanks for all the effort that went into the Time library to make it easy for me!

Chip
 

Attachments

  • IMG_8430.JPG
    IMG_8430.JPG
    142.3 KB · Views: 140
Status
Not open for further replies.
Back
Top