geekhack

geekhack Projects => Making Stuff Together! => Topic started by: Bailey on Sun, 28 September 2014, 20:51:23

Title: teensy 2.0 or 3.1
Post by: Bailey on Sun, 28 September 2014, 20:51:23
Hi,

 I'm new to keyboard building. I have done some research and have noticed only teensy 2.0 is used as a keyboard micro controller. Is there is a reason why the 3.1 version is not used? too many I/Os? or is it more of firmware related issue?

Bailey
Title: Re: teensy 2.0 or 3.1
Post by: jdcarpe on Sun, 28 September 2014, 21:12:43
It's a firmware issue. The 3.1 uses an ARM processor, and I'm not aware of any existing firmwares for it. The 2.0 uses the ATmega32u processor, for which you have Soarer's firmware, TMK, etc.
Title: Re: teensy 2.0 or 3.1
Post by: Bailey on Sun, 28 September 2014, 21:22:24
Thanks,

So essentially if I am to build a 10 keyless keyboard I should go with the Teensy 2.0, while for a standard keyboard layout, I will need to go with the Teensy 2.0++?
Title: Re: teensy 2.0 or 3.1
Post by: 0100010 on Sun, 28 September 2014, 21:27:15
Only need the 2.0++ if you have a very large matrix or you need lots of additional pins for other functions.  For most keyboards, the 2.0 is plenty.
Title: Re: teensy 2.0 or 3.1
Post by: Bailey on Sun, 28 September 2014, 21:33:57
I see, well the idea is to replace the Micro controller on my Ducky2108LS (essentially a Ducky Zero with LEDs on every key) and since it has 108 keys it looks like I will need to use the Teensy 2.0++.

Another question I have, how many I/O do I have leave spare if I am to have full keyboard LED (all light up at the same time, nothing fancy)?
Title: Re: teensy 2.0 or 3.1
Post by: Melvang on Sun, 28 September 2014, 21:58:33
I see, well the idea is to replace the Micro controller on my Ducky2108LS (essentially a Ducky Zero with LEDs on every key) and since it has 108 keys it looks like I will need to use the Teensy 2.0++.

Another question I have, how many I/O do I have leave spare if I am to have full keyboard LED (all light up at the same time, nothing fancy)?

Outside of the full backlight you can technically get away with using a 2.0, you just have to get creative with the rows and columns using a 10x11 matrix.

For the full backlighting I can't help you yo much there.
Title: Re: teensy 2.0 or 3.1
Post by: dorkvader on Sun, 28 September 2014, 22:04:23
I see, well the idea is to replace the Micro controller on my Ducky2108LS (essentially a Ducky Zero with LEDs on every key) and since it has 108 keys it looks like I will need to use the Teensy 2.0++.

Another question I have, how many I/O do I have leave spare if I am to have full keyboard LED (all light up at the same time, nothing fancy)?

Outside of the full backlight you can technically get away with using a 2.0, you just have to get creative with the rows and columns using a 10x11 matrix.

For the full backlighting I can't help you yo much there.

if you want it "always on" or controllable with an external switch or something the LEDs require no pins. If you want all the LEDs to be controllable as a single group, you can use a single pin for PWM and a transistor or two. If you also want lock LEDs, you need one pin per LED unless if you want to get creative.
Title: Re: teensy 2.0 or 3.1
Post by: Findecanor on Sun, 28 September 2014, 23:04:17
I see, well the idea is to replace the Micro controller on my Ducky2108LS (essentially a Ducky Zero with LEDs on every key) and since it has 108 keys it looks like I will need to use the Teensy 2.0++.
If you are not at the level of a professional Electrical Engineer at electronics and microcontroller programming, I would advice against it.
The backlighting on the Ducky keyboards is done by digital circuitry in combination with the existing keyboard controller and a Teensy chip can not replace it outright.

I also think that the actual microcontroller chip is surface-mounted, so it would be difficult to get access to its tiny pins. I suppose that you could wire each row and column with a separate wire, but that would be a bit of work and you could make a mess.

If you want a mechanical keyboard with a programmable controller, I suggest that you switch to a Filco Majestouch or a Rosewill. On those keyboards the controller is on separate daughterboard, respectively and replacement controllers for them do exist which you could install relatively easily.
Title: Re: teensy 2.0 or 3.1
Post by: Bailey on Sun, 28 September 2014, 23:25:32
I see, well the idea is to replace the Micro controller on my Ducky2108LS (essentially a Ducky Zero with LEDs on every key) and since it has 108 keys it looks like I will need to use the Teensy 2.0++.
If you are not at the level of a professional Electrical Engineer at electronics and microcontroller programming, I would advice against it.
The backlighting on the Ducky keyboards is done by digital circuitry in combination with the existing keyboard controller and a Teensy chip can not replace it outright.

I also think that the actual microcontroller chip is surface-mounted, so it would be difficult to get access to its tiny pins. I suppose that you could wire each row and column with a separate wire, but that would be a bit of work and you could make a mess.

 I understand your concern but I don't want to waste the keyboard switches, casing etc. (With the Ducky the num lock, scroll lock and cap lock blinks several times and than switches off with no response, so after checking the cable and connector with a multimeter, I have concluded that its the microcontroller)

 My bad, when I say replace, I mean to remove the Ducky PCB and rewire to the Teensy by hand. At the moment I don't know if I should go Teensy 2.0 and just go 10 key less, this way I can just use the phantom firmware (seems like a more straight forward build).

The only part that concerns me is the LED lighting and wiring, the resistors I will need etc? Does anyone know the specifications on the Ducky LEDs?
Title: Re: teensy 2.0 or 3.1
Post by: vvp on Mon, 29 September 2014, 04:56:06
Before deciding which controller to use, you need to decide first how you want to control the LEDs.

If you want to control each one separately (i.e. you want an option to create any pattern on the whole led matrix) then you can go on with a shift register brigade and use ISP SPI interface on even an ATmega32u4 (Teensy 2.0). If it would be powered with USB power only then you need to check if your diodes will be bright enough when driven with only about 2 mA in average. You need to decide how bright the diodes should be (i.e. how big the average driving current needs to be). You may get creative with using software PWM on each diode and a smaller resistor or just drive them statically and use a bigger resistor (this is more power hungry).

If you want only few LEDs driven separately then you may rather use one controller pin for each separately driven LED and then it may make sense to go with Teensy 2.0++ (or something else with more GPIO rich controller).

So you need to decide first what you want to achieve. After that you can decide what controller to use.
Title: Re: teensy 2.0 or 3.1
Post by: Findecanor on Mon, 29 September 2014, 13:23:25
My bad, when I say replace, I mean to remove the Ducky PCB and rewire to the Teensy by hand. At the moment I don't know if I should go Teensy 2.0 and just go 10 key less, this way I can just use the phantom firmware (seems like a more straight forward build).

The only part that concerns me is the LED lighting and wiring, the resistors I will need etc?
OK then. :)

The Phantom firmware is quite simple to mod to support a full-size keyboard.

There is also a fork (https://github.com/kairyu/tmk_keyboard_custom/tree/redscarfII) of Hasu's TMK firmware for the Red Scarf keyboard, which supports both the µcontroller in the Teensy/Teensy++ and backlighting through the use of a simple cheap chip. (I forgot the number, but it is one that you can get everywhere)