Converting AT keyboard to Bluetooth.

light655

01 Jul 2021, 17:15

Since my laptop has a very limited amount of USB ports, I decided to convert my AT keyboards to Bluetooth. The keyboard I decide to convert is a BTC-5339-R0.

I connect the AT CLK and DATA pins to a ESP32, which is a micro-controller with built-in Bluetooth and Wifi support. However, the ESP32 runs at 3.3V, so I need to put a logic level converter between the keyboard and the micro-controller.
Image
^ I tested the circuit on a Acer membrane keyboard first, so I won't accidentally blow up my beloved foam and foil keyboard (I actually enjoy the key feel of it haha).
Image
^ Then I got the circuit soldered and add a battery to make it truly wireless. Everything was taped to the back plate and that's it.
The AT cable of the keyboard is detachable from the inside of the keyboard, so if I need it I can put the original cable back.

I've got my code for this project on Github (https://github.com/light655/AT-Bluetooth-converter).
There are a few issues currently though:
1. The Bluetooth keyboard library I used cannot get the message sent from the computer. This mean the convert and the keyboard doesn't know the states of the lock lights, in turn the lock lights will stay off.
2. Since print screen and pause keys have longer scan codes, I currently omitted their keystrokes. (I'm just too lazy to write code for them...)
3. I believe that this converter will lag in some sort of way. However, I seems to be alright playing Typeracer with it. (My speed is around 60 wpm.)

Image
^ This is the finished keyboard! I let the Li-po battery charger board stick out of the keyboard from the hole for the cable so I don't need to make any modification to the case.

I'm proud of it so I'm going to share it with you guys!

Post Reply

Return to “Workshop”