Author Topic: (Solved) Help building firmware for a hand wired Planck.  (Read 4279 times)

0 Members and 1 Guest are viewing this topic.

Offline fauxsoul

  • Thread Starter
  • Posts: 16
(Solved) Help building firmware for a hand wired Planck.
« on: Tue, 08 September 2015, 19:37:44 »
Hello GH, I need some help.

I purchased a Planck ALPs/Matias top plate as soon as they were available, bought the switches and wired things up.

Since then I have used the 'Easy AVR USB Keyboard Firmware Generator' to generate firmware, here are the steps that I took.

I used the 'Handwire Matrix' > 'All Keys' layout.

I made sure to update the matrix file 'handwire_hardware.cfg' to reflect the way in which the matrix is wired to my Teensy.

I 'build firmware' and then use the Teensy loader to program the firmware and reboot the Teensy.

My PC detects the keyboard/installs drivers ('EasyAVR Phantom' in devices and printers, and 'HID Keyboard Device' in device manager),  Everything looks good.

The PC will not react to any key-presses whatsoever.

If anyone could help me out with this, that would be great.

Image of wired keyboard here http://imgur.com/A0Ul1AS

Layout file and matrix file below.


« Last Edit: Mon, 28 September 2015, 20:24:25 by fauxsoul »

Online suicidal_orange

  • * Global Moderator
  • Posts: 4133
  • Location: England
Re: Help building firmware for a hand wired Planck.
« Reply #1 on: Tue, 08 September 2015, 20:05:13 »
Which version of Easy AVR are you using?  I just tried to load your layout and it said it was invalid in 20150625.

I also couldn't check your matrix config as the board pictured has no Teensy connected - please can you take one of the finished board?

The only thing I can suggest is that you carefully short some row pins to column pins on the Teensy using a piece of wire - this will simulate a keypress.  If that doesn't work you probably have yourself a damaged Teensy :(
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline fauxsoul

  • Thread Starter
  • Posts: 16
Re: Help building firmware for a hand wired Planck.
« Reply #2 on: Tue, 08 September 2015, 21:21:18 »
Version 1.7.0.0

I tried shorting some of the pins and I was able to get a few letters out, so it looks like it might be an issue with my wiring, and or a damaged Teensy.

There are no obvious faults or shorts with my soldering on the Teensy or my matrix.  More pictures here ( http://imgur.com/a/XZPJl ), sorry for the crappy phone pics, I don't have another camera right now.
You might notice that it looks sort of grey, that's because it was in my apt while it was on fire.

What I think I will do from there is un-solder the Teensy, and clean both it and the matrix with alcohol, then wire it up again.

Thanks a lot by the way, I hadn't though of that, I appreciate your advice as it has set me in the right direction.

I will let you know how things go.

Offline fauxsoul

  • Thread Starter
  • Posts: 16
Re: Help building firmware for a hand wired Planck.
« Reply #3 on: Tue, 08 September 2015, 21:57:41 »
Update

I shorted pins on the Teensy and I tested every row with a few different columns, and they all function correctly. so it looks like the way that I had things wired was the issue.

I've visually inspected the matrix soldering that I did and I don't see any cold joints or breaks anywhere and unfortunately I don't have a multimeter right now that I could use for continuity testing.
I also tried to make sure that the pin out is correct, I don't see any problems though.

Since I don't know what the problem is I'm just going to de-solder the teensy, clean it and the matrix with alcohol and wire things up again.

Offline pokkuhlag

  • Posts: 20
Re: Help building firmware for a hand wired Planck.
« Reply #4 on: Sat, 12 September 2015, 11:00:49 »
Your diode direction may be incorrect. Below is quote from the doc folder of easy avr:

"Diodes must be installed such that current flows from Row to Col."

Yours looks like the Column flows to the Row

See examply reply in the easy avr keyboard topic:

https://geekhack.org/index.php?topic=51252.msg1771906#msg1771906
« Last Edit: Sat, 12 September 2015, 11:02:59 by pokkuhlag »

Offline fauxsoul

  • Thread Starter
  • Posts: 16
Re: Help building firmware for a hand wired Planck.
« Reply #5 on: Sat, 12 September 2015, 16:18:14 »
Your diode direction may be incorrect. Below is quote from the doc folder of easy avr:

"Diodes must be installed such that current flows from Row to Col."

Yours looks like the Column flows to the Row

See examply reply in the easy avr keyboard topic:

https://geekhack.org/index.php?topic=51252.msg1771906#msg1771906

Yep, I definitely wired the diodes in the wrong direction.  ****.

Thanks.

Offline fauxsoul

  • Thread Starter
  • Posts: 16
Re: Help building firmware for a hand wired Planck.
« Reply #6 on: Sun, 13 September 2015, 18:06:16 »
Hey Pokkuhlag, that was definitely the problem after I added new diodes in the correct direction things are working much better.

However I am still having one problem. Specifically with column 9, any key on column 9 will activate multiple keys, basically all keys to the left. for example if I try to press the O (column 9, row 0) key it will not only activate O, but i u t r e w q esc as well.

In order to ensure that my wiring was not a problem I tested things out by shorting the two corresponding pins on my Teensy and it had the same behavior.

To ensure that the specific pin that I was using for column 9 was not at fault I assigned column 9 to another pin and the exact same issue still occurs.

Current matrix and layout attached.

It's only column 9, all other columns work fine. No obvious shorts or bad joints on the Teensy or matrix.


Your diode direction may be incorrect. Below is quote from the doc folder of easy avr:

"Diodes must be installed such that current flows from Row to Col."

Yours looks like the Column flows to the Row

See examply reply in the easy avr keyboard topic:

https://geekhack.org/index.php?topic=51252.msg1771906#msg1771906

Offline neverused

  • Posts: 572
Re: Help building firmware for a hand wired Planck.
« Reply #7 on: Sun, 13 September 2015, 21:13:24 »
You have a short on that column, I've done it before. Try rewiring that column and make sure each switch works properly.

Offline fauxsoul

  • Thread Starter
  • Posts: 16
Re: Help building firmware for a hand wired Planck.
« Reply #8 on: Sun, 13 September 2015, 21:29:31 »
That's what I would normally think however since I actually removed that column and shorted the pins on the Teensy manually and had the same issue that seems to rule that out as the source of the problem.

That being said I was able to get things working by using Jack Humberts TMK firmware for Planck just now, without any changes to the wiring.

I really wish I could use Easy AVR though because it has a nice GUI for creating the key maps.

Offline pokkuhlag

  • Posts: 20
Re: Help building firmware for a hand wired Planck.
« Reply #9 on: Mon, 14 September 2015, 12:01:14 »
Everything looks fine, there has to be some kind of bug in easy avr with certain pins.

So basically, you have tried resoldering column 9 to another pin than B7? And still column 9 is giving issues?
If you have some free time. Can you swap the handwiring.cfg column 9 with 8. And see if 8 gives an issues with B7 or that 9 gives an issue with D0.

Did you try skipping column 9? And just call it 10? keep 9 empty?
Maybe defining the LED input and output as NA?

I'm just shooting up some ideas to diagnose the real problem. Since TMK is working it should not be a wiring problem.

I am starting my handwire project this weekend or next.
I am going to use EasyAVR as well. If I have the same problem, I will be jumping on the TMK bandwagon as well.
It would be better if we got a work around  ;)

Offline fauxsoul

  • Thread Starter
  • Posts: 16
Re: Help building firmware for a hand wired Planck.
« Reply #10 on: Mon, 14 September 2015, 15:41:08 »
I really do want to use Easy AVR, so I can try that.

Setting the LEDs to unassigned on it's own doesn't do anything.

Trying to skip a column like that just seems to break things. I wonder if I should PM the guy who made it and ask his opinion?  I did make a post on the Easy AVR thread, but I haven't gotten any response yet (it's only been about a day though).

Online suicidal_orange

  • * Global Moderator
  • Posts: 4133
  • Location: England
Re: Help building firmware for a hand wired Planck.
« Reply #11 on: Tue, 15 September 2015, 02:16:33 »
I have to say that that looks like a very tidy wiring job, no shorts or backwards diodes there.  I've got an Arduino Micro here so hopefully all those pins are available on it, if so I'll build your firmware tonight to check if it's a software bug on the pins you've chosen or you just got a dodgy Teensy.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline fauxsoul

  • Thread Starter
  • Posts: 16
Re: Help building firmware for a hand wired Planck.
« Reply #12 on: Tue, 15 September 2015, 17:37:42 »
Thank you, I've been looking for faults, but I really can't find any, and I've re-done things to make sure that I haven't ****ed up, but things are still not working well...  I have a few Arduino micros in storage, but I  won't have access to those for a while so I think I might just go ahead and buy a Chinese clone and try that out.

The micro has 12+7 pins so that should work for a keyboard  this size.

Thanks for your time, if you do get the chance to do that please let me know how things go.

Offline pokkuhlag

  • Posts: 20
Re: Help building firmware for a hand wired Planck.
« Reply #13 on: Sun, 20 September 2015, 08:42:58 »
I have finished handwiring my preonic and I had a the same problem at a different location.

The error occurs with column 8 and pin B6. This was also a led definition. LED0 and LED1 was removed in the first run.

I went to hardware config and tried LED0 = NA. That gave and error So I defined LED0 to an unused pin number like this:

[MATRIX]
ROW0=B5
ROW1=B4
ROW2=E6
ROW3=D7
ROW4=C6
COL1=F4
COL2=F5
COL3=F6
COL4=F7
COL5=B1
COL6=B3
COL7=B2
COL8=B6
COL9=D3
COL10=D2
COL11=D1
COL12=D0
LED0=D4
LED1=B7

And now it works perfectly :). I would give it a try by changing the port number of the two leds.

Offline neverused

  • Posts: 572
Re: Help building firmware for a hand wired Planck.
« Reply #14 on: Sun, 20 September 2015, 12:22:17 »
Hopefully this is resolved, but in case it's not, easyavr has a hand wired template you can use that's pretty well explained in the readme

Offline fauxsoul

  • Thread Starter
  • Posts: 16
Re: Help building firmware for a hand wired Planck.
« Reply #15 on: Mon, 28 September 2015, 20:23:39 »
Hopefully this is resolved, but in case it's not, easyavr has a hand wired template you can use that's pretty well explained in the readme

Neverused, I was already using the handwired template, that was mentioned earlier.

That being said Pokkuhlag helped me fix the issue!
Everything is working now after defining the LED pins.

Offline neverused

  • Posts: 572
Re: (Solved) Help building firmware for a hand wired Planck.
« Reply #16 on: Mon, 28 September 2015, 20:48:18 »
Great news!