Arduino - Oscilloscope (poor Man's Oscilloscope)

211,899

246

55

Posted in TechnologyArduino

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

About: Author, Blogger, Electronics Enthusiast and Entrepreneur. For complete Electronics Projects and Tutorials go to: http://randomnerdtutorials.com/start-here
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.


3 People Made This Project!

Recommendations

  • Microcontroller Contest

    Microcontroller Contest
  • Casting Contest

    Casting Contest
  • Woodworking Contest

    Woodworking Contest
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

55 Comments

Hey! Just wondering why my graph changes when I move my Arduino.

I haven't connected anything to the analog input.

2018-03-03.png
1 reply

idk if you got a reply yet, but you're simply getting the reading from that pin, it's like that since you don't have any reference, and it's picking up disturbances, if you connect it to something that has common ground with the board, it'll stabilize

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 ?

squarewave.png
8 replies

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.

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.

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

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

ok, great. Thanks a lot!

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)

Power inverter.png

http://www.ti.com/product/amc7812
This is an ADC and DAC and goes -5V -> +5V

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

https://www.instructables.com/id/Arduino-Improved-Poor-Mans-Oscilloscope/

2 replies

That one works GREAT!! THank you VERY much.

Arnold

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

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: http://www.miupanel.com/Projects/Arduino-Advanced... You could use miuPanel too to provide the graphical interface to your Arduino project.

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

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?

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

user

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).

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.