I make this post and just want to say something about what I did last two month. It's nearly completed.
After it is completed, firmware would be opensource.
It mostly bases on hasu's work.
The back looks the same as original. I really do not like hhkb bt's big ass.
the battery switch is here. It's not angled as I want to close this cover. Just use this cover can reach and switch it.
PCB is made to be smaller, so there is more space for battery. I use a 2500mah battery for 17 days and it still works. It can't be long like some bluetooth keyboard but I think it should be enough.
atmega32u4 with 8M, mdbt40 module with adafruit's firmware.
https://learn.adafruit.com/introducing-the-adafruit-bluefruit-le-uart-friend/introductionIt has 3 leds. They may be blind with black case. There are two more leds under each usb port. I will add its pic later when new board come.
I've meet some problems when did this.
1.first I used a PS3120A 5v boost. It worked but the working current was a little high, about 38ma when typing. Then I changed it to PS7516 and the working current was reduced to 28ma, much better.
Some day I just wanted to try how low the voltage could be to make the keyboard work. Then I found it could work with 3.3v while the working current 18ma.
Things did not always go well. When using 3.3v with HHKB JP, the keyboard kept on rebooting. After a few tests, the reason is at the very moment that HHKB JP keyboard powered up, it needs more power and it makes 3.3v ldo output became too low to be 1.8v that make 32u4 reset. Extra capacitance makes HHKB JP work.
So finnaly I use 3.3v for the whole keyboard. 5v circuit is still kept there, but not used any more.
2. 18ma working current seems acceptable. But it's not enough. I've already desinged my powersaving method of the ble module and when I applied it to HHKB BLE, there were some problems.
Simple to say, my method is:
1>If no key is pressed after a period(5s), 32u4 goes to suspend.
2>If no key is pressed after a more long period(2.5 hours) or bluetooth is unconnected for 90s, shut down ble module.
HHKB needs to shut down the keyboard itself's power when 1 and 2 above.
here is some data when 1
WDTO_60MS 4-6ma
WDTO_30MS 6-8ma
WDTO_15MS 8-10ma
first I used 60MS, but it may miss some keys when waking up from status 1. I used Switch Hitter to test then I found that when waking up, some keys' pressed time was very short like the pic below show. So typing two fast from status 1, it may miss the first key. WDTO_30MS works well.
Even 30MS, HHKB JP still may miss the first key if it is in row0 or row1. I did not understand why this happened. But to solve it, when watchdog wakes up, I scan the matrix once and then scan it again to check if any key is pressed. It works and no key is missing with HHKB JP now.
Update: Some HHKB US also needs this.
when status 2, the power is about 0.3ma, and I only check if any key is pressed every 1s. So to wake up HHKB from status 1, key needs to be pressed for a longer time.
I've made a special mode I named it LOCK MODE. when entering this mode, the power stauts is like 2 but it can be waked up only by pressing F and J at the same time. I use this mode to substitute the power switch.
3. more later.