07 September 2022
Barker sequences
A Barker sequence, also known as a Barker code, is a sequence of values with excellent autocorrelation properties. Thanks to this, it can be used for synchronization in DSP.
=> https://en.wikipedia.org/wiki/Barker_code
Since we have fast computers, we can come up with these sequences ourselves by trying random sequences and evaluating their autocorrelation properties.
12 September 2022
Hantek oscilloscope on Linux
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 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.
=> https://github.com/OpenHantek/OpenHantek6022 => https://github.com/Ho-Ro/Hantek6022API
16 September 2022
Stat collector
I enjoyed looking at monitoring tools like Grafana or Zabbix, and thought it would be cool to have something similar for my servers and computers. When I looked at their installation guides, they suddenly seemed less cool due to their large number of heavy dependencies.
Since I enjoy building everything from scratch, I decided to make my own monitoring graphs as well.
This was inspired by statsd.