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.

<p>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: <a href="http://www.miupanel.com/Projects/Arduino-Advanced-Oscilloscope" rel="nofollow"> http://www.miupanel.com/Projects/Arduino-Advanced...</a> You could use miuPanel too to provide the graphical interface to your Arduino project.</p>
<p>can you send me an electrical scheme for this project please?and what kind of capacitor you used it?</p>
<p>I revamped the Processing software this morning. I think I've made it much easier to use. Check it out at:</p><p>http://www.instructables.com/id/Arduino-Improved-Poor-Mans-Oscilloscope/</p>
<p>like <a href="http://www.instructables.com/member/ealves5/" rel="nofollow">ealves5</a> all i get with the orginal is one red line. Yours works. Thank you.</p>
<p>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?</p>
<p>hey guys i'm wondering if i could use the PWN of the arduino and see it using your program....</p>
<p>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.<br>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).</p>
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 (&lt;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.
<p>The serial port oscilloscopes are very limited. Check out this video for a more advanced oscilloscope.</p><p><a href="http://www.youtube.com/watch?v=5ky_N5-Fu6M" rel="nofollow">http://www.youtube.com/watch?v=5ky_N5-Fu6M</a></p>
Thanks for this one! A great start for beginners like me. Keep up the good work.
Thanks for your feedback Kaxlon! <br>I'm glad you enjoyed :)
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 ?
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..
I don't think that is possible,... But I'm not sure... I guess I need to research on that...
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 ?
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)
http://www.ti.com/product/amc7812 <br>This is an ADC and DAC and goes -5V -&gt; +5V
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. <br> <br>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.
Reminds me of this project... http://www.instructables.com/id/Oscilloscope-THE-EASY-WAY-DIY/
yeah it's a bit similar ... Although the processing code in my project is much shorter. <br>just a few lines compared to that one you showed
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.
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
That's surprisingly simple! But I'm guessing this wouldn't read AC signals?
I made a probe for it http://www.instructables.com/id/How-to-make-an-Arduino-oscilloscope-probe/
yeah I saw you project seems really good! thanks for sharing!
Hey Thanks for the example, It looks really simple. <br> <br>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. <br> <br> <br>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?
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. <br>I must say it works very well. I am using it to monitor an EEG device that I'm building.
i'll probably do that in a few months right now i'm finishing some projects :) <br>thanks for the feedback
Hi RuiSantos, <br>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: <br>http://www.instructables.com/id/Arduino-Multi-Channel-Oscilloscope-Poor-Mans-O/ <br>Thanks again RuiSantos for posting this. I am very happy I have one useful tool more in my arsenal.
Hi RuiSantos, <br>I tried it and it worked great. This was a good find of yours. <br>And by the way, the window size for the scope is adjustable. <br>Go to the first line in the void setup (): <br>size(1280, 480); <br>adjust to your liking. I needed <br>size(1014, 480); <br>to perfectly fit to the width of my screen. <br>Thanks again, I know this will come in handy very soon.
Hi, <br>Thanks for the info! :) Actually for me it works the size of the screen on the code :)<br>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 . )<br>good luck with your projects and check my original Arduino projects on my instructables account!<br>Thanks again for your comment <br><br>
I have a fairly old machine for my hobby stuff, might have been the reason why I needed a smaller window size. <br>However, do you happen to have an idea if this scope can be expanded to a second channel?
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.
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. ;)
I'll try that few modifications don't take much time :)
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.
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
Nice! This worked right off the bat for me. Thanks.
nice, almost everyone who tries it works, I'm glad you like it!
Hi <br>Did you actually try this scope or is this just a repost from the internet? <br>I don't get a reading when i try this.
i've found this code on the internet has i said in the post... but it works fine for me gives me a good reading ... <br>what are you trying to read? if the circuit it's to noisy probably you can't do much with this oscilloscope
A schmitt trigger. Scope shows no display. Only bare scope with the o line.
never happened to me before, if you have the circuit in your computer send me a private message with it, and when i have time i'll try it... <br>sorry
anyway , try to read another circuit with a good power supply, if still doesn't work probably it's a problem with your arduino or with processing
OK Thanks

About This Instructable


168 favorites


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