Arduino - Oscilloscope (poor Man's Oscilloscope)

233,576

258

58

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

  • Tape Contest

    Tape Contest
  • Trash to Treasure

    Trash to Treasure
  • Arduino Contest 2019

    Arduino Contest 2019

58 Discussions

0
None
ealves5

3 years ago on Introduction

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?

1 reply
0
None
AndrewB254ealves5

Reply 4 months ago

Just a quick tip.
If you are using a USB hub, or other devices... you may have some other device using serial port 1.
If this is the case, look in your arduino IDE and check to see what number your device is in the list.
For example, Mine is:
Com Port 1 -> That's port [0] in processing
Com Port 12 - Arduino Mega ----> That's port [1] in processing

So in this list, my arduino is actually in the second spot.
In machine code, 0 is first, and 1 is second.
So you would change this line in processing:

From:
port = new Serial(this, Serial.list()[0], 9600);
To:

port = new Serial(this, Serial.list()[1], 9600);


Hope this helps those getting a red line.

0
None
AndrewB254

Tip 4 months ago

Just a quick tip.
If you are using a USB hub, or other devices... you may have some other device using serial port 1.
If this is the case, look in your arduino IDE and check to see what number your device is in the list.
For example, Mine is:
Com Port 1 -> That's port [0] in processing
Com Port 12 - Arduino Mega ----> That's port [1] in processing

So in this list, my arduino is actually in the second spot.
In machine code, 0 is first, and 1 is second.
So you would change this line in processing:

From:
port = new Serial(this, Serial.list()[0], 9600);
To:

port = new Serial(this, Serial.list()[1], 9600);


Hope this helps those getting a red line.

0
None
MajjiR

1 year ago on Introduction

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
0
None
FilipS1MajjiR

Reply 1 year ago

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

0
None
promach

5 years ago on Introduction

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
0
None
simonfrfrpromach

Reply 5 years ago on Introduction

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.

0
None
xFixatesimonfrfr

Reply 3 years ago

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.

0
None
bigredlevyxFixate

Reply 3 years ago

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

0
None
xFixatebigredlevy

Reply 3 years ago

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

0
None
simonfrfrpromach

Reply 5 years ago on Introduction

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
0
None

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
0
None
Jupiterov

3 years ago on Introduction

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.

0
None
AlexA15

3 years ago on Introduction

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