Build Your Own Arduino Nano Based DIY Oscilloscope With OLED Display – Complete Guide

by Jhuman in Circuits > Arduino

98 Views, 1 Favorites, 0 Comments

Build Your Own Arduino Nano Based DIY Oscilloscope With OLED Display – Complete Guide

Pocket Size Oscilloscope 2.jpg
Pocket Size Oscilloscope 2.jpg

Are you an electronics hobbyist looking to build a compact and functional oscilloscope on a budget? This guide walks you through creating your own Arduino Nano-based oscilloscope with an SH1106 OLED display. Using basic components and open-source code, this project helps you visualize waveforms and measure frequency, voltage, and duty cycle.

Whether you're a beginner or an advanced maker, this project is both educational and practical.

Supplies

Hardware Required

  1. Arduino Nano
  2. SH1106 128x64 I2C OLED display
  3. Tactile push buttons (4 for SELECT, UP, DOWN, HOLD)
  4. Voltage divider resistors
  5. Schottky diode
  6. Capacitor (104)
  7. Breadboard or custom PCB
  8. Jumper wires
  9. Power supply (5V regulated)

Circuit Diagram Overview

20200423SchemOfPMO.png

The circuit connects the signal input through a voltage divider and optional attenuator into the Arduino Nano's analog input pin A0. The I2C OLED display connects to A4 (SDA) and A5 (SCL). Push buttons use diodes to combine input signals and are connected to digital pin D2 for interrupt-based operation.

For signal safety and accuracy, a Schottky diode prevents overvoltage, and resistors scale the input voltage properly.

Features of the Arduino Oscilloscope

Compact design based on Arduino Nano

OLED Display (SH1106) for real-time waveform visualization

Vertical and horizontal scaling (0.2V–50V, 200µs–200ms)

Frequency and Duty Cycle calculation

EEPROM storage of last settings

Trigger polarity detection

Hold function to freeze waveform

Selectable input attenuation (x1, x10)

PCB Layout and 3D Model

5556.png

Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB!Register to get $70 New customer coupons:https://jlcpcb.com/?from=EST Special Deal: Get a $30 coupon for JLCPCB premium 6-layer PCBs: https://jlcpcb.com/6-layer-pcb?from=getcoupon

The PCB is compact and integrates:

  1. An Arduino Nano socket
  2. SH1106 OLED display
  3. Four push buttons
  4. Voltage divider and attenuator circuits
  5. Power terminal and decoupling components

This layout allows for clean assembly and easy usage in a handheld device or benchtop tool.

Arduino Oscilloscope Code

The core functionality is driven by a sophisticated yet compact Arduino sketch. The key features of the code include:

  1. Waveform Acquisition: Captures 200 samples per screen refresh.
  2. Frequency Analysis: Calculates waveform frequency and duty cycle.
  3. EEPROM: Saves settings (voltage scale, time base, trigger polarity).
  4. User Interface: Buttons allow cycling through settings. OLED displays real-time data.
  5. Trigger Detection: Positive or negative edge trigger modes.
  6. Battery Voltage Mode: Pressing a button at boot displays the battery voltage.
📄 The full code is open-source and based on the work by radiopench (2020), adapted for SH1106 OLED using the Adafruit_SH1106 library.


Downloads

How to Upload the Code

Connect your Arduino Nano to your computer via USB.

Install the required libraries:

  1. Adafruit GFX
  2. Adafruit SH1106

Open the code in the Arduino IDE.

Select Board: Arduino Nano and correct COM port.

Click Upload.

Operation Guide

  1. SELECT: Cycles through control options (Vertical Scale → Time Base → Trigger).
  2. UP/DOWN: Adjusts current selected parameter.
  3. HOLD: Freezes or resumes the waveform display.
  4. Auto Save: Settings are saved 5 seconds after the last button press.
💡 On startup, press UP or DOWN to enter voltmeter mode (5V or 50V range).


Applications

  1. Signal visualization
  2. Frequency measurement
  3. Debugging small electronics circuits
  4. Educational tool for learning about waveforms


Video Reference

মিনি অসিলোস্কোপ তৈরি শিখুন | DIY Oscilloscope Making - EST Experiments

Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB!Register to get $70 New customer coupons:https://jlcpcb.com/?from=EST Special Deal: Get a $30 coupon for JLCPCB premium 6-layer PCBs: https://jlcpcb.com/6-layer-pcb?from=getcoupon

Conclusion

Creating your own Arduino-based oscilloscope is not just cost-effective but incredibly rewarding. It blends hardware design, firmware development, and real-world signal analysis. With just a few components and a bit of soldering, you can own a pocket-sized oscilloscope for your bench.