Teensy LC Input Protection?

BriComp

Well-known member
Teensy Battery Circuit.jpg
Can anyone answer this conumdrum?

Is the Diode (circled) really necessary to protect the LC input when the 5V supply jumper is opened?
 
I am sorry to say that I have drawn the circuit incorrectly. The jumper is actually between the battery and the voltage sense resistors and the voltage regulator. I would drawn a new, correct, circuit but I am writing this on my phone.
I hope all that makes sense I only have a small window on what I am writing.
 
Hopefully Someone WILL COMMENT on this corrected submission.
Teensy Battery Circuit.png
Above is the "corrected" circuit.

When the Battery/PSU is disconnected the capacitor will (likely) have a charge and will discharge through R2 and R3 (34k).

I am wondering whether this will be enough and whether a damaging charge on the now unpowered Teensy is likely to exist, or is the C1 charge likely to go down at a similar rate to the Teensy voltage?
 
Its rather large to hang on a pin, rather depends how much current the rest of the circuit pulls from the supply.

You could make the resistors larger and C1 smaller, or more simply just add 1k after the capacitor to limit pin current to a few mA.
 
Thanks for commenting Mark.

How about using a schottky diode from the input pin to 3.3V? Would that suffice?
It wouuld be easier for me to add a diode to the pcb rather than an inline resistor.
The diode could go underneath the LC footprint.
 
I have been using a 100k(R1), 22k(R2) bridge with no series R and no C for a number of years on a T3.2 to measure three lithium in series ~12V. In this design the 12V is energized by a FET at the same time as a smps that powers the Teensy so the pin sees some small current even as the Teensy is powering up. Note the current is so small it doesn't cause problems. I average ten readings, which I think was required.
 
It's the Smoothing C which can potentially cause the problem because it holds a charge (voltage) as the battery power is removed.
 
BriComp:

Thinking out loud (so check for any unexpected signs of smoke !!): could you put a FET between the junction of R3/C1 and the Teensy input, where an additional Teensy pin acts as the "ENABLE" (with a suitable pull-down resistor to ensure that the FET defaults to "OFF"), thus disconnecting C1 from the input pin whenever Teensy power goes away ?? Also, you could enable the FET only when actually measuring to further protect the Teensy input.

Mark J Culross
KD5RXT
 
Yes but would a Shottky diode connected to the junction and the 3.3V supply also work?
If I understand correctly the Teensy would only see 0.2V above the dying Teensy supply voltage and the charge on the capacitor would be dragged down by the diode.
I don't mean that the Teensy is dying but that the supply voltage is dying.
 
Sorry, I'm more of a software kind of person . . . I simply "dabble" in hardware. With that qualification in mind, I'm not sure that connecting a diode between C1 & the 3.3VDC pin would be desirable. Would that not cause the capacitor charge to flow backwards into the 3.3VDC regulator's output, at a time when that output is no longer under positive full control ?? The regulator may not like that very well. For a more definitive answer, someone with much stronger hardware skills will need to chime in.

Using the in-line FET approach, the charge on C1 would be forced to dissipate thru R3+R2 to ground, rather than thru some portion of the Teensy's internal hardware.

Mark J Culross
KD5RXT
 
No need to smooth the connection between a battery and a linear regulator for the sake of measuring the level. Even with a switching regulator as I'm using it's not necessary.

If you look at the circuit in #3 you will see it's a smoothing capacitor in the Low Pass Filter feeding a Teensy input to determin battery voltage and hence assess remaining battery capacity.
 
Just limit the current that can flow into the pin to a low value - analog inputs are high impedance (10^10 ohms or more), until the protection diodes conduct. Limit the current and in the inbuilt protection diodes do the rest. A few kohms will be enough.
 
Just limit the current that can flow into the pin to a low value - analog inputs are high impedance (10^10 ohms or more), until the protection diodes conduct. Limit the current and in the inbuilt protection diodes do the rest. A few kohms will be enough.

OK Mark, I've sucumbed!
Also after further reflection I realise that I can delete the series Feed resistor to the C as it's effectively embodied in the potential divider resistors. I can also reduce the capacitor to 330nF.
Below is the final (!!??) circuit. It also includes the circuit for a RV-3028-C7_32.768KHZ_1PPM-TA-QA 1ppm RTC.

I have circled the parts of the circuit incorporating the low pass filters.

The component cost using JLCPCB comes to less than $3 which is remarkable. I was considcering using a Pimoroni RTC module with the same chip and that would have cost $11 alone.
Teensy Battery Circuit2.jpg

@Mark and everyone else thank's for your input.
 
Back
Top