Digital Oscilloscope

PC Based Digital Oscilloscope


Specifications


• Single channel
• Input voltage range :-2.5 v to 2.5 v
• Bandwidth :120 Hz
• Output display on the PC screen





Introduction


Oscilloscopes are used to observe the change of an electrical signal over time, such that voltage and time describe a shape which is continuously graphed against a calibrated scale. The observed waveform can be analyzed for such properties as amplitude, frequency, rise time, time interval, distortion and others. Originally, calculation of these values required manually measuring the waveform against the scales built into the screen of the instrument.
In this project we have written a MATLAB program to display the signal waveform on a PC screen.

Block Diagram







Working Principle


We sample the input signal using Arduino's built in ADC to get digital readings. These digital readings are sen to PC through COM port where a MATLAB program plots their graph. This graph is merged with an image of oscilloscope grid which is calibrated for amplitude (on y-axis) and time (on x-axis). In this way a calibrated waveform is achieved.

Internal Structure of Digital Oscilloscope



Summing Amplifier


To be able to measure negative values we need to add a bias voltage to the input signal because Arduino cannot measure negative voltages. The designed circuit is a summing amplifier which adds 2.5 volts to the input signal so a -2.5 volts to 2.5 volts sine wave, will become a  0 to 5 volts sine wave after passing through this circuit. The 5.1V zener diode at the summing amplifier's output will protect the Arduino if the input signal goes beyond 5.1V. Any signal greater than 5.1V peak to peak will be clipped at 5.1 volts.
Below is the summing amplifier formula.






Arduino's Analog to Digital Converter


We sample the input signal using Arduino's built in ADC to get digital readings. The ADC of Arduino is very slow so we are not able to get a very high bandwidth out of it.

Serial Communication


The digital readings are sent to the the PC through serial COM port which are retrieved by a MATLAB program.


MATLAB Program


The recieved readings are plotted by MATLAB but the plot is not calibrated. The image of the plot is saved and fused with an image of calibrated grid. The fused image is shown on the screen which shows the amplitude and time axis. The frequency of the waveform can be calculated by counting the number of ticks on the time axis in one waveform, multiplying by 3.4 milliseconds and then taking the reciprocal of the answer. The amplitude can be seen directly at the amplitude axis.


Arduino Code


int val=0;
void setup()
{
Serial.begin(115200);
}

void loop() {
val = analogRead(A0); // read the input pin
Serial.print(val*0.0048828125-2.5);
Serial.print("\r");
}

Uses


Digital Oscilloscope has many applications in industry and academics. Some of the uses of oscilloscopes include:
1. Trouble shooting

2. Research and development

3. Product design


Video of Final Working Product



Index


 Digital, Oscilloscope, Sampling, Analog to Digital converter, Waveform, Frequency, Time Period, Aliasing, Frequency, Amplitude

References


1) http://www.instructables.com/id/Girino-Fast-Arduino-Oscilloscope/

2) http://www.mathworks.com/help/images/ref/imfuse.html

3) http://en.wikipedia.org/wiki/Oscilloscope

4) http://en.wikipedia.org/wiki/Analog-to-digital_converter

5) http://www.arduino.cc

6) http://www.electronics-tutorials.ws/diode/diode_7.html

7) https://www.princeton.edu/~achaney/tmve/wiki100k/docs/Zener_diode.html

Comments