View previous topic :: View next topic |
Author |
Message |
kel
Joined: 17 Oct 2005 Posts: 68 Location: Brisbane
|
LCD with Back-light affecting Temper valz |
Posted: Wed Feb 15, 2006 2:03 am |
|
|
Guys i've an unusual problem here.when i connect an lcd with back to power rail of 5v shared by the ic & lm335. tyhe temperature increses from 20 deg to 25 degs.But when i disconnected it from 5v.the temperature value goes back to normal value.
PS: I'm connecting the lcd back-light to 5v through 5.6 ohms resistor.
Has anyone ever experience this problem?
my lcd is 20x4 [20 char & 4 lines] |
|
|
Ttelmah Guest
|
|
Posted: Wed Feb 15, 2006 6:50 am |
|
|
Not unusual at all.
Your supply rail is drooping.
The ADC reading, is totally dependant on the supply rail to the chip _actually being 5v_. Unfortunately, regulators are not perfect, and when the load changes, the voltage generated changes. This is why there is a seperate ADC reference pin, and for high accuracy applications, this will be fed from a precision bandgap reference, instead of from the normal voltage regulator. You change corresponds to the rail dropping by 1.7%.
Best Wishes |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Feb 15, 2006 9:23 am |
|
|
You could reduce the backlight power.
Try using PWM to drive a N-FET that will provide the ground to the backlight.
Then adjust the current limiting resistor for MORE power..(YES MORE) because you will only drive it for part of a pulse.
Then the eyes persistance will make it look nice and steady...without using power.
http://www.hantronix.com/down/led-dim.pdf |
|
|
kel
Joined: 17 Oct 2005 Posts: 68 Location: Brisbane
|
Thanks alot guys.. |
Posted: Wed Feb 15, 2006 7:14 pm |
|
|
Ttelmah mate, does this mean i have to connect the adc-reference to the powerrail and use it as a reference?
|
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Wed Feb 15, 2006 8:05 pm |
|
|
kel wrote: | Ttelmah mate, does this mean i have to connect the adc-reference to the powerrail and use it as a reference?
|
Almost... The problem is that your A/D is ratiometric and LM335 is not ratiometric - it's absolute. So, you have 2 choices (at least):
1. Both ratiometric. Replace your present absolute-value temperature sensor with a ratiometric sensor (such as AD22103, there are tons of them out there) and make the Vcc your reference voltage. Then your temperature reading will not be dependent on Vcc value. You don't have to hardwire Vref pin to VCC, you can do it with setup_adc() function in firmware.
2. Both absolute. Connect the Vref pin to a precision voltage reference (such as zener diode). Output of a precision voltage reference is independent of Vcc as long as Vcc > Vref. As an additional benefit, the resolution of your A/D will improve. The lower Vref the better the resolution. Estimate the minimum Vcc, estimate the maximum temperature and choose the voltage reference such that max(V(t)) < Vref < min(Vcc). There is a standard zener diode value of 4.1V, I think it should work for you. |
|
|
Ttelmah Guest
|
|
Posted: Thu Feb 16, 2006 4:19 am |
|
|
You already _are_ connecting the ADC reference to the supply rail!...
You are using 'ALL_ANALOGS'. If you look in the .h file for the processor, you will see that for this selection, it says 'Ref=Vdd'.
This is the problem.
As another poster has explained, you have a chip that gives a fairly exact voltage output for a given temperature. This does not change with the supply (well, it will, a _tiny_ bit, but insignificantly). However your reading system, is basing it's 'voltage' readings, on the Ref value from the supply pin. If this changes, the reading will change.
Best Wishes |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1908
|
|
Posted: Thu Feb 16, 2006 9:52 am |
|
|
One other thing....I'm surprised no one else brought this up.
LCD backlights get hot. That could also be contributing to your erroneous temperature measurement if the backlight is near the sensor, or if the whole works is in an enclosure. |
|
|
|