Skip to content

Direct wired "Forager Plus" PCB using Seeed XIAO nRF52840 Plus#17

Closed
peterjc wants to merge 11 commits intocarrefinho:mainfrom
peterjc:forager-plus
Closed

Direct wired "Forager Plus" PCB using Seeed XIAO nRF52840 Plus#17
peterjc wants to merge 11 commits intocarrefinho:mainfrom
peterjc:forager-plus

Conversation

@peterjc
Copy link

@peterjc peterjc commented Sep 29, 2025

This implements the idea mooted on #16, replacing the 11 GPIO Seeed XIAO nRF52840 and diode based scanning matrix with the 20 GPIO Seeed XIAO nRF52840 Plus and diode-free direct wiring.

Feedback welcome (I will wait before ordering the PCB). I'd be happy for this to be merged, and would contribute build guide changes & build ZMK firmware.

Details Screenshot 2025-09-29 at 21 44 13 Screenshot 2025-09-29 at 21 43 53 Screenshot 2025-09-29 at 21 45 04

I'm also tempted to add a battery cutout allowing a thicker battery, but have yet to look at the PCB and case files together (to see how much space the switches allow etc). You may have had good reason not to.

This will be the Forager Plus PCB, direct wiring without diodes
using the Seeed XIAO nRF52840 Plus controller which exposes 20
GPIO pins using '9 extra 1.27mm pitch SMD castellation pins beyond
standard XIAO nRF52840'.
Used sed to search and replace, and then opened and resaved in
KiCad which renumbered the now much smaller list of nets:

sed -i.bak 's/net .. "Net-(RD.*-A)/net 33 "RGND/g' forager-plus-pcb.kicad_pcb
Again, used sed and then opened & saved in KiCad to renumber:

sed -i.bak 's/net . "Net-(LD.*-A)/net 1 "LGND/g' forager-plus-pcb.kicad_pcb
sed -i.bak 's/net .. "Net-(LD.*-A)/net 1 "LGND/g' forager-plus-pcb.kicad_pcb
Changing to top/middle/bottom and thumbs to follow manually:

sed -i.bak -e 's#"/RCOL0"#"RM4"#g' -e 's#"/RCOL1"#"RM3"#g' \
    -e 's#"/RCOL2"#"RM2"#g' -e 's#"/RCOL3"#"RM1"#g' \
    -e 's#"/RCOL4"#"RM0"#g' forager-plus-pcb.kicad_pcb

sed -i.bak -e 's#"/LCOL0"#"LM4"#g' -e 's#"/LCOL1"#"LM3"#g' \
    -e 's#"/LCOL2"#"LM2"#g' -e 's#"/LCOL3"#"LM1"#g' \
    -e 's#"/LCOL4"#"LM0"#g' forager-plus-pcb.kicad_pcb
These only exposed 11 GPIO pins (plus 2 NFC pads on the back),
not enough for direct wiring.
Using the Forager author's Seeed XIAO nRF52840 Plus footprint
from https://github.com/carrefinho/visorbearer

The plus pads do stick out slightly more than before and are on
or over the top PCB edge. Should be fine...

Note there is not quite enough clearance with the radio keepout
to do single sided wiring (and thus potentially a reversible PCB
with suitable switch footprints).
@peterjc
Copy link
Author

peterjc commented Sep 30, 2025

I undestand via the ZMK Discord that D16 aka P0.31 on the Xiao nRF52840 Plus has some special role in battery usage making it unsuitable if not simlpy non-usable for GPIO, so I'll move a few traces...

Also tweaked a few traces, lined up the vias etc.
@peterjc peterjc marked this pull request as draft September 30, 2025 13:29
@peterjc
Copy link
Author

peterjc commented Sep 30, 2025

Converting to draft for now - I have no reason to doubt the current PCB, but a fully reversible one seems tantilisingly close - which if I can pull it off would be more attractive.

@carrefinho
Copy link
Owner

Thanks a lot!

Yeah I agree, the $1 premium for XIAO Plus makes a lot of sense to avoid having to deal with diodes.

A battery cutout is definitely viable. 601230 (200mAh) should fit, which would roughly double the capacity compared to the original 301230. I stuck with the 301230 in the orginal design primarily due to the size's ubiquity.

Reversible is for sure preferable in terms of cost, but from my limited knowledge having to solder jumpers is inevitable and it seems to be a bit more confusing and worsens the build experience somewhat?

On the other hand, I have considered a XIAO Plus version that uses the extra pins for VIK support to enable optional modules, mainly pointing devices which there is a lot of demand for. That one will have to stick with a matrix.

@peterjc
Copy link
Author

peterjc commented Oct 2, 2025

Thanks for the encouragement!

Sourcing a larger battery with the low profile connector could be a challenge, but direct soldering is still an option. I wonder what the current battery connection split is for Foragers built to date?

I agree the reversible direct wiring plan will probably not work with VIK - the board is very tight even if a couple of pins is enough. The non-reversible direct wiring (as in this pull request right now) has more room to play with.

I have a rough version of my reversible direct wiring plan in KiCad with:

  • All 17 switches replaced with a reversible choc v1 footprint generated by https://github.com/ceoloide/ergogen-footprints/blob/main/switch_choc_v1_v2.js - it has to be v1 only as the controller is right up against the corner keys (Qwerty Q or P).
  • Direct wiring to the shared pad/hole on each switch, ground wiring to the other pad/hole on each switch. Like this on one of the less busy edges of the board with the ground fill off for clarity: Screenshot 2025-10-02 at 09 34 39
  • The radio keepout is respected, other than the mounting hole and neighbouring key (Qwerty W or O) which can't be moved without a case design change.
  • Every switches' trace has a via near the controller to connect to a pin on each side (usually a different logical pin, often at the same physical location with the via right by the pads):
Screenshot 2025-10-02 at 09 40 13 Screenshot 2025-10-02 at 09 50 08

I still need to work on the battery plus connection, and here I think a single cut out with the B+ and B- in the corners will be enough. The B+ and B- pads are symmetric, so if we have our solder point for B+ close on one side, it is also close to B- on the other side. Is there an established gap (say 1mm) to act as a barrier yet easy to bridge with solder? If not, a pair of battery jumpers may be the simplest solution (on opposite sides of the board to keep assembly simple and reduce the chances of anyone soldering both jumpers making a battery short).

I may restore the square cutout for the four unused pins under the USB (CLK, DIO, GND, RST) [Update - done, enough room], but will probably just make that a keep out to avoid any chance of a stray connection with a trace under it. I guess access to the RST pad could be useful if the built in switch failed?

@peterjc
Copy link
Author

peterjc commented Oct 2, 2025

I am thinking something like this for the battery + connection, with both vias in the corners of the cutout connected to BAT (no jumpers required). Perhaps bring them in a tiny fraction closer to the pads?

Screenshot 2025-10-02 at 12 28 12 Screenshot 2025-10-02 at 12 27 53

(The switch traces are currently mostly on one side, a legacy of my original single-sided board design attempt which would have been simpler but the routing was too tight.)

@MSmaili
Copy link

MSmaili commented Oct 2, 2025

@peterjc Sorry for jumping in here. In issue #14, I pointed out the battery-draining issue and recommended adding a switch. (I have no clue why I had the battery issue, but I wasn't the only one; On Reddit, other people were complaining about the same thing, and no, I was not using fake XIAO, and I replaced two different batteries.)

I think the power switch is smarter for other things as well, for example, when replacing the battery, you can turn it off and work more "peacefully" on the PCB. N

The power-switch addition has already been done in this repo
. It wasn’t done by me. I also have the design files that include the cut-out for the power switch, which I can post/update there. Now I am using this PCB and there is no issue. Cannot say for the battery yet, but it passed the full week and is above 80% still (which is good news)

I’m commenting here just to ask: would it be sensible to consider the power switch too if, in the future, we decide to go ahead with the diode-less design?

I do not have experience with PCB design, just wanted to post the repo if it helps to grab something from there.

I love this board, is probably one of my favorite boards i use. Thanks a lot for the amazing work @carrefinho

@peterjc
Copy link
Author

peterjc commented Oct 2, 2025

I suspect part of the battery life issue is from the wireless side, having to work harder than expected due to interferance in the radio keepout zone (this was suggested on the ZMK Discord). There are limits with the Forager key placement and case design's screw point, but my no-diode direct wiring is much more careful not to have traces in the keep out. That should help.

Also, adding a battery cutout will allow a thicker higher capacity battery. Brute force, but if it can double the battery life, an easy win.

If there was an offical case change for a power switch, that would be nice to have too. It might be worth looking at moving the screw in the wireless keepout too?

@MSmaili
Copy link

MSmaili commented Oct 2, 2025

@peterjc I just pushed a commit with the case, you can find it here

Feel free to use it; it's not much different, just the tiny open space for the power switch. Also, it does not ruin the look of my Forager at all (at least in my eyes)

I always feel safer when there is a power switch. I drag my keyboard around, so turning it off and putting it in the backpack feels better when it's completely off.

@peterjc
Copy link
Author

peterjc commented Oct 2, 2025

@MSmaili I can try to keep the power line in roughly the same place to facilitate adding a switch like that (you're using the underside, same side as the hotswaps and the controller, right?). The direct wiring version on this branch does that for only for one of the two boards.

@peterjc
Copy link
Author

peterjc commented Oct 7, 2025

Closing this PR in favour of #19 which uses a single reversible PCB shared for both left and right.

@peterjc peterjc closed this Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants