Arduino = Hack Oscilloscope

phi1

Well-known member
I'm sure many of you know this, but it's a new trick for me today. I had the thought, and found some other info online which helped me bring it to life.

An arduino connected to a computer can be a quick and dirty O-Scope!

You can send data to the computer through "serial print" commands, and then use the "Serial Monitor" or "Serial Plotter" functions in the arduino program to read the values. (Serial Monitor gives a text readout of the values, Serial Plotter gives the graph). You could also take the text values and copy them into excel (or other program) for calculations and graphs.

Since the Arduino analog inputs are 0-5V, but pedals circuits are often 9V, I made a 2:1 voltage divider with 2x 10k resistors to scale the 0-9V range to 0-4.5V. Then, in code I apply a 2x scaling factor to get back to ~true voltage.
I tested it out with 9V power supply and potentiometer, then into the 10k/10k divider. Checking my multi-meter off the Pot lug 2 reading, compared to the divider->arduio->computer readout values, it's pretty close but about a couple 1/10th volts off. (I assume resistor tolerance, bit resolution, multi-meter accuracy, etc). But for what I wanted to see, it was very much adequate accuracy.

The main reason I was wanting to use this was I'm making 2 harmonic tremolo pedals (based on the Cardinal Tremolo, with some mods), and one is not giving me enough depth. I suspect it's the Vactrol (2nd bad vactrol on this project, if that's the case), but I wanted to check the LFO output going into the vactrol LEDs. Even with the RATE at minimum, my multi-meter was too slow to give me readings. The result of this measurement is that the 2 pedals are giving the exact same LFO wave, so I'm still thinking maybe the vactrol.

Over my years of building pedals, I've considered getting a proper O-scope, but have always been able to get by with my multi-meter. I'm not saying this arduino setup is as good as a proper o-scope, and if you're serious about getting deeps into projects that need an o-scope, getting a real one is probably still a good idea. But, if you just have the occasional need to see a waveform, this trick may come in handy.
 

Attachments

  • divider.jpg
    divider.jpg
    154.4 KB · Views: 34
  • mess.jpg
    mess.jpg
    292.2 KB · Views: 37
  • rate and depth adjust.jpg
    rate and depth adjust.jpg
    243.7 KB · Views: 35
  • Voltmeter_Sketch.txt
    728 bytes · Views: 8
  • wave shape adjust.jpg
    wave shape adjust.jpg
    337.8 KB · Views: 36
Back
Top