Go Down

Topic: PWM current leaking (Read 583 times) previous topic - next topic


I am currently playing around with driving transistors and controlling current with an arduino.

I just use an analogWrite to the pin connected to the base (through a 1k resistor) of a BC547B NPN transistor.... but never mind the transistors for now....

I have noticed that even when I write a value of 0 (0% duty cycle) I am getting ~ 600 uA through my resistor. I measure this by simply plugging a 1k resistor into the pin assigned for analogWrite then measuring the current with my multimeter going to ground.

Other measurements do not make much sense either. When I set the duty cycle to 100%, I only get 1.2 mA through a 1k resistor. By my calcs I should be getting around 5 mA

Also, and this may be normal, but the atmega328p gets pretty warm (maybe 50-60 *C) when plugged into my USB port for a while.

I measured the 5 volt port and it is supplying 4.6 volts, my 3.3v port is right on target (again while plugged into USB).

Ok so a lot of info here but my primary concern is this 600 uA coming out of my PWM port with a 0% duty cycle write. It is not cool because it pushes my first stage transistor into an active mode which pushes my second stage transistor into an active mode and they both get really darn hot until I write about 30% duty cycle - where they are both in saturation.... strange.

Last note - I have let the magic white smoke out of a lot of things that were on and around this poor arduino uno - so the obvious solution would be to purchase a new board and just assume this one is damaged, but I wanted to get some feedback about this leaking current - if that is normal I may have to dust off the PICkit.... ugh....


If you have smoked stuff attached to the board I would think it would be safe to assume that this particular board is no longer representitive...

Which board is it? Can you get hold of a programmed chip and replace yours?


Jan 25, 2013, 03:51 pm Last Edit: Jan 25, 2013, 03:54 pm by chemnut220 Reason: 1
Uh another thing I just noticed that I should have done first...

other pins do this:

pin 3 gives 40 uA @ 0%,  4.5mA @ 100%

pin 5: 35 uA @ 0% , 4.35 mA @ 100%

pin 6: 37 uA @ 0%, 4.33 mA @ 100%

pin 9: 83 uA @ 0% 4.17mA @ 100%

pin 10: 500 uA @ 0%, 1.31 mA @ 100%

pin11: nothing...

pin13: 100 uA@ 0%, 4.15 mA @100%

Edit: again, all tests were done throught a 1k resistor


I have smoked things that were attached to pins on this board - but to my knowledge, I have not smoked things on the board... but who knows - maybe I have...

I can look into getting another chip I suppose

it is the arduino uno


Also, and this may be normal, but the atmega328p gets pretty warm (maybe 50-60 *C) when plugged into my USB port for a while.

If it gets that warm without driving any loads its definitely toast.  Might be in latch-up mode - remove everything
from all the pins and power cycle.  If it still gets hot its dead.
[ I won't respond to messages, use the forum please ]

Go Up