prototype

UHK + People = Fun times

It's always fun for me to see people experience our beloved keyboard and realize how it is familiar and yet different in a cool way. Lately, I've been to a Toptal meeting, followed by JSConf 2015 Budapest. In my true style, a prototype was in my backpack waiting to be seen by people. Naturally, some pictures were shot.

UHK demo at the Toptal meeting

UHK demo at JSConf

UHK demo at JSConf

Even more recently, András and I were attending to a meetup at Ustream Hungary and the organizers have asked me to give a talk about the UHK in quite an unexpected fashion. I used our website as a presentation medium and got 5 minutes but the attendees asked so many questions that it ended up being about 20 minutes and people still couldn't get enough after the talk! It was a great experience for everyone involved.

Some of the things I learned along the way:

  • Wherever you present always make sure people take some pictures. A lot more pictures could have been shot than the above.
  • Demoing the UHK on mobile is a novel experience for most, but a programmer's editor is very much needed. Just purchased DroidEdit Pro.
  • I've really gotta get some name cards made.
  • After conference parties are fun but be sure not to stay there too late or else the next day you'll look like crap due to the lack of sleep.
  • I've gotta get some tan because I look hopelessly pale next to Pablo. I don't wanna look white and nerdy.

3D printing the LED display

Yesterday András and I were attending to the opening of the 3D printing showroom of Varinex Zrt. who is the largest 3D printing company of Hungary. We were pleasantly surprised to see that one of the printers, namely a venerable Objet Connex 500 was printing 3 LED displays of our prototypes. Watching these printers in action is always very interesting so here's a short video for your viewing pleasure.

The 5th generation PCB has arrived!

We're glad to announce that we've just received our 5th generation PCB! Compared to the previous version it's compatible with the ISO layout. Its contour is also a lot more complex to make place for the stainless steel inserts of the back side. Last but not least, the silkscreen became a lot more helpful, clearly showing the values of the various components, making assembly a lot easier.

PCB out of the box, shrinkwrapped

The PCB is out of the box, neatly shrinkwrapped by Eurocircuits

The front of the PCB

Front side

The back of the PCB

Back side

Near the MCU

Near the MCU

Redesigning the PCB always involves a ton of work and at this point it's more than mature so we don't plan to reiterate any more before the campaign.

Wanna see a bunch of high resolution pictures of the PCB? Head over the Google Plus album!

Introducing the first mountable keyboard

We're in the process of finalizing our 5th generation prototype and thrilled about a new feature: threaded inserts! According to our knowledge this makes the Ultimate Hacking Keyboard the first keyboard ever that is mountable to external objects. "What external objects?" - you may ask. Think about things like a tilt stand, a kiosk or the arms of a chair. As usual, we have some pictures to show you the gory details.

It's easy to spot the 4 threaded inserts per keyboard half:

Mountable case

Same deal with the bottom part of the keyboard halves removed:

Mountable case with the PCB exposed

This makes the shape of the PCBs crazier than ever before:

Mountable PCB

We're super excited about this feature and the possibilities it'll bring. We expect the 5th generation prototype to be the last one before the campaign because we have to kickstart this project eventually. Regardless, we'll keep you posted so let's stay in touch!

Lay back and type

Instead of hunching over the laptop Laci is typing (and controlling the mouse pointer) in the most laid back fashion ever. A perfect use case of the Ultimate Hacking Keyboard. A more ergonomic working environment is surely preferred on the long run, of course.

Laid back typing

The LED display receives commands

We're happy to report that the PCA9634 IC that controls the columns of our LED display is now working as expected. This was a tricky case to solve so let us share the journey of finding the solution.

When starting to debug the problem it was rather strange that the Bus Pirate almost exclusively showed START and STOP bits but almost no actual payload. This shouldn't have happened because the I2C bus was clocked at 400kHz and the Bus Pirate should be able to decode 400kHz I2C communication because this very frequency can be selected from its menu. I still don't know what's wrong with my Bus Pirate but I ordered a new, more modern one which is on its way. Looking for alternative ways to track down the issue I broken out SDA and SCL, added a status LED to the board and reached for my Open Bench Logic Sniffer.

Sniffing the I2C communication of the left keyboard half with the Open Bench Logic Sniffer

Sniffing the I2C communication of the left keyboard half with the Open Bench Logic Sniffer

The signals that were analyzed by the sniffer were a mix and match. Sometimes the analyzed I2C communication made sense but other times it was riddled with protocol errors. Also, the strange thing was that I2C often hanged for some reason at which point I reached to the AVR freaks to help me. They suggested that I should not use I2C from an interrupt handler which I clearly shouldn't but this code has worked on an Arduino before so I knew this wasn't the core reason. It was time to switch to an Arduino to better able to debug the problem.

Using an Arduino Uno to further diagnose the problem

Using an Arduino Uno to further diagnose the problem

Initially, I haven't had any 4.7K PTH resistors laying around for pulling up SDA and SCL but had some SMD ones so I made DIY PTH resistors by soldering wires to pads of 0805 SMD resistors. The sniffed signals were still full of protocol errors. I eventually managed to get PTH resistors which probably made my circuit more reliable but most importantly I realized that the 1Mhz sampling frequency that I used with the logic sniffer was barely sufficient to sniff the 400kHz I2C resulting in frequent decoding errors.

Documentation mentioned that the sampling frequency should be at least 10x larger than the frequency of the bus to be sniffed. After making the proper adjustment I was finally able to consistently see communication clearly, both inside and outside of the timer interrupt handler. That was the perfect moment to grab the working firmware and go back to the left keyboard half to test things there.

Using a broken out PCA9634

Using a broken out PCA9634

This time I broke out not only SDA and SCL but VCC and GND too to interface with an external PCA9634 that was soldered onto a breakout board. Even though initially I couldn't control the LEDs that were wired to the external PCA9634 but the sniffer showed me that that an ACK was received after sending the address of the PCA9634 which was very encouraging.

After messing around with the code I finally realized that there was a critical bug in it. I shifted the bits of the auto increment flags not by 5 bits as described by the PCA9634 data sheet, but by 4 bits! This resulted in sending invalid register numbers that didn't make the IC do anything useful. After fixing this issue the LEDs started to toggle as expected and the sniffed communication looked great, too.

The sniffed I2C communication

The sniffed I2C communication

At this point both the external, broken out PCA9634 and the internal one was wired to the MCU but only the external was working. It was apparent that this is some sort of an electrical problem. My best idea was to connect the SDA, SCL, VCC, GND and OE lines of the external PCA9634 right to the pins of the on-board PCA9634 instead using the previously installed wires. By replacing the connections one by one I should be able to figure out which connection is the bad one.

Accessing the pins of the TSSOP packaged PCA9634 was rather hard, being merely 0.65mm away from each other. My only option was to use my wiring pen to solder enamel wires right to the pins of the on-board IC. Eventually, I managed to break out the connections right at the pins of the IC.

The newly soldered enamel wires under the magnifying lamp

The newly soldered enamel wires under the magnifying lamp

The soldered enamel wires under the microscope

The soldered enamel wires under the microscope

The enamel wires up-close

The enamel wires up-close

Enamel wires soldered to jumper wires for breadboarding purposes

Enamel wires soldered to jumper wires for breadboarding purposes

When powering up the board something unexpected happened: the on-board PCA9634 immediately started working! This was rather strange because I previously did continuity tests with my multimeter and based on those all connections were flawless. I guess there was a soldering error which I couldn't notice because when I pressed down the pin with the multimeter probe it must have connected to the pad beneath it and when I released the probe the pin must have gone back to its disconnected state in a spring-like fashion.

As a software developer these kinds of debugging scenarios really make me appreciate the relative simplicity of software. Not that software isn't a complex beast in itself but when being coupled with hardware issues like the above it can really be a little too stressful. But no problem; it's the nature of the beast and chances are it will never be any easier. At the end of the day challenges like this make the triumph even sweeter.

Wanna see some more photos? Head over to the photo album!

Debugging the LED display

I'm just debugging the I2C protocol between the ATmega88 and the PCA9634 with the bus pirate for the LED display to work properly. For some reason the PCA9634 doesn't receive any message and the protocol dump looks bogus. This video features our 4th generation prototype.

Assembling the 4th generation PCBs

SMD components have been surface-mounted onto the 4th generation PCBs. The firmwares have yet to be uploaded and the switches to be soldered. This is coming together...

Assembling the 4th generation PCBs

Click to see the album

Title