This is a multi-part message in MIME format. ------=_NextPart_000_009C_01C41202.8E8FA670 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit [Reposted with correct tag - sorry ] Hi, I'd like to control the LED backlight of an LCD using the PWM output of a PIC, but I know very little of electronics and need some help to get the correct values for the circuit. This is the LCD datasheet: http://www.optrex.com/SiteImages/PartList/SPEC/20481bae.pdf As I understand from it, the LEDs needs to be driven with ~4V 240 mA and I'd like to get such a big current from the unregulated 9V power supply instead of the regulated 5V line used for the PIC. I think the attached circuit will work, but I have problems choosing the values for the resistors, in part because I can't fully understand the transistor datasheets: Q1: http://www.fairchildsemi.com/ds/MM%2FMMBT3904.pdf Q2: http://www.fairchildsemi.com/ds/MM%2FMMBT2907A.pdf First, to calculate R3: R3=(9-Vce(sat)-Vled)/0.24 First problem: How do I know Vce(sat)?. As I see on the datasheet, it depends on Ic and other parameters, and it's given for Ic=150mA and Ic=500mA, but not for Ic=240mA. ?Is there any way to know this from the curves or other parameters? Also, to be sure there is not excess current I should assume a minimum Vce(sat) and not a maximum ?is this right? And I should also assume minimum Vled voltage... Assuming Vce(sat)~=0V Vled=3.8V R3=(9-0-3.8)/0.24~=21.7 ohms and the power disipated would be P(R3)=1.248 W So a 24 Ohm, 2W resistor will be ok, ?right? Now, for saturation of Q2 the minimum base current should be: Ib~=Ic/hFE=0.24/50=4.8mA Again, I took the minimum hFE in the datasheet as it depends on some parameters... How should I get it? And how do I get Vbe? Well, enough for a post. I think I can get the other values If I know the answer of what I already asked. *Sure* there will be better circuits to do this. If you post another circuit, please tell me how it works and how to calculate the values. Any tips welcome! Ovidio Vazquez Jara -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body ------=_NextPart_000_009C_01C41202.8E8FA670 Content-Type: image/gif; name="BACKLIGHT.gif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="BACKLIGHT.gif" R0lGODlhZQIHAYAAAAAAAP///yH+LjxBTFQ+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