COMP2121 - Analog Input and Output
What is pulse width modulation?
- A way of digitally encoding analog signal levels. - By changing the pulse width of the PWM waveform, we can control the output value
Describe noise errors.
- All signals have noise - Need to reduce noise or choose the converter resolution appropriately to control the peak-to-peak noise
What are some A/D converter specification?
- Conversion time - Resolution - Accuracy - Linearity - missing code - aperture time
Describe aliasing errors.
- Difficult to quantify - Depend on the relative amplitude of the signals at frequencies above/below the Nyquist frequency
What are some D/A converter specifications?
- Resolution: determined by the number of bits - Linearity: How close the output voltage is to the ideal values - Settling time: How quickly does the output voltage get to the right value
Describe aperture errors.
- Signal variation during the aperture time - Good design will attempt to have the uncertainty be less than a significant bit
What is the aperture time?
- The time the A/D converter is looking at the input signal. - It usually equals the conversion time
What is the Nyquist rate?
- Twice the maximum frequency of the signal - If the sampling frequency is less than the Nyquist rate, the waveform is said to be under-sampled.
How can PWM be conducted in AVR?
- Use timers that throw an interrupt at a specific clock time - At specific clock time, flip a bit on the output port
What A/D errors can occur?
1. Noise 2. Aliasing: 3. Aperture
In what ways can you get timer interrupts?
1. Overflow 2. Output compare register: When its equal to some output compare register
In what ways can you get digital to analog output?
1. PWM 2. D/A (digital-to-analog) conversion
Describe the A/D process.
1. Transducer 2. Conditioner 3. ADC 4. Processor
What is a 10% duty cycle?
90% on, 10% off
What is Digital-to-Analog Conversion?
A digital value is generated and converted into a continuous value
What is the ADC?
Analog to digital converter converts the analog to digital values.
What is a conditioner?
Converts the signal, filtering out frequencies, eliminating dangerous voltages, changing the amplification, etc.
What is a missing code?
Could be caused by an internal error.
Timer0 can be configured for PWM
FAST PWM MODE IS THE ONLY MODE YOU SHOULD NEED
How are higher and lower voltages denoted in PWM?
Higher voltages mean opening the signal for a longer time. Lower voltages mean opening the signal for a shorter time.
What is a transducer?
It converts a physical to an electrical signal, either in voltages or currents.
What is a successive approximation converter?
It determines the digital approximation of an analog signal by iteratively comparing a digital converted to analog signal to the analog signal.
What is accuracy?
Relation between the smallest signal and the actual signal
What is linearity?
The derivation in output codes from the real value.
What is Shannon's Sampling theorem?
The minimum sampling frequency must be twice the signal frequency
What is resolution?
The number of bits in the converter, or the smallest analog input signal for which the converter will produce a digital code.
How would you PWM in AVR?
Using Timer.
What is aliasing?
When a signal is undersampled and then converted back into a continuous time signal, it will exhibit unwanted components.
What is conversion time?
how fast can you convert from input to output