Homemade DCF77 receiver [FAIL]

A few weeks ago our old clock radio broke. Out of curiosity I’ve disassembled it: I wanted to remove the DCF77 clock radio signal receiver. Unfortunately, the clock contained a single board, but the receiver part was clearly distinguishable from the rest.

The circuit board of my broken clock radio. The radio signal receiver is marked with a yellow frame.

For fun, I cut out the relevant part of the board and replaced/refreshed the solder joints. I also added four connections for 1.5 Volt (power supply), the clock signal and a power-on line. (At least I think that’s what the last two lines should be).

My low cost self made DCF77 clock signal receiver.

I have not yet managed to get a stable time signal. On my digital storage oscilloscope I get occasional spikes with a distance of one second (what you would expect), but only a few of them and then nothing… The problem is probably the correct initialization of the chip under the black blob (a so called chip-on-board, by the way). Maybe, I also damaged a part of the receiver while cutting out the board, or when resoldering the two joints on the 77.5 kHz antenna.

Update: Well, after playing a bit more with the receiver I’m pretty sure I damaged it while cutting it out. I used common initialization sequences and did not manage to get it work. Too bad…

Logitech M705: How to fix a defective mouse button

After cleaning and reassembling...

I’m a big fan of Logitech mice, or at least was until a few days ago. My wireless Logitech M705 started to behave strangely: Pressing down the left mouse button resulted in multiple clicks (i.e. double-clicking) and dragging became impossible due to random interruptions when holding down the button.

Without a warranty (which had expired three months ago) I did not feel guilty when opening the mouse to look for the cause. The culprit was quickly found: the microswitch of the left mouse button. Luckily, I had spare microswitches as I’m currently playing around with the optical sensors from other spare/defective mice. I will cover this in another post. To come to the point: after replacing the microswitch, the mouse works again as usual. I’ve made a few photos (a picture is worth a thousand words 😉 ) to help others during disassembly of the housing. Screws are marked red, and I have also marked (in yellow) two tiny springs that can easily be lost.

This fix has a bad aftertaste: at least in Germany, there is much talk about “planned obsolescence”, and I’m wondering if Logitech (and other manufacturers) use cheap microswitches that only survive a certain number of clicks. Especially after my mouse showed the previously mentioned defect so soon after the expiry of the warranty… On the other hand Logitech kept its promise regarding the battery life – I’m still using the first set.

Update (2014-11-22): Just as a brief clarification, after I got some feedback on the M705. (Apparently several users have had similar experiences.) Logitech uses Omron switches that actually seem to be pretty good. So I want to point to posts from Kogos and Ralf  below: First you should try what is recommended in a Logitech forum post. After that you might try resoldering the joints. If that doesn’t help an exchange might be the best option…

HowTo: Running Eagle CAD 6.2 on Ubuntu 12.04/12.10/13.04

Update: Eagle CAD version 6.4 is available which runs fine on Ubuntu 12.04., Ubuntu 12.10 and Ubuntu 13.04. I’ve made a small tutorial on how to fix possible dependency problems with this new version.

Ubuntu 12.04 only provides an older version of Eagle CAD, version 5.12.0 to be exact. A newer version 6.2 (32 bit) is available for download, but the installation fails due to the lack of a 32 bit libpng-1.4 library:

error while loading shared libraries: libpng14.so.14: cannot open shared object file: No such file or directory.

Luckily, I found a detailed post at raek’s blog which covers older Ubuntu versions. Great parts of the following instruction were taken from this post and adapted for Ubuntu 12.04. Thanks!

First of all you need to install some packages to build the missing png library. Open a terminal window and enter on a 32 bit Ubuntu 12.04:

sudo apt-get install build-essential perl
sudo apt-get install zlib1g zlib1g-dev

On a 64 bit Ubuntu 12.04:

sudo apt-get install build-essential perl gcc-multilib
sudo apt-get install ia32-libs lib32z1 lib32z1-dev

Then you need to fetch the libpng source code and the Eagle CAD 6.2 installer, either with “wget” (as I have done it) or directly from the respective webpages. A current version of Eagle CAD is available for download here: http://www.cadsoftusa.com/download-eagle/
libpng 1.4 can be found on this page: http://www.libpng.org/pub/png/libpng.html
I will use the “/tmp/libpng-eagle” directory for building the library:

mkdir /tmp/libpng-eagle
cd /tmp/libpng-eagle
wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng14/libpng-1.4.12.tar.gz
tar xvfz libpng-1.4.12.tar.gz
cd libpng-1.4.12/
./configure --prefix=/tmp/libpng-eagle/install CFLAGS=-m32
make check
make install

At this point I assume that your Eagle CAD installation will be located at “/home/$USER/eagle-6.2.0“. If not, simply adjust the location in the text below:

cd /tmp/libpng-eagle/install/lib/
mkdir -p /home/$USER/eagle-6.2.0/lib
cp -a libpng14.so* /home/$USER/eagle-6.2.0/lib/

Now the installer should run…

export LD_LIBRARY_PATH=/home/$USER/eagle-6.2.0/lib/
cd /tmp/libpng-eagle/
wget ftp://ftp.cadsoft.de/eagle/program/6.2/eagle-lin-6.2.0.run
chmod 755 eagle-lin-6.2.0.run

After the installation finishes, Eagle CAD will still not run unless you tell it where to find the png library we have just created. The easiest way to do this is by creating an executable start-up shell script (e.g. /home/$USER/eagle-6.2.0/eagle.sh) which contains the following commands:

export LD_LIBRARY_PATH=/home/$USER/eagle-6.2.0/lib

Additionally, you could create a Unity/Gnome menu entry, for example “/home/$USER/.local/share/applications/eagle.desktop
(do not forget to adapt the $USER):

#!/usr/bin/env xdg-open

[Desktop Entry]
Comment=Eagle CAD

Update: A friend told me that the installation procedure also works with Ubuntu 11.10.

My Erdős number: 3

Okay, it might be a joke among mathematicians – but it is nice to know that one has a finite Erdős Number. Wolfram MathWorld describes it as…

…the number of “hops” needed to connect the author of a paper with the prolific late mathematician Paul Erdős. An author’s Erdős number is 1 if he has co-authored a paper with Erdős, 2 if he has co-authored a paper with someone who has co-authored a paper with Erdős, etc. (Hoffman 1998, p. 13).

In my case, the following collaboration path results in an Erdős number of 3… 🙂

  • Kai C. Bader and Mikhail J. Atallah and Christian Grothoff “Efficient relaxed search in hierarchically clustered sequence datasets”, ACM J. Exp. Algorithmics, 17(1):1.4:1.1–1.4:1.18. 2012.
  • Mikhail J. Atallah and Samuel S. Wagstaff, “Watermarking Data Using Quadratic Residues”, Proc. of SPIE Workshop on Electronic Imaging (SPIE 99), SPIE – The International Society for Optical Engineering, SPIE Vol. 3657, pages 283-288, 1999.
  • Paul Erdos and Samuel S. Wagstaff, “The Fractional Parts of the Bernoulli Numbers”, Illinois J. Math. 24, pages 104-112, 1980.

Dissecting a PICO-C USB flash drive

The Super Talent PICO-C is a really tiny USB flash drive. Ever since I bought mine about a year ago I always wondered how it might look like inside the neat metal housing.

About a month ago, the drive was not accessible anymore. A short search on Google showed that in many cases a bug in the firmware rendered the flash memory inaccessible. There are tools available to revive faulty firmwares, especially for this kind of stick – if at least the controller is still recognized, which was not given in my case. Nevertheless, I tried the tools. As expected, they did not work. Luckily, nothing important was stored on the drive…

Being not that expensive, I did not exchange it (in spite of still having a warranty). Instead, I dissected it. 🙂 Removing the front cover with a screw driver was not complicated.

I first tried to also remove the metal back with a screw driver, but it was firmly glued together. I only managed to break of a piece of the black epoxy (?) housing. Ouch… The solution was to use a hot air gun to melt the glue. The black interior fell out by itself after 10-15 seconds.

Sadly, the black block containing all the logic is rather unspectacular. It does contain a labelling which was only readable after some photoshopping:

4010 C024L0WAA or CO24LOWAA

At this point I gave up. Without any further possibilities to dissect the part and without any clues from the caption I put the remains aside. I thought about dissolving it in acetone or a similar solvent but I suspect it would work.

By the way: I bought the same drive again. I hope the new one lasts longer… 😉

Update: I’ve found a nice blog post about the build process of these USB sticks (bunnie’s blog): Where USB Memory Sticks are Born

Scanning network drives and shares with Avira Antivir

I use a NAS to store files I do not directly need on my notebook hard drive (due to limited space on my SSD). From time to time I need to boot Windows and I regularly use this opportunity to scan my complete system for viruses. The installed free version of Avira Antivir, like most other free scanners (as far as I know), prevents scans on network drives. This feature is reserved for the professional version. Apart from the safety aspect, this has been annoying me for a while…

Playing around with different mount techniques to get the antivirus software to scan my network shares, I eventually stumbled over symbolic links (surprise). What I did not know: you can create symbolic links not only of files or directories, but also network shares.

Symbolic links from network shares can easily created in with the mklink /d command. (Found it on MS TechNet and in the Windows 7 forum).

C:\>mklink /d "c:\folder" "\\NAS-NAME\folder"

You need administrative rights (an administrator cmd shell). You can then use the explorer to browse into the newly created (linked) directory and scan it with your virus scanner.

CaSSiS – Comprehensive and Sensitive Signature Search

Comprehensive and Sensitive Signature Search

CaSSiS is a fast and scalable software for computing comprehensive collections of sequence- and sequence-group-specific oligonucleotide signatures from large sets of hierarchically clustered nucleic acid sequence data. CaSSiS determines sequence-specific signatures and perfect group-covering signatures for every node within a cluster (i.e. target groups). For groups lacking a perfect common signature, it is able to find the signatures with maximal group coverage (sensitivity) within a user-defined range of non-target hits (specificity). An upper limit of tolerated mismatches within the target group, as well as the minimum number of mismatches with non-target sequences, can be predefined.


The former CaSSiS project page at the TU München was shut down in the mean time. The source code is now available in my CaSSiS GitHub Repository.

Building CaSSiS from Source

CaSSiS uses the cmake build system. Please make sure to have it installed. The build will be halted if cmake/make is run in the source directory to avoid build errors. Please make sure to build the source code in an empty directory, i.e. create a new (sub)directory and then run cmake from there.
Caution: Running ‘make’ in the source directory is prevented!

Source code build steps:

$ tar xvfj CaSSiS-0.5.1-src.tar.bz2
$ mkdir /path/to/build
$ cd /path/to/build
$ cmake /path/to/cassis-src
$ make

I’ve also prepared a video tutorial on “How To build CaSSiS from Source”:


Please make sure to point ‘LD_LIBRARY_PATH’ to the correct directory, if necessary.

(export LD_LIBRARY_PATH=/path/to/cassis/lib)
 CaSSiS usage: cassis {1pass|create|process|info} [options]
 cassis 1pass (new CaSSiS-LCA approach)
 Mandatory: -seq [... -seq] -tree
 Optional: -all -dist -gc -idx -len -mis -og -rc -temp -wm
 cassis create
 Mandatory: -bgrt -seq [... -seq]
 Optional: -all -dist -gc -idx -len -mis -rc -temp -wm
 cassis process
 Mandatory: -bgrt -tree
 Optional: -og
 cassis info
 Mandatory: -bgrt
 Options (alphabetical):
 -all Evaluate all 4^len possible signatures. (Not recommended, may take forever... Default: off)
 -bgrt BGRT file path and name.
 -dist <number> Minimal mismatch distance between a signature candidate and non-targets. (Default: 0.0 mismatches)
 -gc <min>-<max> Only allow signatures within a defined G+C content range. (Default: 0 -- 100 percent)
 -idx Defines the used search index: minipt = "MiniPt Search Index" (Default)
 -len {|-} Length of the evaluated oligonucleotides. Either a fixed length or a range. (Default: 18 bases)
 -mis <number> Number of allowed mismatches within the target group. (Default: 1.0 mismatches)
 -og <limit> Number of outgroup hits up to which group signatures are computed. (Default: 0)
 -rc Drop signatures, if their reverse complement matches sequences not matched by the signature itself. (Default: off)
 -seq MultiFasta file as sequence data source Multiple sequence sources can be defined.
 -temp <min>-<max> Only allow signatures with a melting temperature within the defined range. (Default: -273 -- 273 degree Celsius)
 -tree Signature candidates will be computed for every defined (i.e. named) node within a binary tree. Accepts a Newick tree file as source.
 -v Verbose output
 -wm Enable "weighted mismatch" values. (Default: off)
 Caution: Combining the -gc and -temp filters can cause unwanted side effects because they influence each other.

CaSSiS Result Files

CaSSiS was designed to compute comprehensive signature sets based on large sequence databases. To be able to further process/parse the result files of CaSSiS, the simple but flexible CSV format was chosen. Smaller result files can be read/edited with spreadsheet software (Excel, LibreOffice, …). Larger files should be parsed with an appropriate editor or scripts.

When directly run, CaSSiS creates two different types of result files in the CSV format in the current directory: result_array.csv and results_xxx.csv where ‘xxx’ is defined by the outgroup hits’ range.

This file gives an overview over the results. Rows represent the range from 0 to max. outgroup hits. Columns represent the nodes of the hierarchical cluster. All information within this file is also included in the following ones.

This file contains the actual results of CaSSiS, separated by the number of outgroup hits ‘xxx’. Within the files, the first column contains the node identifier of the hierarchical cluster. The second and third column show the number of organisms within the group/node (for leafs/organisms: 1) and the number of
actually matched organisms. The appropriate signatures follow subsequently.



CaSSiS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. CaSSiS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with CaSSiS. If not, see http://www.gnu.org/licenses/


MiniPT is derived from the ARB PT-Server search index: The ARB software and documentation are not in the public domain. External programs distributed together with ARB are copyrighted by and are the property of their respective authors unless otherwise stated. All other copyrights are owned by the Lehrstuhl für Mikrobiologie, TU München. See the respective license.txt files in the binary/source packages for more details.

Klipsch S4i: Repair broken earbud headphones

Note: Please also read the comments as there are updates & fixes available!

Update: I’ve fixed the graphics showing how the different bundles of cables should be attached to the connector. A big thank you to Rock for correcting me on this!

I am a fan of good-sounding in-ear headphones and bought a Klipsch S4i for my iPhone 3GS. I am really impressed by its quality and they are not overpriced (around 80.- € when I bought them). Last month, the connector on the headphone cable began to loosen. I tried to fix it with cyanoacrylate adhesive but a few days ago the cable finally broke (resulting in a dead left channel and microphone).

I am pretty sure this type of defect is not covered by the manufacturers guarantee (another point: I purchased them over two years ago) so I didn’t bother disassembling the connector. The first thing I did was removing the plastic cover of the connector with a utility knife.

The soldering spots are enclosed in clear plastic. I tried to remove the plastic and gently desolder the cables from the connector, but the connector broke (actually it melted). At least I was able to identify the six bundles of thin twisted wires.

Corrected Cable Assignment for the Klipsch S4i Headphone
I separated the colors and twisted them together into four bundles (one for each contact on the connector) and resoldered them onto another spare connector. The fixed connector lacks the ‘stylish’ finish it previously had, but the shrinkable tubing makes a good protection for the thin wires. And the complete functionality is back, including the microphone and the control buttons.

Update: The new Klipsch S4i model has a revised (improved) kind of connector. Maybe I was not the only one with a broken cable…


Update for users of the Android version (Klipsch Image S4 II) headphones.
A big thank you to “WCSTUR” (whoever you are) for sharing this information per e-mail:

Changes to your wiring diagram for the Klipsch Android version:
TIP – green wire (always left earbud)
Band 1 – red wire (always right earbud)
Band 3 – the 2 earbud copper wires AS WELL AS the red and blue-green shield wires for the microphone. This band is the ground. (Your diagram shows the microphone red and green-blue shield wires connected to the earbud wires. Your diagram may also work since the earphone impedance to ground is only about 18 ohms for each of these earbuds.)
This wiring follows what I dissected from the original plug.

HowTo: Compact Virtualbox VDI images

I just ran into an issue while trying to compact my Virtualbox hard drive images. On virtual NTFS filesystems I usually run defrag twice, then rely on a tool called sdelete (download page) to zero the free space within the image. Afterwards I use vboxmanage to reduce the image size.

This time either zeroing the free space or the shrinking process seemed to fail. The supposedly compressed images needed even more space than before. It took me a while to figure out what happened – the parameters of sdelete had changed:


SDelete - Secure Delete v1.6
Copyright (C) 1999-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

usage: sdelete [-p passes] [-s] [-q] <file or directory> ...
       sdelete [-p passes] [-z|-c] [drive letter] ...
   -a         Remove Read-Only attribute
   -c         Clean free space
   -p passes  Specifies number of overwrite passes (default is 1)
   -q         Don't print errors (Quiet)
   -s or -r   Recurse subdirectories
   -z         Zero free space (good for virtual disk optimization)

It feels like 99% of the tips concerning zeroing the free space (by calling sdelete -c, the old option for zeroing) seem to be outdated. Even worse: the “clean free space” feature shows the same output as “zero free space”.

So this should (currently) be a working procedure:

  1. On the guest system: Run the Windows “defrag” tool twice.
  2. On the guest system: (Download and) run “sdelete -z” to zero the free space.
  3. On the host system: Use vboxmanage “modifyvdi IMAGE.vdi –compact” to reduce the image size.