How To Build An Arduino Oscilloscope Using OLED Display

An oscilloscope is an electronic measuring instrument that has the ability to graphically represents the steady change of any electrical voltage in a 2-dimensional form. The change of one or more electric voltages is placed on the vertical Y-axis with respect to time. This is a daily need for all electronic hobbyists and professionals dealing with electronics as well as too costly. In this article, we will reduce this problem by making an Arduino oscilloscope at home which is cost-effective and easily affordable for students and small hobbyists.

To build such an instrument, we need an Arduino, a 1.3″ OLED display and some other components that can be used here to determine the waveforms accurately. This project is inspired by Peter Balch’s Oscilloscope in a Matchbox project. According to our requirements, we have changed some codes and hardware.

Must Read Arduino Electronic Component Tester

Circuit Diagram

Components Required

  • Arduino Nano
  • LM358 Op-Amp (x2)
  • 270KΩ Resister (x3)
  • 1KΩ Resister
  • 1MΩ Resister (x2)
  • 4.7KΩ Resister (x3)
  • 100KΩ Potentiometer
  • 100nF Capacitor (x2)
  • 0.1uF Capacitor (x2)
  • OLED Display
  • Push Switch (x2)
  • 5 Volt Power Supply

Circuit Connection

The circuit diagram for making this Arduino Oscilloscope is very simple and requires fewer components. The main part of the diagram consists of a single op-amp chip i.e., LM358 ic. If we put AC signal as an input and we do not have split rail construction, there are two op-amps i.e., used to make the signal ac coupled. Both the op-amps are given a reference voltage that is used to offset the signal and using analog inputs it is plotted on the graph. The offset can be varied using the potentiometer. Both the op-amps are set with the same negative feedback with a 5x gain setting.

Now come to the OLED connection part. The OLED display is connected over the serial communication pin A4 and A5 which are SCL and SDA pins. The buttons are used here to set the parameters of the Arduino Oscilloscope. We have built the complete project using Veroboard.

Working Principle of Arduino Oscilloscope

The work of this project is a little bit complex. I use an OLED display to show the waveforms. We connect the input SG with a laptop. From the audio channel of the laptop, we get our required signal. If you have a signal generator then you can use it.

At first, we power on the circuit. Then send signals by using an online tone generator. Now we can see the waveforms are visible in our OLED display. We can increase or decrease the amplitude by pressing the positive or negative buttons from the keyboard.

We can control the time duration and volume by pressing these push buttons. This project is a single channel input but you can add multiple channels from the configuration.

Arduino Code for Arduino Oscilloscope

To compile the code we need some libraries; wire.h, limits.h, Adafruit_SH1106, math.h.

Post a Comment

Previous Post Next Post