Electronics > Microcontrollers

SAMD21 - Voltage on analog input trickles into 3.3V rail

<< < (3/3)

eugene:
I occasionally teach a few different courses at a local community college. I couldn't begin to count the number of times students wired the inputs and outputs of logic gates but didn't supply power to the IC, yet the circuit still worked!

Simon:

--- Quote from: TimFox on June 25, 2022, 05:56:10 pm ---(I posted this anecdote previously.)
When RCA first introduced their "COS-MOS" line (4000-series higher-voltage CMOS), I attended a presentation by an RCA field engineer.
He related a personal story:  he had been tasked with verifying the toggle-frequency spec on an MSI counter.
He set up the equipment late on Friday, and returned Monday morning to document the measurements.
The result was horrible:  the maximum toggle frequency was way below the specification.
He then found that he had forgotten to turn on the bench power supply:  the square wave from a low-impedance source had produced enough voltage on the supply rail (through the protection diodes) for the counter to function badly.
No problems after powering-on the external supply.

--- End quote ---

it's actually what happened when the very first ARM processor was tested, they fired it up and it worked, they tried to measure the consumption as they  had no way of knowing what the power draw would be and found there was none. They had forgotten to power it and it was running on the power from an input pin. It's often told in relation to how low power it was and how much lower than they expected.

DavidAlfa:
Yep, thats' the clamping diodes, most mcu pins are like this:


Simplest way is to just put a 100Ohm resistor to the VDD rail, the clamping diodes will dump the current into it.
Not good for battery powered because that will cause permanent VDD current consumption when ON.

For more power-critical circuits, you can use this simple circuit.
When VDD is present, Vb >= Analog input, so the transistor can't turn on, there's no extra current consumption.
When it's gone, VDD itself goes near 0V providing a path for the base current flow.
Anything >0.7V will turn on the transistor and clamp the voltage. 0.7V shouldn't cause any problem.

peter-h:
Use much higher value resistors for that voltage divider.

I do this with the ADC of a 32F417, 3.3V powered, to measure a +5V rail. I use a 100k/10k divider, so the max current that can source is 5V/100k=50uA. This is OK because the Zin of that ADC is pretty high, so check that yours is too.

There are other solutions but they involve more components; basically clamping the max input voltage just below the VCC of the micro, to the upper input protection diode doesn't turn on. The limit for that is normally VCC+0.2V, or if going below GND it is VSS-0.2V.

This touches on the interesting topic that capacitor-switching delta-sigma ADCs (those that deliver a 2's complement value) actually work around 0V and can sense below zero, down to about -0.2V :)

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version