Electronics > Beginners
Driving LCD backlight and contrast ping by Arduino
(1/5) > >>
VEGETA:
Dear Friends,

I have a finished project with Arduino that contains LCD 16x2, I just need the Arduino to control the contrast and brightness to allow user to adjust brightness the way needed.

I thought of outputting PWM then filtered by 330 ohm + 330uF capacitor but it didn't work as I expected. Although I am outputting (PWM = 255) the output of the RC filter is about 3~3.5v while at the Arduino pin itself is 5v. So I thought perhaps current is not enough or so because a drop voltage happened.

I am powering my circuit by USBtinyISP programmer right now, so could it be the case? that it does not give enough power to circuit?

best regards,
BrianHG:
As a test, disable the PWM on that IO pin and just set it to high.  See if you get 5V.  Measure the voltage across the resistor, maybe something is drawing too much current.
VEGETA:

--- Quote from: BrianHG on April 23, 2018, 10:24:12 pm ---As a test, disable the PWM on that IO pin and just set it to high.  See if you get 5V.  Measure the voltage across the resistor, maybe something is drawing too much current.

--- End quote ---

I will test it tomorrow.

I think the +5v pin gives enough but I wanted adjustable back light so PWM is a must. However, what values for RC filter?
BrianHG:
This is the reason for measuring the voltage across the 330Ohm resistor.  I want to know if you are drawing ridiculous current for no reason.  I would have chosen 1k or 10k with 100uf or 10uf.  However, we first want to know why the output isn't reaching 5v.  Those LCD contrast inputs are usually very-very low current.

An example would be having the 330uf cap reverse in polarity, or, it being a 4v cap.  Going with a higher voltage cap, like 10uf 16v, means at 5v, there will still be practically no current at all.

Be careful of low ESR caps in this application, their current is much higher than cheap aluminum electrolytic, but, with 330 ohm in series, it should easily hit 4.9v or more.
VEGETA:
I have 330uF electrolytic cap which is a normal one. It is 25v rated and I am sure I put it the correct way. If you pick 10k resistor, won't this affect current?

Plus, I don't want it for contrast only, but for back light which is more important. Contrast is just for convenience since I have a free arduino pin.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod