CP/PC364 Data Communications & Networks Laboratory
A/D Conversion
Overview
Digital transmission of analog data, (such as sound and video), requires analog input signals to be converted to digital signals for processing. Once received, the signals then have to be converted to back analog. These conversions are done by analog to digital (A/D) and digital to analog (D/A) converters, respectively. Although you could construct these converters from discrete components, integrated circuits specifically designed for these purposes are usually used.
Objectives
The objectives for this lab are:
- to test the A/D of the Arduino for proper operation
- to investigate the effects of the A/D conversion process
Equipment
- Arduino
- bench supply, oscilloscope, function generator
- breadboard, debugger board, resistors, capacitors
Task
NOTE: For the ADC, it would be better to use a zener diode circuit with a diode that is appropriate for the reference voltage. However, since the shield buttons are used to produce an analog voltage on A0 based on 5V, changing the reference voltage would mess up the switch operation on the shield.- Wire up a potentiometer between 0 and 3.3V, with the wiper connected to analog input A1 of the Arduino. (Remember A0 is used by the LCD shield.)
- Load the AnalogInSerial sketch to display the analog input value on the serial monitor.
-
Modify the sketch to display the analog
input value on
the LCD. Display both the digital value and the
corresponding analog input voltage.
Note: It will make you life easier in the future (as well as being good programming practice) to use a variable for the reference voltage rather than hard-coding it into your conversion formula.
Demonstrate your circuit to the lab supervisor.