Go Down

Topic: Quick urgent PWM question (Read 816 times) previous topic - next topic

SouthernAtHeart

HOPING TO ETCH MY BOARD TODAY, AND NEED ONE THING VERIFIED:
I'm wanting to fade Spakfun's 16x2 LCD display.  the specs are:
LED forward voltage  4.2   (4.6 V max)
forward current 120    (160 mA  max)

I had it prototyped on my board through a 100 ohm resistor off a PWM pin from the Uno and it seemed to fade in and out okay, but for 120 mA, shouldn't I have a transistor drive it or something, since the I/O pins are limited at 40ma?
I have the backlight negative connected to ground, the positive goes through the 100 ohm resisitor to a jumper that I can switch from either 5+, or to the D0 pin. With this config. what transisitor & bais resistor would I need coming off the D0 pin?
If someone could recommend what transistor to use, I don't understand them all together yet.  Not sure if I need a PNP or a NPN for this type of config.  I have a lot of common transistors, just don't know which one I need to use here.
Thanks

mowcius

Do you have any nice MOSFETs?

Yes you should be driving it through a transistor - NPN would probably be best although it doesn't matter too much - re wiring, use the search bar - someone asked only a few days back about PWM and LCD backlights.

RuggedCircuits

I've used this circuit in the past with good success:



--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

floresta

Rugged:

Wouldn't it be a good idea to add a current limiting resistor so that you don't have to rely on the PWM being set properly to avoid excessive LED/Arduino current?

Don

RuggedCircuits

I haven't found it necessary but it might not be a bad idea overall. I modified the image to include the resistor.

--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected

SouthernAtHeart

Thanks for the good schema, rugged!

Go Up