Maker Pro
Maker Pro

Problem using ADC 0808

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.
 

Attachments

  • Program in C.zip
    6.3 KB · Views: 153
  • Cct diag.zip
    17.9 KB · Views: 150
Let me try to help, just a little.
First by attaching the files in plain png & txt formats.
Second; did you properly decouple & noise-proof the power supplies?
If having done that doesn't help; try to read the value 20 times and calculate the avereage.
 

Attachments

  • Cct diag.PNG
    Cct diag.PNG
    27.1 KB · Views: 1,428
  • Program in C.txt
    1.1 KB · Views: 169
No we did not decouple the power supplies but how can this effect the inputs as inputs are not connected directly to supplies. If it is really due to noise than please tell us the method to decouple the supply.
 
With that reasoning you might just as well ask why an IC needs a power supply at all, since the inputs & outpus are not directly connected to the power supply.
Some physical analogy: Why won't you find any potholes on a racetrack? Can you imagine trying to read a paper sitting on a trampoline while others are jumping on it?
The literature is full of examples & references to the importance of decoupling. Just Google ADC0808 decoupling and you can pick among the 1000 results.
 
Yes, that's what I observed too. As a minimum I'd use both a 10uF electrolytic and a 1uF plastic capacitor.
You have the reference voltage directly tied to Vcc and any ripple or noise there will directly affect the readings.
If doing this fails to produce good results you could try averaging 20 readings and see what comes out of that.
 
Top