Author Topic: HHKB USB/BLE Controller with USB HUB  (Read 10731 times)

0 Members and 1 Guest are viewing this topic.

Offline yangdigi

  • Thread Starter
  • Posts: 79
  • Location: China
HHKB USB/BLE Controller with USB HUB
« on: Wed, 17 April 2019, 05:38:42 »
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.
217464-0

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.
217466-1

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/introduction
217468-2

It 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.
217470-3

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.
217472-4
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.
« Last Edit: Tue, 03 September 2019, 03:39:08 by yangdigi »

Offline yangdigi

  • Thread Starter
  • Posts: 79
  • Location: China
Re: HHKB USB/BLE Controller with USB HUB
« Reply #1 on: Wed, 17 April 2019, 06:35:33 »
something else.
I broken my fc980c.
217474-0
217476-1

Offline joric

  • Posts: 136
Re: HHKB USB/BLE Controller with USB HUB
« Reply #2 on: Wed, 17 April 2019, 07:44:06 »
I'm interested but I won't ever buy it since I already have Hasu contoller (which is open source, by the way). I'm mostly interested in schematic and firmware to build it at home and possibly improve it.
I'm following this project since november https://geekhack.org/index.php?topic=71517.msg2676544#msg2676544
You could also try nRF52840 (with USB bootloader) instead of nRF51 and get rid of Atmega32u4 altogether: https://redd.it/bby5y4
« Last Edit: Wed, 17 April 2019, 07:49:41 by joric »

Offline yangdigi

  • Thread Starter
  • Posts: 79
  • Location: China
Re: HHKB USB/BLE Controller with USB HUB
« Reply #3 on: Wed, 17 April 2019, 07:59:42 »
I'm interested but I won't ever buy it since I already have Hasu contoller (which is open source, by the way). I'm mostly interested in schematic and firmware to build it at home and possibly improve it.
I'm following this project since november https://geekhack.org/index.php?topic=71517.msg2676544#msg2676544
You could also try nRF52840 (with USB bootloader) instead of nRF51 and get rid of Atmega32u4 altogether: https://redd.it/bby5y4
Thanks for the infomation. I will try 52840 later for some other project.
In my thought, how it works is more important than what it uses. I'm more familiar with this way so just use it to get my purpose
52840 is my next target, especially for split keyboard.

Offline equalunique

  • Posts: 539
Re: HHKB USB/BLE Controller with USB HUB
« Reply #4 on: Fri, 19 April 2019, 10:59:46 »
Amazing work!

Sent from my LG-H918 using Tapatalk


Offline nathanchere

  • Posts: 708
Re: HHKB USB/BLE Controller with USB HUB
« Reply #5 on: Fri, 19 April 2019, 16:08:39 »
Love the way you've approached the status lights

Offline LostInInaka

  • Posts: 21
  • Location: Tohoku, Japan
Re: HHKB USB/BLE Controller with USB HUB
« Reply #6 on: Wed, 08 May 2019, 05:58:17 »
This is most assuredly awesome!

I am currently using a Hasu USB controller, and the only thing holding me back from his BT version is the fact it can’t make HID addresses over 0x65, which I often use on the JIS layout keyboard since I need to type in Japanese sometimes or need the Japanese based keys.

Looking at the controller information, I am assuming this board would not have such a limitation?

Also, any idea when this might be available outside of China (or to Asia at least)?