All these recent bluetooth threads popping up has sparked my interest in making a bluetooth HHKB. I'v already installed a teensy so I figure how bad could it be. Unfortunately I could use a little bit of help - If this all works out I will turn it into another big write up / guide.
Hasu did a bluetooth mod for the HHKB Pro 1 (
http://geekhack.org/index.php?topic=20851.0) but it was for an old version of the tmk software and is mostly outdated. In his new alternative controller prototypes (
http://geekhack.org/index.php?topic=12047.0) he has moved to the RN-42-HID chip. The chip supports raw hid reports and the documentation describes the configuration so I think I could get the software in a working state. I'm sure Hasu will come along and iron out all the bugs as he continues his prototyping work.
My issue is the fact that I am primarily a software guy and thus don't know as much about the hardware side of things. The non-SMD version of the RN-42-HID (
https://www.sparkfun.com/products/10938) comes with built in voltage regulators and level shifting so it can simply be connected to the Teensy's Vcc/Gnd/Rx/Tx pins. Unfortunately the HHKB internals should be ran at 5V (according to Hasu) so a 3.7V LiPo battery would need to have a step-up/booster inserted. Everything should then be able to run off the 5V power source.
The part I need help with is figuring out how to correctly wire in the battery/charger/step-up/etc. When disconnected the device should run off of battery power and transmit over bluetooth. When plugged in over usb the battery should charge while still running the hardware and retaining the data pins for communication over usb. Pjrc's website (
http://www.pjrc.com/teensy/external_power.html) describes using an external power source, however they use traditional batteries. Most LiPo usb LiPo chargers I have found let you attach a battery and load but provide no way of carrying over the data pins. Maybe I should buy a usb breakout board and then wire the D+,D- to the teensy and Vcc,Gnd to the charger which is then wired up to the battery and teensy load (with the matrix and bluetooth module also sharing the Vcc line). I really don't know.
If it is any help here is Hasu's old circuit diagram.
https://raw.githubusercontent.com/tmk/tmk_keyboard/master/keyboard/hhkb/doc/Bluetooth_img/BT_circuit.jpghttps://i.imgur.com/4YXc8SF.jpgThanks in advance.
Edit: Here is my currently planned circuit. I believe it should work as follows.
USB Detached, Switch Down - Battery connected, providing power
USB Detached, Switch Up - Battery disconnected, powered off
USB Attached, Switch Up - usb powers circuit and also charges battery (lipo is disconnected to not discharge)
USB Attached, Switch Down - BAD? (both usb and lipo attempt to provide power)
Does anyone see any other possible issues or have suggestions for improvement?