Introduction: Oscilloscope Arduino-Processing

Picture of Oscilloscope Arduino-Processing

Oscilloscope is a device that allows us to see graphically the electrical signal.

If you want a cheap oscilloscope to learn what it is or to play with, follow the steps below:

Step 1: Have an Arduino Uno

Picture of Have an Arduino Uno

The price of Arduino Uno is around $ 20 in internet stores.

Step 2: Install the Arduino IDE and TimerOne.h Library

Picture of Install the Arduino IDE and TimerOne.h Library
  1. First, if you do not already have the Arduino IDE installed, install it from the site Arduino: click here
  2. Install the "TimerOne.h" library for the Arduino IDE, following the steps bellow
    • In the Arduino program click on "Sketch" (see the picture)
    • "Include Library ..."
    • "Manage Libraries ..."
    • On the line "Type: 'all' Topic: 'all'" has a blank search field , type "TimerOne".
    • (Information about the library will appear )
    • click over that text and the "Install" button will appear.
    • click "Install"
    • Restart the program

Step 3: Download Arduino Program and Upload It to Arduino

Picture of Download Arduino Program and Upload It to Arduino
  1. Download and unzip the Arduino program from this link: (oscilloscope_arduino.ino)
  2. Connect the Arduino to the computer via USB port
  3. Run the Arduino IDE;
  4. Open the downloaded program "oscilloscope_arduino.ino"
  5. Adjust the COM port correctly (see picture)
  6. Upload the program to Arduino.

Step 4: Download the Oscilloscope Processing Program

Picture of Download the Oscilloscope Processing Program
  1. Download and unzip the Processing program to run on the computer. Choose the correct one below:
  2. Execute the Processing file (ex: Windows 64 bits => oscilloscope_4ch.exe)
    • Obs: lib\ folder is important, do not delete it
    • Java 8 needs to be installed

Step 5: If Oscilloscope_4ch.exe Doesn't Work...

Picture of If Oscilloscope_4ch.exe Doesn't Work...

If oscilloscope_4ch.exe doesn't work for any reason:

  1. Install the Processing IDE.
  2. Download and unzip the Processing source oscilloscope program
  3. Run Processing IDE and open the oscilloscope source program
  4. Execute the program clicking on the triangle icon

Step 6: Configure Serial Port to Connect Oscilloscope Program With Arduino

Picture of Configure Serial Port to Connect Oscilloscope Program With Arduino
  1. You already have the oscilloscope program running and the Arduino connected to the computer by USB port. Now you have to connect to each other by "serial".
  2. In the "Configurar a serial" (Configure the Serial) box, click "select serial" until the COM where the Arduino is connected appears.(if it did not appear, click "refresh" to update)
  3. Click "select speed" until the speed 115200 appears.
  4. Click "off" to switch to "on"
  5. If everything is correct, the oscilloscope will show the 4 channels [A0 (ch-0), A1 (ch-1), A2 (ch-2) and A3 (ch-3)]
    obs: if nothing is connected you will see a noise.

Step 7: Connect the Output (~10) to Input (A0) and (~9) to (A1)

Picture of Connect the Output (~10) to Input (A0) and (~9) to (A1)
  • With wires connect the Arduino's digital output (~10) to analog input (A0) and digital output (~9) to input (A1).

You will see appear a signal like the picture.
The out (~9) and (~10) are generated by the "Ger.Sinal" box:
(~9) is PWM of 10Hz (T = 100ms) with 25% ON.
(~10) is a square of period 2T (200ms)

  • You can adjust the values on that box dragging the edge or clicking around the control.

Step 8: Tips

Picture of Tips
  1. Click "Trigger" at the Ch-0 (red) to stabilish the signals.
  2. To not read the signals of Ch-2 and Ch-3, click on the names "Ch-2" and Ch-3 ".
  3. To see the XY (Lissajous figures), click on the name "XYZ"
  4. To detect the frequencies, click on "detect freq."
  5. To measure voltage and time/frequency, click on "medir" (measure) of the desired channel then click on a point on the graph and drag to the other desired point.
  6. To change the dial control value click between vertical lines or drag the edge indicated by the triangles. (see picture)
  7. There is so much more! Explore!

Step 9: Aplication: Detecting Flash Frequency

Picture of Aplication: Detecting Flash Frequency

You can find out the frequency that the flashlight is blinking using a LDR and a resistor (see the picture)

Step 10: Application: Detecting RPM of Fan

Picture of Application: Detecting RPM of Fan

To find out the RPM of a fan use the circuit with LDR, resistor and a flashlight (not blinking).

Using the frequency value shown by the oscilloscope, apply the formula of the picture.

Step 11: Application: Analysing the Remote Control Signal

Picture of Application: Analysing the Remote Control Signal

You can see the IR signal from remote control using the phototransistor TIL78.

Make the circuit of the picture, then follow the steps bellow:

  1. Adjust "dt" to 2ms (see all signal) or 100us (see details)
  2. Turn ch-0 trigger ON
  3. Increase level of trigger tension
  4. Click "UMA" (one): oscilloscope will stay waitting for the signal
  5. Press any remote control key directing it to TIL-78
  6. Analyse the graphic

Step 12: Application: Testing Components or Devices

Picture of Application: Testing Components or Devices

We can use the oscilloscope to test electronic components or devices.

In this example we will test the little joystick for Arduino.

    1. Make the circuit shown in the picture.
    2. Connect the oscilloscope program to Arduino (configuring the Serial Port box)
    3. Click on "fluxo" (flow) so the Arduino sends each point right after reading.
    4. Adjust "dt" to 100ms to have a slow reading.
    5. Turn off the "ch-3" clicking over the name
    6. Adjust "v/div" to 5 (pressing the "shift" key to adjust all channels simultaneously)
    7. Change the ch-0 to up, moving the little left triangle (pressing the "shift" key)
    8. Turn on the XYZ channel and drag the "v/div", adjusting it to fill the free space.
    9. Move the joystick to all directions and press the button some times.
    10. See the curves.

    Step 13: Measure Resistors and Capacitors

    Picture of Measure Resistors and Capacitors

    The "medir res./cap." (measure res./cap.) box is for measuring values of resistors and capacitors, but it will only work if you make the circuit of the picture.

    That function has the hability to discover by itself if the component connected is a capacitor or a resistor, and to choose the better result using 3 scales (low, middle or high values)

    Step 14: Do You Want More Fun?

    Picture of Do You Want More Fun?

    You can download the entire project directly from the GitHub site clicking here

    Watch the video on Youtube (turn on closecaption and translate to english!)

    Please, let me know if you liked that project or if you had any trouble to follow the steps.

    I will apreciate any help to develop that project. Programmers, users, curious, dreammers, etc.., will be welcome! ;)


    SivasankarieS (author)2017-11-19

    hello there, my programme in processing can't be compiled. The error shown is in line 27: Com com;

    error: Cannot find a class or type names "Com"


    You have to have all files ".pde" into the folder "oscilloscope_4ch\"

    Download from the link

    The files are:












    In the Processing IDE open the file "oscilloscope_4ch.pde"

    You will see other tabs. One of them is the class "Com.pde"

    Let me know if work or not!

    dardoelectro (author)2017-11-09

    1.Hola le agradezco tanta dedicación y tan gran trabajo.

    Seria posible que diera especificaciones tecnicas, como por eejmplo ancho de banda, voltajes permitidos, y demas.


    RogerioBego (author)dardoelectro2017-11-09


    Oscilloscope Capabilities
    Monitor up to 4 voltage channels (0 to 5V).
    Can display frequencies up to 3kHz.
    Stabilizes the wave on the screen using a simple trigger.
    Identify the frequency of the wave using the best criterion (square or sinusoidal).
    Scales: volts / division and time / division adjusted individually for each channel.
    Tool to measure voltage and time in each channel.
    Combined display of channels in XYZ.
    PWM signal generator.
    Measure resistor or capacitor values on 3 scales (automatically)

    dardoelectro (author)RogerioBego2017-11-13

    Muchas Gracias por su respuesta.
    Quisiera hacerle otra consulta con respecto a la parate de X-Y.
    ES posible ver curvas de componentes si tener que agregar ningun circuito previo??

    RogerioBego made it! (author)dardoelectro2017-11-16

    To view component curves:
    It is necessary to use a circuit to generate a sine wave or sawtooth.
    This signal will be used on the component being tested and will also enter the X channel.
    series with the component we must put a small resistor to get a value
    proportional to the current that passes in the component, and we use
    that signal in channel Y.
    The Arduino Due
    already has a DAC (Digital Analog Converter) that can be used as a
    Signal Generator, in addition to the clock rate of 84MHz (Arduino Uno is
    16MHz). But the I / O ports are 3.3V.

    alexandre_willame (author)2017-11-01

    Amazing work, thank you so much for sharing! It is extremely useful for Hobbyist who want to get an oscilloscope with just an Arduino!

    DmitriyK10 (author)2017-10-10

    Good project!

    How to messure negative signals and continuous positiv-negative signals?

    RogerioBego (author)DmitriyK102017-10-12

    In theory, I
    think we can shift the negative signal to positive (2.5V will be the
    0V) and limiting the peak-to-peak voltage to 5V using resistors (voltage
    I put a 5V zenner diode as protection at the Arduino's input.
    We need change the program to show the correct values.

    I have to test that!

    obs: be careful when using high voltage! ;)

    EkoS48 (author)2017-10-05

    Thank you for sharing. Great job!.

    raulb32 (author)2017-05-31

    tanks... great job!!!

    Swansong (author)2017-05-02

    Thanks for sharing :)

    About This Instructable




    More by RogerioBego:Oscilloscope Arduino-Processing
    Add instructable to: