Maker Pro
Maker Pro

When I remove GND from AVR µP TINY15, become very hot.

M

Mats Myhrman

Hi!

My problem is that when I remove the GND from the µP (Tiny15) my LED that is
connected via a BC327-40 goes on, the current seems to go through the AVR.

The LED's anode is connected to +5V, the cathode is connected to the
Collector, base via 2k2 res to TINY output, and emmiter to GND.

The strange thin is that if I remove the GND connector to TINY, the µP
become soon very hot and the current is about 0.4 A. How can this work? How
is the port inter connected inside the TINY, Anyone that has a good link? Or
idea.

Best Regards
/Mats
 
S

Spehro Pefhany

Hi!

My problem is that when I remove the GND from the µP (Tiny15) my LED that is
connected via a BC327-40 goes on, the current seems to go through the AVR.

The LED's anode is connected to +5V, the cathode is connected to the
Collector, base via 2k2 res to TINY output, and emmiter to GND.

Eh? No series resistor on the LED? That's a PNP transistor so it's not
going to be doing much useful. What are you trying to do?
The strange thin is that if I remove the GND connector to TINY, the µP
become soon very hot and the current is about 0.4 A. How can this work? How
is the port inter connected inside the TINY, Anyone that has a good link? Or
idea.

Best Regards
/Mats

Sounds like you're getting latchup. No pin should 'see' a voltage much
outside the range of 'Vdd' to 'GND' (referring to the voltages on
those pins). So if Vdd and GND are both at 5V, all the pins have to
have 5V (more or less) on them or bad things can happen.



Best regards,
Spehro Pefhany
 
M

Mats Myhrman

Thanks.

Ok! I'll think I understand.

I have to secure that the µP allways have GND if Vdd is on.

Does not explain why the µP drain so much current thoug...?
/Mats

Spehro Pefhany said:
Eh? No series resistor on the LED? That's a PNP transistor so it's not
going to be doing much useful. What are you trying to do?


Sounds like you're getting latchup. No pin should 'see' a voltage much
outside the range of 'Vdd' to 'GND' (referring to the voltages on
those pins). So if Vdd and GND are both at 5V, all the pins have to
have 5V (more or less) on them or bad things can happen.



Best regards,
Spehro Pefhany
http://www.speff.com
 
S

Spehro Pefhany

Thanks.

Ok! I'll think I understand.

I have to secure that the µP allways have GND if Vdd is on.

Does not explain why the µP drain so much current thoug...?
/Mats

That's what latchup does. Something like a shorted output wouldn't
even be close to 400mA.


Best regards,
Spehro Pefhany
 
P

Pooh Bear

Mats said:
Hi!

My problem is that when I remove the GND from the µP (Tiny15) my LED that is
connected via a BC327-40 goes on, the current seems to go through the AVR.

The LED's anode is connected to +5V, the cathode is connected to the
Collector, base via 2k2 res to TINY output, and emmiter to GND.

The strange thin is that if I remove the GND connector to TINY, the µP
become soon very hot and the current is about 0.4 A. How can this work? How
is the port inter connected inside the TINY, Anyone that has a good link? Or
idea.

The uP is finding a route to ground eleswhere, presumably via a port pin (
likely turning on an internal parasitic diode from the IC structure ) and that's
upsetting it ! Hard to say more without a schematic.

Graham
 
P

Pooh Bear

Mats said:
Thanks.

Ok! I'll think I understand.

I have to secure that the µP allways have GND if Vdd is on.

Does not explain why the µP drain so much current thoug...?

How many other pins are connected to ground ? The current will find a way to
ground through one or more of them. It's an effect caused by turning on one or
more internal parastic diode(s) ( created by the IC fabrication process ) that's
normally reverse biased but gets forward biased under these conditions.

Graham
 
M

mc

The LED's anode is connected to +5V, the cathode is connected to the
Collector, base via 2k2 res to TINY output, and emmiter to GND.

No resistor directly in series with the LED? It needs one.

But I'm not sure I understand your entire problem either.
 
M

mc

Sounds like you're getting latchup. No pin should 'see' a voltage much
outside the range of 'Vdd' to 'GND' (referring to the voltages on
those pins). So if Vdd and GND are both at 5V, all the pins have to
have 5V (more or less) on them or bad things can happen.

I second that. Diode-like effects on the input or output pins of the AVR.
 
M

Mats Myhrman

Hi!

First, Thanks for all your help.

Second, I will try to include some schematics in here, I have not the the
picture in my head but will try to make it tomorrow.

The LED is an IR-LED, and I thought that if I calculate the hfe-value on the
Transistor (round 300) and if the PIN from TINY can give ~4.8 volt the
current over 2k2 resistor will be 2.2mA. Times 300 = 65 mA. That should the
LED handle (rated 100mA constant and 1 A pulse)

The strange thing happend when i removed the ground in a lab plate. I have
also (befor the lab test with ground) a pcb with the same schematics and
there could it not be the ground that is removed...?
Anyway, I discoverd the symphtoms first at the pcb. The LED "hang" and the
TINY gets hot. Then I conected it to a labplate (labdeck?!?) and dicovered
that if I pull the GND the current arised.

However on the pcb, if LED output gets a puls (+5v) it behave in the same
way as if I remove the GND.

I will privide a schematics to clear things.

Thanks
/Mats
 
P

Pooh Bear

Mats said:
Hi!

First, Thanks for all your help.

Second, I will try to include some schematics in here, I have not the the
picture in my head but will try to make it tomorrow.

The LED is an IR-LED, and I thought that if I calculate the hfe-value on the
Transistor (round 300) and if the PIN from TINY can give ~4.8 volt the
current over 2k2 resistor will be 2.2mA.

Actually you also need to subtract the transistor's Vbe = ~ 0.6V. So the
voltage across the resistor is 4.8V - 0.6V = 4.2V.
Ib = V/R = 1.9 mA.
Times 300 = 65 mA.

Actually =~ 650mA ! Which exceed your transistor's spec IIRC.

It's bad practice to use hfe like this. It's highly variable from device to
device. It likely varies from 100-300.

It's better to define the cuurent with a series resistor in the collector load.
What current do you actually need for the led ?

You also need to use an NPN transistor here !

Graham
 
S

Spehro Pefhany

Hi!

First, Thanks for all your help.

Second, I will try to include some schematics in here, I have not the the
picture in my head but will try to make it tomorrow.

The LED is an IR-LED, and I thought that if I calculate the hfe-value on the
Transistor (round 300) and if the PIN from TINY can give ~4.8 volt the
current over 2k2 resistor will be 2.2mA. Times 300 = 65 mA. That should the
LED handle (rated 100mA constant and 1 A pulse)

You might want to try sci.electronics.basics.

1) It's bad design generally to depend on transistor gain for
this sort of purpose. At 100mA Ic the part you have is only
guaranteed to be between 250 and 600. That's at 25°C, it
changes with temperature (usually for the worse).

2) If you had the right 'polarity' of transistor, or if it was
connected correctly, it would have around 0.7V Vbe drop so
you'd get more like 1.9mA

3) 300 * 2.2mA is not 65mA

Drive the transistor hard enough to saturate it (eg. with a few mA)
and put an appropriate series resistor on the LED. You'll have to sink
current from the base to use your PNP transistor (low = on: emitter to
+5V, base through eg. 1K to port pin, collector through series
resistor of 50 or 60 ohms, rated 1/4W or preferably better.



Best regards,
Spehro Pefhany
 
S

Spehro Pefhany

Actually you also need to subtract the transistor's Vbe = ~ 0.6V. So the
voltage across the resistor is 4.8V - 0.6V = 4.2V.
Ib = V/R = 1.9 mA.


Actually =~ 650mA ! Which exceed your transistor's spec IIRC.

It's bad practice to use hfe like this. It's highly variable from device to
device. It likely varies from 100-300.

It's better to define the cuurent with a series resistor in the collector load.
What current do you actually need for the led ?

You also need to use an NPN transistor here !

Graham

Is there an echo in here? ;-)


Best regards,
Spehro Pefhany
 
P

Pooh Bear

Spehro said:
Is there an echo in here? ;-)

Best regards,
Spehro Pefhany

Lol ! Well at least the OP can see we're in agreement. Although I differ over the
need to use as much as 1mA to drive the transistor.

Graham
 
M

mc

I see two things.

You need a 0.1-uF capacitor between +5V and ground. Every digital circuit
always needs this.

Is your IR emitter an LED? It needs a resistor in series with it, doesn't
it? I see an LED and a transistor with no resistance to limit the current.

Neither of these is a certain explanation of what's going wrong, but I'm
guessing that when you emit a strong IR pulse, your supply voltage drops
below 5 V and the ATtiny goes into a latchup state.
 
Top