Skip to content

OLED AC Voltmeter Arduino

OLED AC Voltmeter Arduino Project | 5-Step DIY Electronics Guide

This OLED AC Voltmeter Arduino Project is a practical DIY electronics build that measures AC voltage and displays it on an OLED screen. The OLED AC Voltmeter Arduino Project uses Arduino Nano, LM358 IC, and resistors for accurate scaling. Anyone can follow this OLED AC Voltmeter Arduino Project with circuit diagram, step-by-step guide, and coding instructions.


Introduction

Measuring AC voltage is a core requirement in electrical and electronics work. While commercial digital voltmeters are common, building your own not only deepens understanding but also gives flexibility in customization.

This OLED AC Voltmeter Arduino Project allows you to measure AC mains voltage safely and display the readings on a bright OLED display. The heart of this project is an Arduino Nano, which processes the scaled signal from an LM358 op-amp circuit. The resistive divider and filter network ensure the voltage fed to Arduino is within its ADC input range.

By completing this project, you will:

lm358 pinout

  • Learn how AC voltage scaling circuits work.

  • Interface an LM358 with Arduino for analog signal processing.

  • Use an OLED display for clear, real-time readings.

  • Build a compact, DIY AC voltmeter suitable for lab or home use.


 Materials for the Project (OLED AC Voltmeter)

ComponentQuantityDescriptionBuy Link
Arduino Nano1Microcontroller boardBuy Link
OLED Display (0.96″ I2C)1For displaying voltageBuy Link
LM358 IC1Dual Op-Amp for scalingBuy Link
2.2kΩ Resistor1Voltage divider resistorBuy Link
4.7kΩ Resistor1Voltage divider resistorBuy Link
10kΩ Resistor1Feedback & dividerBuy Link
470kΩ Resistors6High value divider networkBuy Link
2-Pin Terminal Block2For AC input & connectionsBuy Link
Perf Board1Prototyping boardBuy Link
Jumper WiresAs neededFor connectionsBuy Link

 


Useful Tools 

ToolQuantityPurpose / NotesClick & Buy
Soldering Iron Kit1For making permanent connectionsClick & Buy
Solder Wire (60/40, 0.8mm)1Electrical solderingClick & Buy
Wire Stripper & Cutter1Stripping jumper wiresClick & Buy
Mini Screwdriver Set1For module and relay terminal screwsClick & Buy
Multimeter1Testing voltages and continuityClick & Buy
Hot Glue Gun (optional)1Securing components in placeClick & Buy
Small Pliers1Holding and bending wiresClick & Buy
Heat Shrink Tubing Set1Insulating exposed wiresClick & Buy

Download Circuit Diagram 

OLED AC Voltmeter Arduino Circuit Diagram


Circuit Diagram & Explanation

The circuit can be broken down into three main sections:

1. AC Voltage Scaling Network

  • AC mains voltage (110V/220V depending on your region) is reduced using a resistive divider made with 470kΩ resistors in series.

  • This brings the high AC down to a safer low level suitable for the LM358 op-amp input.

2. Signal Conditioning (LM358)

  • The LM358 is used to buffer and scale the voltage.

  • Since Arduino can only read positive voltages (0–5V), the op-amp ensures the scaled signal stays within the ADC range.

  • Filtering capacitors (optional) can smooth noise for stable readings.

3. Arduino & OLED Display

  • Arduino Nano reads the scaled AC waveform using its ADC pins.

  • The RMS value is calculated in software.

  • The final voltage value is displayed on the OLED screen using I2C communication.

⚠️ Safety Note: The AC input is directly connected through resistors. Handle with care, keep connections insulated, and avoid touching live wires during operation. For higher safety, an isolated transformer can be added.


Step-by-Step Guide to Building the OLED AC Voltmeter Arduino Project

Step 1: Gather Components

Collect all parts listed in the BOM. Double-check resistor values with a multimeter to avoid scaling errors.

Step 2: Assemble the Voltage Divider

  • Connect six 470kΩ resistors in series.

  • Add the 2.2kΩ and 4.7kΩ resistors to fine-tune scaling.

  • Connect the divider output to the input of the LM358 op-amp.

Step 3: Wire the LM358

  • Use the LM358 in a buffer/amplifier configuration.

  • Ensure the op-amp output does not exceed 5V peak.

  • Connect the op-amp output to A0 pin of Arduino Nano.

Step 4: Connect the OLED Display

  • Connect SDA → A4 and SCL → A5 on Arduino Nano.

  • VCC → 5V, GND → GND.

Step 5: Upload the Arduino Code

  • Use Arduino IDE.

  • Install the Adafruit SSD1306 and GFX libraries for OLED.

  • Upload code that reads AC voltage, calculates RMS, and displays the result.

Arduino Code   


Applications

  • DIY lab instruments.

  • Household voltage monitoring.

  • Educational projects for learning about AC measurement.

  • Integration with IoT (logging data online with ESP8266/ESP32).


FAQs

Q1. Can I use a different op-amp instead of LM358?
Yes, but ensure it can handle single-supply operation and input range down to ground.

Q2. Is this project safe for direct mains connection?
With proper resistor scaling and insulation, it works. For extra safety, use a small isolation transformer.

Q3. Can I display voltage in larger fonts?
Yes, adjust the OLED library text size function (setTextSize()).

Q4. How accurate is this voltmeter?
Accuracy depends on resistor tolerances, op-amp offset, and calibration. Typically ±2–3%.

Q5. Can I expand this to measure current and power too?
Yes, by adding a current sensor like ACS712 and modifying code.

Leave a Reply

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