Pages: [1]   Go Down
Author Topic: Quick urgent PWM question  (Read 753 times)
0 Members and 1 Guest are viewing this topic.
South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 655
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 37
Posts: 4329
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 655
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the good schema, rugged!
Logged

Pages: [1]   Go Up
Jump to: