Welcome to my blog
Raspberry Pi Pico Ultrasonic Sensor with no additional parts
Two transducers and two pins are all that you need to measure ultrasonic range profiles on the cheap! I recently wanted to revisit an old project idea - an ultrasonic windspeed monitor. The original project idea started about 10 years ago. However, I was stuck with slow AVR microcontrollers and didn’t have the knowledge to work around that. Thus, the project never went anywhere. Now - 10 years later and armed with better hardware and a better understanding of signal processing - I decided to revisit the project. ...
Archlinux full-disk encryption with SSH unlock
This is a short guide on how to set up full disk encryption on an Archlinux system. Assumes a system installed with the archinstall script, using an encrypted root partition. I use this setup on my personal server (works on a Raspberry Pi as well). If SSH does not work for some reason, you should still be able to enter the password for the rootfs via keyboard. Otherwise, boot from archiso and make these changes in chroot. ...
motor drivers for my CNC machine
My new CNC machine uses JMC’s iHSV57-36-18-36 integrated servo motors. One big advantage is that they don’t require any external electronics, the encoder, controller and power electronics are all included. They only need power (20-50V) and step/direction signals, the latter of which are galvanically isolated by optocouplers. There is also an RS232 configuration port for setting the parameters for the PID control loops. disclaimer (not at the top so it doesn’t show up in the preview) the events outlined in the next few posts on my cnc machine all happened three to five months ago. I won’t write these in chronological order (or in any sensible order at all) but I will adjust the publish dates so they will apppear in chronological order. The step/direction inputs have internal constant current sources. They reach their nominal current at about 3V, though the manufacturer recommends at least 5V. I ultimately want to use either an STM32 microcontroller or a beaglebone black to generate step signals, both of which use 3.3V. I did some testing with an Arduino Due (also 3.3V), which seemed to work fine without a level translator. Nonetheless I wanted to stay in the safe side, so I built some level converters to boost the voltage levels and provide some protection from ESD. ...
V-USB to NRF24L01+ Adapter Part 4 - HID
The crappy firmware has bothered me for some time now. The biggest problem is that it needs additional PC-side software just to receive basic button presses. Right now, the only job of the dongle is relaying the messages from my volume knob to my Pi, using mpc to control the music player. Luckily I don’t actually need to write my own software and drivers if I just switch to using the HID protocol (and the triggerhappy daemon to assign commands to the hotkeys). This also means that the device works under windows without installing drivers. ...
V-USB to NRF24L01+ Adapter Part 3 - Working
I finally finished the firmware for my NRF24L01+ USB dongle, you can find it on Github, together with the (fixed) PCB layout. Also I wrote a simple GUI for it, which is perfect for debugging other devices or eavesdropping on traffic: Read more about it on the project page!
Raspberry Pi Logic Analyzer Part 1 - DMA in Userspace
I wanted to get my hands on a logic analyzer. And, of course, rather than buying one I wanted to build one. There are many ways to build a simple logic analyzer, here are some: use a parallel SRAM chip, add latch, clock, trigger and a way to read it all out use USB microcontroller, read all samples in real time use a (ideally cheap) microcontroller with lots of memory I searched around a bit and what I found out was pretty off-putting: ...
V-USB to NRF24L01+ Adapter Part 2 - Assembly
My PCBs arrived just twelve days after I ordered them and I’m sure you’ve all heard of OSHPark’s spectacular service. All three boards are perfect in every way, even under a microscope I can’t see any alignment issues or defects. What I failed to notice was that I have to swap MISO and MOSI when using the AtTiny’s USI as an SPI master, but that’s nothing a little bodge can’t fix. Soldering was pretty straightforward and after the error was fixed, both the PCB and software worked right out of the box. Now what’s left to do is to write the daemon for the PC and an alternative HID firmware for the dongle.
V-USB to NRF24L01+ Adapter Part 1 - Board
I’ve decided against using WIFI for my Volume knob, instead I’ll use the much more energy efficient NRF24L01+ which you can get cheaply from the usual sources. That’s why I’ve designed this board: It sports an AtTiny 861 and the bare minimum of external components to interface to USB and the NRF (except for the two diodes on the USB data lines which aren’t strictly necessary). The NRF24L01+ usually comes on breaout boards with a surprisingly consistent and widespread pinout, so you can easily swap out the basic one for an advanced version with an RF PA for longer range. ...
Wifi Volume Knob Part 1
Why? I recently started using Volumio as my main music player, but I soon got fed up with opening up the webinterface every time I want to change the volume or pause the song. My inspiration is this beatiful piece of work by Rupert Hirst. What? I want to build a similar-looking, probably larger knob that works over wifi, ideally running from a Lithium-Ion battery with an integrated USB charger. I also want to include basic playback controls while keeping the exterior elegant. ...