Author Topic: EEVblog #831 - Power A Micro With No Power Pin!  (Read 35110 times)

0 Members and 1 Guest are viewing this topic.

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37734
  • Country: au
    • EEVblog
EEVblog #831 - Power A Micro With No Power Pin!
« on: December 18, 2015, 12:59:05 am »
In this Fundamental Friday Dave will blow your mind as he shows you how you can power a microcontroller *without* a power or ground pin!
A potentially big trap for young and old players alike.
Can you guess how it's done before the secret is revealed?



SPOILER:
A tutorial on how ESD protection diodes in chips work and how they can be used, mostly inadvertently to power a chip through the input and output pins without having the power or ground pin connected.
This example uses an MSP430 microcontroller, but is applicable to almost any complex or simple CMOS chip.
 

Offline photon

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #1 on: December 18, 2015, 01:37:00 am »
Very good fundamental. Where I have run into this issue is when I'm asked to measure peak power consumption of a part. Most parts only reach peak power when the inputs and outputs are being driven fast enough to bring the part to it's peak performance. But then you have just the issue you explained. The IO's themselves are supplying power. So just putting a power monitor on VCC/VDD of the part is not good enough. You must also add in the power supplied by the IOs.
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #2 on: December 18, 2015, 02:28:27 am »
 Yes, can be a big deal with systems where different interconnected modules are supplied by independent voltage sources and failing to have all power applied at the same time, on or off, that can actually damage the chip by exceeding the clamping diodes maximum current rating of around 1 ma or so.

 The only reason the Dave's setup didn't damage any input pins is that the LED resistors were limiting the total current supplied to less then the diode's max rating. What if the led resistors were sized to allow 10-20ma, yea dead pins and maybe dead micro.

 So yea, lots of magic to the newbies. One can even wire 120vac to an input pin (although not recommended) as long as you wire it through a large enough series resistor (think meg ohms) to the input pin(s). That is a cheap way of getting AC voltage zero crossing timing pulses for time keeping or phasing information.

 



« Last Edit: December 18, 2015, 02:31:26 am by retrolefty »
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #3 on: December 18, 2015, 02:39:13 am »
Very good fundamental. Where I have run into this issue is when I'm asked to measure peak power consumption of a part. Most parts only reach peak power when the inputs and outputs are being driven fast enough to bring the part to it's peak performance. But then you have just the issue you explained. The IO's themselves are supplying power. So just putting a power monitor on VCC/VDD of the part is not good enough. You must also add in the power supplied by the IOs.

Confused by your statement.

 IO pins don't supply current to a working device unless the device has it's normal Vcc/Vdd path turned off. IO pins as output pins can consume by passing power to load(s) of course, but one doesn't have to measure all the output pins plus Vcc current in a normal powered system, the normal Vcc pin(s) will contain total current consumption.
« Last Edit: December 18, 2015, 02:50:53 am by retrolefty »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #4 on: December 18, 2015, 02:47:18 am »
The old-timers will mostly have bumped into this the first time they used 4000 series CMOS logic in a circuit complex enough to need multiple supplies, starting as early as 1970.   However its a constant source of surprises for repair techs, designers and general experimenters who haven't learned the hard way, and causes particular problems when a newbie attempts a MCU design with power management, or a bus powered USB interface chip with a separate supply for the MCU, so 10/10 to Dave for enlightening the next generation.
« Last Edit: December 18, 2015, 03:30:17 am by Ian.M »
 

Offline justanothercanuck

  • Frequent Contributor
  • **
  • Posts: 391
  • Country: ca
  • Doing retro repairs...
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #5 on: December 18, 2015, 03:17:38 am »
i once saw a nintendo with a broken cartridge slot, where the ground pins had broken free from the pads on the pcb.  some games would work, others would black screen and not start up.  i guess this would explain it though, as the cartridges hold a small handful of memory, logic chips and the lockout chip.  unintended routing paths, yay technology.  :-DD
Maintain your old electronics!  If you don't preserve it, it could be lost forever!
 

Offline baoshi

  • Regular Contributor
  • *
  • Posts: 167
  • Country: sg
    • Digital Me
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #6 on: December 18, 2015, 04:04:15 am »
I fell in the same trap before when I try use a MOSFET to turn on/off a micro. Result is when MOSFET is turned off, the I/O pins start to supply power.
 

Offline BUkitoo

  • Contributor
  • Posts: 13
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #7 on: December 18, 2015, 04:11:26 am »
This happens all the time when you disconnect the power supply and forgot to disconnect the programmer, during debugging.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8269
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #8 on: December 18, 2015, 04:30:57 am »
Clever use of ESD diodes:

http://scanlime.org/2008/09/using-an-avr-as-an-rfid-tag/

I wouldn't be surprised if real RFID chips were built much the same way.

Edit: Dave initially shows this being powered from a RESET pin. Some uCs which are designed to take much higher voltages on that pin (e.g 12V to activate programming mode) don't have the upper diode.
« Last Edit: December 18, 2015, 04:58:31 am by amyk »
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12297
  • Country: au
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #9 on: December 18, 2015, 04:32:35 am »
Answering Dave's questions was easy enough.  Looking at such a simple circuit made that easy.  My problem is that I didn't even realise these questions were there to be asked.

Knowing what diode protection was designed to do is one thing, but understanding the implications in practical implementation goes much further.


Thank you Dave.

I think I'm going to have some fun with this knowledge....
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #10 on: December 18, 2015, 07:34:03 am »
I'm not sure why the microcontroller stops working at 15:07 in the video. The 10 meg input resistor of the multimeter is in parallel to the LED and resistor, so more current should flow and the microcontroller should work better.

I tried the same with a PIC and it is interesting that it works with no ground connection, but connecting the ground to any INPUT pin of the PIC. So my guess would be that the current flows like this: Vcc -> CPU core -> internal chip ground -> body diode of the output FET -> input pin -> ground. Same would be true for Dave's setup. And then when the multimeter load is added, the body diode of the FET has a higher voltage drop and this is the reason for the CPU to stop working.

Ok, after answering my own question, another one: Why does the CPU stop working in Dave's setup when one of the LEDs is disconnected? The body diode of both FETs for the pins are still there. And am I right that the low side output FET don't conduct in reverse direction when it is turned on, so not Vcc -> CPU core -> internal chip ground -> FET drain/source -> output pin -> resistor -> LED -> ground?

Sorry for my noob questions, I'm mainly a programmer :)
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline photon

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #11 on: December 18, 2015, 07:43:07 am »
Very good fundamental. Where I have run into this issue is when I'm asked to measure peak power consumption of a part. Most parts only reach peak power when the inputs and outputs are being driven fast enough to bring the part to it's peak performance. But then you have just the issue you explained. The IO's themselves are supplying power. So just putting a power monitor on VCC/VDD of the part is not good enough. You must also add in the power supplied by the IOs.

Confused by your statement.

 IO pins don't supply current to a working device unless the device has it's normal Vcc/Vdd path turned off. IO pins as output pins can consume by passing power to load(s) of course, but one doesn't have to measure all the output pins plus Vcc current in a normal powered system, the normal Vcc pin(s) will contain total current consumption.

I assume GND is common to both driving device and receiving device.

If VDD(driving device) > VDD(receiving device) such that the ESD diode is on in the receiving device, then the 2 supplies are connected on the receiving device's power plane. The net effect is that the voltage of the receiving device's power plane goes up. Higher voltage mean higher power or more current.

In measuring peak power of a device, I would ensure that VDD(driving device) < or = VDD(receiving device) since then the 2 supplies are not connected.
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37734
  • Country: au
    • EEVblog
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #12 on: December 18, 2015, 08:03:10 am »
Answering Dave's questions was easy enough.  Looking at such a simple circuit made that easy.  My problem is that I didn't even realise these questions were there to be asked.
Knowing what diode protection was designed to do is one thing, but understanding the implications in practical implementation goes much further.
Thank you Dave.
I think I'm going to have some fun with this knowledge....

Cool. It's not something they teach you in school.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #13 on: December 18, 2015, 08:20:44 am »
I just love those PowerBricks from Diligent. Don't get me wrong, the video was great but that thing caught my eye!

I can use one of each, even the 5V ones, too bad they are pricey at $17 + Shipping.  Also, no 1.8V?  :-//

Any quality cheap alternatives out there? (not to build but to purchase)
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #14 on: December 18, 2015, 08:38:44 am »
Even knowing about protection diodes does not always avoid falling into the traps. I once had a design using a HDMI receiver. Under some conditions the HMDI lines were supplying enough voltage to keep some parts of the circuit running. After power was reapplied the circuit did not work, because the microcontroller did not reset and therefore did not initialize the other ics.
I simply didn't expect that. The solution was to add a load to the 3.3V to pull down the voltage below the microcontroller's brown out threshold. Then the microcontroller shuts down, disabling the HMDI receiver and then also the HDMI transmitter stops, removing the signals on the HDMI lines. Now everything is ready to start up correctly.

A followup video would be nice, showing how 5V tolerant inputs work and what the drawbacks are. If you do not understand how to use and protect them correctly, especially when they are used as inputs from other boards, you can easily damage the inputs without even knowing! You kann destroy a 5V tolerant input that is designed to survive a kV ESD spike by applying only 12V. It may still work, but with a changed threshold voltage. And some ics (PIC32) have some unexpected specifications for the maximum input voltage on the 5V tolerant inputs.
 

Offline TheSteve

  • Supporter
  • ****
  • Posts: 3753
  • Country: ca
  • Living the Dream
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #15 on: December 18, 2015, 08:48:32 am »
Disconnecting the Vcc pin was a known "fix" in the satellite hacking realm years ago on the atmel at90s8515. The micro resetting itself countered the satellite receivers detection of the atmel cloning the real smart card.
VE7FM
 

Offline ealex

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: ro
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #16 on: December 18, 2015, 10:12:43 am »
Found it out the hard way with an atmega8 that had one pin connected to 12V via a resistor.
Took me 5 puzzled minutes to understand why the damn thing was still powering up - it had the UVLO activated and some big capacitors -> it oscillated quite nicely.
Discovered the problem when I touched the resistor and it was hot enough to melt skin :)
 

Offline JoeMuc2013

  • Contributor
  • Posts: 21
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #17 on: December 18, 2015, 10:13:06 am »
Thank you Dave!
Explains the mystery I found some years ago making a networked Arduino temperature / humidity sensor. At that time I thought it might be some kind of backup solution to keep the microcontroller running even if VCC drops out. Nothing to be found officially about the issue. It seems so natural for micro designers they don't consider mentioning it.
Learned a lot once again from your episode. Great work  :-+

Regards,
Joe
« Last Edit: December 18, 2015, 10:23:22 am by JoeMuc2013 »
 

Offline Zad

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: gb
    • Digital Wizardry, Analogue Alchemy, Software Sorcery
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #18 on: December 18, 2015, 03:10:43 pm »
I replied on YouTube that there is a relatively famous instance of this effect, and it was definitely not an inexperienced young player. When testing the very first ARM processor, Steve Furber made exactly this mistake:

https://youtu.be/1jOJl8gRPyQ?t=8m26s

(Watch the whole video though, Steve is fascinating to listen to.)

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #19 on: December 18, 2015, 03:15:19 pm »
next in the internet : a whole slew of schematics where they don;t bother hooking up the power pins anymore. 'cos it works without bro ... we saw it in a video'   :palm:
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline matkar

  • Regular Contributor
  • *
  • Posts: 153
  • Country: si
  • Sixty percent of the time it works EVERY time.
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #20 on: December 18, 2015, 05:23:13 pm »
next in the internet : a whole slew of schematics where they don;t bother hooking up the power pins anymore. 'cos it works without bro ... we saw it in a video'   :palm:
And as a consequence producers will stop making chips with Vdd pin to shave off another 0.01 cent in production :)

It happened to me as well. I made a project with a USB powered FTDI USB-UART bridge with separately powered PIC micro. The PIC kept going since it was powered by TX/RX connections from FTDI. And it's not I didn't know about this "feature", its just I didn't think of it when designing the PCB.
 

Offline opty

  • Regular Contributor
  • *
  • Posts: 55
  • Country: ie
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #21 on: December 18, 2015, 06:03:42 pm »
Hi,

Those protection diodes can be used in zero crossing detector.  (see "AVR182: Zero Cross Detector" http://www.atmel.com/images/doc2508.pdf)

Well, connecting my 5v micro directly to mains (ok, 1meg resistor) feels sort of weird...hm

(I know this was already discussed on this blog, but I couldn't find relevant link).

gl
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #22 on: December 18, 2015, 06:11:07 pm »
Intentionally using the protection diodes as limiting clamps can be problematic for chips with ADC inputs.  Charge injection can foul up the ADC input multiplexer leading to errors on other channels.
 

Offline Drazn

  • Newbie
  • Posts: 4
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #23 on: December 18, 2015, 06:47:36 pm »
This remind me on my early days (cca 35 years ago) when I developed one of my devices. It has a number of 4000 series chips and was working perfectly. Until it started to behave funny, reset itself in some situations. Well, main Vdd trace has a very narrow gap very close to solder. After some time corrosion removed microscopic trace and complete Vdd was thru protection diodes. In specific situation number of output pins went to gnd, Vdd dropped and circuit started to behave funny.
But more bizarre was when D FF was not dividing input frequency by 2.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #24 on: December 18, 2015, 06:52:21 pm »
And as a consequence producers will stop making chips with Vdd pin to shave off another 0.01 cent in production :)
if we could make chips powered by stupidity we'd solve the entire world energy problem in one shot.

i've been proposing we make telepatic chips. forget all thjis bluetooth and wifi. Imagine a huge FPGA/cpu in one chip with a telepatic interface. These devices mesh with each other. All they need is a power and ground pin. ( they'd have built in oscillators running off comic radiation)
No devtools required. Just think about what the thing needs to do and voila. design ready. Need an additional feature ? simply think about it.
no more complex board layouts, no more rf radiation. all gone.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline mrpackethead

  • Super Contributor
  • ***
  • Posts: 2845
  • Country: nz
  • D Size Cell
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #25 on: December 18, 2015, 07:19:23 pm »
Thanks for this.

Yes, i knew about the diodes, but had never actually thought about the implication of what could happen if you disconnected it.  This will make for an interesting problem next time i have some overly smart students who need some extra stretching.   

On a quest to find increasingly complicated ways to blink things
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #26 on: December 18, 2015, 07:30:51 pm »
And as a consequence producers will stop making chips with Vdd pin to shave off another 0.01 cent in production :)
if we could make chips powered by stupidity we'd solve the entire world energy problem in one shot.

i've been proposing we make telepatic chips. forget all thjis bluetooth and wifi. Imagine a huge FPGA/cpu in one chip with a telepatic interface. These devices mesh with each other. All they need is a power and ground pin. ( they'd have built in oscillators running off comic radiation)
No devtools required. Just think about what the thing needs to do and voila. design ready. Need an additional feature ? simply think about it.
no more complex board layouts, no more rf radiation. all gone.
Comic radiation?  I suppose narrative causality could make it work.  :-DD

A great idea, but possibly a bit too futuristic for today's market.  Instead, as one doesn't actually need a power pin, why not put a MCU into a SOD-723 package and take on Microchip's PIC10F range head to head in the ultra-miniaturized minimum pin count market?

The worrying thing is: such a device might actually be a good thing for musical greeting cards!  :scared:
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #27 on: December 18, 2015, 07:42:31 pm »

There is a need to check the power with a scope to find problems like this.

Most parts have a wide power range and most volt meters are slow. The meter can show it's good while the power dropped out of range for a very small amount of time.

If Dave did same with 4050 but with pins such that power was off for only one fast count the the off time could be too short to see on digital meter and yet the processor would be reset.

C


 

Offline kscarbery

  • Newbie
  • Posts: 3
  • Country: us
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #28 on: December 18, 2015, 08:21:18 pm »
Well, connecting my 5v micro directly to mains (ok, 1meg resistor) feels sort of weird...hm

It should feel more than weird. There are many things, not only voltage ratings of components, creepages and clearances, single-fault conditions, et cetera that should be observed. AC mains needs to be treated with great care on the bench and even more so in products that will make it into unsuspecting customer's hands. Safety standards like UL/IEC 60950-1 encourage us to design safe products and these standards should be well understood if you're going to be messing with mains.
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16647
  • Country: 00
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #29 on: December 18, 2015, 08:55:16 pm »
I just love those PowerBricks from Diligent. Don't get me wrong, the video was great but that thing caught my eye!

I can use one of each, even the 5V ones, too bad they are pricey at $17 + Shipping.  Also, no 1.8V?  :-//

Any quality cheap alternatives out there? (not to build but to purchase)

http://www.ebay.com/sch/i.html?_nkw=breadboard+power+supply

Those things supply two separate voltages to top/bottom rails of a breadboard. Voltages are selectable with jumpers. They have a switch and take either USB or barrel jack power.

The voltages are set by linear regulators on the PCB. Easy to change if you want other values.
 

Offline dcac

  • Frequent Contributor
  • **
  • Posts: 339
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #30 on: December 18, 2015, 09:11:32 pm »
Intentionally using the protection diodes as limiting clamps can be problematic for chips with ADC inputs.  Charge injection can foul up the ADC input multiplexer leading to errors on other channels.

Yeah I had that problem when I redesigned a circuit that used a bunch of cmos 4000 ICs to use a single pic16f882 instead. Even though the combined clamping current was less than 0.5mA and even though none of the analogue features of the MCU was used, I got ghost signals appearing on some input pins even on other ports.

Adding external schottky diodes to all pins that needed clamping fixed the problem, it took some time to figure out the underlying cause though. Possibly are MSU:s that doesn't have any analogue features at all more tolerant with clamping current through the input diodes as I used the old pic16c84 in similar designs without any noticeable problems.

Microchip note:
Quote
Passing current through the ESD protection
diodes of the device is outside of the
operating conditions of the device causing
potentially shortened device life span and
incorrect functionality

http://ww1.microchip.com/downloads/en/AppNotes/93009A.pdf

 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #31 on: December 18, 2015, 09:25:30 pm »
Instead, as one doesn't actually need a power pin, why not put a MCU into a SOD-723 package and take on Microchip's PIC10F range head to head in the ultra-miniaturized minimum pin count market?

The worrying thing is: such a device might actually be a good thing for musical greeting cards!  :scared:
There are some 1-wire chips, like the DS18B20, which work with 2 pins, only (in parasitic power mode). It comes in a TO-92 package, but I guess could be built in a SOD-723 package, too.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline dentaku

  • Frequent Contributor
  • **
  • Posts: 881
  • Country: ca
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #32 on: December 18, 2015, 09:45:36 pm »
I've had this happen to me with old CMOS counter chips before.
It's great to learn how this works.

In fact, I have a 74HC393D Dual 4-bit binary ripple counter on my desk right now that works without the power connected. It's running (the LEDs connected to the output are very dim tough) just from the 3.3V going into the clock input coming from my little DDS function generator.
I just checked the datasheet and it says "Inputs include clamp diodes. This enables the use of current limiting resistors to interface inputs to voltages in excess of VCC."
 

Offline PinheadBE

  • Regular Contributor
  • *
  • Posts: 176
  • Country: be
  • Pinball Freak
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #33 on: December 18, 2015, 11:08:33 pm »
 :wtf: Dave!
Your breadboard is full of .... DDDD ....   DU .......   DUST !!!!!
  :palm:
« Last Edit: December 18, 2015, 11:26:23 pm by PinheadBE »
Please keep our planet clean
 

Offline jnissen

  • Regular Contributor
  • *
  • Posts: 63
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #34 on: December 18, 2015, 11:49:44 pm »
Often the data sheets do not show the ESD clamping diodes since the designer may be counting on the parasitic bipolar device in the CMOS output stage. If a standard push-pull CMOS output stage is used their is a parasitic bipolar produced that runs from the output pin up to the VCC rail or down to GND as indicated. I know if I didn't explicitly draw a diode in my schematics for the guys writing up the documentation they wouldn't mention it in the data sheets!  If I had a design that explicitly added diodes then it typically wasn't an issue. Sometimes we had custom drive impedance requests (very low drive current) and the output stage parasitic diode was so small that I'd have to add a well diode to the I/O pin so that an ESD zap would not blow the smaller parasitic device.

Anyone who has ever designed CMOS I/O cells is well aware of these pitfalls. The bigger problem was when newbies would design an I/O and not understand the fundamentals of why the diodes were required in the first place. Poor ESD design has taken down more designs than I care to recall. What is sad is the ESD testing is often done toward the end of a product test cycle. Finding a fundamental flaw late in a design flow is not fun and can be a major PIA to spin new silicon. Anyone who's been round the block a time or two understands this and inspects and evaluates every single pin for robust ESD protection prior to taping out and then schedules the ESD tests early!  :-DD
 

Offline jnissen

  • Regular Contributor
  • *
  • Posts: 63
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #35 on: December 19, 2015, 12:11:40 am »
I'm not sure why the microcontroller stops working at 15:07 in the video. The 10 meg input resistor of the multimeter is in parallel to the LED and resistor, so more current should flow and the microcontroller should work better.

I tried the same with a PIC and it is interesting that it works with no ground connection, but connecting the ground to any INPUT pin of the PIC. So my guess would be that the current flows like this: Vcc -> CPU core -> internal chip ground -> body diode of the output FET -> input pin -> ground. Same would be true for Dave's setup. And then when the multimeter load is added, the body diode of the FET has a higher voltage drop and this is the reason for the CPU to stop working.

Ok, after answering my own question, another one: Why does the CPU stop working in Dave's setup when one of the LEDs is disconnected? The body diode of both FETs for the pins are still there. And am I right that the low side output FET don't conduct in reverse direction when it is turned on, so not Vcc -> CPU core -> internal chip ground -> FET drain/source -> output pin -> resistor -> LED -> ground?

Sorry for my noob questions, I'm mainly a programmer :)

Yes the ground pin can be removed and you will pull the return current through a VSS clamp diode structure instead.

 I fully expected him to show how to measure the internal voltage rail. He could have measured the high drive out on the I/O pin. The high level is equivalent to the actual micro internal VCC rail. It would have shown the 3.3V minus the 0.7V for the ESD clamp diode or about ~2.6V on the actual I/O pin relative to ground.
« Last Edit: December 19, 2015, 12:14:43 am by jnissen »
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16281
  • Country: za
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #36 on: December 19, 2015, 03:36:53 am »
Big worry with powering through the input protection diodes is that if you exceed a certain current, determined by the process and not something tested for in manufacture, of around 30-50mA you will turn on the parasitic SCR in the device. That then will short out the power and ground pins along with inputs and outputs, possibly randomly. Then the chip will either latch up as a short, and if the current source on the power supply or the pin has enough current source ability, you will blow up the chip. thus the requirement to connect the unused pins to a supply rail through a resistor, so that if the supply disappears and the chip runs off the input diodes it will not latch up destructively as the current is below the trigger current of the SCR.

http://ww1.microchip.com/downloads/en/AppNotes/00763b.pdf

www.microsemi.com/document-portal/doc_download/126494-msan107-appnote

 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9013
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #37 on: December 19, 2015, 04:33:26 am »
I once modified a Pogoplug to add a second network interface by soldering in a PCIe Gigabit card. I had a bad solder joint on the power supply connection, but there was enough current through the I/O pins to light up the LEDs on the card. Took me a while to figure out why the card wasn't being seen by the kernel.
Intentionally using the protection diodes as limiting clamps can be problematic for chips with ADC inputs.  Charge injection can foul up the ADC input multiplexer leading to errors on other channels.
Actually had that happen in my senior design project. The power measurement board had an Arduino handling the network connection and a dsPIC doing the actual measurement. I used resistors to interface the two and was puzzled why there was an offset in the ADC measurements that seemed to vary depending on the USB voltage even through the dsPIC was running from a regulated 3.3V supply. Once I figured it out, I added additional resistors to make voltage dividers and no more problem.
Even knowing about protection diodes does not always avoid falling into the traps. I once had a design using a HDMI receiver. Under some conditions the HMDI lines were supplying enough voltage to keep some parts of the circuit running. After power was reapplied the circuit did not work, because the microcontroller did not reset and therefore did not initialize the other ics.
I simply didn't expect that. The solution was to add a load to the 3.3V to pull down the voltage below the microcontroller's brown out threshold. Then the microcontroller shuts down, disabling the HMDI receiver and then also the HDMI transmitter stops, removing the signals on the HDMI lines. Now everything is ready to start up correctly.
Not an ESD diode related fault but in an HD audio DAC my best friend and I worked on, we ran into a problem where the unit sometimes fails to initialize properly when power is first connected, but work fine if the power was then cycled right afterwards. Turns out the big "audiophile's favorite" capacitors were slowing the ramp up of the supply voltage and the MSP430 would start up before the DAC and interface chip got enough voltage to work properly. (Imagine scoping the I2C bus to debug the problem, find some missing acks, and then trying to figure out what's wrong by back tracking through the transitions all while explaining the process to your best friend with little experience in hardware!) Ended up fixing it with an external UVLO.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37734
  • Country: au
    • EEVblog
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #38 on: December 19, 2015, 09:25:54 am »
I fully expected him to show how to measure the internal voltage rail. He could have measured the high drive out on the I/O pin. The high level is equivalent to the actual micro internal VCC rail. It would have shown the 3.3V minus the 0.7V for the ESD clamp diode or about ~2.6V on the actual I/O pin relative to ground.

I did measure the internal rail relative to ground. You simply measure the floating Vcc pin, no need to measure an IO pin.
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37734
  • Country: au
    • EEVblog
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #39 on: December 19, 2015, 09:27:01 am »
:wtf: Dave!
Your breadboard is full of .... DDDD ....   DU .......   DUST !!!!!
  :palm:

The whole lab is fully of dust. Anything not kept under a shelf cops it.
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #40 on: December 19, 2015, 10:04:50 am »
Yes the ground pin can be removed and you will pull the return current through a VSS clamp diode structure instead.
Ok, but why does it stop when one of the blinking LED connection is removed?

I did some experiments in LTspice to learn more about the details. This is the normal behaviour of a digital output pin, e.g. for one of the LED blinking outputs:



It push/pulls the output pin very nicely to Vcc and ground.

The output MOSFETs have internal body diodes, or manufacturers put in extra diodes for ESD protection. The IRF MOSFETs in this example have internal diodes. You can see the effect when the outputs are turned off, then the diodes provide some kind of ESD protection:



Finally this is the setup when the ground connection is removed:



R2 is a placeholder for the CPU core. The internal ground in the chip is gnd2. When the LED is turned on (V(gate)=low), M1 conducts and the output is connected to Vcc. This means no current can flow in the path Vcc->CPU core R2->body diode of M2->output, because output is (nearly) at the same voltage level as gnd2 (because of the low impedance connection of M1, compared to the LED and R1 connection). But when the LED is turned off (V(gate)=high), M2 conducts and M1 not. This means current can flow in the path Vcc->CPU core R2->gnd2->body diode of M2->output->R1->LED D1->gnd. So if you have two output pins and they are alternating high and low, gnd2 is always at about 0.5V. But as soon as you remove one LED, gnd2 goes up to Vcc and the CPU core stops working. Note that you can connect any input pin to ground and it will still work if one LED is disconnected, because as we've seen before, when both output FETs are disabled for an input pin, current can flow through the body diode of M2 of this pin.

PS: Regarding my last question: You can tell that it is the body diode of the n-channel MOSFET M2 that is conducting and not the source-drain connection, because if you change R2 to 1k, gnd2 increases to 1.9V (because of the higher voltage drop of the diode at higher currents), but output is only at 1.3V, so there is the diode. If voltage is flowing from drain to source, there is only the usual very low voltage drop because of the Rdson resistor.

PPS: you can power the microcontroller with no connection to Vcc or ground at all: Just connect one input pin to Vcc and one input pin to ground :) (Vcc has to be sufficient high for the voltage drop of the two ESD protection diodes)

Sorry for the long-winded explanation, this is very basic stuff, but I didn't know it.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline bitwelder

  • Frequent Contributor
  • **
  • Posts: 967
  • Country: fi
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #41 on: December 20, 2015, 11:02:51 pm »
If in the circuit instead of having two LEDs in alternate blinking pattern they would have been configured e.g. as counter 00-01-10-11, I guess we could have seen the magic smoke escape at the 11 phase (both LEDs on) due to too much current on the clamping diode?
 

Offline kedwards22

  • Newbie
  • Posts: 8
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #42 on: December 21, 2015, 07:29:10 am »
I run into this problem many years ago while designing an LDO regulator for an automotive anti-lock braking system (ABS). One test is to turn the ignition off and back on while driving at 70mph. The system would not power back up. The problem was the wheel speed sensors. They are variable reluctance transducers that produce a sine wave of 10's of volts when the wheels are turning at higher speeds. When the ignition was turned off so power to the system was removed, the input ESD devices of the wheel signal processing chip sourced the negative transducer current partially from the Vcc, the output of my LDO. This pulled the Vcc below ground turning on my LDO output ESD protection. When these ESD devices turn on they typically form multiple parasitic devices around the chip. When the ignition was turned back on, these parasitic devices stopped my LDO from powering up. A new mask set later and all was well.
 

Online ntfreak

  • Contributor
  • Posts: 12
  • Country: gb
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #43 on: December 21, 2015, 10:51:05 pm »
ST call IO's without the protection diodes true open drain. These were generally used for I2C peripherals.

Spen

Sent from my XT1562 using Tapatalk

 

Offline mrpackethead

  • Super Contributor
  • ***
  • Posts: 2845
  • Country: nz
  • D Size Cell
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #44 on: December 22, 2015, 05:28:11 am »
Dave,

What prompted you to run this tutorial.  What happened?
On a quest to find increasingly complicated ways to blink things
 

Offline chris_leyson

  • Super Contributor
  • ***
  • Posts: 1541
  • Country: wales
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #45 on: December 25, 2015, 01:34:32 pm »
First time I saw this phenomenon I had a board populated with 4000 series CMOS sitting on the bench running all by itself, no power supply connected only a scope. How strange, the "power supply" turned out to be a Marconi S300 radar and every time the radar swept around the decoupling capacitors got charged up and kept the board running until the next sweep.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #46 on: December 30, 2015, 02:24:41 am »
Quote
I fell in the same trap before when I try use a MOSFET to turn on/off a micro.
Are there any widely accepted techniques for "powering down" a microcontroller even though it might still have voltage on IO pins?

And I feel like I've seen conflicting advice on connecting micros to external signal sources.  conventional wisdom says "don't change connections with the micro powered on."   But that seems very much in conflict with the possibility of "protection diode phantom power" if you were to connect active signals when the micro ISN'T powered on...
 

Offline photon

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #47 on: December 30, 2015, 02:36:25 am »

Are there any widely accepted techniques for "powering down" a microcontroller even though it might still have voltage on IO pins?

What I do is make sure the external IO drivers of the micro share the same supply with the micro. This way the diodes are never on except possibly during power on or off transients
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7374
  • Country: nl
  • Current job: ATEX product design
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #48 on: December 30, 2015, 01:46:56 pm »
Quote
I fell in the same trap before when I try use a MOSFET to turn on/off a micro.
Are there any widely accepted techniques for "powering down" a microcontroller even though it might still have voltage on IO pins?

And I feel like I've seen conflicting advice on connecting micros to external signal sources.  conventional wisdom says "don't change connections with the micro powered on."   But that seems very much in conflict with the possibility of "protection diode phantom power" if you were to connect active signals when the micro ISN'T powered on...
It is really not an issue, if firmware programmers finally start using that damn brownout detection.
Seriously, once we ended up hardware patching boards, because the brownout wasnt turned on, and the screwed up decision making process.
 

Offline stryker

  • Regular Contributor
  • *
  • Posts: 99
  • Country: au
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #49 on: February 02, 2016, 08:04:31 am »
Thanks Dave

Despite seeing this video I still managed to reproduce this for myself in a ATtiny85-based design I put together last weekend.  My plan was to control the power using a switch or MOSFET (in parallel on the GND pin) and the darned thing won't turn off.   |O  Everything else worked as advertised so I struggled through the weekend trying to make it turn off too, then in a reflective moment remembered and re-watched your vid.

After reading this thread I think I'll delve into the deep sleep with a pin change interrupt to bring it back awake. Shame I didn't remember this video before I uploaded the gerbers, but it appears I learn through headaches.

My genuine thanks though...you've set me on a path to get this sorted.  Or my next headache.
Geoff
 

Offline Zeph

  • Newbie
  • Posts: 5
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #50 on: March 06, 2016, 02:03:05 am »
One of my first Arduino tests was connecting two Uno's via serial & ground, each powered by a different laptop via USB.  The first Uno sent simple commands to the second, which then turned the onboard LED on or off accordingly.  All worked as expected.

But when I happened to unplug the receiver first, I was rather surprised to see the LED continue responding to Serial commands, absent power.  That's when I learned about parasitic power.

In this case, the power was coming from one ATmega328's TX output, to the other ATMega328's RX input.  Serial commands very briefly interrupted the parasitic power (not long, a couple of 38400 chars every second), but apparently the bypass caps on the second Uno kept it running.  Not just the uC, but the D13 controlled LED, and even the "power" LED on the receiving Uno.  That uC can supply up to 40 mA on an output pin, and the uC can run on very little current and much less than the 5V normal supply, so it's not very hard for one uC to power another via connected I/O lines.

Voila - one pin power + signal, using standard Uno's and two jumper cables!

After learning why this worked, I've been surprised people don't run into this all the time, when connecting two uC's via I/O pins, and then removing power from one of them.
 

Offline apis

  • Super Contributor
  • ***
  • Posts: 1667
  • Country: se
  • Hobbyist
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #51 on: March 06, 2016, 11:06:29 pm »
I just love those PowerBricks from Diligent. Don't get me wrong, the video was great but that thing caught my eye!

I can use one of each, even the 5V ones, too bad they are pricey at $17 + Shipping.  Also, no 1.8V?  :-//

Any quality cheap alternatives out there? (not to build but to purchase)

http://www.ebay.com/sch/i.html?_nkw=breadboard+power+supply

Those things supply two separate voltages to top/bottom rails of a breadboard. Voltages are selectable with jumpers. They have a switch and take either USB or barrel jack power.

The voltages are set by linear regulators on the PCB. Easy to change if you want other values.
They have no protection built in though. If you short one out for a second they are gone, not ideal for experimenting. If they were made properly they might have been useful.
 

Offline fubar.gr

  • Supporter
  • ****
  • Posts: 366
  • Country: gr
    • Fubar.gr
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #52 on: March 06, 2016, 11:54:04 pm »
Most linear regs have built in short circuit protection

Offline apis

  • Super Contributor
  • ***
  • Posts: 1667
  • Country: se
  • Hobbyist
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #53 on: March 07, 2016, 01:23:33 am »
I had one and managed to kill one of the regulators when probing it by accidentally shorting out two of the jumper pins, maybe I was just unlucky but mine was very fragile.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #54 on: March 09, 2016, 12:20:03 am »
Quote
Most linear regs have built in short circuit protection
I don't know if they're counterfeit chips, or just especially cheap and inferior regulator design, but there have been a "significant" number of reports recently where the regulators on Arduinos and derivatives have failed in ways that I thought that the common 3-terminal regulators were just not supposed to.   "I had by Nano connected to a 12v wall wart (~16V, perhaps) drawing 100mA (1.1W dissipation in the poorly-heatsinked SO223 package, not really within spec) and it failed permanently."  or "It let Vin onto Vout and fried everything."
(other possibilities: substituting a regulator that has a different pinout without changing the PCB, or using one with different electrical requirements for the "tab".)
(The Arduino derivatives are so frequently operated via USB power that a vendor could ship a version with totally defective regulation for a long time, without anyone noticing.  Sigh.)
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16647
  • Country: 00
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #55 on: March 09, 2016, 09:18:28 am »
Quote
Most linear regs have built in short circuit protection
I don't know if they're counterfeit chips, or just especially cheap and inferior regulator design

Is that even possible? There's no reason even the cheapest of clones of a voltage regulator can't use a proper design.

The "genuine" regulators haven't changed since the 1970s.

Well... I guess they could use really low-grade silicon or something.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #56 on: March 09, 2016, 07:44:49 pm »
There are a few nasty situations that can kill a linear reg that the cheap clone board designers don't bother protecting against.  e.g. if there is significant output capacitance, or an alternative source of power to the output, a reverse current protection diode is recommended, from Vout to Vin to shunt the reverse current round the regulator.  Otherwise if the input is shorted to ground the charge in the output cap can blow the pass transistor.   A series diode in the input may be needed as well (or may be sufficient on its own) if a very large output capacitor is used or an alternative supply can feed the output.

The LM317 is one of the few regulators that has an internal shunt reverse current protection diode. Ignoring this for regulators that don't have such protection is probably the commonest way in a bench environment of blowing a regulator so its shorts in to out.

Other ways for a regulator to let through excessive voltage is if its common pin goes O/C either due to external causes or just due to it being cooked to death with excessive dissipation and insufficient heatsinking.   

My experience is that persistently overheated 78xx series regulators normally fail with the pass transistor O/C, or high resistance. I haven't seen enough of any other individual type on my repair bench to notice their commonest failure mode.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16281
  • Country: za
Re: EEVblog #831 - Power A Micro With No Power Pin!
« Reply #57 on: March 09, 2016, 07:54:09 pm »
I have had a number fail with them oscillating slowly going into and out of thermal overload, probably from the die separating from the internal heat spreader. Some do it cleanly, others are very noisy in going into and out of thermal shutdown. Others just become very noisy on the output, not oscillating, but just a lot of noise, as even new capacitors does not fix it, but a new regulator does.

Fake ST parts with the thick tab, while the genuine part has the skinny copper saving tab. Even seen a few with tinned steel as the tab and leads.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf