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

0 Members and 1 Guest are viewing this topic.

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37730
  • 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: 12852
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: 8264
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: 37730
  • 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: 3752
  • 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: 312
  • 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: 12852
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).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf