Author Topic: Discuss the difference between bpiphany's keyboard controllers and teensies  (Read 3261 times)

0 Members and 1 Guest are viewing this topic.

Offline berserkfan

  • Thread Starter
  • Posts: 2135
  • Location: Not CONUS Not CONUS Not CONUS Not CONUS
  • changing diapers is more fun than model f assembly
Is the basic process of a keyboard controller taking signals from the PCB and allocating meaning to these signals based on the position a key is in? IE the function is basically like a teensy hooked up to a matrix keyboard?

I am wondering because the price of a bpiphany controller is $35 which is about 2x the price of a teensy. The teensy is more versatile since it is not limited to any single keyboard. It can be reused for nearly everything except mouse functions.

Please don’t misunderstand and think that I’m putting bpiphany down. I believe he has done a fantastic job, and has been very nice in answering some of my questions. It is also obvious that his controllers do a very important job of replacing damaged or broken controllers on specific popular models of keyboards. But I’d like to start a discussion about the general use of bpiphany controllers. I simply don’t see mobility as all important to most full size keyboards, for instance. Most people don’t carry around Filcos nearly the same weight as their laptops and more heavy than their tablets.

I am now using a matrix keyboard (drum roll: Dorkvader) and have gotten much more interested in teensy programming.

The way I see it, it is too expensive to use a bpiphany for most situations. Shouldn’t most people be better off taking a fullsize USB jack, wiring that to their teensy, and plugging the USB output on their favourite Ducky or Filco into the teensy’s fullsize USB jack? Your teensy can surely identify all the keyboard scancode signals coming in and reprogram them. You won’t need to open your Filco (tearing the warranty sticker), and when you are tired of your Filco you can just take it off and plug your cooler master and you have the same reprogrammed functions without having to buy a second bpiphany controller for the CM (and also tear the warranty sticker in the process).

Right now I am about to invest in getting a super teensy project box built, with multiple teensies inside hooked up to different input jacks/ female ports. The biggest problem I have with bpiphany controllers is that most of my keyboard collection can never use his stuff, but since I do have a CM and a Filco I am considering between buying bpiphany controllers to make them programmable, or passing them through the same teensies I already own so that I don’t need to spend more $$$.

XXX

A second angle to the problem comes from the stock controller’s special functions key. As you know, many keyboards have proprietary function keys. Eg fn+f1 might be mute. The keyboard controller won’t pass the fn on as a scancode that the teensy can recognize. But wouldn’t it be possible to program the teensy firmware to recognize whatever fn+f1 sends? After all, whether you are using Deck Hassium or Ducky Shine 3 or PLU (all of which are incompatible with bpiphany controllers), there is only a limited ‘vocabulary’ of special functions that teensy will need to recognize. ‘Open mail’, ‘Home page’, Mute, Fast Forward, etc. If the teensy recognizes that the keyboard is sending the Mute command, that can be remapped also. So while we can’t actually make the fn key do something on its own, with the right firmware we can use the teensy to remap the use of fn+f1 and similar combos.

XXX

A third consideration is that the keyboard controllers that bpiphany's stuff replaces, are themselves very much like teensies with pins. My CM QFR's controller has 40 pins, which means a teensy 2++ would be able to take in all inputs assuming I hooked up a teensy 2++  and 40 jumper wires?

I'm not saying I want to save ten plus bucks and wind up having to run a whole bunch of wires. Am just trying to understand how these things work.

My real motive actually is that I also have a TG3 keyboard that runs on 12V. Thechemist has identified that it is the keyboard controller forcing all the LEDs to operate on 12v, but thinks that if I got a teensy and made that the keyboard controller, not only would the LEDs (once replaced) henceforth be able to work on normal computer voltages, but also the keyboard would be programmable, and USB -cabled at the same time.
 
So does anyone know how to replace the controller in these pictures?
http://i.imgur.com/3VjEPMa.jpg
http://i.imgur.com/mmWCwmC.jpg

I'm thinking the teensy 2++ can do it, but I have no idea how to take these connectors and connect them to the teensy since they are finer and smaller than standard jumper cables. Is there some kind of adapter cable I can use?


Eagerly awaiting what everyone has to say!
Most of the modding can be done on your own once you break through the psychological barriers.

Offline Grendel

  • Posts: 462
  • Location: OR, USA
    • Firmware for Costar Replacement Controllers
The key difference is that Teensy's are general purpose development boards and the Costar Replacement Controllers are not (they are designed as drop-in replacement.) The later also carries two chips to allow scanning a 18x8 matrix (can't be done w/ just a Teensy 2.0, needs a Teensy++ or additional logic.) If you don't want to void the warranty of your board you could build Soarer's converter and hook up the board via PS/2 (you can't connect a board via USB to a Teensy.) You also can't just plug a Teensy++ into the socket of a QFXT/MJ2 etc., USB lines and power are either not available or in the wrong place. In the long run it can be done but it's cheaper and way easier just to get the right replacement controller and concentrate on the firmware.

Personally I prefer using the replacement controllers for ultimate control (matrix scan rate, USB poll rate, debounce times, special codes etc.) I'm running them in QFR's, QFXT's, and RK-9000's w/ my own firmware.

As for the TG3 project -- by all means, use a Teensy. Probably as much work as trying to shoehorn a CoReCon into it :) You will need to reverse engineer the circuit schematic of the original controller, then come up w/ an interface that allows a Teensy to take over.
Currently using: RK-9000WH/GR, CMS QFXT w/ Ghost Squid
- I'm game !

Offline berserkfan

  • Thread Starter
  • Posts: 2135
  • Location: Not CONUS Not CONUS Not CONUS Not CONUS
  • changing diapers is more fun than model f assembly
OK, apologies for sounding stupid since I didn’t understand 90% of what you were saying, but what I’m understanding is…

1>   Soarer’s firmware isn’t set up for USB input, so I first have to get a USB keyboard’s signals passed through a Ps2 converter in order to benefit from teensy control. Would a passive converter be enough?
2>   Rosewill keyboard can use a mini-USB to Ps2 output cable. Deck keyboard uses a dual Ps2/USB cable. Surely USB and Ps2 signals are the same if they use the same cable, and that means  a teensy can accept USB input and recognizing the scancodes is only a firmware issue that probably soarer can address without difficulty?
3>   I don’t mean plugging a teensy++ directly into the socket of a Filco/CM. I know the shape’s all wrong. But theoretically, if I use lots of jumper cables, I should be able to plug it in right? I don’t mean to do this in practice (its awkward), I am just trying to attain practical understanding.
4>   What about programming issues with bpiphany’s replacement controllers? As a guy who doesn’t know programming, I frankly have little understanding of debounce times, matrix scan, and whatever. Do these really matter in practical usage?
5>   Based on what you are saying about the TG3, I take it isn’t so easy as to treat every single lead from the keyboard as a matrix column/row input, put them into the teensy++, and program the teensy to translate them into the correct scancode outputs?
Most of the modding can be done on your own once you break through the psychological barriers.

Offline Grendel

  • Posts: 462
  • Location: OR, USA
    • Firmware for Costar Replacement Controllers
OK, apologies for sounding stupid since I didn’t understand 90% of what you were saying, but what I’m understanding is…

1>   Soarer’s firmware isn’t set up for USB input, so I first have to get a USB keyboard’s signals passed through a Ps2 converter in order to benefit from teensy control. Would a passive converter be enough?

I'm guessing you are talking about a PS/2 adapter (the thingies you plug your USB cable in on one side and then stuff the other side into the PS/2 port) ? Soarer's project is a true converter, it talks to the keyboard on one end (using PS/2, XT, AT, serial, but not USB) and mimics to be a USB keyboard on the other end (that you hook up to a PC.)

Quite a few keyboards support both interfaces on their connection, USB and PS/2. When powered up they do some magic w/ the lines and figure out what they are connected to. Hence a "PS/2 adapter", it's just a bunch of wires internally.

2>   Rosewill keyboard can use a mini-USB to Ps2 output cable. Deck keyboard uses a dual Ps2/USB cable. Surely USB and Ps2 signals are the same if they use the same cable, and that means  a teensy can accept USB input and recognizing the scancodes is only a firmware issue that probably soarer can address without difficulty?

Soarer's Converter does exactly that, it presents a PS/2 port to the keyboard and massages the scancodes comming in to the USB side. In the process there are many things that can be done, substituting codes (ie. change the right WIN key to a FN key), adding layers and media keys etc.

3>   I don’t mean plugging a teensy++ directly into the socket of a Filco/CM. I know the shape’s all wrong. But theoretically, if I use lots of jumper cables, I should be able to plug it in right? I don’t mean to do this in practice (its awkward), I am just trying to attain practical understanding.

It's doable, yes.

4>   What about programming issues with bpiphany’s replacement controllers? As a guy who doesn’t know programming, I frankly have little understanding of debounce times, matrix scan, and whatever. Do these really matter in practical usage?

To a typist, probably not. To me they do -- I like the illusion that a 3.5ms latency could make a difference in L4D2 compared to the normal 20ms+ ;) Plus I like to be able to twiddle bits as they say.

5>   Based on what you are saying about the TG3, I take it isn’t so easy as to treat every single lead from the keyboard as a matrix column/row input, put them into the teensy++, and program the teensy to translate them into the correct scancode outputs?

Probably not. You really need to know what each pin does. You could just take over the matrix, but that would leave out the LED's...
Currently using: RK-9000WH/GR, CMS QFXT w/ Ghost Squid
- I'm game !

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
I looked into upgrading / replacing the TG3 BL82 controller pretty in depth a while ago.

If you are ok with 2kro and you don't want to wire up the backlighting, you can just solder the pins to a teensy and put soarer's firmware on it and call it good (with 20 minutes of effort, no soldering required if you get headers / socket.)

There are a number of ways of wiring up LEDs. the easiest is to leave them on all the time and just wire it directly to USB power (maybe a toggle switch on the back of the case). If you want backlight control, you can wire the LEDs up to the PWM pin on the teensy with a transistor. Some firmwares support adjusting backlight levels this way.

I was planning on direct-wire of mine with the switches, but keeping the LEDs in place for ease of wiring / routing.
OK, apologies for sounding stupid since I didn’t understand 90% of what you were saying, but what I’m understanding is…

1>   Soarer’s firmware isn’t set up for USB input, so I first have to get a USB keyboard’s signals passed through a Ps2 converter in order to benefit from teensy control. Would a passive converter be enough?
2>   Rosewill keyboard can use a mini-USB to Ps2 output cable. Deck keyboard uses a dual Ps2/USB cable. Surely USB and Ps2 signals are the same if they use the same cable, and that means  a teensy can accept USB input and recognizing the scancodes is only a firmware issue that probably soarer can address without difficulty?
3>   I don’t mean plugging a teensy++ directly into the socket of a Filco/CM. I know the shape’s all wrong. But theoretically, if I use lots of jumper cables, I should be able to plug it in right? I don’t mean to do this in practice (its awkward), I am just trying to attain practical understanding.
4>   What about programming issues with bpiphany’s replacement controllers? As a guy who doesn’t know programming, I frankly have little understanding of debounce times, matrix scan, and whatever. Do these really matter in practical usage?
5>   Based on what you are saying about the TG3, I take it isn’t so easy as to treat every single lead from the keyboard as a matrix column/row input, put them into the teensy++, and program the teensy to translate them into the correct scancode outputs?

1. hasu's does USB to USB for hardware remapping. I've not tried it though.
2. this is incorrect sadly. They have the same power, but they do some signalling / sensing to determine what they're plugged into. additionally, TG3 uses two different physical connectors internally for the deck legend, and it's set with a jumper. They don't even need to have to do that. the KB can only do one at a time.
3. Yep, this'll work, but putting the case back on is left as an excercise to the reader (it will be very hard). But you can just wire a KB matrix to a teensy with jumpers or whatever, toss a firmware on there and call it a day. It's what I did with that G80-1950 I wired up.
4. can't help here.
5. ok the answer is yes and no. Be careful. See below.

If you look closely you see three cables, now I'm not 100% sure since I haven't looked at mine in a while, but I believe the same cable carries different things. (so one cable is mixed LED / switch matrix). You will have to look at the PCB to determine which pin on the cable does what. Once you have that, you can solder the proper cable/pin to teensy (or use a jumper or whatever) and get the switch matrix up and running. Getting the LED matrix working has a lot of complex electrical-engineering type options, as I mentioned above. But that's the main way to get it working. You do have to make sure you're scanning a matrix in the right direction if it has diodes, and if not, you have to tell the firmware that (there is an option for soarer's firmware for this: very easy to set). Also, there's a few pins on the teensy you can't use (VCC, GND, reset, for example).

Man, I could go into so much more detail here, but It'd take hours to write. I think I'll just answer questions and post a whole guide when I convert mine.