Dungeons & Dragons, the mother of all role playing games, uses alignment charts to classify characters along the lines of “lawful” to “chaotic” and “good” to “evil”. Internet-memes classify everything into such charts, from screws to penguins.

Looking at my desktop, a colleague mentioned even screen-setups to be classified this way. My office setup isn’t shown in the chart, but it’s nearest to “chaotic good”.

My home-setup on the other hand is somewhere between “chaotic neutral” and “chaotic evil”. On the left side, I have my notebook’s full HD screen, a big horizontal 4k-Monitor in the center, next to it another full HD in vertical alignment. Works for me.

I see “chaotic evil” as a challenge. Some months ago I read a gloss about the ideal screen setup for programmers. Using “xrandr –listmonitors” I found the internal name of my 4k-screen to be “DP-2-3”. The calculator in the article gave me the following command to rotate the screen’s content by 25°, with a vertical shift of 800 pixels:

To be honest: I don’t see this being my preferred configuation in the future. But it’s nice to see that its so easy to setup:

Screen-setup, chaotic (very) evil

Deutsch Lieber auf Deutsch? Hier lang.

Math lessons in the fifth grade cover — amongst other things, I hope — the binary system.

My favourite fifth-grader asked me for help. Explaining the number-systems is one thing, but you can do more if you’re a geek with a laser cutter. So I built her a binary counter:

Binary counter, laser in wood

The idea for this came from Twitter, I remembered seeing the video a while ago. I couldn’t find any files for this, so I called FreeCAD to the rescue.

I really like the result. And it looks as if the physical model really did help understanding the numbers.

If anybody is interested in building their own version of this: here are the files (planned for 4mm material):

Deutsch Lieber auf Deutsch? Hier lang.

BBQ temperatures in Zabbix

BBQ temperatures in Zabbix

Unfortunately, this project is still work in progress. But I want to tell of the first test run anyways. The electronics didn’t do exactly as it was supposed, but you see where this is going.

About two years ago, I built a prototype of a BBQ thermometer, which I showed here (german only, sorry). It really was just a quick hack, not really intended for repeated usage. I have learned a lot since then, and now I want to build something like that, but this time as a ‘real project’.

Being able to measure core temperatures of multiple pieces of meat, I didn’t have to think about the project’s name for long: Multimeater! :-D

The Hardware

The Hardware

Like some of my last projects, this is based on an ESP8266-module, with software developed in the Arduino IDE. So it already runs WiFi. My firmware is — as in some of my other recent projects — based on the Homie-framework. It sends collected values via MQTT to my broker, from there they are delivered to Zabbix. Values are measured with two high temperature sensors each connected to a MAX6675, and four common meat thermometers on a MCP3208.

Six temperatures? Yes. The plan is, to acquire the inner temperature of the pit on two positions. Under certain circumstances, these temperatures can be too high for the meat sensors. So I take two separate sensors for this, one on each end of the pit (which is a bit lengthy on a smoker, so there really is a relevant bit of a temperature drop in between). And with four meat thermometers I can monitor core temperatures of — you guessed it — up to four pieces of meat.

Zabbix is usually used as a monitoring software for server systems. But it doesn’t just work in enterprise environments, I am collecting some… let’s say unusual values at home. ;-)

In this case, I just used it to see graphs of the temperatures. But if I’m really starting to smoke me a pulled pork over night, I can tell Zabbix to wake me up if temperatures are out of a predefined range.

As mentioned, today’s run was just a test. And of course, several things didn’t work out as they were planned. I had a problem with the high temperature measurements in the pit. Those values turned out to be completely useless. But since I just bought three pieces of meat for today, I was able to use the fourth meat sensor for the pit temperature. Then I misplaced the sensor in my piece of ham, so the graph looks a bit strange. And to top all this off, heavy rain poured down during the test. Currently, there is no roof over the smoker, so that didn’t make it easier, either.

All in all, everything looked quite promising. I keep bringing this forward, and as soon as I really get it to work I’m going to publish it here, of course with circuit and firmware.

Oh, and since I’m sure that I’ll get that question: technical problems aside, I had some awesome pieces of meat from this test. Everybody really enjoyed it. :-D

What's wrong with this?

What’s wrong with this?

This is another old project, dating back to about 2004. I had it covered on the old Schatenseite, and I want to give a short presentation on the blog to preserve it.

I was given an old Commodore C64 that somebody decided to dispose of. The first version, in germany this case is dubbed ‘Brotkiste’ (bread box). It didn’t turn on anymore, and lacking any personal Commodore history I didn’t hesitate long before taking it apart.

Unfortunately, I didn’t know about microcontrollers at that time, otherwise I would have been able to save the functionality of the keyboard. I wasn’t able to, so parts of the underside of the keyboard had to go, to make space for CPU cooler and RAM. :-(

I inserted a VIA EPIA M10000b, so the C64 ran at 1GHz. The system was completed by 256MB RAM, a 2,5″-20GB-harddisk, a CD-ROM from a notebook and an external power brick.

The C64-PC

The C64-PC

Built like this I could attach the unit to my TV set, mainly for playing some games on it. But to be honest: this was one of the projects that made more fun during the build than afterwards…

Nowadays I would build this in a different way. A Raspberry would look great in the case. Needing much less space it would even be possible to keep the keyboard in a working condition. And running the Retropie distribution you could even have this certain 80’s feeling… :-D

See also…

I mentioned this project in an article (german only) on this blog, it dates back from November 2012. Somehow I never showed it, I don’t really know why.

Those who read this blog for a while know that I have a deep faible for computer keyboards. You don’t get the full picture from my english language articles, but in german you can find many keyboard related articles on this site.

Amongst others, my collection contains two vintage Apple keyboards. There’s a — really not too shabby — Apple Extended Keyboard II, which was built between 1990 and 1994. Many enthusiasts claim that this is the best keyboard ever produced by Apple, partly of course because of it’s mechanical nature with the Alps switches.

Even more original — and in my eyes it’s a typical Apple product — is the Apple Adjustable Keyboard, 1993 vintage. Typical Apple? As I said, in my eyes: it was expensive for its time, and above all the visual appearance of the product is more important than functionality. Even though there are arrow-keys on the main keyboard, I personally wouldn’t want to miss function- and navigation-keys (Home, End, PgUp, PgDown). And if you connect the additional keypad, you really have to have long arms to reach your mouse… :-/

However, I wanted to give both a try. And since I don’t have access to a computer with ADB interface — Apple killed it in 1999 — I needed a converter. You can buy this stuff, but you don’t have to.

On geekhack.org, there’s a japanese developer called hasu, who is tmk on Github. He created and published the TMK Keyboard Firmware Collection. That’s a firmware that can be run on several AVR-based platforms, notably the Teensy 2.0 which is well known in keyboard communities. The firmware is able to ‘talk’ several different keyboard protocols. Of course, USB in one direction, to be connected to any modern computer. In the other direction there are protocols like PS/2, Sun or Apple Desktop Bus. The custom firmware is loaded with features even expensive modern high end boards fail to deliver. It’s possible to program macros, use media keys or control the mouse pointer with the keyboard.

Unfortunately, I didn’t have a Teensy at home. But I had all the parts to build something compatible, and all the tools to etch a fitting PCB. So I fired up KiCad and designed a minimal circuit, from that it wasn’t too difficult to create a PCB layout:

(The KiCad files need a bit of a workover, so I won’t publish them here. But it should be easy to recreate the circuit following the two screenshots.)

ADB USB Converter

ADB USB Converter

The finished converter measures in at 2x5cm, that’s really tiny. But the important thing is: it works!

I could probably use the ADB mouse with an off-the-shelf converter. But honestly: even a hardcore fanboy would prefer a modern pointing device without the ball in it. That is: a while ago I had the opportunity to play a bit with System 7.5 (the Apple operating system from the same era as the two keyboards), and I have to confess that the Adjustable Keyboard did its part for the authentic user experience… :-D

To prevent misunderstandings: this says that it's not a mediaeval toilet.

To prevent misunderstandings: this says that it’s not a mediaeval toilet.

This article wasn’t on the blog in 2011. I took it from my old CMS in 2015.

I built this photo booth for our wedding in summer 2010.

I can’t remember where I got the idea, I guess I saw something similar somewhere on the net. After everything else for the ceremony was set I had some time to spend. And this idea…

Hardware

Manual

Manual

I had most of the needed material at home. Enough wood, a cloth for the curtain, an unused notebook. And a test circuit I built for my USB-projects. I just had to acquire a webcam, a push button like it’s used in moist rooms (how do you call that in english?) and two fluorescent tubes.

Unfortunately, I forgot to take a picture of the entire booth. It was basically a large box made of oriented strand board, about 2.20m high, 1.20m wide and 1m deep. On one side was the entrance, closed by a thick brown curtain. Inside there was a bank, opposed to it the technology.

Visible there were two simple tubes for the light, a rectangular section with a screen, a small round hole with a lens and said moisture-proof switch.

Hidden behind the wall were an IBM Thinkpad T43 along with a power supply, a Logitech Webcam Pro 9000 and some electronics.

I built this circuit since I didn’t want to make the same USB-interface over and over again on breadboard. It is essentially the same circuit as in my USB LED fader, the USB servo or my Dulcimer Keyboards. An ATmega8 microcontroller and some bird seed for the USB interface, at the other end a pin header to interface all unused pins of the controller on the breadboard.

The box was not built to last forever, so I just had two of the pins connected to terminal cables to the push button.

Software

The circuit is the same as the USB-Servo

The circuit is the same as the USB-Servo

In this project there are two important software components: the photo booth program on the laptop and the firmware on the controller.

The notebook was easy to equip. First I wanted to write a program myself, but after a short search I found something that does exactly what I wanted: Cheese. This is basically a photo booth. You press the space bar, then the program takes four images, at intervals of a few seconds. Simple and perfect.

The microcontroller was not quite as trivial to program, but I already had the solution in the drawer. With a slightly adapted Dulcimer firmware, the circuit behaves just like a simple USB keyboard. I just had to see in the schematic which pins I had to connect to create a space key.

:arrow: In combination with the moisture-proof push button I probably had the only wet room space bar in the world! ;-)

The combination worked perfectly: you go into the box and see the large display. After pressing the button, there were four consecutive pics taken, each with a short countdown.

The pictures end up in a directory and each has the recording time in the file name. That allows to rearrange the pics with a nice one-liner, so the result is a big picture with the full series of four images:

Results

Box of Fools

Box of Fools

I had assured that I would not put the images into the net, so there is only one unrecognizable example. The names of people and the original contents of the bottle are withheld. :-)

The quality has really surprised me. The camera makes really sharp and detailed images, and the fluorescent lights illuminated everything pretty evenly.

The box was used at the wedding-eve party and at the actual wedding. From the eve we’ve got more than 500 images, from the wedding even more than 800. Almost all the guests have found their way into the box, most of them repeatedly. And in packs: on some pictures we see at least seven people at once…

The curtain has proven to be a terrific feature. On many of the pictures you can see that the people did not expect that we can see the pictures lateron… ;-)

We are happy about each image. By means of that box, and above all the spontaneity of our guests, we have truly unique memories of one of the best days of our lives. Thanks again to all who joined us!

I didn’t have this project on the blog in 2008, I copied it from the old CMS in 2015.

Looks like the day it was made -- except for the cable

Looks like the day it was made — except for the cable

A ‘hammered dulcimer’ is a musical instrument, its german name is ‘Hackbrett’. But you also can loosely translate ‘Hackbrett’ to ‘hackboard’, which I think is a great name for this kind of keyboard. A funny fact on the side is, that the name ‘Dulcimer’ originates from the latin ‘dulce melos’, which means ‘sweet sound’. If you ever heard someone type away on a Model M, you know why I chose this name… ;-)

A computer keyboard can be a very personal utensil. Especially if it is an extraordinary well built one, like for example the IBM Model M. The Model M design dates back to 1984, but it still has many fans even nowadays. It came with the usual keyboard connectors. First the old 5-pin one, later a PS/2 plug. Unfortunately is that, at least to my knowledge, they never released a version with USB.

A friend of mine knew that I already had built other USB-devices, and one of them even acted as a keyboard (it isn’t really a keyboard, but that’s a different story… ;-) ). He is a big fan of the Model M, so he asked if I could put new life in one of his old keyboards, which had a broken circuit inside. And this is the result…

Hard- and Software

A first prototype

A first prototype

The main part of a computer keyboard circuit is the key matrix. You can imagine it as a number of keys, placed on a raster of horizontal (rows) and vertical (columns) wires. In the case of a Model M keyboard, we have a matrix of 8×16 lines. Eight columns in 16 rows, or the other way around, depending on how you look at it. Each key is connected to one column and one row. If you press the key, it will connect the column and the row on it’s crossing of the lines.

Connected to this matrix is a keyboard controller. That’s a chip with a number of I/O-lines to detect the state of the matrix, and on the other side an interface that enables it to talk to the computer. Oh, and not to forget: it also has three output lines to drive the LEDs for Num-, Caps- and Scroll-lock.

What I did in this project is, that I dumped the keyboard controller chip and its circuit, and replaced it by an ATmega32 and my own circuit. The ATmega scans the matrix for keyboard activity, controls the LEDs and talks to the computer.

For further convenience, I added a boot-loader. With that, it is possible to update the keyboard’s firmware without disassembling it, and without the need for a dedicated programmer.

Other Hardware?

Antique

Antique

As mentioned, the controller in this project is just connected to an ordinary keyboard matrix. You can find this kind of matrix in all kinds of keyboards, from key-telephones over good old hardware like the Commodore C=64 or the Schneider CPC, keyboards with non-PC-connectors like those made by Sun, to modern hardware that could need a few more features.

Till now, I just made a PCB layout for the IBM Model M, but I intend to modify at least a Sun keyboard. In order to do that, I expect having to refactor the key-scanning, since the key-matrix is not 16×8. The positions of the keys on the matrix will be different, I’ll have to re-engineer that. And of course, I’ll have to make another PCB.

Features

Powered by Kicad

Powered by Kicad

At the moment, the keyboard should be able to do everything that the average off-the-shelf-keyboard can do. But there are many features that are possible, regarding the fact that the ATmega32 is absolutely bored till now. You can think of ‘magic keystrokes’ that turn some hidden features on or off, like for example:

  • send complete phrases on one keystroke
  • ‘autofire’ feature on keys that don’t repeat normally, for example Alt+F4
  • change keyboard layout without reconfiguring the computer
  • turn bouncing keys on or off, to annoy other people using your computer
  • random caps lock function
  • use arrow keys as mouse, without having to include a special driver in the OS.

With a little tweaking on the hardware side, there should be even more possibilities:

  • turn the oldtimer-keyboard into a supermodern wireless bluetooth one
  • implement keylogger-funktionality, using for example an SD-card
  • include an USB-hub into the keyboard

If you are just a little like me, it won’t take you much brainstorming to come up with own useful — or even better: useless — ideas. ;-)

Usage

Connect the keyboard to the USB-port. All LED should flash up to indicate that the device is initialized.

Then you can use the keyboard as always. If additional features get implemented, you will be able to use them in their respective ways.

Drawbacks

I don’t know if and how keyboard manufacturers face the problem of ghost keys, I didn’t take special measurements for this. I hope that the engineers at IBM distributed the keys on the matrix in a way that minimizes this problem. Don’t misunderstand: I haven’t experienced that on this keyboard, but I know that it’s a common problem on key-matrixes.

Thanks!

Modern oldtimer

Modern oldtimer

I’d like to thank Objective Development for the possibility to use their driver for my project. In fact, this project wouldn’t exist without the driver.

I took great inspiration from Spaceman Spiff’s c64key, this software is based on his ideas.

Further credits go to xleave, who etched the PCB for me, and also answered many stupid questions about electronics I had during the last few years.

And of course I’d like to thank FaUl of the Chaostreff Dortmund who gave me the idea for this project.

About the license

My work – all contents except for the USB driver – is licensed under the GNU General Public License (GPL). A copy of the GPL is included in License.txt. The driver itself is licensed under a special license by Objective Development. See firmware/usbdrv/License.txt for further info.

Download

See also…

  • clickykeyboards.com – dedicated to IBM Model M
  • RUMP – practically the same project, a parallel development
  • Geekhack – protoboard version, based on Dulcimer

The assembled clock

The assembled clock

In Germany, the official time is transmitted in a signal called DCF-77. You can find many descriptions of the signal format on the internet.

The Binary DCF-77 Clock is a simple device to receive and decode the signal and display the current date and time in binary form. The signal is received in a stock DCF-77 receiver module, decoded with an ATmega8 microcontroller and displayed in binary form on an array of LEDs. This array consists of for lines with eight LEDs each. The ATmega8 is not able to control 32 LEDs at once, so an SAA1064 module is used which is connected via I2C-bus.

The time should be displayed in several different binary formats, the format can be selected with a simple button. The formats will be described later.

The distribution contains the firmware for the controller, the schematics, the documentation and a copy of the GPL license.

Building and installing

The circuit is not too complicated

The circuit is not too complicated

The installation is described in the documentation.

Usage

Connect the device to a DC power source with 9V. As long as no time has been decoded, a running light is shown on the output LED array. The single DCF indicator LED should start flashing to indicate that a signal is received. It is set to on when the input signal is high, and switched off if the signal is low. So you should see it flashing with one flash per second, each flash being 100ms or 200ms long.

If the signal is received correctly, after about two minutes the clock should be able to tell the correct time.

Reading the time

The different modes

The different modes

The time and date are displayed in seven different styles. You can select the style by pressing the button for a while. A pattern of lights indicate which mode is selected, you can read it as a binary value.

Mode 1: Time as binary

This simply displays the hours, minutes and seconds as bytes, one after each other. The fourth line of the display stays blank.

Mode 2: Date as binary

This is like the previous, with the difference that it displays the day of the month, the month and the year in the first three lines. The last line shows the day of the week, monday being a 1, tuesday a 2 and so on.

Mode 3: Time as BCD

This shows the time as binary coded digits (BCD). The first line displays the hours. The left four LEDs indicate the 10-hours, the right four LEDs indicate the 1-hours.

In the same way, the second and third line display the minutes and the seconds.

Mode 4: Date as BCD

This is like the previous mode, but the date is displayed.

Mode 5: Time as BCD (vertically)

This shows the time in a BCD-form as described in mode 3, but the BCD-values are put vertically next to each other. So in the first two colums you can read the hours, the third column is empty, the fourth and fifth columns show the minutes, the sixth is empty and the seventh and eighths indicate the seconds.

Mode 6: Date as BCD (vertically)

This is like mode 5, but it displays the date.

Mode 7: Unix timestamp

This is probably the least human readable format. It shows a 32-bit value of the seconds since january 1st, 1970. :-)

Demo mode

If you connect the clock in a place with a poor DCF-reception, but want to demonstrate the functions, you can use the demo mode. To toggle this, you can touch and hold the button for about five seconds. Afterwards, you can switch through the different display modes. The time displayed will stand still, so this can be used to explain the display modes without a hurry.

Switching to demo mode is indicated by all LEDs flashing for a short moment. Leaving demo mode shows an empty rectangle for a short moment.

Drawbacks

I didn’t expect the DCF-signal to be so easily disturbed. In my case sometimes there is no usable signal left when I put my notebook with WLAN next to the clock. Fortunately, the time will be counted further until the next ‘correct minute’ is received.

Thanks!

I’d like to thank Michael Meier, who developed and published a much more sophisticated clock on his site. The SAA1064-stuff and the routine to calculate the Unix timestamp are based on his project. You can find it on his page.

And once again I’d like to give special credits to Thomas Stegemann for help with the C language.

License

This project is licensed under the GNU General Public License (GPL). A copy of the GPL is included in License.txt.

Download