Category Archives: DIY

Automatically resetting an USB-to-serial adapter

I read the temperatures and other data from my heating controller using a python script. The heating controller is connected via a serial line to a raspberry pi, using an FTDI USB-to-serial adapter. From time to time, the adapter stops working. Plugging it out and in again helps, but eventually I found out how to restart it automatically.

You need to find out the device number of your adapter (here it is device 4):

$ lsusb
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

You need to find out the name of the driver module (here it is ftdi_sio):

$ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 3: Dev 4, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M

You need to find out the identifier (here it is 1-1.3:1.0):

$ ls -l /sys/bus/usb/drivers/ftdi_sio/
lrwxrwxrwx 1 root root    0 Sep 12 20:51 1-1.3:1.0 -> ../../../../devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.0
--w------- 1 root root 4096 Sep 12 20:51 bind
lrwxrwxrwx 1 root root    0 Sep 12 20:51 module -> ../../../../module/usbserial
--w------- 1 root root 4096 Sep 12 20:50 uevent
--w------- 1 root root 4096 Sep 12 20:51 unbind

With all this information, execute the following script:

# !/bin/sh
sudo sh -c "echo -n '1-1.3:1.0' > /sys/bus/usb/drivers/ftdi_sio/unbind"
sudo modprobe -r ftdi_sio modprobe
sudo modprobe ftdi_sio

(Of course you need to replace the ftdi_sio and 1-1.3:1.0 with the things you found out in steps 1-3)

Now the USB-to-serial adpater is working again. Iris

I built my own keyboard. It is an Iris from The Iris has a split 56-key ortholinear layout and it is fully programmable, running the QMK firmware.

my Iris keyboard

Step 1: Choose wisely

Coming from the Kinesis Freestyle II, I wanted to go one step further and have all keys (especially the cursor keys) right at my fingertips, without the need to move my hands. And I wanted to have this luxury everywhere, therefor I looked for a fully programmable solution with split layout. The Iris provides both for a reasonable price, if you are able to use a soldering iron.

Step 2: Find all the parts

After deciding for a keyboard, the next step was to find all required parts. offers the PCBs, the micro controllers and the plates, but I wanted to order the least amount of parts from outside of Europe. I ended with the following sources:

Step 3: Build it

Building the Iris was a piece of cake using the building instructions from It really worked like a charm and took less than one hour for the whole keyboard.

Step 4: Configure it

Going from 104 keys down to 56 requires a bit of thought about the layout of your new keyboard. The QMK firmware offers tremendous possibilities. There are already several layouts for the Iris available out of the box, but nothing that works well in the German typing context. So I started to define my own layout.

I just added one additional layer that contains all the keys missing in the default layer. This is mainly the function keys F1-F12 and everything that you need for writing source code – a great opportunity to put those characters into positions that are more convenient for my fingers than in the standard German layout. A third layer just contains some media control keys.

my keyboard layout

Building and flashing the QMK firmware is also straight forward, just follow the instructions.

Step 5: Profit

After a short period of complete confusion and dystypia I’m back to my old level of productivity. It is very convenient to have everything right at my fingertips while the wrists can stay where they are. The split layout also allows me to position the two keypads in the most comfortable ways! Now it is time to train my muscle memory and increase speed.