Hand Wiring Switches and LED Backlighting questions
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
It takes a lot to break a switch. Trust me, I've been pretty brutal!
Did you install those resistors? If so, they could be the problem.
Did you install those resistors? If so, they could be the problem.
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
I am back home now, and testing my board.
I changed the code a bit, and this seems to work:
(I edited the keypad and blink examples together to create this)
When I first loaded that code on my teensy, I used a 1x1 matrix (pins 22 and 21).
The light was off at first, then I held down the key and the light turned on for 500ms, then turned off. Sweet.
I bumped it up to a 2x2 matrix (pins (22, 23)(21,20)) and it behaved the same way. Sweet.
When I bumped it up to 6x13 using my original code, it failed because the diodes are wired along the other axis, so I flipped it to 13x6. Wasn't sweet, but now it's sweet.
Once I got all the code working and all the keys registering, it the teensy started blinking very quickly. Wat.
When I tried actuating the keys, almost all behaved exactly how they did before, the LED stopped blinking and became solid for 500ms, then went out. Ok...
When I pressed keys on column 2 (counting from the left. Pin 1) the light would go solid and stay that way, instead of turning off after 500ms. <-- First weird thing.
When I pressed keys on column 3 (counting from the left. Pin 2) the light did nothing. It didn't stop blinking. <-- Totally non-functional... but evrything is connected.
I tried disconnecting those whole columns, and the light still blinks. <-- Why would this happen if the connection faults were on those columns?
Not sure what is going wrong, the teensy can run other software, so I don't think that is the fault point. I guess it has to be one or two connections that are failing somewhere near those two columns, but I am not sure how to think through tracing them back.
Here are some pics:
My Imgur: http://imgur.com/a/QfPJP
I changed the code a bit, and this seems to work:
Spoiler:
When I first loaded that code on my teensy, I used a 1x1 matrix (pins 22 and 21).
The light was off at first, then I held down the key and the light turned on for 500ms, then turned off. Sweet.
I bumped it up to a 2x2 matrix (pins (22, 23)(21,20)) and it behaved the same way. Sweet.
When I bumped it up to 6x13 using my original code, it failed because the diodes are wired along the other axis, so I flipped it to 13x6. Wasn't sweet, but now it's sweet.
Once I got all the code working and all the keys registering, it the teensy started blinking very quickly. Wat.
When I tried actuating the keys, almost all behaved exactly how they did before, the LED stopped blinking and became solid for 500ms, then went out. Ok...
When I pressed keys on column 2 (counting from the left. Pin 1) the light would go solid and stay that way, instead of turning off after 500ms. <-- First weird thing.
When I pressed keys on column 3 (counting from the left. Pin 2) the light did nothing. It didn't stop blinking. <-- Totally non-functional... but evrything is connected.
I tried disconnecting those whole columns, and the light still blinks. <-- Why would this happen if the connection faults were on those columns?
Not sure what is going wrong, the teensy can run other software, so I don't think that is the fault point. I guess it has to be one or two connections that are failing somewhere near those two columns, but I am not sure how to think through tracing them back.
Here are some pics:
Spoiler:
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
Okay, no resistors in sight: phew! Are all the diodes the same polarity? And have you tested for shorts between rows and columns (accidental continuity when no switches are pressed)?
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
Yes, the diodes are all the same polarity.
I haven't checked for shorts, but I am pretty sure the only place a short could be happening is on pin 1 or 2 (the 2nd and 3rd column from the left).
Those are the ones that are behaving weirdly thus far. Also, all the switches in those columns behave the same way, so I would imagine the problem is somewhere along the connection between those columns and the teensy... but I can't see anything wrong there and the blinking problem still happens after I desolder those leads.
I haven't checked for shorts, but I am pretty sure the only place a short could be happening is on pin 1 or 2 (the 2nd and 3rd column from the left).
Those are the ones that are behaving weirdly thus far. Also, all the switches in those columns behave the same way, so I would imagine the problem is somewhere along the connection between those columns and the teensy... but I can't see anything wrong there and the blinking problem still happens after I desolder those leads.
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
When I had shorts on my matrix, it showed up as ghosting along whole columns. Nothing else was broken, just my handiwork!
Get forensic with that continuity meter, stat.
Get forensic with that continuity meter, stat.
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
I just tried jumping those leads to any of the row leads and it has the same affect... so the problem might be in the code? Or the teensy itself? I am quite confused... still testing.
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
Actually... isolating two columns at a time they all seem to work... still trying to figure out how to get a reading on the serial signal though, the monitor never shows anything so I can't tell if there is ghosting just from that.
Also, I will borrow a continuity meter to test the connections later
Also, I will borrow a continuity meter to test the connections later
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
When I run
10 pins: {9, 8, 7, 6, 5, 4, 3, 2, 1, 0} together all switches are fine (same goes for everything less than 10
11 pins: {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0} the 0 row stops working, but the other 10/11 work fine
12 pins: {23, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0} the blinking starts AND 0 and 1 behave like 1 and 2 did when all are running together.
I feel I am on to something... I hope it isn't the bandwidth limitation of the teensy though :s
[EDIT]
Checked the columns from the other direction:
When I run
10 pins: {22, 23, 10, 9, 8, 7, 6, 5, 4, 3}: works fine
11 pins: {22, 23, 10, 9, 8, 7, 6, 5, 4, 3, 2}: #2 does nothing
12 pins: {22, 23, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}: the feedback loop-esque blinking begins
10 pins: {9, 8, 7, 6, 5, 4, 3, 2, 1, 0} together all switches are fine (same goes for everything less than 10
11 pins: {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0} the 0 row stops working, but the other 10/11 work fine
12 pins: {23, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0} the blinking starts AND 0 and 1 behave like 1 and 2 did when all are running together.
I feel I am on to something... I hope it isn't the bandwidth limitation of the teensy though :s
[EDIT]
Checked the columns from the other direction:
When I run
10 pins: {22, 23, 10, 9, 8, 7, 6, 5, 4, 3}: works fine
11 pins: {22, 23, 10, 9, 8, 7, 6, 5, 4, 3, 2}: #2 does nothing
12 pins: {22, 23, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}: the feedback loop-esque blinking begins
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
I think the problem I was having is a software issue, so I am going to load the actual software on it and test that.
Anyone wanna help me with my layout source files? It's pretty simple, but I am too noobly to understand all of it.
Anyone wanna help me with my layout source files? It's pretty simple, but I am too noobly to understand all of it.
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
I am trying to edit the GH60 code to make it work for my weird matrix, but there are a couple things in there I just can't seem to figure out.
for the columns, I changed static matrix_row_t read_cols(void) so that it would return:
but I don't know what to do with static void init_cols(void). The default stuff for the gh60 is:
But I don't think that is compatible with my matrix.
Same goes for the rows, I changed my static void select_row(uint8_t row) to
but I don't know what to do with static void unselect_rows(void). The default for that one is:
Should I leave it alone? or make it unselect?
More vaguely, does anyone know what I have to change to reduce the column size to 13 (on different pins) and the row size to 6 (also on different pins)?
I think I have the keymap part together, figured that out from context, but don't know how to correct the other files.
And another thing! I tried to recreate matt3o's brownfox diode orientation... does that mean that I have to reorient the matrix? like 13 rows 6 columns? The only way the board worked with my little arduino test was in that orientation.
for the columns, I changed static matrix_row_t read_cols(void) so that it would return:
Spoiler:
Spoiler:
Same goes for the rows, I changed my static void select_row(uint8_t row) to
Spoiler:
Spoiler:
More vaguely, does anyone know what I have to change to reduce the column size to 13 (on different pins) and the row size to 6 (also on different pins)?
I think I have the keymap part together, figured that out from context, but don't know how to correct the other files.
And another thing! I tried to recreate matt3o's brownfox diode orientation... does that mean that I have to reorient the matrix? like 13 rows 6 columns? The only way the board worked with my little arduino test was in that orientation.
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
I should have lurked /workshop more before spending all that time with the source code... Soarer's firmware is so much more awesome.
I just set all the matrix values to blank and tested the switches with HID_listen like he said to and it turns out all of my switches produce the correct matrix code and don't ghost (as far as I am aware) at all! No shorts on the first try!
I just set all the matrix values to blank and tested the switches with HID_listen like he said to and it turns out all of my switches produce the correct matrix code and don't ghost (as far as I am aware) at all! No shorts on the first try!
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
That's more like it. I don't really code, and I'm much more comfortable with Soarer's controller too. Be sure to give it a good test though. Ghosts aren't fun.
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
If you're on Windows, everyone there swears by Aqua's KeyTest:
http://geekhack.org/index.php?topic=6643.0
On OS X, I simply open up the onscreen keyboard and keep an eye on it while putting on the caps. Ghosts show up quite clearly as multiple keys go dark.
http://geekhack.org/index.php?topic=6643.0
On OS X, I simply open up the onscreen keyboard and keep an eye on it while putting on the caps. Ghosts show up quite clearly as multiple keys go dark.
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
I got all my function layer remaps working and everything.
Oh man, it's so awesome.
It's so awesome.
Once those damned LEDs come from china I will wire up that matrix and finish my build log.
Oh man, it's so awesome.
It's so awesome.
Once those damned LEDs come from china I will wire up that matrix and finish my build log.
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
I just tested the USB nkey rollover... It is functioning better than I have ever seen on USB... I have always been a PS2 guy but this changes everything!
Did I mention that I am a huge Soarer fan now?
Happily Minimal Animal typing, I hope those LEDs come soon (I also have a couple MX clears that I am going to mod and put on the board)
Did I mention that I am a huge Soarer fan now?
Happily Minimal Animal typing, I hope those LEDs come soon (I also have a couple MX clears that I am going to mod and put on the board)
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
Soarer has turn-key awesome ready to go, right out the box. I'm a huge fan too! You get all the same powers with his converter, too, which brings a naturally NKRO board like an IBM Model F right into the USB age. I was amazed the first time I saw it!
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
Got my LEDs, wired them up (which was probably more complicated and took more time than the switch matrix, since I only gave myself a ~9mm cavity to work in ).
Everything worked first try once again (I am a very methodical solder-er).
You guys might have been right... at 5mA the LEDs are SUPER DUPER AWESOME GIGA BRIGHT.
Like... This keyboard is LITTERALLY(and not that stupid new 'also figurative' definition) brighter than any flashlight I have ever owned!
I can see the ceiling above my desk perfectly well now.
Good thing I am going to be blocking them out with red color changer caps and blank black DSA keycaps...
Still can't solder in the LEDs for backspace, space, and my UDLR keys, since I haven't gotten my mx clear stems and springs yet, but everything else is ready to go around it (the positive leads and the resistors are in place)
I will post pics in the morning. I am sleepy and mostly blinded at the moment.
Everything worked first try once again (I am a very methodical solder-er).
You guys might have been right... at 5mA the LEDs are SUPER DUPER AWESOME GIGA BRIGHT.
Like... This keyboard is LITTERALLY(and not that stupid new 'also figurative' definition) brighter than any flashlight I have ever owned!
I can see the ceiling above my desk perfectly well now.
Good thing I am going to be blocking them out with red color changer caps and blank black DSA keycaps...
Still can't solder in the LEDs for backspace, space, and my UDLR keys, since I haven't gotten my mx clear stems and springs yet, but everything else is ready to go around it (the positive leads and the resistors are in place)
I will post pics in the morning. I am sleepy and mostly blinded at the moment.
- rklm
- Main keyboard: Minimal Animal 75
- Main mouse: Razer Naga Molten Core Edition
- Favorite switch: 65g MX Blue
- DT Pro Member: -
Project is completely (well, until I find something else to tinker with) finished.
Here is the new forum post: http://deskthority.net/workshop-f7/mini ... ml#p157190
Here is the new forum post: http://deskthority.net/workshop-f7/mini ... ml#p157190
- tentator
- Location: ZH, CH
- Main keyboard: MX blue tentboard
- Main mouse: Pointing Stick
- Favorite switch: Cherry MX Blue and Model F BS
- DT Pro Member: -
Hello Rklm.. noticing just now your interesting project with the leds since I'm also thinking about what to do with leds on my new project based on teensy..
in the end did you connect the leds to the teensy or just directly to the 5v rail from USB?
And you used 330ohm resistors for each led? (I was more into 1kohm or even more actually..)
But actually I'd then also like to be able to increase or diminish or turn off completely the leds by connecting them to a pwm pin anyways.. hope this is still possible without damaging the pin..
my plan would be to have 4 pins used like: one for caps, one for num and one for scroll locks and a fourth one for the rest of the leds in background configuration as a whole...
in the end did you connect the leds to the teensy or just directly to the 5v rail from USB?
And you used 330ohm resistors for each led? (I was more into 1kohm or even more actually..)
But actually I'd then also like to be able to increase or diminish or turn off completely the leds by connecting them to a pwm pin anyways.. hope this is still possible without damaging the pin..
my plan would be to have 4 pins used like: one for caps, one for num and one for scroll locks and a fourth one for the rest of the leds in background configuration as a whole...
-
- Location: France
- Main keyboard: KBT Pure Pro
- Main mouse: G500
- Favorite switch: MX Red, MX Blue
- DT Pro Member: -
If you plan on using TMK, flabbergast provides valuable info on how to wire and control backlight here: workshop-f7/how-to-build-your-very-own- ... ml#p240050
Teensy 2.0 has 25 pins, so as long as your matrix does not use more than 21 pins you should be able to use four as described (caps/numlock/scrlock/backlight).
Teensy 2.0 has 25 pins, so as long as your matrix does not use more than 21 pins you should be able to use four as described (caps/numlock/scrlock/backlight).