geekhack

geekhack Community => Keyboards => Topic started by: intellipanda on Fri, 17 June 2016, 22:10:37

Title: my planck build with programmable LEDs
Post by: intellipanda on Fri, 17 June 2016, 22:10:37
I had posted here years ago on a custom keyboard build made from 2 numpads, my goal being to have a mechanical keyboard with a grid layout.  It worked fine and was my main home keyboard (though i do most my typing at work) for a long time.  Then I stumbled upon Jack Humbert's Ortholinear keyboards - so i wasn't the only one after all  :D  I ordered a top plate and a milled bottom from Jack, and got started as soon as it arrived (which took a while).

My keyboard was hand wired using an chinese arduino (much cheaper than the teensy i had used on my numpad keyboard), and was using it fine.  I got to thinking about the back light, I wanted individually controllable led's and preferably in more than 1 color.  It would be cool to have the led change according to which layer I'm on.  Turns out the usb micro port is not robust enough for a keyboard wire, it eventually broke off and motivated me to start on my second build with LEDs.

For my second build, salvaged teensy++ from the numpad keyboard - needed more pins for the LED matrix and key matrix together, and the usb mini port is a big plus, as I know that is strong enough to last a while.  The only issue was the the teensy++ was slight too long, the milled bottom is very tight and only had a small cut out for the controller.  I was able to squeeze it in by cutting the bottom knub off 2 keys.

I used 2 pin bi color leds and laid it out in a matrix.  The idea is to power the matrix 1 row at a time, flip the current to show the second color, then move on the next row (of course this is done really fast so it looks like it is all lit and I am able to use get different shades of the 2 colors).  The build and coding took some time, maybe 2 weeks each - working on it a few hours each day, and I finally finished it.  Posted my led driver on github if anyone is interested.

Here are some pictures of the build process and the final product:

Title: Re: my planck build with programmable LEDs
Post by: SBJ on Fri, 17 June 2016, 23:58:03
Very cool!
Not totally into the planck lyfe myself. But I can see the appeal.
Title: Re: my planck build with programmable LEDs
Post by: a-c on Sat, 18 June 2016, 02:17:51
Very nice!

I did something similar but used a separate Arduino Mini to drive the LED matrix. Have you tried to do different brightness levels?

(http://i.imgur.com/qA8RRob.jpg?1)
Title: Re: my planck build with programmable LEDs
Post by: MOZ on Sat, 18 June 2016, 04:00:42
neat!
Title: Re: my planck build with programmable LEDs
Post by: intellipanda on Sat, 18 June 2016, 21:28:13
@a-c yes i did implement brightness levels in my driver, though not using it in my buttons - just toggle on off for now. Basically it will skip some cycles, however if you skip too many cycles it will start to blink. If i used a my own timer i could compensate by increasing the draw speed, but right now I am invoking draw right after scanmatrix (of the tmk firemare) - and works good enough =).  Also i used a pretty high value resistor just to be on the safe side, its not too bright even at full power.  With this drawing scheme even full power is a 1/8 duty cycle only.