Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Voltage applied to unpowered PIC pin

Status
Not open for further replies.

Iomega

New Member
I'm attempting to use an output pin of the PIC to activate the Enable pin of the power regulator IC that feeds the PIC. I also want a manual push-button to be able to temporarily Enable the power regulator IC until the PIC is powered up and can resume this function. Please see the attached schematic.

My question is whether the manually applied voltage will damage the PIC, since it will be applying a voltage greater than Vdd (since it will take some time before the PIC actually gets powered up).

I know the datasheet specifies maximum of Vdd+0.3V on any pin. But scenarios such as having a capacitor on an output pin would break this rule since they'd effectively be applying a voltage on the PIC after power-down.

Additional info: Using a PIC16F1783 (contrary to what schematic shows). PIC will be powered by 3.3V output of MCP1640 IC, which in turn will be powered by 1.5V on its Vin pin. The Enable pin requires minimum 90% of Vin to activate.
 
The easy answer to be safe, add a Shotkey diode in series with the PIC pin so it won't see V+ supplied by the push button.
 
Thank you for the quick responses!

I've been reading up on Schottky diodes lately and it seems that they would work. But before going down that path, I wanted to see if there would be a simpler option--such as the one proposed above. Another option I had come across (in an attempt to keep it simple), was the RC circuit shown below. The intent was to delay any significant voltage to the PIC, until it was powered up. But this presents a similar problem to the original option: Once the PIC is powered off, the capacitor will be holding a voltage against the PIC.

With such common scenarios, including any filtering capacitors on the analog ADC pins, it makes me think that the PIC may be expected to withstand such voltages--contrary to the spec sheet.

Would like to receive feedback from those more experienced than myself.
View attachment 68455

Or a resistor.
I'm trying to better understand this. Do you mean in series with the PIC? If I add a resistor in series with the PIC pin, wouldn't the PIC still receive the applied voltage? And once the PIC is powered up and outputting on that pin, wouldn't a voltage divider effect reduce the voltage on the Enable pin?

Obviously, I'm still learning the basics. Thank you in advance for the explanations!
 
The circuit you posted last would work the resistor would keep the pic from seeing any over voltage and would bleed the cap off I would use a lower value resistor 1Kohm would work fine.

But this would work better A 1k would limit the the pin to 3.3 mA at shutoff and 1.5 mA at startup I would place the cap on the MCP1640 EN pin to Grd for a soft shutoff.
 
Last edited:
Thanks for the follow-up responses. I understand the resistor limiting the current entering/exiting the PIC during regular powered-on operation. But the thing that I'm trying to understand is how the resistor would prevent over-voltage being applied to the PIC while the PIC is off.

What I'm picturing (please correct me if I'm wrong) is a large internal resistor on each of the PIC's pins. Thus with a smaller (1Kohm) resistor in series with it, there won't be much of a voltage division. And if there is no large internal resistor, then full (1.5V) voltage is on both sides of the resistor. It's only the external capacitor that would slow-down the voltage build-up on a pin, until the PIC is powered up.

I would appreciate if someone could explain the mechanics if the above is not correct. Thanks.
 
There are protection diodes on the pic pins that will prevent the pin going more than 0.7V above Vdd. The resistor will limit the current through this diode. I don't see the purpose of the capacitor and I would omit it.

Mike.
 
Thanks. For me to better understand: if there are protection diodes on the PIC pins, then why would the specifications indicate that damage will result if more than Vdd+0.7V is applied to a pin? The diodes should be able to withstand several volts of reverse bias, no?

Also, how does having the resistor (versus not having a resistor at all) reduce the VOLTAGE being placed on the PIC pin? The protection diode should prevent any current from going through the resistor, and no voltage drop should occur. Am I misunderstanding something?
 
Sure it can if you limit it to less then 20mA it can handle higher voltage to a limit but you'll blow them with to much current and yes current flows threw them But 1.5 volts is not going to keep the chip running but you need to limit current to a safe level.

View attachment 68458
 
Last edited:
Burt, the current flows through the top diode to Vdd.

Applying more than Vdd+0.7V will damage the protection diodes which is why you need a series resistor to limit the current and drop some voltage.

Mike.
 
I no but there is no flow at start as long as he uses a current limit resistor and at stop it brings EN to ground i just realized i drawled that wrong going to change it now

The En pin has no power coming from it it's pull high to start the chip oscillator running then would be pulled low to shut the chip down as I show it in the updated drawing.
 
Last edited:
All,

Thank you for the explanations! I think I've put the pieces together (for my understanding), and can summarize it as follows:

The potential at the pin is not so much dependent on the external circuitry, but rather is dependent on the voltage drop across the protection diode to Vdd (which is ~zero when powered-down). And THAT voltage drop is dependent on the current going through the diode--which in turn IS controlled through the external circuitry.

In calculating the current from the external circuitry, there is negligible resistance from the diode (ideally), so the only limiting of the current comes from the external resistor. Thus I = V/R.

And the reason that 0.7V above Vdd is bad, is because once the voltage drop across the diode starts going beyond ~0.7V (or 0.3V in case of the PIC16F1783), the current can quickly exceed the diode's limitations and the diode fails.

If I've misstated something, please correct me. Otherwise, thank you for the explanations.
 
You have another important issue. If the current through the diode into the pin is greater than the current consumed on Vdd then the Vdd cap will charge and Vdd will rise, and the PIC will run.

The safe way to do this is use an ACTIVE LOW signal from the external input through a diode so there can be no + voltage applied to the PIC input pin. The external wire can then only GROUND the PIC input.

JonSea already said this in post # 2.
 
If you look at the Appnote's for the MCP1640 What your trying to do is totally wrong. You supply the MCP1640 with power and use the Microcontoller to put it to sleep which draws less then 1uA

If you place a diode you can't put the MCP1640 in low power mode once the EN pin is high it will stay that way and the diode will keep you from pulling it low.

I would read this https://www.electro-tech-online.com/custompdfs/2012/11/01337A-1.pdf

There using a MOSFET N Chanel and a 1Mohm to feed the EN pin from the 1.5 volt supply then Fet let's you switch to power saving mode and you place the pic in sleep waking it up at set time to make sure you keeping the output high enough to keep the pic running which lets you keep the power use to like 10uA till you turn power on full time.
 
Last edited:
I have to admit my answer is based on the schematic in the question and not on the larger question of how to use the chip.

The diode idea may still work if a pull down resistor is connected be EN and ground. The push button starts the show and the micro asserts the port pin as soon as the code is running. When shutdown is desired, the micro releases the port pin, and EN is pulled low, shutting off the power.

This may or may not be easier than what's shown in the app note Burt linked.
 
Deleted, same answer as be80
 
Last edited:
Howdy, Schottky diodes provide a "wired OR", without any guessing about damage or probabilistic behavior (a self-latching circuit, also available in relay version). G.H. <<<)))
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top