Maker Pro
Maker Pro

Burning PIC16F84A

  • Thread starter Nicolae Fieraru
  • Start date
N

Nicolae Fieraru

Jan 1, 1970
0
Hi All,

I am very frustrated with the PIC16F84A and I don't understand what is going
on. I am trying to control a stepper motor with this chip (it is a circuit
from a book, using Darlington transistors and a hex buffer 4050). I managed
to program the chip fine, I measured the output of the ic. But when I
install it in the circuit, it blows the chip in a matter of seconds or
minutes while I fittle with the circuit and measure some signals. So far I
burned four of them, and they don't come too cheap. I initially presumed
that the stepper motor generates voltage spikes despite the protection
diodes placed on the transistors, but the last chip blew when I was driving
leds instead of the motor coils. When they blow, the oscillator doesn't work
anymore (I am using quartz crystals) and all the ouputs appear to the
programmer as the chip is erased.
Are these chips ultra-ultra-ultrasensitive to electrostatic electricity, to
overloading the outputs, to accidental shortcircuits or what is going on? I
worked for years with TTL and CMOS and analog IC's and I've never blown ic's
in such an easy way.
What are your comments about this matter? Have others experienced the
failure of these chips?

Regards,
Nicolae
 
M

Michael Lange

Jan 1, 1970
0
Nicolae said:
Hi All,

I am very frustrated with the PIC16F84A and I don't understand what is going
on. I am trying to control a stepper motor with this chip (it is a circuit
from a book, using Darlington transistors and a hex buffer 4050). I managed
to program the chip fine, I measured the output of the ic. But when I
install it in the circuit, it blows the chip in a matter of seconds or
minutes while I fittle with the circuit and measure some signals. So far I
burned four of them, and they don't come too cheap. I initially presumed
that the stepper motor generates voltage spikes despite the protection
diodes placed on the transistors, but the last chip blew when I was driving
leds instead of the motor coils. When they blow, the oscillator doesn't work
anymore (I am using quartz crystals) and all the ouputs appear to the
programmer as the chip is erased.

That sounds interesting. But sorry, that I can't scry, my crystal sphere
will be serviced this time. ;-) So please tell us more about the
circuit; AACircuit is very helpful (look at www.tech-chat.de).
Are these chips ultra-ultra-ultrasensitive to electrostatic electricity, to
overloading the outputs, to accidental shortcircuits or what is going on? I
worked for years with TTL and CMOS and analog IC's and I've never blown ic's
in such an easy way.

I think, PICs are very robust chips. I maltreated them many times,
placed them 180 degres distorted in the sockets, connected low outputs
to Vdd and so one, without any loss.
What are your comments about this matter? Have others experienced the
failure of these chips?

AFAIK there are no common "the failure" of these chips. Mostly, the
problem is between monitor and keyboard, you know!?


Sory about my jokes :) Feel free to ask me more concrete.
Michael
 
S

Spehro Pefhany

Jan 1, 1970
0
Hi All,

I am very frustrated with the PIC16F84A and I don't understand what is going
on. I am trying to control a stepper motor with this chip (it is a circuit
from a book, using Darlington transistors and a hex buffer 4050). I managed
to program the chip fine, I measured the output of the ic. But when I
install it in the circuit, it blows the chip in a matter of seconds or
minutes while I fittle with the circuit and measure some signals. So far I
burned four of them, and they don't come too cheap. I initially presumed
that the stepper motor generates voltage spikes despite the protection
diodes placed on the transistors, but the last chip blew when I was driving
leds instead of the motor coils. When they blow, the oscillator doesn't work
anymore (I am using quartz crystals) and all the ouputs appear to the
programmer as the chip is erased.
Are these chips ultra-ultra-ultrasensitive to electrostatic electricity, to
overloading the outputs, to accidental shortcircuits or what is going on? I
worked for years with TTL and CMOS and analog IC's and I've never blown ic's
in such an easy way.
What are your comments about this matter? Have others experienced the
failure of these chips?

Regards,
Nicolae

Suggest you post a link to a schematic (or post the schematic in gif
or pdf format in the newsgroup alt.binaries.schematics.electronic).

PICs are not particularly sensitive to ESD or other mild abuse.

Just one suggestion comes to mind- what is your exact power supply
voltage? I hope you are not using an unregulated linear "wall-wart"
type of power supply, because they often have significantly higher
than rated voltage when not loaded down to capacity. Exceeding the
maximum Vdd voltage will most certainly kill them dead.


Best regards,
Spehro Pefhany
 
A

Alexander

Jan 1, 1970
0
Nicolae Fieraru said:
Hi All,

I am very frustrated with the PIC16F84A and I don't understand what is
going on. I am trying to control a stepper motor with this chip (it is a
circuit from a book, using Darlington transistors and a hex buffer 4050).
I managed to program the chip fine, I measured the output of the ic. But
when I install it in the circuit, it blows the chip in a matter of seconds
or minutes while I fittle with the circuit and measure some signals. So
far I burned four of them, and they don't come too cheap. I initially
presumed that the stepper motor generates voltage spikes despite the
protection diodes placed on the transistors, but the last chip blew when I
was driving leds instead of the motor coils. When they blow, the
oscillator doesn't work anymore (I am using quartz crystals) and all the
ouputs appear to the programmer as the chip is erased.
Are these chips ultra-ultra-ultrasensitive to electrostatic electricity,
to overloading the outputs, to accidental shortcircuits or what is going
on? I worked for years with TTL and CMOS and analog IC's and I've never
blown ic's in such an easy way.
What are your comments about this matter? Have others experienced the
failure of these chips?

Regards,
Nicolae

Without any circuit it's difficult to say.
Check your DC-connection and voltage level, with a good meter (fluke comes
into mind).
I burned during my many fiddling sessions only one PIC, I misplaced it in my
breadboard.
PIC's are normally very well suited for amateurs and small series production
because they stay long in production (or a manufacture alternative is
given), can easily be replaced by a chip with more capebilities of the same
series PIC 16F with another 16F (code compatible) and last but not least the
protection of the chip. I have not heared of any chip broken easily. Only
with real missuse.

Do you use the right X-tal (frequency) for the chip since this one is also
broken???

- all the outputs appear to the programmer as the chip is erased.
Explain, Microchip uses only a few pins for programming the other pins are
never checked!
Most of the times these outputs are on chip-reset input because of
high-impedance and with that some fail-safe.

Why don't you use an ULN2003 or similar for this, you don't need the buffer
and clamping diodes.

Alexander
 
E

ellipsis

Jan 1, 1970
0
Nicolae Fieraru said:
So far I
burned four of them, and they don't come too cheap

Hey - PICs come very cheap. Just register via the Microchip website,
and they will send you sample chips for free. They even pay for
postage.

....
 
N

Nicolae Fieraru

Jan 1, 1970
0
....
When they blow, the oscillator doesn't work
That sounds interesting. But sorry, that I can't scry, my crystal sphere
will be serviced this time. ;-) So please tell us more about the circuit;
AACircuit is very helpful (look at www.tech-chat.de).
You should have your crystal ball serviced then :p
The circuit is from the book of John Iovine and I will upload the image of
the diagram to www.monitortest.net/images/stepper.gif
I didn't use the 4k7 resistors that I drew on the diagram, although I find a
bit strange driving the Darlington transistors straight from the CMOS
circuit.
The voltage I used for the whole circuit was 5V from a lab power supply
(stabilized and current limited to around 1Amp at the time). I have used
this power supply in other instances and I don't think it could cause
problems. Anyway, I will build another power supply with a 7805, just to be
sure. Instead of TIP120 I used BD681 and the stepper motor I have no idea
what model is, it is unipolar or bipolar and what is the voltage for it. The
protection diodes I used initially were 1N4004, then I changed to 1N4148 (I
thought maybe the first ones were too slow and voltage spikes return from
motor). The whole purpose of this circuit is for me to learn about
microcontrollers, to identify the voltageof my stepper motor (I would have
increased it once the circuit was fine), one of which wasn't how to blow
PICs... Anyway, as I was saying, I blew the last PIC16F84A trying to run
leds instead of the motor, this rules out the motor.
I think, PICs are very robust chips. I maltreated them many times, placed
them 180 degres distorted in the sockets, connected low outputs to Vdd and
so one, without any loss.
This is what puzzles me so bad. During the time I had all kind of chips with
shorts between pins, or connected to the wrong points, or anywhing else, and
they didn't die straight away, most of the times, after solving the circuit
errors, they were still working. In this case I am unable to identify any
mistake in the circuit (I used wrapping wire to connect the connections). I
don't exclude I might have some errors, although I was able to drive the
leds properly straight from the output of the 4050, therefore there isn't a
lot to be wrong. I was measuring the voltage and it was set to 5V
(accidentally I raised it once to 5.5V, which is still under 6V limit). I
use two Fluke multimeters, and they work fine.
The circuit is PIC16F84A/20MHZ and I run a crystal of 4MHz, I really don't
believe this would damage the chip.
AFAIK there are no common "the failure" of these chips. Mostly, the
problem is between monitor and keyboard, you know!?

I know the problem is somewhere out there or in here, but need to find out
more exactly where. Do you recommend a psychiatric exam? :)
Sory about my jokes :) Feel free to ask me more concrete.
Michael

Thanks for the help.
Nick
 
N

Nicolae Fieraru

Jan 1, 1970
0
Suggest you post a link to a schematic (or post the schematic in gif
or pdf format in the newsgroup alt.binaries.schematics.electronic).
Done that, on www.monitortest.net/images/stepper.gif
PICs are not particularly sensitive to ESD or other mild abuse.
This is where the mystery lies.
Just one suggestion comes to mind- what is your exact power supply
voltage? I hope you are not using an unregulated linear "wall-wart"
type of power supply, because they often have significantly higher
than rated voltage when not loaded down to capacity.
I am aware of that, and I used a stabilized lab power supply, monitoring the
voltage with a good Fluke voltmeter.

Exceeding the
maximum Vdd voltage will most certainly kill them dead.
Best regards,
Spehro Pefhany

I only went to 5.5V for about 5 seconds with one of the chips, and supplied
all four chips with 5V. I distroyed the chips over a few days, and after
careful check of my board, replacing the slow diodes 1N4004 with 1N4148 (who
cares if the diodes or transistors blow up) and even not using the stepper
motor anymore. The result of all these changes was another blown PIC.

Thanks for support,
Nick
 
N

Nicolae Fieraru

Jan 1, 1970
0
Without any circuit it's difficult to say.
You can check www.monitortest.net/images/stepper.gif. Please ignore the hand
drawn resistors, it was only a test.
Check your DC-connection and voltage level, with a good meter (fluke comes
into mind).
I burned during my many fiddling sessions only one PIC, I misplaced it in
my breadboard.
PIC's are normally very well suited for amateurs and small series
production because they stay long in production (or a manufacture
alternative is given), can easily be replaced by a chip with more
capebilities of the same series PIC 16F with another 16F (code compatible)
and last but not least the protection of the chip. I have not heared of
any chip broken easily. Only with real missuse.
I really can't explain the kind of missuse I've done. Hopefully I will
understand before I blow too many of them.
Do you use the right X-tal (frequency) for the chip since this one is also
broken???
The crystal wasn't broken, it is still functional. It is a 4MHz crystal,
running a chip rated 20MHz.
I was saying that once the PIC blows (it doesn't even heat itself), not even
the oscillator works anymore (I am checking with an oscilloscope).
- all the outputs appear to the programmer as the chip is erased.
Explain, Microchip uses only a few pins for programming the other pins are
never checked!
Once the PICs stopped working, I put them back on the programmer, and I
tried to read them, then to erase them and to reprogram them.
The programmer reads them as they are blank (3FFF or so).
Most of the times these outputs are on chip-reset input because of
high-impedance and with that some fail-safe.
The hex file burned to PICs takes care of configuring the ports (I copied
the code from the book called PIC Microcontroller Project Book, of John
Iovine).
Even if the code is wrong, I expect to be able to erase the chip and
reprogram them again, which doesn't happen. I can't erase them anymore.
Why don't you use an ULN2003 or similar for this, you don't need the
buffer and clamping diodes.
Because I don't really need to control the stepper motor, this should have
been only an experiment to familiarize myself with the PIC microcontroller,
and programming them. It was meant to be only the initial try, after which I
would have gone into the stuff I am interested about. Unfortunately, after a
week, I am still at the stage of blowing chips without understanding why. I
will find out eventually.
Alexander
Regards,
Nicolae
 
S

Spehro Pefhany

Jan 1, 1970
0

Okay, several things here...

1) You need a power supply filter capacitor (t the output of the
bridge rectifier and input of the 7805. It will have to be
large (like maybe 1000uF or 4700uF depending on the stepper
current. The minimum value can be easily calculated (see any
basic level text).

2) 6VAC is insufficient to reliably get 5V out of a 7805-- it
will be marginal, even with a large capacitor. 10VAC is more
like it.

3) Those 1N514? diodes are not doing anything. They need to be
across the motor coils.




Best regards,
Spehro Pefhany
 
N

Nicolae Fieraru

Jan 1, 1970
0
Done that, on www.monitortest.net/images/stepper.gif
Okay, several things here...

1) You need a power supply filter capacitor (t the output of the
bridge rectifier and input of the 7805. It will have to be
large (like maybe 1000uF or 4700uF depending on the stepper
current. The minimum value can be easily calculated (see any
basic level text).

I agree with you, the guy forgot to place the electrolytical cap after the
bridge. I didn't even look at the power supply module, since I used my own
lab power supply, adjusted to 5V.
2) 6VAC is insufficient to reliably get 5V out of a 7805-- it
will be marginal, even with a large capacitor. 10VAC is more
like it.

Yes, the input voltage to the 7805 should be at least 2.5V...3V more than
the output. Considering the voltage drop on the 2 diodes (1.4V), from the
initial 6V * 1.414V - 1.4V = 7.08V
It is a bit low to supply the 7805.
3) Those 1N514? diodes are not doing anything. They need to be
across the motor coils.
Best regards,
Spehro Pefhany

I know that relays have the protecting diode across their coils. These
diodes protect the transistors, but the spikes could affect the +5V that go
to the rest of the circuit as well. I think you are right about placing the
diodes across the motor coils (cathode to +5V and anode to collectors).
I suspect the author actually haven't actually tested the diagram, he just
made the design. Thank you very much for your insight.

Best regards,
Nicolae
 
S

Spehro Pefhany

Jan 1, 1970
0
I know that relays have the protecting diode across their coils. These
diodes protect the transistors,
<snip>

They won't do anything unless they are zeners.


Best regards,
Spehro Pefhany
 
M

Michael Lange

Jan 1, 1970
0
Hi Nicolae,

unfortunately my crystal shpere isn't back, so we must use our brain the
next time ;-)

Here are some questions and ideas (looking something curious).

Did you test the PIC in the circuit without the whole other things (4050
....) and some LEDs on RB0-3 instead?

Check the board again, if nothing found, from a friend instead or do any
other for some time. (From my own practice I know, that if someone looks
on a problematic thing more and more, it looks more and more error-free.
;-) )

To your comment from another post, that you can't reprogramm the PICs.
Did you enable any code protection on the PIC? The text in the
programming manual sounds like there is no way back, if you do so. But I
never used these old PICs, so I can't say something more about.


Sorry, but in this situation I can't say do this or that.

Michael
 
N

Nicolae Fieraru

Jan 1, 1970
0
Hi Michael,

I haven't enabled the protection on them., because I've been able to erase
them and reprogram them before I burnt them.
It was just a hope that maybe they just lost the information and I will be
able to erase and program them again, but obviously they died.

I will rebuild another board and test it without the motor (just with some
leds), so that at least I will split the problem apart, in case they blow
again.

Thanks for your support
Nicolae
 
N

Nicolae Fieraru

Jan 1, 1970
0
Hey - PICs come very cheap. Just register via the Microchip website,
and they will send you sample chips for free. They even pay for
postage.

Thanks for the tip :)
 
N

Nicolae Fieraru

Jan 1, 1970
0
<snip>

They won't do anything unless they are zeners.
Spehro Pefhany

Sorry Spehro, but I don't agree in here. The problem when you have an
inductive load in a circuit (as a stepper motor in the circuit) is that the
coils generate a high voltage with REVERSE polarity in the moment the
current is intrerupted through the coil. Because the diodes are placed in
reverse polarization on the coils (cathode to the VCC), they don't need to
be Zener diodes in order to protect the whole circuit (including
transistors), as all the voltage spike will be shorted by the diode.

Regards,
Nicolae
 
S

Spehro Pefhany

Jan 1, 1970
0
Sorry Spehro, but I don't agree in here. The problem when you have an
inductive load in a circuit (as a stepper motor in the circuit) is that the
coils generate a high voltage with REVERSE polarity in the moment the
current is intrerupted through the coil. Because the diodes are placed in
reverse polarization on the coils (cathode to the VCC), they don't need to
be Zener diodes in order to protect the whole circuit (including
transistors), as all the voltage spike will be shorted by the diode.

Regards,
Nicolae

Hi, Nicolae:-

VCC
+
|
|
C| |
C| | i
C| v
|
|
|
|
| Vc
|/
-|
|>
|
|
===
GND


Consider this circuit (view in fixed pitch font).
Assume we are in steady state, the transistor is in saturation, and a
constant current i is flowing through the coil (limited by the series
resistance of the coil, which I do not show).

As the transistor turns off, the voltage Vc will start to *rise*,
because the *current* continues to flow in the *same* direction
through the inductance. It will rise above Vcc (thus reversing the
voltage across the coil, perhaps what you are thinking of), and is
limited only by the parasitic capacitance of the coil and the
breakdown voltage of the transistor.



Best regards,
Spehro Pefhany
 
N

Nicolae Fieraru

Jan 1, 1970
0
Hi, Nicolae:-
VCC
+
|
|
C| |
C| | i
C| v
|
|
|
|
| Vc
|/
-|
|>
|
|
===
GND


Consider this circuit (view in fixed pitch font).
Assume we are in steady state, the transistor is in saturation, and a
constant current i is flowing through the coil (limited by the series
resistance of the coil, which I do not show).

As the transistor turns off, the voltage Vc will start to *rise*,
because the *current* continues to flow in the *same* direction
through the inductance. It will rise above Vcc (thus reversing the
voltage across the coil, perhaps what you are thinking of), and is
limited only by the parasitic capacitance of the coil and the
breakdown voltage of the transistor.

Best regards,
Spehro Pefhany

Hi Spehro,

As you say, the current will cause the potential in VC to become greater
than VCC when we turn off the transistor. And if we connect a diode between
VCC and VC, with the cathode to VCC, that diode will absorb all the current
generated when the transistor is turned off, therefore it will protect the
transistor from receiving a potential on his collector higher than VCC. And
the diode doesn't need to be Zener. Isn't that right?

Regards,
Nicolae
 
S

Spehro Pefhany

Jan 1, 1970
0
As you say, the current will cause the potential in VC to become greater
than VCC when we turn off the transistor. And if we connect a diode between
VCC and VC, with the cathode to VCC, that diode will absorb all the current
generated when the transistor is turned off, therefore it will protect the
transistor from receiving a potential on his collector higher than VCC. And
the diode doesn't need to be Zener. Isn't that right?

Regards,
Nicolae

Yes, that's correct, however the schematic:

http://www.monitortest.net/images/stepper.gif

... shows the 1N514 diodes connected across the transistors, where they
would do nothing unless they avalanched. The 'transistors' are
actually 60V/5A darlingtons, and have parasitic diodes in the same
orientation anyhow.

http://www.learn-c.com/tip120.pdf



Best regards,
Spehro Pefhany
 
N

Nicolae Fieraru

Jan 1, 1970
0
Yes, that's correct, however the schematic:
http://www.monitortest.net/images/stepper.gif

.. shows the 1N514 diodes connected across the transistors, where they
would do nothing unless they avalanched. The 'transistors' are
actually 60V/5A darlingtons, and have parasitic diodes in the same
orientation anyhow.

http://www.learn-c.com/tip120.pdf

Best regards,
Spehro Pefhany

Yes, I agreed with you a couple of posts ago that the diodes as shown in the
schematic don't protect the circuit. I had a look on the pdf file of the
transistors and yes, the diodes are redundant anyway. As I was saying, I
suspect the author didn't actually built the circuit, just made the design.
Anyway even if he built it, depending on the stepper motor and transistors,
the overvoltage generated by his motor maybe wasn't high enough to destroy
the transistors.
I was doing some tests in the past, and I discharged very large sparks
(about 2 cm in lenght) generated by an automotive induction coil to a LED,
in both polarisations and I couldn't to destroy it! And I had tens of
thousands of volts applied in reverse polarisation, so it isn't always easy
to destroy an electronic component. Except for the PIC16F64A :p

Thank you very much for your help.

Nicolae

PS. I checked your web site and I read the article about the MOSFET switch
for ac/dc conversion, it is a very interesting idea. Congratulations :)
 
C

Chewy

Jan 1, 1970
0
I had a look at the circuit, he must have done some bad soldering or hooked
it up wrong.
Instead of using 4050's and transistors I'll use either a ucn2003 or 2803.
I've built projects from the same book with no trouble.
Chewy
 
Top