Author Topic: cyber60: 60% Bluetooth PCB running nRF52 and ZMK  (Read 5516 times)

0 Members and 1 Guest are viewing this topic.

Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« on: Mon, 16 November 2020, 13:28:58 »
I mentioned this project in a thread, so I thought I should do a thread for it. Would love to hear feedback and thoughts. :D

I wanted to play with ZMK and could not find any DIY friendly 60% project, so I made one. The goal is for the project to use as much JLC-basic parts as possible, and keep everything hand solderable using only a soldering iron. JLC can do all assembly except for connectors (USB, battery and daughter board), battery-switch, RGB-led and module. The module is a bit trickier to solder then it need to be since I kept split space support, but who does not love split space? ;)

Specs:
  • Module: Holyiot YJ-18010
  • Standard Tray Mount support
  • Non constant drain battery measurement on Rev A, not Rev B
  • Lipo charger for single cell 3.7V li-po/li-ion batteries (JST PH and JST SH support, you can mount either, not both)
  • RGB-led under Caps lock for multi function indicator (no support in code yet)
  • Possible to build with just a soldering iron (no underside pads etc)
  • ANSI and ISO layout support with the common options.

255979-0
255981-1

Layout support:
255983-2

Github:
Project: https://github.com/4pplet/cyber60
Latest (pre)release: https://github.com/4pplet/cyber60/releases/tag/A2

Currently test-built in a Tofu. The batteries I have is a bit too big, so it is placed outside the keyboard currently, waiting for smaller batteries. I have a box60 ordered that I will also testfit the PCB and batteries in.
255985-3
255987-4

ZMK-fork:
https://github.com/4pplet/zmk

Todo:
  • Order and test revision B2.

Status:
- 2021-06-07: Testing of revision B1 done, some changes made and released as B2. Will be ordering protos and verify B2 soon. ( (https://geekhack.org/index.php?topic=109628.msg3035159#msg3035159))
- 2021-03-21: Testing revision B1, mostly works, but some minor changes need to be made for being fully functional. (https://geekhack.org/index.php?topic=109628.msg3028003#msg3028003)

Feel free to use the design for personal use but note that I take no responsibility. Note that Revision B is currently being testet, for something functional today, use Revision A2. Revision B2 SHOULD be safe to use, but not verified.

Useful links:
- ZMK website: https://zmkfirmware.dev/
- ZMK discord: https://discord.com/invite/sycytVQ
- zmk-config for this board: https://github.com/4pplet/zmk-config
- Adafruit bootloader: https://github.com/adafruit/Adafruit_nRF52_Bootloader
- How to flash BL (I do step 2): https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide/flashing-the-bootloader
- Suitable programmer: https://www.segger.com/products/debug-probes/j-link/models/j-link-edu-mini/
« Last Edit: Wed, 07 April 2021, 09:08:39 by Applet »

Offline nevin

  • Posts: 1422
  • Location: US
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #1 on: Mon, 16 November 2020, 13:57:15 »
I've been playing with layer lights in qmk. Have some good working exampes. Does zmk have the same implimentation or not yet?
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #2 on: Mon, 16 November 2020, 14:05:12 »
I've been playing with layer lights in qmk. Have some good working exampes. Does zmk have the same implimentation or not yet?
afaik, no. Don't think there is any LED-support yet other than basic underglow, ZMK is still very new. I have big expectations for it in the future tho.
« Last Edit: Mon, 16 November 2020, 14:14:36 by Applet »

Offline nevin

  • Posts: 1422
  • Location: US
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #3 on: Mon, 16 November 2020, 14:14:13 »
In qmk you can specify layer segments, of an led strip or underglow and get it to function as lock & layer indicators. So it might not ba a far stretch to get it to work. i'll look at it then.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline parablol

  • Posts: 97
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #4 on: Mon, 16 November 2020, 15:16:43 »
Cool feature set!!! Assuming all goes well, please consider an ortholinear version in the future! :D

Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #5 on: Mon, 16 November 2020, 15:17:20 »
In qmk you can specify layer segments, of an led strip or underglow and get it to function as lock & layer indicators. So it might not ba a far stretch to get it to work. i'll look at it then.
The undergow is for adressable leds. This PCB uses a dumb common anode led without logic, so I can't use the underglow code. I'm planning to implement a PWM driver for it. I disslike the adressable leds for a project like this, since they have a constant current draw, even when off. This could be solved using a transistor to fully turn them off, but I prefer it this way. It's probably a bit more if a hassle to implement the code, but it should be more power efficient.

There is no lock states in ZMK yet and no support for userspace-code yet.
Cool feature set!!! Assuming all goes well, please consider an ortholinear version in the future! :D
Thanks :D

Offline nevin

  • Posts: 1422
  • Location: US
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #6 on: Mon, 16 November 2020, 18:36:00 »
adddressible led draw.... good to.know. That makes total sense, and important aspect being wireless.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline ice9js

  • Posts: 22
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #7 on: Thu, 19 November 2020, 05:07:50 »
Very cool! I've got a question - how's your experience been with the reception inside an aluminum case so far?
I see it's a common pattern to put the radio module in the spacebar area and use a non-metallic plate but I don't really have the tools or the experience to verify how that affects the rf signal vs a more traditional design like a patch antenna or not having metal at all around that part on the case.

Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #8 on: Thu, 19 November 2020, 05:52:47 »
Very cool! I've got a question - how's your experience been with the reception inside an aluminum case so far?
I see it's a common pattern to put the radio module in the spacebar area and use a non-metallic plate but I don't really have the tools or the experience to verify how that affects the rf signal vs a more traditional design like a patch antenna or not having metal at all around that part on the case.
I've not done much testing on signal strength yet. Having the antenna under space bar is the only feasible location with this layout and module, with another layout and PCB size, I would have placed it on top. Generally I would not recommend using the Tofu case at all, since it is a big metal piece, shielding the antenna, but so far it has been working great. I start to loose connection about 3-4m from my PC, but it's working great with the ~1m distance from my desk to my PC. I had the case, so I thought it would be a good test. The acrylic/plastic Tofu or some other plastic case is of course a better option from a RF and reception perspective, but metal case and plastic plate seems to be good enough at least for my use case.

I have now patched the PCB to work like rev A2, and the battery circuit seems to work like I intended it to. Flipped one transistor, removed series resistance between enable pin and MCU and added a pull down so it defaults to off. Not pretty but it works ;D (I restored the series resistance/gate resistance, don't know what I was thinking...)
256173-0
« Last Edit: Thu, 19 November 2020, 14:05:56 by Applet »

Offline nevin

  • Posts: 1422
  • Location: US
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #9 on: Thu, 19 November 2020, 08:55:31 »
nice when things start going your way....
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #10 on: Wed, 25 November 2020, 04:27:15 »
Tiny update:
  • Still waiting on my smaller batteries and eventually the box60 to test the PCB in.
  • I put together a ALPS PCB, very similar and uses the same software implementation. I'll make a pre-release on my github soon, but changes may still be added to A1 (same applies for the MX-release A2)
  • Still have more testing to do (Leds test, current measurements etc)
256503-0
256505-1

Edit:
Link to pre-release: https://github.com/4pplet/cyber60/releases/tag/A1_ALPS
« Last Edit: Wed, 25 November 2020, 05:52:12 by Applet »

Offline nevin

  • Posts: 1422
  • Location: US
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #11 on: Wed, 25 November 2020, 04:58:10 »
looking good.

yeah, i've been eyeing up the Box60 case as well. Haven't purchased one yet though. Love the different styles they've done them in. So far i've seen two translucent ones, black & most recently they have a beige with commodore 64 stickers... Looks like a versatile, cute little case with plenty of room for modifications.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline paperassgasket

  • Posts: 364
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #12 on: Tue, 05 January 2021, 12:34:11 »
I just stumbled upon this looking for ZMK implementations. This is a cool project, I'll be watching  :thumb:


Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #13 on: Thu, 07 January 2021, 04:02:02 »
Tiny update:
I've been working on a new revision (B) with rotary, underglow and buzzer added that I will order prototype for soon. Rotary placement is either off board, or in split backspace position (replaces tilde-key). All of these additions is optional, and you can just skip mounting them if not needed. I also simplified the voltage measurement circuit to the basic voltage divider that is commonly used. This adds a tiny bit of current leak, but it is very low compared to the self leakage of a lipo battery.
259162-0
The RGB-led under capslock and buzzer is something not supported by ZMK currently, but hopefully we can work that out :D

As mentioned previously, addressable leds have a constant current draw, even when off, so there is a transistor added to cut power to the leds when off.
« Last Edit: Thu, 07 January 2021, 04:24:12 by Applet »

Offline nevin

  • Posts: 1422
  • Location: US
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #14 on: Thu, 07 January 2021, 10:14:44 »
nice additions.
do you think these will eventually go to a GB? or just open source?
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #15 on: Mon, 11 January 2021, 06:51:56 »
Currently no plans to take this to GB, especially since there is features that is not yet supported by ZMK. If there is interest, we could do a small scale GB, most of the components is supported by JLC assembly, so it's pretty cost effective.

Files are also open and license support it if someone else want to run a GB.

I'd recommend to wait until after my first proto-run tho. ;D

Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #16 on: Mon, 01 March 2021, 04:17:20 »
Tiny update:

My modules for testing revision B1 is still stuck in customs (been waiting for a month soon). In the mean time, I got some help to test out the RGB-led, and code for indicating which BLE-profile/device is connected is in the works, thanks to Megamind.


The idea is to make it easier to see which device you currently have selected in the keeb. The led is on for a short while and the color depends on which device.

Offline nevin

  • Posts: 1422
  • Location: US
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #17 on: Mon, 01 March 2021, 09:56:40 »
nice! love single, multifunction leds. i'm not a big RGB guy but implementations like this are totally worth it.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #18 on: Sun, 21 March 2021, 16:40:09 »
Update on Revision B:

For starters: revision A2 MX and revision A1 for ALPS and SMK is tested and I consider revision A done for now. I finally got the bluetooth modules after 2 months of waiting and has gotten started on testing the revision B protos :cool:

My findings so far:
- Basic functions carried over from A2/A1 work great
- Rotary encoder has issues when using the common encoder filter, but works great without the filter. I'm using low frequency pins, and all works great.
- Design error in the circuit that cuts off power to the underglow. Annoying rookie mistake. I'm using a p channel mosfet as a high side switch, but I did not account for the control voltage being lower than the voltage I'm powering the leds with (battery voltage). This results in that the p mosfet does not close 100%, especially when battery voltage is high. I will add a n channel mosfet in the B2 release to make sure that the p mosfet close fully. Current situation will leak a bit of current to leds, even when they are turned off.
- One of the downside of the added functions from revision A to revision B is my use of pads that is partly cut away due to stabilizer and mx switch holes and thus making it a bit more difficult to solder. I found it OK to solder (success!), so I'll keep the new functions in revision B. My backup plan was to simply revert to how it is in revision A and that feature set.

Updates to B2:
- Removing encoder filter from design
- Adding complementary transistor to underglow shut off, so it fully closes
- Add reverse polarity protection for battery connector

To do in Revision B:
- Test buzzer circuit to verify function and volume
- Update design and verify function.

Current plan for revision C:
This will be a bit further in the future, but I'll gladly take suggestions. My current plan is to wait for a good nRF53-module (probably ~a year away) before changing anything in current design/feature set aside from bug fixes like above. My current plan is the following:
- Update to a nRF53 based module
- Change to ws2812c in 2020-package for underglow
- Possibly remove the support of having two different JST battery connectors and stick to one.
- Possibly do a transistor based battery switch.

I try to document more of what I do, so I put together a short vid if anyone is interested :D

« Last Edit: Sun, 21 March 2021, 16:47:36 by Applet »

Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #19 on: Fri, 26 March 2021, 10:02:10 »
Patched the underglow issue on my B1 build and in code, it will work like this in the B2 revision. Power to underglow is now completely off, when they are turned off in code.
265422-0

Still to do now is to test and verify the buzzer
« Last Edit: Fri, 26 March 2021, 10:04:29 by Applet »

Offline nevin

  • Posts: 1422
  • Location: US
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #20 on: Fri, 26 March 2021, 10:57:55 »
nice. i know that has been an issue with led's for a long time.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Applet

  • Thread Starter
  • Posts: 418
  • Location: Sweden
Re: cyber60: 60% Bluetooth PCB running nRF52 and ZMK
« Reply #21 on: Wed, 07 April 2021, 08:40:04 »
Small update:  :D

I believe I've tested and verified everything on revision B1 now and updated the things that needed to be changed for B2 release. B2 release is now on github, I will be ordering protos soon to verify function, then it should be mostly done for now. B2 revision should be safe to use, but I'd recommend to wait for my proto-round, so I can verify it.

MX: https://github.com/4pplet/cyber60/releases/tag/B2_MX
ALPS: https://github.com/4pplet/cyber60/releases/tag/B2_ALPS
SMK: https://github.com/4pplet/cyber60/releases/tag/B2_SMK

I tested the buzzer with a simple arduino sketch just to verify the circuit. Should not be any problem using it with ZMK, but it needs to be implemented in code.

Functionality for LED under capslock-switch is still very limited, but under development.

EDIT: The volume is a bit low in the video, it's not loud IRL, but ok.

Stay safe!
« Last Edit: Wed, 07 April 2021, 09:21:56 by Applet »