• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Arduino Projects / Making a Single Channel Oscilloscope using Arduino

Making a Single Channel Oscilloscope using Arduino

Last Updated on December 5, 2024 by Swagatam 24 Comments

In this interesting post, we are going to make a simple single channel oscilloscope using Arduino and a personal computer, where the waveforms will be showcased on the PC’s display and frequency and time period of the input waves will be displayed on the 16 x 2 display.

Table of Contents
  •  Introduction
  • Illustration of LCD to Arduino connection:
  • Author’s prototype:

 Introduction

Every electronics enthusiast once said “I have a dream, one day I will purchase an oscilloscope” but, it is still dream of many to own a decent oscilloscope for their projects and experiments.

The oscilloscope being expensive equipment even for an entry level model, we consider them as a luxury electronics tool and we might bring our experiments and projects to halt because we can’t afford one.

This project might be a game changer for many, electronics enthusiasts no need to spend tons of money for an oscilloscope to measure basic parameters of a wave.

The proposed idea has very limited functionality so don’t expect the features on a high end oscilloscope to be present in this project. We get three solid functionalities from this project:

1) visual representation of waveform on computer’s screen

2) frequency measurement of the input wave

3) Time period measurement of input wave in microseconds.

The frequency and time period of the signal will be showcased on 16 x 2 LCD display. There are two methods for visually representing the waveform on the computer screen which will be described in later part of the article.

Now let’s dive into technical part of the setup.

The proposed setup consists of arduino which is the brain our project as usual, a 16 x 2 LCD display, IC 7404, 10K potentiometer and a computer preferably a windows machine.

The arduino is brain of the setup and we must choose Arduino UNO or Arduino mega or Arduino nano for this project since other models doesn’t have built-in USB to serial converter which is essential for communicating between Arduino and computer.

If we choose other models of arduino board we need external USB to serial converter which might complicate the project.

Illustration of LCD to Arduino connection:

Single Channel Oscilloscope LCD Display

The above circuit is self-explanatory. We can find similar connection between the display and arduino on other LCD based projects.

The 10K potentiometer is used to adjust the contrast of the 16 x 2 LCD display which must be set by the user for optimum view.

Single Channel Oscilloscope using Arduino

The function of IC 7404 is to eliminate any noise signal from the input and fed to frequency sampling pin A0. The IC 7404 only outputs rectangular waves which is a great advantage for arduino, since arduino is more capable of processing digital signal than analogue signals.

Program: 

//-----Program Developed by R.Girish-----//
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int X;
int Y;
float Time;
float frequency;
const int Freqinput = A0;
const int oscInput = A1;
int Switch = A2;
const int test = 9;
void setup()
{
Serial.begin(9600);
lcd.begin(16,2);
pinMode(Switch,INPUT);
pinMode(Freqinput,INPUT);
pinMode(oscInput,INPUT);
pinMode(test, OUTPUT);
analogWrite(test,127);
lcd.setCursor(0,0);
lcd.print("Press the button");
}
void loop()
{
if(digitalRead(Switch)==HIGH)
{
lcd.clear();
lcd.setCursor(0,0);
X = pulseIn(Freqinput,HIGH);
Y = pulseIn(Freqinput,LOW);
Time = X+Y;
frequency = 1000000/Time;
if(frequency<=0)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("F=");
lcd.print("0.00 Hz");
lcd.setCursor(0,1);
lcd.print("T=");
lcd.print("0.00 us");
}
else
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("F=");
lcd.print(frequency);
lcd.print("Hz");
lcd.setCursor(0,1);
lcd.print("T=");
lcd.print(Time);
lcd.print(" us");
delay(500);
}
}
else
{
Serial.println(analogRead(oscInput));
}
}
//-----Program Developed by R.Girish-----//

Once you completed the hardware part and uploaded the above code. It’s time to plot waveform on the computer screen. This can done in two ways, the easiest and laziest way is described below.

Method 1:

•    Connect the input wire to pin #9 of arduino (Test mode).
•    Open the Arduino IDE (it must be 1.6.6 or above versions)
•    Go to “tools” tab and select serial plotter

As soon as the serial plotter opens you can see the rectangular wave which is generated from arduino’s pin #9, illustrated below.

rectangular wave which is generated from arduino’s pin #9

Press the push button to show the readings and also for refreshing the readings the LCD display, it must show around 490Hz on “test mode”.

Schematic of test mode:

TEST2BFreq2Boscil2Binput2B 1

The test mode is to check proper functioning of the oscilloscope. The pin #9 is programed to give 490Hz output.

Method 2:

This method is relatively easy but we need to download software from the given link:

http://www.x-io.co.uk/downloads/Serial-Oscilloscope-v1.5.zip

This software will give us little more control and features compare to arduino’s serial plotter. We can zoom in and out of the generated waveform; we can set trigger functionality, offset control over vertical and horizontal axis etc.

•    Download the software and extract.

•    Now double click on the Serial Oscilloscope application.

arduino’s serial plotter

•    A window will pop-up as illustrated below and select baud rate to 9600.

select baud rate to 9600.

•    Now select “Serial port” tab and select the right COM port which can vary computer to computer. If you select the correct COM port, you can see readings as illustrated below.

3 2

•    Now select “oscilloscope” tab and select “channels 1, 2 and 3” (first option).

Now select “oscilloscope” tab and select “channels 1, 2 and 3” (first option).
Waveform from single channel Oscilloscope Using Arduino

•    You can see the generated test signal from Arduino as illustrated below.

As you can see there are some control buttons on the software by which you can analyze the waveform better.

NOTE: 

The proposed setup has one major disadvantage:

The Arduino cannot show input waveform on computer screen and frequency/time period reading on LCD display simultaneously. To overcome this issue a push button is provided for reading/refresh the frequency and time period on the LCD display.

Once you press the button it will show the frequency and time period on LCD display at the same time waveform will freeze on the computer screen as long as you keep pressing the push button.

You may also consider this as an advantage since you can stop the frequency on the computer monitor at any instant and this may give you time to analyze displayed waveform.

Author’s prototype:

output 1
Prototype Image for Arduino oscilloscope circuit

If you have any further queries regarding this simple single channel Arduino oscilloscope circuit, please feel free to use the below comment box for expressing your specific views

You'll also like:

  • 1.  Make this 7 Segment Digital Clock with Beep Alert Circuit
  • 2.  ATmega32, Pinouts Explained
  • 3.  Over Current Cut-off Power Supply Using Arduino
  • 4.  Password Controlled AC Mains ON/OFF Switch
  • 5.  Arduino SPWM Generator Circuit – Code Details and Diagram
  • 6.  Wireless Thermometer Using 433 MHz RF Link Using Arduino

About Swagatam

I am an electronics engineer with over 15 years of hands-on experience. I am passionate about inventing, designing electronic circuits and PCBs, and helping hobbyists bring their projects to life. That is why I founded homemade-circuits.com, a website where I share innovative circuit ideas and tutorials. Have a circuit related question? Leave a comment.... I guarantee a reply!

Previous Post: « Arduino Frequency Meter Using 16×2 Display
Next Post: LiFi Internet Transmitter Circuit – USB Signal Transfer through LED »

Reader Interactions

Comments

  1. Farid says

    February 10, 2018 at 10:50 pm

    What is the max frequency that it can handle?

    Reply
  2. Saqib Lodhi says

    September 30, 2017 at 4:10 pm

    Hi Swag,

    Great news. I have successfully built this project. it is working great. sharing images with you. thanks for great blog.

    https://ibb.co/dbBofb
    https://ibb.co/nAFELb
    https://ibb.co/ekwofb
    https://ibb.co/cPvg0b

    Reply
    • Swagatam says

      September 30, 2017 at 4:18 pm

      Thanks a lot Saqib, congrats on that.

      I am sure the other folks here will also love those pics and your success.

      Reply
  3. Saqib Lodhi says

    September 30, 2017 at 3:13 pm

    Hi Swag,

    While compiling the above Arduino code I am getting errors. I not good in hardware microcontroller programming. can you please check and fix the code. the errors are below;

    Oscilloscope:4: error: stray ‘\302’ in program

    int X;             

    ^

    Oscilloscope:4: error: stray ‘\240’ in program

    Oscilloscope:4: error: stray ‘\302’ in program

    Oscilloscope:4: error: stray ‘\240’ in program

    Reply
    • Swagatam says

      September 30, 2017 at 3:25 pm

      Hi Saqib, I’ll forward this message to Mr.GR, he’ll reply you soon…

      Reply
    • Saqib Lodhi says

      September 30, 2017 at 3:40 pm

      Hi Swag, No need now. I have fixed the problem. the problem was copying and pasting the code from website to Arduino IDE.

      It’s perhaps because I copied code from website which has perhaps not an ASCII encoded page, but UTF-8 encoded page. So to solve this issue I just copied all code in visual studio C# file and then replaced qomma and semicolons and the copied that code to Arduino IDE and it worked.

      Btw thanks for your prompt response.

      One more thing, I have successfully built frequency meter using Arduino which was in your blog and it worked perfectly. now I am making this oscilloscope because it has frequency meter and wave visuals. I am almost done with it. hopefully it will work.

      Reply
      • Swagatam says

        September 30, 2017 at 3:56 pm

        Hi Saqib, I thought you were referring to the above article, so was it from some other website??

        Reply
    • GR says

      September 30, 2017 at 3:53 pm

      Hi Saqib,

      it is copy/paste errors.
      Copy the code from this site and paste directly to Arduino IDE.
      If it didn’t work, go to (Arduino IDE) “Tools” > Auto format.
      I just copied and pasted on the IDE directly and found no errors and code complied successfully.
      I think you are using some code editing tool or something like that and copied from there.
      If any errors arise further, notify us, we will help you out.

      Regards

      Reply
      • Swagatam says

        September 30, 2017 at 3:57 pm

        Thanks GR, The problem is solved now, but not sure whether Mr. Saqib was referring to your above article or some other external article….

        Reply
      • Saqib Lodhi says

        September 30, 2017 at 4:15 pm

        Swag,

        This was from your blog. my Microsoft Edge copied invalid chars. shared my completed project images in previous comment. thanks GR and Swag for great tool. it will really help us.

        Reply
        • Swagatam says

          September 30, 2017 at 4:24 pm

          OK got it, thanks, appreciate it!!

          Reply
  4. Jappar says

    September 2, 2017 at 3:13 pm

    Sir, I can’t find schematic of 7404 (that I saw it in old version) in this new version

    Reply
  5. Jappar says

    September 2, 2017 at 2:43 pm

    Sir, can I use 74HC14 to replace 7404 ? Thx, for all – sir

    Reply
    • Swagatam says

      September 2, 2017 at 3:45 pm

      yes 74HC14 will also work, just make sure you replace the pinouts correctly…

      Reply
      • Jappar says

        September 6, 2017 at 3:27 am

        Sir, I built it – but my lcd16x2 didn’t work & I got 1020 amplitude on my laptop screen, any suggestion to solve ? Thx U, sir

        Reply
        • Swagatam says

          September 6, 2017 at 4:28 am

          Jappar, I’ll forward this to Mr.GR, he will reply soon

          Reply
        • GR says

          September 6, 2017 at 11:45 pm

          Hi Jappar,
          You have to press the push button, only then LCD screen shows the Frequency and Time period.

          Can you say which signal source did you use as input, the built in test signal 490 HZ? or external signals?

          To visually the see wave form which one you did you use: serial plotter or serial oscilloscope software?

          Please give me a insight reading the above.

          Reply
          • GR says

            September 6, 2017 at 11:47 pm

            * Please give me a insight regarding the above.

            Reply
  6. Unknown says

    May 20, 2017 at 12:26 pm

    Pls can you give a circuit diagram for video mixer with this features. Av & VGA inputs and Av & VGA outputs.

    Reply
    • GR says

      May 24, 2017 at 2:39 pm

      Hi,

      It is not possible to add VGA output/input from arduino.

      Regards

      Reply
  7. Swagatam says

    May 1, 2017 at 1:33 pm

    I have posted the required circuit here

    https://www.homemade-circuits.com/2017/04/lifi-internet-transmitter-circuit.html

    you can discuss your queries under the same article if any…

    Reply
  8. Swagatam says

    April 29, 2017 at 6:16 am

    Ndidi, It might take some time because the concept is a little confusing.

    the USB data has positive negative push pull signals which the LED light won't be able to differentiate…to correct this we may have to modulate the two signals but modulation could cause distortion of the actual signal?

    Reply
  9. Swagatam says

    April 27, 2017 at 3:19 pm

    If it's possible I'll surely post it for you…

    Reply
  10. Swagatam says

    April 24, 2017 at 2:08 am

    You can try the following circuit

    https://www.homemade-circuits.com/2012/04/how-to-make-simple-programmable-timer.html

    Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

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

Primary Sidebar

Subscribe to New Circuit Ideas

Categories

  • Arduino Projects (87)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (82)
  • Datasheets and Components (103)
  • Electronics Theory (143)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (14)
  • Inverter Circuits (87)
  • Lamps and Lights (142)
  • Meters and Testers (69)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (27)
  • Pets and Pests (15)
  • Power Supply Circuits (108)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (101)
  • Solar Controller Circuits (59)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (37)
  • Water Controller (36)

Calculators

  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator
  • Filter Capacitor Calculator
  • Buck Converter Calculator
  • Boost Converter Calculator
  • Solar Panel, Inverter, Battery Calculator
  • Wire Current Calculator
  • SMPS Transformer Calculator
  • IC SG3525, SG3524 Calculator
  • Inverter LC Filter Calculator

People Also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Recent Comments

  • Swagatam on High Current Wireless Battery Charger Circuit
  • Swagatam on Timer Based Cell Phone Charger Circuit
  • Nitesh Agrawal on Timer Based Cell Phone Charger Circuit
  • angga on High Current Wireless Battery Charger Circuit
  • Swagatam on Best Electronic Circuit Projects

Company

  • Privacy Policy
  • Cookie Policy
  • About Me
  • Contact
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Quora
  • Stack Exchange
  • Linkedin
  • © 2025 · Swagatam Innovations