Electronics > Microcontrollers

SAMD21 - Voltage on analog input trickles into 3.3V rail

(1/3) > >>

Vulpecula:
Hey there!

I have observed a rather strange thing regarding a circuit, where the voltage of a 7.4V 2S LiPo battery gets divided down with a voltage divider (ratio: 1kOhm/3kOhm) and is then fed into an analog input pin of a SAMD21 microcontroller. The circuit is turned on and off by a pushbutton controller which is connected to the enable-pin of a buck converter. Also, the battery is always connected to that voltage divider and the connection does not get cut off in case the circuit is turned off.

Here's the strange thing: When turned off, I can measure a voltage between 0,8V and 1V on the 3.3V rail and a current of 2.5mA coming from the battery. Changing the resitor values (without changing the ratio) does lower the voltage and the current of course. For instance: 100kOhm/300kOhm lowers the voltage on the 3.3V rail to 0.4V and the current to 0,15mA.

Can someone explain why this happens? My best guess is, that when the 3.3V rail on the microcontroller is turned off, something inside the SAMD21 lets current seep through. But after all, I do not know enough about the internals of those microcontrollers so maybe some of you guys can tell me what is going on here.

Thanks and greetings
Vulpecula

Ian.M:
Your MCU is getting parasitic power via its input protection diodes.


EEVblog #831 - Power A Micro With No Power Pin!
Forum thread: https://www.eevblog.com/forum/blog/eevblog-831-power-a-micro-with-no-power-pin!/

ataradov:
Yes, all pins on SAM D21 have clamping diodes, and if there is no VDD voltage, but there is a voltage on the pin, then the VDD diode opens and powers the VDD rail.

nemail2:
how would you stop this, let's say for the UART pins where you have your USB/UART converter connected during development all the time, even if the power source for your DUT is temporarily turned off? Is there an easy fix for that, if I'm too lazy/annoyed to disconnect the USB/UART adapter everytime I disconnect power from my SAMD21?

Ian.M:
Get a USB<=>UART converter that senses target power to set its logic levels and also disables its outputs when target power is not present.

Alternatively mod your existing USB<=>UART converter by adding 74LVC1T45 dual supply level translating buffers, with the target side powered from target Vcc, which are guaranteed to go Hi-Z if one supply is missing.  They also bring the benefit of target level conversion over the range 1.8V to 5.5V.  Strap their DIR pins according to whether the signal is an input or output.  If you've got two signals in the same direction you could use 74LVC2T45 buffers, for a reduction in board area and component count.

Navigation

[0] Message Index

[#] Next page

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