Wow, a custom PCB, cool!
I didn't find any open source projects with easily available parts that do this, so I tried with a Pi Pico.
(might be that normally Arduino boards don't support USB host mode)
As I'm not an engineer there are still quit some hardware and software bugs left. I only have a logic analyzer and I need to buy an oscilloscope to see the wave form transitions.
Keyboard adapter works with Dell C840 (Pentium 4) laptop. Caps/numlock LEDs don't work (as expected), but the functions do work
LEDs should work on the first release version 0.1
With my i7 6700K PC (it still has PS/2 port) the keyboard adapter didn't work. But the LED on the Pico was flashing as I was pressing the keys. And the Num-lock LED did lit up on the keyboard (?) for some reason
The Pico LED should always flash if you press or release a key. If not then the keyboard wasn't detected by the Pico. This sometimes happens, don't know why, maybe there is a capacitor needed on 5v or I'm not using the TinyUSB library correctly? Replugging the USB keyboard should fix this.
I think the input stage with the zener diodes isn't optimal as I also had mixed results. I only did static voltage measurements using a multimeter but I couldn't see how the transitions look like. Maybe we should try something with a BSS138? https://duckduckgo.com/?q=level+bss138&t=h_&i … mages&ia=images
You can test if its the input stage by disconnecting GPIO 14, 17 and the zener diodes and pulling the GPIOs to 3.3V.
That way only the output side is working, but this might also be a problem as there are no ACKs replied to host requests.
Do you think it would be possible to adapt the code to also work with USB mouse? And would be combo mouse/keyboard operation be possible (with additional GPIO/transistors)?
Yes! It should be possible using only one Pico for both devices as TinyUSB supports multiple devices and hubs.
I also found out that all my USB mice with the PixArt chip still do native PS/2 using the green passive adapter!
E.g. the official Raspberry Pi Mouse or the Microsoft Basic Optical Mouse
There is only one USB port on Pico, but I'm thinking about using Logitech Unifying wireless mouse/keyboard combo sets, or some other wireless mouse/keyboard combos.
Ah interessing, I'll have to check how such a receiver appears on the USB side.
BTW the new wireless Pi Pico W could give some interesting possibilites of remote control of the old machines.
Also thought about that! I already have a Pico W at home, will try it some time.