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 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

Arduino Oscilloscope 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.

PCB Design

For removing messy wiring and give a clean look, I designed a PCB prototype for this project. It is also helpful for troubleshooting that runs great without any errors. To design this PCB board, I used EasyEDA as it is too easy to use. For ordering PCB for this, I prefer PCBWay.

Gerber file for Arduino Oscilloscope Gerber.

You can view the Gerber file from here Gerber File Viewer.

PCB View

Arduino Oscilloscope 2D View
2D View
Arduino Oscilloscope 3D View
3D View

Order PCB From PCBWay

There are so many forums or communities for electronics online in today’s technical world, and one of the famous ones for PCB manufacturing is the PCBWay. PCBWay is a place that brings manufacturers and customers together. They have more than a decade of experience in this field of fabrication, prototyping and assembling PCBs. PCBWay have proved their focus to their customers’ needs in terms of cost-effectiveness, delivery, and quality.

How PCB Manufacturing Process Done in PCBWay

Standard quality for any product needs to be maintained using some parameters. PCBWay gives that opportunity by quality control in designing and manufacturing. At first, they ensure accuracy, clarity, validity of the PCB files that we sent to them.

Then all the boards will go through the most stringent tests other than the basic visual check. They adopt most of the testing and inspecting equipment used in the industry, such as Flying Probe Tester, X-Ray Inspection Machine, Automated Optical Inspection (AOI) Machine. PCBWay are having 50+ new engineers on the daily basis around the world using PCBs for their work, who trust for their reliable quality. They produce high-quality pink, orange, grey, even transparent solder mask. Moreover, according to people’s needs, they can also provide Black core PCB. Check it out for a High-Quality PCB solder mask. There are some pictures below of the new colours of solder musks.

Features of PCBWay

PCB Prototyping & Manufacturing: PCBWay produces FR-4 and Aluminum boards and advanced PCBs like Rogers, HDI, Flexible and Rigid-Flex boards, at a very reasonable price. Just check this Instant Quote to order premium PCBs for your hobby projects.

PCB Assembly: It not only offers PCB Prototyping but also offers PCB Assembly service. You can order a full PCB board with attached components by uploading your file. SMT & THT assembly starts from only 30$ including free stencil and worldwide shipping. The components can be sourced and provided by PCBWay, or by clients themselves.

Open Source Community: It not only offers PCB Prototype & Assembly service but also gives opportunities to students for sponsorships. I think this is so great. They feature their projects on the website also.

3D Printing & CNC: It also produces Rapid Prototyping like 3D printing, CNC Machining, Sheet Metal Fabrication, and Injection Molding. The quality of the product is too premium and reliable. And also the best part is that you will receive your order within a minimum of 3 days.

PCBWay Store: More boutique gift modules are waiting for you to discover, giving your creativity wings. You can order all types of electronic equipment, components and many more with exciting offers. Go with the link and buy your needs, PCBWay Store.

Services: PCBWay offers great servicing of their products. It takes only 3 to 15 days according to courier service to deliver your products. Also, it has a live support facility. Whenever you have any problems, you can always reach a live customer service person to respond to your emails or messages. They have the “Return and Refund” principle, for every unusable board caused by PCBWay, they will rebuild and refund the order soon.

Guide for Ordering PCB From PCBWay

Working Principle of Arduino Oscilloscope

The working 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 button 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.

Leave a Comment