Introduction: Arduino - Oscilloscope (poor Man's Oscilloscope)

Picture of Arduino - Oscilloscope (poor Man's Oscilloscope)
Hi guys,
a few days ago i found this code in github and it's the best i found so far, so i've decided to spread this project as much as I can, for anyone who want a cheap oscilloscope around this is the best way!  Let's start...

First, download processing. It's free Click here to download. You don't need to install anything, It runs like the Arduino IDE.
Now upload this code into your Arduino 
After Run this code in Processing IDE

And then you just need to connect the Arduino analog pin 0 to the signal you want to read.
And It's done!

The Circuit I'll be measuring , it's a simple 555 timer circuit... that flashes a LED, parts list and wiring diagram:

1x Arduino
1x Breadboard
1x LED
1x 10k resistor
1x4.7k resistor
1x 1k resistor
1x 100nF electrolytic capacitor
Jumper cables
check my YouTube video and watch it working. you can also visit my website for more projects and tips.


Heginator made it! (author)2016-03-30

Why is it picking up this voltage and why is it changing when im grounded? (im not touching the Arduino)

promach (author)2013-06-28

Hi, I am using your oscilloscope to view a PWM signal generated from a 555 timer. However, I have some doubt regarding the voltage boundary. Red Line means what ? My positive peak is at around 3.6V. And from my observation, I can never see my negative peak. Why ?

simonfrfr (author)promach2013-07-04

This is because the ATMEGA328 cannot read a negative voltage, it would require a different ADC than the one that is built into the ATMEGA328 to be able to read the negative voltage. The lowest voltage that the ATMEGA328 can possibly read is GND. You could even actually use a MAX232 (RS232 to TTL converter) to be able to read higher voltages such as 10V. Personally the way I would do it is I would get an external ADC which can read below 0V (GND), and a MAX232 so that the Arduino would be able use the data (since it is TTL level). You would have a more efficient and possibly better Oscope. I think I might write an instructable on how I would do this so it is easier for you to do.

On another note, depending on the resolution of the ADC converter, you could be able to even read micro-volts, so an adjustable speed for an Oscope would be easier now, and the resolution could be a lot higher.

xFixate (author)simonfrfr2016-02-28

Hey did you get around to working on the 10+ V oscilloscope? I would love to see this as it would have a lot of application for automotive use which sometimes utilizes up to 14V.

bigredlevy (author)xFixate2016-03-01

Use a voltage divider. It would be a good idea to buffer the input, and polarity protection would be necessary.

xFixate (author)bigredlevy2016-03-01

sorry I'm pretty new to this. Where would the voltage divider be placed? On the probe end to split the voltage in half? (This way 14v would read as a fraction of itself). Would this have to be programmed into the arduino to display the voltage it receives X formula = actual voltage?

And what does it mean to buffer the input?

Sorry for all the questions, thanks again

bigredlevy (author)xFixate2016-03-01

exactly right.


buffer adds considerable complexity to the circuit, but serves to increase the input impedance. (this means that the arduino circuit will not alter the voltage you are trying to measure).

xFixate (author)bigredlevy2016-03-01

ok, great. Thanks a lot!

simonfrfr (author)promach2013-07-04

Since most ADCs do not read negative voltage, there is a better solution: inverting the voltage to be all positive. It would even be able to use the Arduino's built in ADCs, but would require an Op-amp. It would be a small amount of external hardware (as shown in the schematic). I will be making an instructable of an Oscope using cheaper parts than it costs to even buy an arduino, roughly $15 for a dedicated USB Oscope. (will use MSP430)

simonfrfr (author)promach2013-07-04
This is an ADC and DAC and goes -5V -> +5V

LucianoB19 made it! (author)2016-02-02

I made it! and works great!

jp_boardrides (author)2014-02-07

I revamped the Processing software this morning. I think I've made it much easier to use. Check it out at:

That one works GREAT!! THank you VERY much.


gnbradford (author)jp_boardrides2015-05-17

like ealves5 all i get with the orginal is one red line. Yours works. Thank you.

Jupiterov (author)2015-07-26

Hi All! There is a nice project of an Oscilloscope with Arduino UNO with miuPanel that permits to see and control the oscilloscope with a smart phone. The sample rate is 50 kSa/s, it implements the trigger and can provide more than 20 FPS on a smartphone LCD. See: You could use miuPanel too to provide the graphical interface to your Arduino project.

AlexA15 (author)2015-05-25

can you send me an electrical scheme for this project please?and what kind of capacitor you used it?

ealves5 (author)2015-05-09

I don`t know whats happening. In processing appear nothing, just a red line. Even if I put 5V or 0V in power or GND port in Arduino. Do you have any idea to help me?

rodrigo.beltrame.54 (author)2015-03-18

hey guys i'm wondering if i could use the PWN of the arduino and see it using your program....

TMSZ (author)2014-02-11

If serial port speed is configured to 9600 bps it should be able to get 320 samples per second, thus it be useful up to ~30Hz. Code is far from optimal even at this serial speed, e.g. additional 0xFF synchro byte is most likely redundant for USB connection.
As for GUI part - same hardware/firmware should work with miniscope v3 or v4 with Bus Pirate plugin - Bus Pirate has similar ADC streaming mode. Required changes: removing 0xFF byte and changing serial speed from 115200 used by BP to 9600 used here (dll plugin has to be recompiled).

Ubiqvit (author)2013-11-25

Hello everybody! I have arduino Mega ADK and decided to try out this project. Anyway, i tested it with function generator and I can nicely see slow (<10Hz) frequency signals. But when frequency is increase above 15 Hz signal becomes unreadable. It looks like some random(aliasing) signal. In the comments I read that you can read signals up to kHz. Any advice what could be wrong? Thank you for answer.

NelsonsTrfgr (author)Ubiqvit2014-01-12

The serial port oscilloscopes are very limited. Check out this video for a more advanced oscilloscope.

kaxlon (author)2013-12-29

Thanks for this one! A great start for beginners like me. Keep up the good work.

RuiSantos (author)kaxlon2014-01-04

Thanks for your feedback Kaxlon!
I'm glad you enjoyed :)

promach (author)2013-10-29

How do I increase the bandwidth (I suppose it is correct, or is it the sampling rate) of the poor man oscilloscope because I have a 1MHz square wave to examine ?

rexco (author)2013-07-09

Hi! Any chance to speed up the 'time base' of the oscilloscope so I could look at slow AC-signals (maybe up to about 300Hz)? Thanks..

RuiSantos (author)rexco2013-07-10

I don't think that is possible,... But I'm not sure... I guess I need to research on that...

simonfrfr (author)2013-07-03

Reminds me of this project...

RuiSantos (author)simonfrfr2013-07-03

yeah it's a bit similar ... Although the processing code in my project is much shorter.
just a few lines compared to that one you showed

tali2 (author)2013-05-27

Hey Thanks for posting the code on instructables. Through when I was looking through the code and working with the signal input to the oscilloscope the output wasn't what I expected it was rather off and due to that it maybe a good code but still needs some working I believe.

RuiSantos (author)tali22013-06-06

sorry for the long delay to answer... sure it need some improvements, but will never get much better with just an atmega microcontroller i guess

afarid4 (author)2013-05-22

That's surprisingly simple! But I'm guessing this wouldn't read AC signals?

NeoRecasata (author)2013-04-09

I made a probe for it

RuiSantos (author)NeoRecasata2013-04-24

yeah I saw you project seems really good! thanks for sharing!

Williamscullen818 (author)2013-04-22

Hey Thanks for the example, It looks really simple.

I've got almost everything to work except when I open the Processing sketch I can't get a waveform to appear. Everything else is fine, my LED is flashing from the 555 timer, and the my probe is connected to Analog 0. The only issue I could think might of is maybe I had to change the serial port in the Processing sketch, but I don't see anything about that. It looks like a little wiring mistake, but I'm positive all my wires are connected properly.

Any suggestions would be helpful. Thanks.

hi, that's really weird for example after you upload the code into your arduino and then run the processing code nothing appears?

thuiberts (author)2013-04-14

It would be really nice to have an indication of voltage and time and perhaps a pause mode in this, but I have absolutely no experience with processing.
I must say it works very well. I am using it to monitor an EEG device that I'm building.

RuiSantos (author)thuiberts2013-04-18

i'll probably do that in a few months right now i'm finishing some projects :)
thanks for the feedback

Superbender (author)2013-03-31

Hi RuiSantos,
It's me again. As discussed off-line I finished the instructable on a multi-channel version of the oscilloscope you are showing here. For anyone who is interest in a 2-channel or even a 3-channel version check at:
Thanks again RuiSantos for posting this. I am very happy I have one useful tool more in my arsenal.

Superbender (author)2013-03-23

Hi RuiSantos,
I tried it and it worked great. This was a good find of yours.
And by the way, the window size for the scope is adjustable.
Go to the first line in the void setup ():
size(1280, 480);
adjust to your liking. I needed
size(1014, 480);
to perfectly fit to the width of my screen.
Thanks again, I know this will come in handy very soon.

RuiSantos (author)Superbender2013-03-24

Thanks for the info! :) Actually for me it works the size of the screen on the code :)
This project is great for me to study some signals as I don't have an Oscilloscope at home yet (I'll probably buy one really soon . )
good luck with your projects and check my original Arduino projects on my instructables account!
Thanks again for your comment

Superbender (author)RuiSantos2013-03-24

I have a fairly old machine for my hobby stuff, might have been the reason why I needed a smaller window size.
However, do you happen to have an idea if this scope can be expanded to a second channel?

RuiSantos (author)Superbender2013-03-25

yeah that's actually a really cool idea. I might do that ! And It should be easy to do that. In the arduino code you just need to define one more analog pin like the analog pin 1. On the processing you will need to duplicate the code that represents the signal from the analog pin 0 to represent the too the new analog pin 1at the same time or in two windows or something.

Superbender (author)RuiSantos2013-03-25

I agree that a second channel would be a cool feature. Please keep me posted on your progress. If I find the time I might try to work on it during the course of the next days. I hope though that you can beat me to it. ;)

RuiSantos (author)Superbender2013-03-26

I'll try that few modifications don't take much time :)

kavtoakustika (author)2013-02-24

Hy does this works on 64bit WIn7? Because while i run the processing i got an error that serial doesn't work on 64bits..

Download the 32 bit version of processing and you will be good to go. I had the same problem as I am using a 64 bit win7. 64 bit processing does not support serial, you have to use the 32 bit version of processing.

RuiSantos (author)kavtoakustika2013-02-24

Yes for me was working on a 64bits windows... Try to search more about that error, because im sure that processing works on that operative system

alex_keil (author)2013-02-14

Nice! This worked right off the bat for me. Thanks.

RuiSantos (author)alex_keil2013-02-14

nice, almost everyone who tries it works, I'm glad you like it!

WWC (author)2013-02-09

Did you actually try this scope or is this just a repost from the internet?
I don't get a reading when i try this.

About This Instructable




Bio: Author, Blogger, Electronics Enthusiast and Entrepreneur. For complete Electronics Projects and Tutorials go to:
More by RuiSantos:ESP8266 Web Server (Without Arduino)Arduino Simple Memory GameArduino – Datalogger with Temperature Sensor and Photoresistor
Add instructable to: