adb2usb for old Apple mice and keyboards

What are you developing?
Post Reply
arpruss
Posts: 83
Joined: Sat Dec 21, 2019 10:06 pm

adb2usb for old Apple mice and keyboards

Post by arpruss »

In case anybody is interested, I ported Szymon Lopaciuk's adb2usb project to use the libmaple stm32f1 core and my USBComposite library, as well as optimizing it a little, and making the timing work better on counterfeit blue pills (using CYCCNT instead of delayMicroseconds(), since delayMicroseconds() is known to fail on some counterfeits).

https://github.com/arpruss/stm32-adb2usb/

Setup is very simple. Connect 5V to ADB 5V (if you're using a black pill that doesn't have a 5V pin, you may need to solder to the voltage regulator), GND to ADB GND, and B13 to the ADB data line. Then put a pull-up resistor between B8 and 5V (I've tried 2.2k and 4.7k and both worked for me). You can just jumper with a female end at the ADB plug if you don't have an ADB female socket (you can also use an S-video female socket). And now you can use old Apple mice and keyboards (including keyboards with mice plugged into them) as USB devices.

Currently only one button mice are supported. I don't have a two button adb mouse. Keyboard support is pretty full, though Windows-centric in some choices (e.g., Windows doesn't support keypad =, so the keypad = key sends a standard = button).

Took me long to figure out problems. Finally I realized that I had the keyboard hooked up to 3.3V, and while that was good enough to initiate communications and send some keyboard data, the keyboard was mangling some bits it was sending. When I connected the keyboard to 5V, everything worked better. I also ended up making some tweaks to keyboard support in my USBComposite library, so you'll need the latest version of that to compile.
arpruss
Posts: 83
Joined: Sat Dec 21, 2019 10:06 pm

Re: adb2usb for old Apple mice and keyboards

Post by arpruss »

Two updates:

1. If you have a mouse plugged into a keyboard, then the keyboard's power button (which I can't get working on Windows in a useful way) emulates the mouse right button, so you can use a one-button Apple mouse with a PC.

2. A 3D printable case is here: https://www.thingiverse.com/thing:5484276

The project works well enough that I am comfortably typing this post with an Apple Design keyboard from the 90s. I'm also pleasantly surprised that an old Apple ball mouse works fairly well -- I have bad memories of ball mice.
eloi
Posts: 1
Joined: Sat Jan 07, 2023 5:04 am

Re: adb2usb for old Apple mice and keyboards

Post by eloi »

Hello!

There is a Mak-105 keyboard from Ortek and I am trying to make an ADB- to USB converter based on stm32. I found your implementation project, but I don't understand the moment with the connection:

«Setup is very simple. Connect 5V to ADB 5V (if you're using a black pill that doesn't have a 5V pin, you may need to solder to the voltage regulator), GND to ADB GND, and B13 to the ADB data line. Then put a pull-up resistor between B8 and 5V (I've tried 2.2k and 4.7k and both worked for me). You can just jumper with a female end at the ADB plug if you don't have an ADB female socket (you can also use an S-video female socket). And now you can use old Apple mice and keyboards (including keyboards with mice plugged into them) as USB devices»
.-- _ --.
/ o4 3o \ 1: DATA
| o2 1o | 2: PSW(Power SW)
- === - 3: VCC
'- ___ -' 4: GND

I understand correctly?:

1. Connect 5V to ADB 5V (3: VCC)
2. GND to ADB GND (4: GND)
3. B13 to the ADB data line (1: DATA)
4. Resistor between B8 and 5V- what is connected ADB to the B8 pin?
Thanks!
Post Reply

Return to “Projects”