Analog to digital converters find huge application as an intermediate device to convert the signals from analog to digital form. These digital signals are used for further processing by the digital processors. Various sensors like temperature, pressure, force etc. convert the physical characteristics into electrical signals that are analog in nature.
ADC0804 is a very commonly used 8-bit analog to digital converter. It is a single channel IC, i.e., it can take only one analog signal as input. The digital outputs vary from 0 to a maximum of 255. The step size can be adjusted by setting the reference voltage at pin9. When this pin is not connected, the default reference voltage is the operating voltage, i.e., Vcc. The step size at 5V is 19.53mV (5V/255), i.e., for every 19.53mV rise in the analog input, the output varies by 1 unit. To set a particular voltage level as the reference value, this pin is connected to half the voltage. For example, to set a reference of 4V (Vref), pin9 is connected to 2V (Vref/2), thereby reducing the step size to 15.62mV (4V/255).
ADC0804 needs a clock to operate. The time taken to convert the analog value to digital value is dependent on this clock source. An external clock can be given at the Clock IN pin. ADC 0804 also has an inbuilt clock which can be used in absence of an external clock. A suitable RC circuit is connected between the Clock IN and Clock R pins to use the internal clock.
Where to use an ADC0804?
The ADC0804 is a commonly used ADC module, for projects were an external ADC is required. It is a 20-pin Single channel 8-bit ADC module. Meaning it can measure one ADC value from 0V to 5V and the precision when voltage reference (Vref –pin 9) is +5V is 19.53mV (Step size). That is for every increase of 19.53mV on input side there will be an increase of 1 bit at the output side.
This IC is very Ideal to use with Microprocessors like Raspberry Pi, Beagle bone etc. Or even to use as a standalone ADC module. Every ADC module requires a clock to function; this IC comes with its own internal clock so you don’t have to worry about it. Hence, if you are looking for a compact ADC module with a decent resolution of 8-bit then this IC is for you.
How to use ADC0804?
Since the IC comes with an internal clock we do not need many components to make it work. However to make the internal clock to work we have to use an RC circuit. The IC should be powered by +5V and both ground pins should be tied to circuit ground. To design the RC circuit simply use a resistor of value 10k and capacitor of 100pf (approx) and connect them to CLK R and CLK IN pins as shown in the circuit below. The chip select (CS) and Read (R) pin should also be grounded. The Vref pin is left free because by default without any connection it will be connected to +5V.
The digital output will be obtained from the pins DB0 to DB7 and the analog voltage should be connected to V in the (+) pin as shown in the circuit. Also, note that another end of the voltage source (sensor/module) should also be grounded to the circuit for the ADC conversion to work. Now, for the ADC Conversion to start we have o make the Write(WR) pin to go high momentary this can be done connecting the pin to I/O of MPU and toggling it high before every ADC reading. Only if this is done the ADC value on the output side will be updated.