Combining PDF files with gs

Combine 2 or more pdf files to 1:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=dest.pdf -f file1.pdf file2.pdf

Select page numbers from the input file:
gs -dNOPAUSE -dBATCH -dFirstPage=1 -dLastPage=1 …

Lubuntu volume keys (not working)

To get them work edit the /home/$USER/.config/openbox/lubuntu-rc.xml. Replace the commands within the <command> statements to:

<!-- Keybinding for Volume management -->
 <keybind key="XF86AudioRaiseVolume">
 <action name="Execute">
 <command>amixer -D pulse sset Master 5%+</command>
 <keybind key="XF86AudioLowerVolume">
 <action name="Execute">
 <command>amixer -D pulse sset Master 5%-</command>

Kicad schematic editor slow

If there are performance issues with Kicad and the schematics editor running on a ATI Radeon GPU hardware consider to add a xorg option in the file


Section "Device"
    Identifier "Radeon"
    Driver "radeon"
    Option "AccelMethod" "exa"
    Option "MigrationHeuristic" "greedy"
    Option "EXAPixmaps" "false"

The option EXAPixmaps is documented here:

Battery charger – battCharger V1

I am proud to introduce you now my newest electronic hardware:

battCharger – a free and open hard- and software design to evaluate buck-converters charging a battery.



The hardware circuit consists foremost of a secondary switched micro-controller driven buck-converter. An Arduino Micro board controls the output levels, while it is measuring voltage, current and temperature.
The main reason to build this “monster” was that most manufacturers do not free the source code and schematics. What if a “new” battery technology is out and the manufacturer does not update it’s firmware any more?

With the battCharger no problem: Source code is available for public.

The battCharger can charge battery types like Ni-Cd, Ni-Mh, Li-ion and Lead acid. Although it is designed for charging batteries, the battCharger has a power supply mode and an electronic load mode because the main hardware design consists of a power supply.

The software is currently mostly functional and following features are implemented:

Charger mode:

  • Charge

    Batteries are charged within given parameters: Voltage, current, capacity, cells, temperature, battery type. A security shutdown occurs if over-/undervoltage, -temperature and overcurrent is detected, or a timeout is reached.

  • Discharge

    Batteries are discharged within given parameters: Voltage, current, capacity, cells, temperature, battery type. A security shutdown occurs if over-/undervoltage, -temperature and overcurrent is detected.

  • Charge/Discharge/Charge
  • Charge/Discharge/Charge cyclic (for Ni-Cd batteries)
  • Measure resistance

    The resistance is measured by discharging at 0,1C for 20 seconds and by discharging afterwards at 1C for 20 seconds. If finished, the resistance will be calculated. (DC load method,

Power supply mode:

  • CV/CC mode

Electronic load mode:

  • CC mode


  • Channels: 2
  • Maximum current per channel: 8A
  • Maximum voltage: 36V
  • Maximum power sum: 200VA
  • Maximum capacity: 200Ah
  • Maximum discharge/load power per channel: 50W
  • Power supply topology: Secondary switched buck converter (with transformers)

External data acquisition tools
The USB UART of the Arduino Micro can be grabbed with any tool understanding serial communications. A GUI is developed to inspect electrical loads, sources and batteries. Remote SSH connection is supported.
Also an email alert function is implemented.


The soft- and hardware sources are available at:

Two PCBs were manufactured by Eurocircuits and one of them is now under stress-test. Note that a new PCB release will be publicated to patch some errors.

Further on more info will be presented onto this site.

Fiddle yard controller fy_2

Some summarizing word about it:

  • Controls (with my circuit) up to eight rails
  • Direct DCC support, “Multiport” setup (
  • Position control solved with some kind of “P” controller
  • Position setup could be done with the implemented loco decoder mode or direct by changing CVs, for details please have a look at the header of fy_2.ino
  • Switching between the rail sensors possible (, “Shared sensors”)


The source code is available at:

And the schematics:



Don not forget to load the Arduino Duemilanove bootloader onto your microcontroller otherwise the serial upload and debug will not work!