Donnerstag, 26. September 2013

Expedit Coffee Bar

As the title implies, this is a simple mod to create a small coffee bar out of an Ikea Expedit rack.
I covered the desk with an 1 mm aluminium sheet, also the border is enhanced with an rectangular aluminium stripe. Everything is glued directly to the rack's surface in order to avoid screw holes.

The coffee maker is placed on a more ergonomic level. The stainless steal parts are also from Ikea (CAPITA) .

The lighting is made of an acrylic white plastic and a RGB led stripe. I bought 4 pieces of wood in the local home store, already cut to 33,5x33,5cm. I used my jigsaw to cut holes in each one, glued the LEDs to the wood using hot glue and assembled everything.

I used a self designed controller for the LED stripes. It is based on an ATMega8, and can drive 5-LED stripes. The firmware supports an 8-bit PWM on every channel. To control the lights remotely and changing the lighting mode I used an infrared receiver.  

This shows my test and development board. 

I used n-channel MOSFETs for switching the led stripes to reduce the voltage drop and to increase the efficiency of the board.
This picture shows the controller (and some other boards) after etching. 

To decode the IR-signals I used the great Infrarot-Multiprotokoll-Decoder (IRMP) library from

This is a demo of my new ethernet Arduino board I'm developing. I attached an IR-LED to the board and wrote a little program with buttons to change the colors. The windows program sends an UDP-package to the Arduino board which generates the IR signal. The LED controller receives the IR signal and sets up the light correctly.

In the future I plan to develop an Android app to switch the lights. 
The final installation is not very spectacular. As power supply I used an XBOX 360 HD-DVD drive AC adapter, which was left from salvaging the blue laser diode years ago.

As usual you can download the board files form thingiverse:

Sonntag, 8. September 2013

Building a small (Gaming-) KeyPad for StarCraft 2

A month ago or so I started playing StarCraft 2 again. I'm not really good at it, actually, but it's fun to play with my friends. I've never ever got used to the hotkeys, most of my refuse to practice. As an engineer I've tried to solve problems by creating tools, not to practice stupid routines. The grind hotkey system seems a good idea, but it if you think about it, there is a serious design fault. As a right-handed person you have to use the left hand for the hotkeys. The grid on the screen is on the right side and the most used keys are on the left. This means you have to use your little finger for the most common actions - that's not very comfortable. 
Another thing is that switching between right and left shift is not very intuitive. 
My idea was to mirror the grid on a special keypad. Mostly, you think from the middle of your view to the outside. The same is true for your hands. The index finger means center, the little finger is your outer side. 

It's totally stupid to shift the hole grid to the left.
For the brain (at least for mine) it's much easier to mirror the action, because we are always thinking from the center of our view to the left and the right side. 

After thinking about this I wanted to try it. So I decided to build a programmable mini keyboard. And this is the result:

First I salvaged some old Cherry-MX keys from an old keyboard. This was indeed cheaper than buying the buttons.

The case is fully 3D printed. The cover for the electronics is made of carbon, I personally like the way it looks. I even added folding feet to change the angle of the keypad.


For the future I plan to paint the buttons with somekind of rubber paint, called "PLASTI DIP". Thats a rubber like paint witch give the surface a very good grip.

The design is a simple matrix. Because this is a "gaming" device, every single button should be pressed at the same time. This means you need a diode for every button.

I used six of these PCB slices for the buttons, the last two rows are a little bit different, due to the different size of the key caps, though electrically the same.

The finished button matrix: 
Due to the fact the SMD-Diodes didn't arrive at time, I've soldered the normal ones out of my personal stock in. It's always a good idea to buy at least 100 pieces of the most used common parts. 


This shows the overall wiring of the button matrix and the USB-controller board:

The thing is powered by an ATmega8U2. These little guys come with a preprogrammed DFU bootloader. To use it as a HID-Device I used the LUFA-USB Framework. I just had to edit the Keyboard Demo a little bit. Unfortunately the Atmega8U2 has only 8kB of flash. The preprogrammed bootloader uses already 4kB and the USB stack another 3, there is not much left, but enough. Originally I planned to add a virtual serial port to edit the keyboard layout, but after adding the keyboard functions I have only less than 400 Bytes left and I'm not sure if this is enough. 

For now if I hold the upper left key pressed while plugging it in, the original Atmel bootloader comes up and I can flash it with the FLIP-Programmer. This can be done by an easy jump:

void (*bootloader)( void ) = 0x0800; // Address is in Words not Byte !!!!
void BootloaderCheck(void)
   if (BootButton)
I thought this would be interesting because I did't find so much about how to use the the bootloader of the ATmega8u2 and I tried a lot until I got it to work.

The keyboard layout can be easily edited by changing the values in the array:
uint8_t KeyTable[6][6] = {
 {0x00,    0x00,  0x00,    0x00, HID_SC_SPACE, HID_MO_LEFTCTRL}


Back to the original intention: playing StarCraft 2. I played some games with it and you learn using the hotkeys incredibly fast. As I thought the mirrored grid is very intuitive. You don't have to move the hand as much as if you use the normal hotkeys and with the two rows of numbers, every short group is easily reachable. The rectilinear grid of the buttons is more ergonomical than I thought. 
Over all I like it (and it was fun to build a keyboard ;) ), even there is now a little space problem on my desk:

I put the 3D-Files, the PCB and the Sources on thingiverse:

Freitag, 7. Juni 2013

My new LaserCutter (technical details)

A lot of people asked me about additional information about my laser cutter project.

The Laser Driver, is based on the A 1 MHz Analog Laser Modulator Based On LM317 Regulator. I planned to build a Laser PCB Exposer like this one. But after some calculations I was not longer convinced that it would provide satisfying results in resolution and usability. I canceled the project and the laser with driver was unused for more than a year.

However, the driver has some serious disadvantages for this use case.
First of all, if the Atmega (Arduino) is booting up, all pins are high-Z - this is enough to power the laser, not on full current but it is damned bright. I highly recommend to build another driver from Sam's page. The analog modulation is not necessary, neither is the switching time.

Secondly, a current monitoring by the Arduino would be nice maybe even current controlling. I think this is worth to invest some time in.

Thirdly, no emergency switch-off or at least a second enable pin.

The Laser itself is a 445nm Diode I've purchased for about 50€. It was labeled 1000mW, but I don't believe it will run this long on that power output.

Now to the mechanical part. I don't feel comfortable by releasing the complete design because I'm not happy with it. It was very quickly done and has a lot of disadvantages. The worst part is the swinging of the Y-axis.

I think, a possible solution is a second belt, but this increases the cost and complexity of the device.
The belts are just fixed with cable ties and some other nasty hacks. If you really want the design, email me and I will send you the files.

I used Skeinforge to generate the G-Code.

I added a M103 to turn off the laser and a M101 for turning it on. So you have to add these two commands in the Commands.cpp file of the firmware:

      case 101: // M101 Laser ON
        digitalWrite(5, HIGH);

        codenum = 100;        // Wait vor 100ms for the Laser to burn though the material.
        codenum += millis();  // keep track of when we started waiting
        while((unsigned long)(codenum-millis())  < 2000000000 ){

      case 103: // M103 Laser OFF
 digitalWrite(5, LOW);

I hope some of you found parts of this entry useful.

Donnerstag, 25. April 2013

I needed new T-Shirts - or: How I got a Laser-cutter.

Last week, spring finally arrived in Germany and I realized I need new t-shirts. The new Iron Man film is only days away, so it's time to upgrade the Arc. Short thought, I could make them like I did last year.
Ain't nobody got time for that.
And cutting the stencil by hand sucks! So a quick look in the "junk" boxes where I collect all the electronic parts I used or bought for my projects - yeah I have everything to build a Laser-cutter!!!!! A 1 Watts blue laser diode will be enough to cut through a thin plastic sheet, that's all I need. Everything else is routine. Designing a simple XY-Stage took only one evening, printing the parts took another.

The funniest part, the assembly, unfortunately took only half a day.
As controller an old Gen6 RepRap motherboard will do the job. I used it for my first 3D-Printer but without heated bead and fan support it got replaced by a Ramps1.4 on the second one. Some little adjustments to the firmware (Repetier FW) and the first results are very promising:

Finding good cheap materials to make the stencils of was a little difficult. After some failures I found the perfect one:

I think I have thousands of this older dividers, most of them are not longer in use. But they do have exactly the right thickness and my laser is able to cut them.

Here we go, as I say BURN!
Making the t-shirts was a matter of minutes.

The Logo on the blue shirt is the Mayday emblem, a large German EDM party taking place this weekend. Nice timing!!! 
Overall I'm very happy with the results:

The Laser-cutter is a solid base for future improvements. 

Some words to the stage: it needs some improvement, first of all a z-axis. This makes adjustments much easier.
Secondly, I will make a drawer where I can put the cutting material and slide it inside, so I don't have to open the hole case. 
Thirdly, the x-axis swings a little bit too much, I will add a threaded rod to make it less flexible. 

If this modifications are successful I will upload the *.stl files an schematics here.

I'm closing this with a nice picture of the beam taken by the webcam I used for beam monitoring. Lasers look awesome:

I've updated the model a little bit: