Author Topic: ADB to USB keyboard converter  (Read 344198 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 2837
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #850 on: Sun, 18 November 2018, 20:44:51 »
The black component is ferrite core and not critical one. You can hook up converter directly to main pcb without the ferrite core and ADB port.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline kungfu_jesus

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #851 on: Mon, 19 November 2018, 19:38:33 »
Thank you so much for your response. I went ahead and removed that component and soldered in, but it's not seeming to register any key presses.

I verified that the build was correct for Teensy 2.0++ at90usb1286 and device manager shows it is HID Keyboard.

Using HID listen, before I was receiving error 30, after resoldering I am only showing keyboard start. No keypresses log any input. I am curious if I am using an incorrect resistor as it is at 4.7k according to the color codes.

Did I solder everything in correctly?

Magic button seems to be the only one registering and it returns:

Keyboard init.
[C]Before init:
hadler_id: 00, is_iso_layout: no
After init:
debug enabled.

Keyboard start.
adb_host_kbd_recv: ERROR(-30)
Before init:
hadler_id: 00, is_iso_layout: no
After init:
debug enabled.


I feel like I am getting close but no cigar quite yet. Bad build, perhaps? Neither the rev1 or rev2 hexes play friendly with the Teensy 2.0++. I am using the modified makefile.teensy.

Using a multimeter I register the 5V from one side of the board to the other, and some of the pins on the black NEC chip at the top show 5V as well, but when I test a switch for any voltage it stays at 0. Is this a warning sign that I have a bad board? :/
« Last Edit: Tue, 20 November 2018, 16:30:26 by kungfu_jesus »

Offline hasu

  • Thread Starter
  • Posts: 2837
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #852 on: Tue, 20 November 2018, 20:17:39 »
In most cases if not all -30 error means connections are not totally wrong or iffy. Make sure your wiring is correct.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline kungfu_jesus

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #853 on: Wed, 21 November 2018, 14:40:00 »
It's only the power button that gives that and I think it's the only button that generates a response because the traces are connected directly to the Teensy. I've double checked all my wiring and it seems kosher. The multimeter shows the same readouts on the board as it does the Teensy.

Is there any way to test the board itself? Should my switches be seeing voltage?

Offline hasu

  • Thread Starter
  • Posts: 2837
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #854 on: Wed, 21 November 2018, 16:35:13 »
It's only the power button that gives that and I think it's the only button that generates a response because the traces are connected directly to the Teensy.
what do you mean? You see something in hid_listen when you press power key? How does it connected to, DATA line or VCC line?
Power key was used to wake computer and is always given 5V for coumpter to see direclty its state on 2 pin of connector. That pin is not used by the conveter, though.

Quote
I've double checked all my wiring and it seems kosher. The multimeter shows the same readouts on the board as it does the Teensy.

Is there any way to test the board itself? Should my switches be seeing voltage?

Other switches on matrix is scaned at very fast rate and you can't see with multimeter.
Assuming your wiring is correct the board is probably damaged.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline numist

  • Posts: 1
  • Location: sfbay
Re: ADB to USB keyboard converter
« Reply #855 on: Wed, 05 December 2018, 21:06:54 »
- Apple adjustable keyboard keypad is not confirmed yet. Not sure if it works or not at this time.

I can confirm that the keypad works properly with the adapter:



REQUEST FOR HELP: Extended mouse protocol support
It is required for more buttons and movement resolution of mouse/trackball.
Do you have multiple button mouse? Implement it!
https://github.com/tmk/tmk_keyboard/issues/274

Funny, I was writing an adapter firmware before I found this thread and already have extended mouse support implemented. Should be able to port it over without too much trouble.

Offline hasu

  • Thread Starter
  • Posts: 2837
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #856 on: Wed, 05 December 2018, 21:31:29 »
numist,
Great! Thanks for the report. I'm really glad to know it works with the keypad.

And adding exntended mouse support would be appreciated!
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Lótetem

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #857 on: Thu, 20 December 2018, 06:16:27 »
Hi guys!

Im a newbie to microcontrollers its one of my first projects but I encountered a problem I think I cant resolve alone.

So I downloaded the full tmk_master library. Set up the compiler and tried to compile it but it exits with Error 1 after trying to compile keymap.c I think. Final line basically sais that keymap.o cannot be compiled.

So I tried downloading the .hex form the keyboard editor that doesn't work either.

Im using FLIP to upload it uploads and verifies with success.

Im using a Pro Micro about that:

Yes its 16Mhz/5v.
PD0 is pin #3 but sources differ... I can verify that if needed.
Im using the Atmel DFU bootloader the one it comes with is crap. Its programmed with an Arduino UNO and I tricked the IDE to upload it, it seems to be working.
I made sure J1 is shorted I can reverse if needed.
I-used a 4.7K external pull up R.
Im using the libusb driver.

Symptoms with the downloaded .hex.

*Windows doesnt recognise converter as an HID device
*When keyboard plugged in It blinks up all the leds and then nothing happens.

So my probably wrong guess is that the downloaded hex doesnt work because of the same issue as my compiler doesnt compile but it pushes the unlinked file to be able to be downloaded. Im using the rev1 editor and makefile.rev1 but makefile also exits with the same error. Also Im trying to compile with iso layout.

***
About me and stuff:

I love keyboards I have an 89 and a 93 model M both ISO
I have 2 AEK2 both are Hungarians (like i am) and on of them is boxed and Mint no yellowing at all and that feels really noice.
Have a bunch of other keyboards mint foam and foil terminals and yes they really get better when the go wrong.
And I have one really interesting HP terminal board which I want to present to the community in the future.




Offline superbia

  • Posts: 104
  • Location: Republique de Croatie
Re: ADB to USB keyboard converter
« Reply #858 on: Thu, 20 December 2018, 10:14:49 »
Im a newbie to microcontrollers its one of my first projects but I encountered a problem I think I cant resolve alone.

I can only say that I've documented the entire process on linux, so make sure to check it out.  :thumb:
https://geekhack.org/index.php?topic=14290.msg2464076#msg2464076

Offline Tactile

  • Posts: 1154
  • Location: Portland, OR
Re: ADB to USB keyboard converter
« Reply #859 on: Thu, 20 December 2018, 10:24:44 »
...
So I tried downloading the .hex form the keyboard editor that doesn't work either.
...

Which keymap editor?

At the top do you see:
ADB-USB Converter rev.2

or
ADB-USB Converter rev.1

Your Pro Micro has a ATMega32u4 processor so you'll need to use the editor Rev 1

Carefully read the fine print below "Keymap Editor" in this post.

Offline Lótetem

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #860 on: Thu, 20 December 2018, 10:55:51 »
Thanks guys for the answers.

I can only say that I've documented the entire process on linux, so make sure to check it out.  :thumb:
https://geekhack.org/index.php?topic=14290.msg2464076#msg2464076

@Superbia I did, did I miss something? Im planning to set up something with Linux but I dont think its an OS related issue, feel free to correct me.

Which keymap editor?

@Tactile I used rev1, if you read the whole post you can see I tried to compile for rev1 too.


Could any of you verify that the firmware downloaded from the editor works? I mean a firmware downloaded today. Or that a fresh download of the tmk_master compiles?

That way I can be sure that the problem is at my end not in the tmk_core.

Offline Lótetem

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #861 on: Thu, 20 December 2018, 11:05:48 »
Just to follow up, I think my compiler works all right because it starts compiling compiles about 10 or something like that files before it quits at keymap.c -> keymap.o and thats in the tmk core.

Offline Lótetem

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #862 on: Fri, 21 December 2018, 03:51:03 »
Hi Its a new day!

So I checked the git the last commit was about 2 years ago to keymap.c and keymap.h so there is plentiful evidence that it works. But the last commit mentioned that some compilers would have problem with the old version of the file. So I checked the compiler, and the avr toolchain was installed and the compiler compiled. Hm. Then I checked the compiler error nothing new. So I checked the full output and what I saw at the end so when the compiler starts... WinAVR was installed and that was the compiler. After uninstalling compiling works.

Still an issue remains, that the code doesn't work. My best guess right now is the bootloader or an issue while flashing the bootloader. I have some spare Pro Micros, they show up as HID devices but the one I'm using doesnt. I think it has to do something with the Atmel DFU bootloader Im using.

I will try a fresh OotB Pro Micro with avrdude.
« Last Edit: Fri, 21 December 2018, 04:04:48 by Lótetem »

Offline BlastoSupreme

  • Posts: 2
  • Location: Wisconsin, United States
Re: ADB to USB keyboard converter
« Reply #863 on: Thu, 24 January 2019, 22:05:06 »
Hello,

This is going to be my first coding project. I have next to no experience with any form of code. My education is in medicine so this is quite new to me. I have recently acquired an Apple Extended Keyboard II. I found online that it is possible to use a teensy to connect it to a modern day Mac. I have a question about the power button. I would like to use it to make my MacBook go to sleep. I know this can be done via a specific key stroke shortcut, but i am wondering if it is possible to accomplish this with the power button in a single press.

Thank you so much in advance. I appreciate your patience as I said, I have no clue what I'm doing.

Blasto

Offline hasu

  • Thread Starter
  • Posts: 2837
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #864 on: Mon, 28 January 2019, 00:09:14 »
Hello,

This is going to be my first coding project. I have next to no experience with any form of code. My education is in medicine so this is quite new to me. I have recently acquired an Apple Extended Keyboard II. I found online that it is possible to use a teensy to connect it to a modern day Mac. I have a question about the power button. I would like to use it to make my MacBook go to sleep. I know this can be done via a specific key stroke shortcut, but i am wondering if it is possible to accomplish this with the power button in a single press.

Thank you so much in advance. I appreciate your patience as I said, I have no clue what I'm doing.

Blasto

It should work. Use code KC_PWR(or AC_PWR) for that pupose.
Try it and report back here when you have time.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline BlastoSupreme

  • Posts: 2
  • Location: Wisconsin, United States
Re: ADB to USB keyboard converter
« Reply #865 on: Tue, 29 January 2019, 14:17:44 »
Hello,

This is going to be my first coding project. I have next to no experience with any form of code. My education is in medicine so this is quite new to me. I have recently acquired an Apple Extended Keyboard II. I found online that it is possible to use a teensy to connect it to a modern day Mac. I have a question about the power button. I would like to use it to make my MacBook go to sleep. I know this can be done via a specific key stroke shortcut, but i am wondering if it is possible to accomplish this with the power button in a single press.

Thank you so much in advance. I appreciate your patience as I said, I have no clue what I'm doing.

Blasto

It should work. Use code KC_PWR(or AC_PWR) for that pupose.
Try it and report back here when you have time

 
Do I need to attach the power switch wire to the teensy for that to work?
« Last Edit: Tue, 29 January 2019, 14:45:29 by BlastoSupreme »

Offline hasu

  • Thread Starter
  • Posts: 2837
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #866 on: Tue, 29 January 2019, 18:20:07 »
No, you don't.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline mcmaxmcmc

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #867 on: Sat, 02 February 2019, 20:35:49 »
EDIT: I got it working! 1K Ohms weren't wasn't enough for my original ADB cable.   :thumb:

I've been trying to figure out why my controller isn't working for about 6 hours now...  Everything seems to be wired correctly, the pro micro is working and is detected by QMK Toolbox, there's a 1K Ohm resistor as a pull-up, and all of the wiring is active (as in, Continuity tests show that the wire isn't cut or anything).  When the board is plugged in, the lock LEDs light up normally as it would, but it updates very slowly, though it is controllable with another board.  I flashed in the rev.1 version of the hex file.  The board tested is an AEKII.  (I've also tested an ASK with it, though I feel like that board is broken due to it not giving anything in QMK Toolbox.)

Here's the wiring:





Here's what QMK Toolbox spits out:

If you need anymore info, please ask.  Cheers!
« Last Edit: Sun, 03 February 2019, 00:40:41 by mcmaxmcmc »

Offline Tactile

  • Posts: 1154
  • Location: Portland, OR
Re: ADB to USB keyboard converter
« Reply #868 on: Sun, 03 February 2019, 00:24:11 »
I've been trying to figure out why my controller isn't working for about 6 hours now...  Everything seems to be wired correctly, the pro micro is working and is detected by QMK Toolbox, there's a 1K Ohm resistor as a pull-up, and all of the wiring is active (as in, Continuity tests show that the wire isn't cut or anything).  When the board is plugged in, the lock LEDs light up normally as it would, but it updates very slowly, though it is controllable with another board.  I flashed in the rev.1 version of the hex file.  The board tested is an AEKII.  (I've also tested an ASK with it, though I feel like that board is broken due to it not giving anything in QMK Toolbox.)

Here's the wiring:
Show Image

Show Image

Show Image

Show Image


Here's what QMK Toolbox spits out:
Show Image

If you need anymore info, please ask.  Cheers!

In the photos I can't see J1 very well. Have a look at this post.

Offline GollyGee

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #869 on: Sun, 10 February 2019, 15:49:32 »
Hey Hasu, thanks for the great resource and code!  :) I'm working on converting an MO116.  I'm still new to this stuff, but I think I'm very close to getting it working. Right now, I'm getting nothing when I type on it, even though the keyboard is hooked up to the Teensy. I'm pretty sure I programmed the Teensy right and the wiring is fine, but I'll attach pictures. It's not soldered yet because I want to make sure everything works before making it permanent. Thanks for the help! :D

« Last Edit: Sun, 10 February 2019, 15:54:33 by GollyGee »

Online nevin

  • Posts: 176
  • Location: US
Re: ADB to USB keyboard converter
« Reply #870 on: Sun, 10 February 2019, 17:31:34 »
Gollygee, it's probably a loose connection, something not making good contact because of not being soldered. If you want to do something this way (pre solder) use a breadboard & jumpers.

Try soldering the converter together, even if not permanent & see if problem persists.

Or make everything neat & solder for final assembly, you sound like you're pretty certain you have it put together correctly, go for it.
Keeb.io Viterbi, Apple m0110, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline GollyGee

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #871 on: Sun, 10 February 2019, 17:52:46 »
Gollygee, it's probably a loose connection, something not making good contact because of not being soldered. If you want to do something this way (pre solder) use a breadboard & jumpers.

Try soldering the converter together, even if not permanent & see if problem persists.

Or make everything neat & solder for final assembly, you sound like you're pretty certain you have it put together correctly, go for it.

Thanks for the help! Just a quick question: the copper wire is a bit thick to fit in the holes of the teensy with the resistor being in the same hole (that's why I'm using thinner braided wire atm). Does the copper wire have to go all the way through the hole, or can I just solder it to the top? I guess I could file the ends of the wire down.

Oh and something else: the data line should be connected to D0 by default, correct?
« Last Edit: Sun, 10 February 2019, 17:54:53 by GollyGee »

Online nevin

  • Posts: 176
  • Location: US
Re: ADB to USB keyboard converter
« Reply #872 on: Sun, 10 February 2019, 18:01:50 »
solder the resistor in first (through hole), then solder the wire to the leg on the resistor just above the solder joint you just made. the connections don't have to go through the hole to work they just have to make a solid connection to the pad they are supposed to be connected to.
Keeb.io Viterbi, Apple m0110, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Online nevin

  • Posts: 176
  • Location: US
Re: ADB to USB keyboard converter
« Reply #873 on: Sun, 10 February 2019, 18:10:47 »
here's another way to do it (wires first, then resistor), posted earlier in the thread:
SUCCESS

Turned out to be a 1 hour project, once I had all the components in place. Ultimately, I went with an external connector for three reasons:

  1) Fear of working in cramped conditions

  2) Can more easily fall back on one of the other spare keyboards if something goes wrong

  3) DAT original ADB cable!

Process writeup:

So, I bought the keyboards together on eBay from a single seller (he discounted the lot of 4 for $112 - $28 a pop!). He sent me serial numbers, confirming that all had the Alps switches. They had no cables, though, so I was originally planning on an internal mod with a pretty stock USB cable. I looked at the Zeal PC custom cables, and considered getting a grey coiled cable, but man, it'd be more than the keyboard! I planned for a bit of redundancy, so I ordered two of the Teensy 2.0 boards, and started collecting some other bits and bobs. Got some various soldering bits off Amazon and Adafruit, and got a batch of 10 S-Video connectors off eBay for $5. Also came across two coiled ADB cables on eBay, one NOS, each for ~$5. So, I was set. Easy peasy lemon squeezy.

Now to come up with some sort of housing for it.

Thanks for the inspiration, GeekHack, and thanks for the code, Hasu!

Happy clackety clack

...sorry, images didn't come through, one sec...

images credit (zacbir). images did not come across when i quoted his post.

212656-0212658-1212660-2212662-3
« Last Edit: Sun, 10 February 2019, 18:19:09 by nevin »
Keeb.io Viterbi, Apple m0110, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline GollyGee

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #874 on: Sun, 10 February 2019, 18:39:32 »
Thanks for the information nevin! I'll try to remember to update once I try soldering it.

Online nevin

  • Posts: 176
  • Location: US
Re: ADB to USB keyboard converter
« Reply #875 on: Sun, 10 February 2019, 21:12:05 »
looking for ward to it. good luck.

if your not very familiar with soldering look up a couple how to's on youtube or something.
Keeb.io Viterbi, Apple m0110, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline GollyGee

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #876 on: Mon, 11 February 2019, 19:10:52 »
I know someone who can solder, hopefully all will go well