Hi everybody,
We are making a project on sun tracking system using MC 89s52 and we used ADC 0808 to convert analog signal from LDR. All the circuit is working quiet good but there is a problem with ADC that a random voltage is generated automatically at the input of the ADC even when we did not apply any input signal to the ADC. Also there is the problem in output of the ADC that the digital number generated at the output is quiet different than the input signal but sometimes it is correct. Please help us as we have to submit our project within a week. The following are circuit diagram and program.
Do you allow the input pin to be unconnected? This will result in unpredictable voltages.
It can be picking up ambient 60 cycle hum (or 50 cycle).
It can be a static charge on the pin, or coming in from the wire connected to the pin.
The input may even be able to detect static charge on you... or objects as much as several feet away.
The input pin should always be connected to some source, while you have the device powered up.
Unless it has some internal means to neutralize these effects.
the digital number generated at the output is quiet different than the input signal but sometimes it is correct.
Thanks for the reply. Are you sure that it is gaining charge because it is not connected and if we connect the inputs it will not gain extra voltage. I will check for it.
The input voltage is in the detectable range.
---------- Post added at 14:06 ---------- Previous post was at 12:59 ----------
I have checked applying inputs and there is no extra voltage so first problem is solved but the second still unsolved. Please tell me why the output of ADC is not according to input.
Take a closer look at your incoming signal using an oscilloscope while the ADC is sampling the voltage. See if you have some ripple on the line, or see transients. When the ADC takes a reading, it does so from a single instance in time... a simple DC voltmeter will take an average over a long period of time, so you may not "see" the ripple using that type of meter, the o-scope will tell you more truly, what the signal looks like.