Oscilloscope and logic analyser notes
📃 These are primarily notes, intended to be a collection of useful fragments, that will probably never be complete in any sense. |
See also the nice aggregation at https://opencircuits.com/index.php?title=Oscilloscope
The things below are roughly ordered from cheaper to more expensive
What do you need?
Sampling rate and bandwidth
Rise time
UI
Memory - at all
Memory depth (how much)
Triggering, trigger modes
Math features
Decoding
Poor man's oscilloscopes
PC sound card
One of the simplest oscilloscopes, one you already have, is a sound card.
This will give you a 2 channel, 16-bit ADC often 48000 sample/sec, and assume at most 15kHz bandwidth.
Too slow for many fancier things things,
but it's pretty nice to be able to measure some slow baseband signals for almost-free -- a few cents worth of resistors for some protection.
Sound cards now tend to have a pretty low noise floor.
Time accuracy
AT 48000 samples/sec, you would e.g. be fine checking that something is within a millesecond. In fact, one sample would be ~21usec, a millisecond would be ~48 of those.
Bandwidth
Note that running your sound card 96 or 192kHz does nothing to increase your bandwidth, because all sound cards have lowpass filters on their input, meaning you should assume content above ~20kHz is attenuated to gone.
Attenuation may start a little lower, though that effect often comes from microphones more than audio interfaces.
(You sometimes find faster ADCs around PC hardware, such as a 448kHz (not a typo) ADC in bt878-based TV cards, with ~360KHz usable bandwidth(verify), though it takes more work to make this into something usable.)
Voltage
Since consumer audio assumes it'll rarely go above ~0.5V, and most things you want to measure is higher-voltage, you'll at least want to make a factor-20ish voltage divider.
A few more components can provide more protection and/or convenience - consider (e.g. switchable division or potmeter voltage divider, buffering, protection diodes, decoupling)
See pages like http://xoscope.sourceforge.net/hardware/hardware.html
See also:
- Software:
- http://xoscope.sourceforge.net/ (linux) (no cost)
- http://www.zeitnitz.de/Christian/scope (no cost)
- www.multi-instrument.com (paid)
Microcontrollers
...such as the Arduino's Atmega chip, the PICs, and others.
If they have an ADC, you can use it as a lowish-speed scope. Consider e.g.
- Arduinoscope (AVR based software scope)
...but note that performance is on the same order as a sound card.
Even without an ADC, they can be a (somewhat faster) logic analyser. Consider e.g.
- Bus pirate (PIC based logic analyser)
Arduinoscope
It's not going to have the precision, regularity, or memory depth, or interface features of even a relatively cheap DSO, but it can be a pretty good debugging tool, given it's software for something you already have.
One of the first, and simplest to get started with, was https://github.com/konsumer/arduinoscope (GUI for win, lin, osx), which is fed with ASCII lines of values - not very efficient, but it's an easy way to visualize what's happening on a pin, and with just a few lines of Arduino-side code.
The arduino IDE itself has basically adopted that same approach since version 1.6.6 (2015), with its "Serial Plotter" (see the tools menu), that reads numbers written as text on the serial port.
There are various other projects that tried to be a little fancier than that, in particular getting a little more speed.
AVR-wise, the 9.6ksamples/sec that libraries default to is for compatibility with more arduino variants, and most AVRs can easily be run at ~77ksamples/sec.
Higher is possible, but using/moving the data fast enough becomes an issue, and above ~77ksamples/sec the resolution loss starts becoming noticeable.
It seems the combination FTDI UART and AVR USART (both also run at higher bitrates than typical in Arduino), and AVR code needing some time, will in practice probably transfer no faster than ~1.5mbits/s. If you are willing to give up bit depth for speed, you can get on the order of maybe 150k or 300ksamples/sec.
Toy-like DSOs that fit certain purposes
Somewhat better
USB / mini oscilloscopes
USB logic analysers
- Logicport one
- ZeroPlus Logic Cube
- Bus Pirate
- USBee
USB scopes
- http://www.pctestinstruments.com/
- http://www.google.com/search?q=parallax%20usb%20oscilloscope
- http://www.google.com/search?q=propscope
- DSO-2090, DSO-2250 (apparently made in china, and appears with many brand stickers and varying prices)
- Poscope
- PCSU1000
- PicoScope 2104, 2105
- ...and more
'DSO' is a description -'Digital Storage Oscilloscope', not a brand or type. You see the term on toys as well as professional gear.
Many cannot use all their sample memory at the top speed(verify)
DSO Nano
- One probe (so no probe-based triggering, but there's level and edge triggering).
- 12bits ADC at 1Msamples/sec. Don't count on seeing unaliased / detailed signals faster than 200kHz.
- Can store waveform to SD storage
- USB connection can be used to charge battery, read stored waveform (from SD storage), upgrade firmware
- USD ~100
DSO Quad - basically an improvement over the DSO Nano
Desktop memory scopes
On probes
On (not) damaging your oscilloscope
See also