FTDI TTL232R-3V3 to Visonic PowerMax

Online information on RS232 communication with a Visonic PowerMax Plus/Pro home security system describes the pinout of a 10-pin header. The photograph below shows the 4-pin RS232 interface of a regular PowerMax system. Counting from left to right, the RXD (yellow wire) of the FTDI TTL 3V3 cable connects to pin 2. Pin 3 is used for TXD (orange wire). The fourth pin is used for ground (black wire).

uCurrent Gold damaged

Today my EEVblog uCurrent Gold got fried in an experiment. 😥 The idea was to measure the current of a power supply to a circuit board on a Saleae Logic 8 Pro. So, the current input of the uCurrent was connected in series between the power supply and the circuit board. The output voltage of the uCurrent was connected to an input of the Logic. The supply voltage was measured on a second input of the Logic. Both voltages were measured with respect to the negative side of the power supply.

ucurrent_friedStupid stupid stupid. The inputs and outputs of the uCurrent Gold are not isolated and both negative binding posts are connected with a tiny trace. Connecting the uCurrent Gold in series with the positive lead to the circuit board caused that tiny trace (along the bottom side of the board in the photograph above) to act as fuse. My bad, but I must say Dave left some room for improvement in revision 6. The uCurrent was recovered with a bypass operation and a big label was installed on the box as reminder of the common negative. The experiment worked a lot better with the uCurrent tinned-Gold connected in series in the negative lead from the circuit board to the power supply.

Endless delay …

Let’s not wait for this to be done:

// Delay for x milliseconds (at 8 MHz clock)
void delay_ms(uint16_t x) {
    uint8_t y, z;
    for (; x > 0; x--) {
        for (y = 0; y < 1000; y++) {
            for (z = 0; z < 8; z++) {
                asm volatile ("nop"); // one clock cycle 125 ns

Dropbox on Ubuntu server

It turned out to be a small Google challenge to find a working method for running the Dropbox daemon on an Ubuntu 15.04 server as systemd service. Some sites propose to schedule the dropboxd as cron job. Other sites propose an Upstart script, which was abandoned by Ubuntu this year and replaced by systemd. Then there is the proposed solution to add a script as /etc/init.d/dropbox, which does appear to work at first and then exits at random. Potatoes. Potatos. After the break what I found to be the solution.

Continue reading

Hexadoku solver

The Elektor magazine has been entertaining its readers for close to 10 years with a Hexadoku puzzle. The first one was published in the edition of January 2006. Compared to the more common Sudoku puzzle, the range of possible values is extended from single digit decimals (1 – 9) to single digit hexadecimals (0x0 – 0xF). The size of the puzzle is increased from 9 x 9 cells to 16 x 16 cells and consists of 4 x 4 squares of 4 x 4 cells.

hexadoku Continue reading

.22LR weight measurements

I recovered some data I collected in December 2013 using a microbalance and three boxes of ammunition. Although the sample size was small with only 15 parts per brand, the statistics tell a lot: weight is proportional to cost and the best is the most expensive. No surprise.

20131219 Weight statistics .22 ammunition


I have been struggling to get my HackRF One working again on a new laptop with the latest Ubuntu release. Although being detected as USB device, the hackrf_info utility continued to stop working with the following error:

Found HackRF board 0:
hackrf_open() failed: HACKRF_ERROR_LIBUSB (-1000)

Repeatedly starting hackrf_info resulted in a proper response on all occasions except for the first call. The HackRF One was also not functional in other programs. Info from various mailing lists seemed to point to the recentlt introduced hackrf kernel module. However, unloading this module or adding it to a blacklist did not bring a solution for my case. Eventually, it turned out that the firmware of the HackRF does not support USB suspend. All that was needed was to add the USB device ID to a blacklist (/etc/default/tlp) and start TLP again as superuser:


A similar solutions exist in case laptop-mode-tools is used: [Hackrf-dev] HackRF, USB Autosuspend, etc.

Linux and HP 1320 printing

I have an HP LaserJet 1320 printer connected to an HP ew2500 JetDirect network interface. Despite the uniform branding, printing from my Ubuntu laptop is too frequently a horrendous experience. Simple text documents typically work well with the standard Postscript drivers, but do not attempt anything beyond that. The outcome of printing a PDF file with graphics is typically the entire content of the paper tray filled with apparently random ASCII characters. How to simply install a printer and get your stuff on paper: LPR, IPP, IPPS, DNS-SD, HTTP, HTTPS, AppSocket:9100, CUPS, HPLIP, PS, PCL3, PCl4, PCL5, PCL6 … WTF! It took me twice quite some time to get the printer working properly, both times finally using a script David Everly hosted back in 2006. Since the original link (http://users.adelphia.net/~david.everly/ppd/hplj1320.sh) no longer works, but the script still does, I will host it here for future use: hplj1320.tar. The produced .PPD file is used with an Appsocket/HP JetDirect connection. Make sure the available printer memory is set in the Installable Options tab of the Printer Properties. Let’s hope manufacturers of printers some day see the benefits of standardization and start to deliver products that simply work … including on Linux.

Bending tubes for OpenFOAM

For some reason I have been looking for an easy method to create a meshed gas line with various bends. Our favourite search engine returned an undisclosed solution by Kjetil Moe: Automating blockMesh pipe geometries in OpenFOAM. Unfortunately, access to the OpenFOAM Pipemesher is restricted. So, how hard could it be to automate the creation of a blockMeshDict file from a list of tube bending parameters? Today I fixed the last bug to get a working Python script and could quickly create a couple of examples, as shown below in screenshots of Paraview. A next step could be to rewrite the code and make it look pretty.
Continue reading