View previous topic :: View next topic |
Author |
Message |
championx
Joined: 28 Feb 2006 Posts: 151
|
short circuit on pic! |
Posted: Tue Mar 06, 2018 6:11 pm |
|
|
Hi all! I'm having a problem with a design, the thing is that the circuit works perfect, but sometimes (3 in 900 so far) the microcontroller's VDD and GND (16F1849) get short circuited when switching or connecting the power.
Is it a transient problem? The design is pretty simple, just a linear 5volt regulator with the datasheet recommended caps.
thanks. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Mar 06, 2018 7:16 pm |
|
|
It could be latch-up. Post your:
1. MCLR circuit.
2. List of connections to the i/o pins.
Also, do you initially, at the start of main(), set all unused i/o pins to low
level outputs ? Or do you leave them floating ? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9226 Location: Greensville,Ontario
|
|
Posted: Tue Mar 06, 2018 8:27 pm |
|
|
hmm.....
just a linear 5volt regulator
... do you have a reverse protection diode across the 5 volt regulator ? What values are the capacitors ? Have you an LED+resistor on the 5 volts supply(power on LED ?) Any high current devices like relays, GPS modules,PWM H-bridges and motors? If PCB, what are the trace widths for VDD and GND?
a link to your schematic may help us..
have you got POR enabled? any code that demands a lot of power(like turning on relays or GPS..)?
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Wed Mar 07, 2018 3:37 am |
|
|
Any external circuits that could be powered up before the PIC?.
Though the PIC itself is remarkably rugged, if it is driving something drawing reasonable power, and something attached to another I/O pin that is capable of delivering some power, comes on first, this can deliver more than the protection diodes can handle and latch the output driver. This is what PCM_programmer is talking about with 'latch-up'. |
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Wed Mar 07, 2018 12:57 pm |
|
|
Thanks for your help, the circuit is really simple, it doesn't control any high power device or anything like that.
1) MCLR: the pin is configured as IO (i don't use it), it is connected only to a ICSP connector, no resistor, no cap or diode. This is used only during first program.
2)IO pins: analog input for temperature reading (LM35), TTL level communication to an external device, the other pins are for other sensors, none of them use more than 10mA.
3) The voltage input has a 1N4148 diode in series connected to the regulator input pin to prevent reverse voltage, then a 22uF 35v cap, then a 100nF cap. On the output, 22uF 6.3v cap, then a 100nF cap.
4)when the circuit is connected, the only pins going "outside" are TX, RX, GND and the input voltage. Those four pins get connected "at the same time" through a superseal connector.
The device uses very little power, just 20 to 30 mA.
Trace width: 0.254 |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Wed Mar 07, 2018 3:16 pm |
|
|
PCM programmer wrote: | It could be latch-up. Post your:
1. MCLR circuit.
2. List of connections to the i/o pins.
Also, do you initially, at the start of main(), set all unused i/o pins to low
level outputs ? Or do you leave them floating ? |
Latch up usually latches up an input. I have never seen a latch up short VDD to VSS. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Thu Mar 08, 2018 2:11 am |
|
|
I must admit I don't like leaving MCLR completely floating. Put a 22KR resistor between this and the 5v rail.
Problem is that though you don't use MCLR, it is still the programming pin. It is pretty unique on the PIC, in having no protection circuit to prevent it going above the supply rail. If this is floating, and happens to be sitting with a tiny voltage on it above the 0v, when you raise the supply this could be trying to turn on the internal Vpp inverter.
Also set all the pins that are not used as outputs. Never leave a pin unconnected and floating. |
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Thu Mar 08, 2018 8:24 am |
|
|
Thanks for your answer, I'll keep that in mind. Also, all the non used pins are configured as outputs.
But, i cant understand why the pic has a short circuit on the power pins... how could that happened... even if the mclr pin get activated... this doesn't burn the pic out...
Could be because a connection surge? This problem has only occurred when we connect the device... Should i add a MOV between the main voltage and gnd?
(sorry for my english) |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Thu Mar 08, 2018 8:28 am |
|
|
All sorts of odd things can happen if bits of circuit come 'on' with the wrong voltage present. Imagine what happens if this power inverter circuit tries to start when there is no actual supply to run it present... Quite easily draw much more current than it is meant to. |
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Thu Mar 08, 2018 9:44 am |
|
|
Well... Good point. I'll put a resistor there. Any other idea? It's really hard to reproduce |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1908
|
|
Posted: Thu Mar 08, 2018 11:12 am |
|
|
How do you know it's the PIC? Does it (and just it) get hot? Could be a faulty (borderline) lot. |
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Thu Mar 08, 2018 11:45 am |
|
|
I know it's the pic because i take it out of the board, check continuity between vss and vdd and i get a short. |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1908
|
|
Posted: Thu Mar 08, 2018 12:06 pm |
|
|
I had a problem with a bad batch of a different PIC last summer that exhibited a really weird "creeping short" condition between adjacent pins, but only if the programmer was attached (to completely different pins). I bought some new stock and the problem went away.
In any case, it's not a software problem. Contact Microchip and explain the issue. They'll probably ask that you ship them the PICs that are now internally shorting Vdd to Vss. |
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Thu Mar 08, 2018 12:39 pm |
|
|
thanks! i will do that! |
|
|
|