Openscope is a software package for turning an Arduino Uno into a workable oscilloscope. Developed by me (Brendan Whitfield), it is meant as an alternative tool to help hardware makers study and debug their electronics. The front-end is written in Processing, and provides controls for pin selection, triggering, and sample rate. Data is collected via the Arduino’s 6 ADC pins, and triggered/buffered on the chip. This allows for sample rates of up to ~25kHz. While this isn’t fantastic, it’s better than most, and I hope to keep speeding it up as time goes on.
The codebase has undergone a bit of an overhaul since the last time I posted about this. The obvious change being that buffering now takes place in the Arduino. This was completely for performance reasons. It not only allows for radically higher sample rates, but also eliminates the wildcard of serial timing between samples (quite honestly, I’m not sure why I didn’t do this in the first place). This did however, present serious memory constrictions. Currently, this project has a fixed buffer size of 800 samples, and a variable sampling rate to accommodate scale changes. While this is good enough for now, I’d like to see it improve.
There are still many features I’d like to see implemented. The biggest being a better time coding system for the samples themselves. Currently, the time scales are being generated based on the Arduino’s sample rate, and experimentally determined execution times. This get’s you in the ballpark (for 800 samples), but as far as precision goes, this method is pretty shaky. I would rather have the Arduino submit microsecond time deltas for scale computation.
Other improvements include:
- Investigate the multi-pinning problem (suspected hardware limitation)
- Ability to save the current frame to a file (most likely as CSV)
- Increase buffer size by packing the 10 bit samples in a way that eliminates waste
- Record & display samples prior to the trigger event
As always, suggestions & code welcome at the GitHub repo