pwm with transistor

Hello
I'm driving a LED through PWM port of an arduino pro mini 328
I'm really limit on the max amp that the 328 can drive : 40mA
after few minutes , the 328 over heat and ,don't manage to work properly .
I would like to use a transistor to drive my led and ,save my arduino board .

My trouble is that , with a PNP transistor ,the led is always on .

Any idea of what I can do to keep the PWM effect , using a transistor to drive more amp ?

Thanks a lot

What LED(s) do you have? "High power" LEDs are a different animal and they are normally driven with a constant-current source.

.

Thanks for your reply .
led using 5v , works perfectly with PWM is I reduce a little bit the voltage to save some mA ...

led using 5v ,

No LED works off 5V. What colour are they and what value resistor are you using?

My trouble is that , with a PNP transistor ,the led is always on .

No what on earth are you doing with them?

This is a special LED , made to be used on 5v , using inside a capacitor , and resistor, with 2 5630 , as a car LED on 12v for example .

I was expecting to drive the LED , with PWM through a transistor to drive more amps , as the arduino is limited to 40mA

Why are you holding back on us.
We can’t help unless we know what you have. Without knowing what you are doing we can’t tell what you are doing wrong.
Now what LEDs do you have, post a link to their data sheet or where you got them from.
Post a schematic of how you wired them up.

I'm really limit on the max amp that the 328 can drive : 40mA

No it hasn’t, 40mA is where damage started being done to a pin. So what makes you think this is the limit for the whole processor?

Thanks for your reply .
led using 5v , works perfectly with PWM is I reduce a little bit the voltage to save some mA ...

PWM does not reduce the peak voltage or current so things can STILL get damaged. [u]PWM[/u] reduces the average voltage & current and it makes the LED appear to dim.

Standard practice is to use a current-limiting resistor in series with the LED. Even if the LED is rated for 40mA, it needs a resistor (or something) to limit/control the current.

...At this point, I'm betting you have a regular-everyday LED and all you need is a ~220 Ohm series resistor. :wink:

I use this kind of led for example

I don't talk of limit of the whole processor , but by pin . it takes 40mA @5v , so too high for my pin . that's why I would like to pass through a transistor ,

But , my solution is maybe to use a MOSFET instead of a PNP transistor ? !

led.png

DVDdoug:
PWM does not reduce the peak voltage or current so things can STILL get damaged. [u]PWM[/u] reduces the average voltage & current and it makes the LED appear to dim.

Standard practice is to use a current-limiting resistor in series with the LED. Even if the LED is rated for 40mA, it needs a resistor (or something) to limit/control the current.

I don't use it to reduce the current , but , to dim the LED , no problem for that .
I connect the LED to a different power source ,and , if I reduce the voltage ,the LED takes less mA for example 20mA @ 4v ... and like that the arduino works well .

A simple Google of PNP high side switch or PNP Arduino should get you going. That or use low side switching and an NPN a Google of Low Side Switching NPN or Arduino NPN should get you going.

Ron

led.png

That looks like a 12 V LED module to me, not a 5 V.

This thread is positively weird!

Whenever I need to add PWM in my project, I normally use 75N75 FET, its NPN and works great.

Paul__B:
led.png

That looks like a 12 V LED module to me, not a 5 V.

This thread is positively weird!

Yes , but manufacture do what we want , if we need a model like that in 5v they can make it .... anyway does not matter .

jackthomson42:
Whenever I need to add PWM in my project, I normally use 75N75 FET, its NPN and works great.

Ok I'll try with a mosfet today , will try a N or P chanel , I'll modify my code to run a N or P chanel

gberic:
Yes, but manufacture do what we want, if we need a model like that in 5v they can make it ... anyway does not matter.

Since it is abundantly clear that you are not going into commercial manufacture, that is clearly specious. :roll_eyes:

Use an N-channel logic-level FET.