I bought a second-hand USB oscilloscope from the internet, and it arrived today. I believe the model is Hantek 6022BL. I was a bit worried about Linux support, but thankfully some people already reverse-engineered the device and wrote Linux userspace drivers for it.
I didn’t have time to dive too deeply into it, but I played around a little bit. Here are some tiny projects I’ve done with it.
- Figuring out the mains AC frequency.
I wrapped a random alligator clip cable around my extension cord, probed one end of the cable and observed an oscillating signal, precisely at 50 Hz (which is the AC frequency in my area).
- Audio card
I probed an audio cable, and used the Python API to capture samples. I then piped those samples to aplay
in order to play them through my computer’s speakers.
This is an interesting way to use the oscilloscope as a high sample-rate audio card. And due to having two channels, it can be used for stereo recording as well.
The graphical oscilloscope application I used on Linux is called OpenHantek6022. And the Python API and open source firmware is called Hantek6022API. You can find the links to those below.