Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Display Modules & Screens

DIY Oscilloscope Display: DS0138 with STM32 & OLED

DIY Oscilloscope Display: DS0138 with STM32 & OLED

March 11, 2026 /Posted byJayesh Jain / 0

Building a DIY oscilloscope with STM32 and an OLED display is one of the most rewarding weekend projects for any electronics hobbyist in India. Whether you are debugging PWM signals, checking sensor outputs, or learning about waveforms for the first time, a pocket oscilloscope built around the DS0138 kit and an OLED screen gives you a real lab instrument at a fraction of the cost of commercial units. In this guide, we walk through every step — from understanding the DS0138 kit to upgrading it with an STM32 microcontroller and a crisp OLED panel.

Table of Contents

  1. What Is the DS0138 Oscilloscope Kit?
  2. Why Upgrade to STM32 and OLED?
  3. Components You Will Need
  4. Wiring and Assembly Guide
  5. Firmware Setup and Code
  6. Calibration and Testing
  7. Real-World Use Cases for Indian Makers
  8. Frequently Asked Questions

What Is the DS0138 Oscilloscope Kit?

The DS0138 is a popular single-channel digital oscilloscope kit sold as a DIY build. It is based on the STM32F103C8T6 ARM Cortex-M3 microcontroller and originally ships with a 2.4-inch TFT color display. The kit has a maximum sampling rate of 1 Msps and a bandwidth of around 200 kHz — more than enough for audio circuits, PWM motor control, I2C/SPI bus debugging, and general hobby electronics work.

In India, the DS0138 kit is extremely popular because it costs under ₹600-800 fully assembled, making it accessible to students and hobbyists who cannot afford a bench oscilloscope. The kit comes with BNC input, a test probe, and basic trigger controls. However, the stock TFT display is power-hungry and relatively dim. That is where the OLED upgrade becomes interesting.

Key specifications of the DS0138:

  • MCU: STM32F103C8T6 (72 MHz, 64KB flash, 20KB RAM)
  • Max sample rate: 1 Msps (analogue input)
  • Bandwidth: ~200 kHz
  • Input impedance: 1 MΩ
  • Input voltage range: 0–30V with probe attenuation
  • Display: 2.4″ TFT (320×240) — upgradeable to OLED

Why Upgrade to STM32 and OLED?

The stock DS0138 firmware runs on the STM32 already. The upgrade we are talking about is replacing the power-hungry TFT display with a 0.96″ or 1.3″ OLED module (SSD1306 or SH1106 driver). Here is why this matters:

  • Power consumption: A 0.96″ OLED draws as little as 8–20 mA versus the TFT backlight pulling 60–80 mA. This matters enormously if you run the scope off a USB power bank.
  • Contrast and readability: OLED pixels are self-emissive. In a dimly lit lab or outdoors in India’s bright sunlight (with a shade), the contrast is far superior to backlit TFT.
  • Size and portability: You can build the entire scope into an Altoids tin or a compact 3D-printed case with an OLED display instead of the larger TFT.
  • Learning value: Rewriting or adapting the display driver in STM32 firmware is an excellent exercise in SPI/I2C peripheral programming using the STM32 HAL or bare-metal registers.

For a more advanced upgrade, some makers use a 1.54″ or 2.42″ larger OLED (SSD1309, 128×64) which gives the same resolution headroom as the original TFT but with far less current draw.

Components You Will Need

Here is a complete bill of materials for the DS0138 + OLED oscilloscope project:

  • DS0138 oscilloscope kit (assembled or kit form)
  • 0.96″ SSD1306 OLED module (128×64, I2C) — or 1.3″ SH1106 for larger view
  • STM32F103C8T6 Blue Pill board (if building from scratch)
  • 10:1 oscilloscope probe with BNC connector
  • USB to TTL programmer (ST-Link V2 or CH340G) for firmware flashing
  • Breadboard, jumper wires, 100nF bypass capacitors
  • Optional: LM35 or DHT20 sensor for live waveform testing
  • Optional: ACS712 current sensor module for power analysis

Most of these are available on Zbotic, making it a one-stop shop for your build. The sensors below are great for generating test signals to verify your scope is working correctly after assembly.

LM35 Temperature Sensors

LM35 Temperature Sensors

The LM35 outputs a clean analogue voltage proportional to temperature — a perfect test signal for checking your DIY oscilloscope’s analogue input and waveform rendering.

View on Zbotic

DHT11 Digital Relative Humidity and Temperature Sensor Module

DHT11 Digital Relative Humidity and Temperature Sensor Module

Use the DHT11’s single-wire digital output to test your oscilloscope’s digital signal capture — its 40-bit serial protocol is a great exercise for trigger and time-base settings.

View on Zbotic

30A Range Current Sensor Module ACS712

30A Range Current Sensor Module ACS712

The ACS712 outputs an analogue voltage corresponding to current flow — ideal for power monitoring projects where you want to visualise current waveforms on your DIY scope.

View on Zbotic

Wiring and Assembly Guide

If you are using the DS0138 kit with its original STM32 board and replacing the TFT with an OLED, follow these steps:

Step 1: Desolder the TFT Header

The DS0138 TFT connects via an 8-pin or 10-pin header to the main board. Carefully desolder or disconnect this header. The TFT uses an SPI interface on the STM32 (SPI1: PA5=SCK, PA7=MOSI, PA4=CS, PB0=DC, PB1=RST).

Step 2: Connect the OLED

For a 128×64 SSD1306 OLED on I2C:

  • OLED VCC → 3.3V
  • OLED GND → GND
  • OLED SCL → PB6 (I2C1 SCL on STM32)
  • OLED SDA → PB7 (I2C1 SDA on STM32)

If you prefer SPI OLED (faster refresh), wire to the same SPI pins as the original TFT but adapt the CS/DC/RST lines.

Step 3: Modify the Firmware

The DS0138 firmware is open source (available on GitHub under JYE-Tech). You need to replace the TFT driver calls with SSD1306 I2C driver calls. Key libraries for STM32 HAL: ssd1306.h from afiskon or stm32-ssd1306 repository.

Step 4: Flash with ST-Link

Use STM32CubeProgrammer or OpenOCD with your ST-Link V2 to flash the modified firmware. Connect SWDIO, SWCLK, 3.3V, and GND from the ST-Link to the STM32 header pads on the DS0138 board.

Firmware Setup and Code

The key change in firmware is replacing the display driver. Here is a minimal snippet showing how to initialise the SSD1306 and draw a waveform line using the STM32 HAL:

#include "ssd1306.h"

void display_init(void) {
  ssd1306_Init();
  ssd1306_Fill(Black);
  ssd1306_SetCursor(0, 0);
  ssd1306_WriteString("DIY Scope v1.0", Font_7x10, White);
  ssd1306_UpdateScreen();
}

void draw_waveform(uint8_t *samples, uint16_t count) {
  ssd1306_Fill(Black);
  for (uint16_t i = 1; i < count && i < 127; i++) {
    ssd1306_DrawLine(i-1, 63 - (samples[i-1] >> 2),
                     i,   63 - (samples[i]   >> 2), White);
  }
  ssd1306_UpdateScreen();
}

The full firmware needs to handle ADC DMA transfers, trigger detection, time-base scaling, and voltage calibration. The JYE-Tech source is the best starting point — fork it and swap out the display layer.

For beginners building from scratch on a Blue Pill, the STM32duino framework (Arduino IDE compatible) is an easier entry point. You can use the Adafruit SSD1306 library and write a simpler scope sketch that reads ADC pin PA0 at high speed and plots the samples on the OLED.

Calibration and Testing

Once assembled, calibration is critical for accurate measurements:

  1. Zero offset: With the probe tip grounded, adjust the vertical position potentiometer until the flat line sits at mid-screen.
  2. Voltage scale: Apply a known DC voltage (e.g., 3.3V from a regulator) and verify the scope reads within ±5%.
  3. Time-base: Use the test signal output (usually a 1 kHz square wave on the kit) to verify the time-base. Count grid squares and confirm the period matches 1 ms.
  4. Trigger test: Connect a DHT11 data pin and set trigger to rising edge. You should see the DHT11 start pulse cleanly on the OLED.
  5. Bandwidth test: Feed a 100 kHz square wave from an Arduino (using PWM or Timer output). Verify the waveform is still recognisable (it will round off but should be visible).

In India, temperature fluctuations can cause voltage reference drift. Use a 10nF ceramic capacitor across the ADC reference pin (VREF+) to GND to reduce noise.

Real-World Use Cases for Indian Makers

Your DIY oscilloscope + OLED becomes incredibly useful once you start debugging real projects:

  • Motor control: Visualise PWM signals from ESCs or motor drivers. Check frequency and duty cycle without a multimeter’s limitations.
  • Audio circuits: See sine waves from audio oscillators or amplifier outputs. Debug guitar pedal circuits.
  • Sensor debugging: Probe SPI/I2C bus lines to see if your BME280 or INA219 is communicating correctly.
  • Power supply ripple: Measure ripple on a 5V or 12V supply using AC coupling mode.
  • RF detection: While bandwidth-limited, you can see carrier envelopes from IR remotes or 433 MHz modules.

In Indian workshops and college labs where bench oscilloscopes are shared or unavailable, having your own pocket scope changes how you debug. Pair it with the BMP280 or INA219 for environmental and power projects.

CJMCU-219 INA219 I2C Bi-directional Current Power Monitoring Module

CJMCU-219 INA219 I2C Bi-directional Current/Power Monitoring Module

Monitor current and power in real time. Use alongside your DIY oscilloscope to cross-verify waveform measurements with digital readings over I2C.

View on Zbotic

BMP280 Barometric Pressure and Altitude Sensor I2C/SPI Module

BMP280 Barometric Pressure and Altitude Sensor I2C/SPI Module

Combine with your STM32 oscilloscope project — use the BMP280’s SPI/I2C signals as a live test input while learning to read digital protocols on the scope.

View on Zbotic

Frequently Asked Questions

Can the DS0138 measure signals above 200 kHz?

Not reliably. The DS0138’s analogue front end and STM32 ADC limit usable bandwidth to around 150–200 kHz. Above that, the waveform rolls off significantly. For higher frequencies you would need a dedicated analogue IC like the AD8065 or a faster ADC chip.

Which OLED is best for this project — SSD1306 or SH1106?

Both work well. The SSD1306 is I2C-native and easier to wire; the SH1106 supports both I2C and SPI and has a slightly different internal mapping. For screen size under 1.3″, use SSD1306 I2C. For 1.3″ modules, SH1106 SPI gives faster refresh which matters for oscilloscope sweep speed.

Do I need STM32CubeIDE for this project?

Not necessarily. You can use the Arduino IDE with the STM32duino core for a simpler approach. STM32CubeIDE with HAL is recommended if you want to modify the original DS0138 firmware for maximum performance.

Is there a risk of damaging the STM32 with high voltages?

Yes. The STM32F103 ADC input is only rated to 3.6V. The DS0138 has a front-end attenuator for this reason. Never connect a probe directly to mains or high-voltage circuits without proper probe attenuation and isolation.

Where can I buy DS0138 components in India?

The DS0138 kit is widely available on Indian e-commerce platforms. Sensors, current monitors, and STM32 accessories are available at Zbotic with fast delivery across India.

Ready to Build Your DIY Oscilloscope?

Get all the sensors and modules you need for your STM32 + OLED oscilloscope project from Zbotic — India’s trusted electronics components store with fast shipping.

Shop Display Modules at Zbotic

Tags: Display Modules, DIY oscilloscope, DS0138, electronics project India, STM32 OLED
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Automated Agriculture Robot: S...
blog automated agriculture robot seed planting on arduino track 597527
blog stepper motor cnc engraver build a desktop laser engraver 597530
Stepper Motor CNC Engraver: Bu...

Related posts

Svg%3E
Read more

Multi-Display Sync: Run Same Content on Multiple Screens

April 1, 2026 0
Table of Contents When You Need Multiple Synchronised Displays Communication Protocols for Display Sync I2C Multi-Display Architecture SPI Daisy-Chain Approach... Continue reading
Svg%3E
Read more

Display Brightness Control: Ambient Light Auto-Adjust

April 1, 2026 0
Table of Contents Why Auto-Brightness Matters Light Sensors: LDR, BH1750, TSL2561 PWM Brightness Control Basics Implementing Auto-Brightness for OLED Auto-Brightness... Continue reading
Svg%3E
Read more

LCD Menu System: Multi-Level Navigation with Encoder

April 1, 2026 0
Table of Contents Why Build a Menu System Hardware: LCD + Rotary Encoder Menu Architecture Design Implementing the Menu Engine... Continue reading
Svg%3E
Read more

LED Running Text: Single Line Scrolling Marquee

April 1, 2026 0
Table of Contents Applications for Scrolling Marquee Displays Hardware Options: Dot Matrix vs LED Panel Building with MAX7219 Cascaded Modules... Continue reading
Svg%3E
Read more

Prayer Time Display: Mosque and Temple Timer India

April 1, 2026 0
Table of Contents The Need for Automated Prayer Time Displays Calculating Prayer Times Programmatically Display Options for Places of Worship... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now