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

0 Members and 1 Guest are viewing this topic.

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.
 

Online 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: 9015
  • 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: 37738
  • 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: 37738
  • 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.
 

Offline 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
 

Online 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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf