Author Topic: Best way to connect split board with WS2812 LED strips in both sides?  (Read 4751 times)

0 Members and 1 Guest are viewing this topic.

Offline Tye

  • Thread Starter
  • Posts: 69
After successful Planck and Ergodox experiments, I'm beginning my first fully custom board. It will be a compact split with 48 keys, Trackpoint, and WS2812 strips on both halves. I will use QMK for the firmware.

I've researched a ton but still not quite clear on the best way to connect the halves.

There will be a Teensy and the Trackpoint in the right half. The left half will only have keyswitches and 24 LEDs. From calculations, I think the left half LEDs would draw about 1 amp, at most. I could limit the brightness problematically to keep power draw low enough (at the expense of brightness).

Any advice/suggestions on how to connect the halves is greatly appreciated.

As I see it, I can:
1. The Ergodox way. Use a TRRS and MCP23018 I/O Expander. Honestly, I don't understand how the I/O expander works and if I could get the firmware working with it. (I've read the spec sheets. I need it in English). Additionally, does the TRRS connector have what's needed to drive the LEDs?

2. Use a USB C cable with female breakout boards and non standard (for USB C) wiring. The left half matrix is 6x4 so I'd need 10 wires for the matrix, plus 3 for VCC, GND, and signal for the LEDs. So, 13 total wires, which USB C can provide. Does that sound right?

3. Some variation of number 2 like, maybe an HDMI cable. It's easy to breakout boards for these too.

4. Something else I don't know about???

Input from the Making Stuff Together! subforum always appreciated!

Offline 0100010

  • Posts: 1127
  • Location: DFW, TX, US
  • Not Sure
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #1 on: Sun, 25 September 2016, 21:09:01 »
From memory the IO expander allows the use of the TRRS connector because the 2nd half is only communicating using something like I2C back to the controller in the other half.  If you don't want to go that route and instead wire the 6x4 matrix of the 2nd half directly, then yes you would need the 10 wires for that, plus the 3 for the LEDs.
  Quoting me causes a posting error that you need to ignore.

Offline spindle

  • Posts: 28
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #2 on: Sat, 01 October 2016, 21:03:18 »
I've used tmk to make split boards  that uses a promicro/atmega32u4 in each half and uses serial/i2c to communicate between them (code here).

People have done builds with ws2812 led strips in both halves (the code). It uses trrs wire to interconnect the two halves, with with 1 wire for the ws2812 signal, and 1 wire to interconnect the atmega32u4 to transfer key matrix state.

Offline Tye

  • Thread Starter
  • Posts: 69
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #3 on: Wed, 05 October 2016, 00:46:01 »
Thanks for the info. For various build and design reason, I don't really want to run a full microcontroller in each half.

I'm a little out of my league so let me ask this probing question...
What is the reason that I always see 4 conductors for builds that use an expander. Is there any reason I couldn't use five conductors? So, 4 wires just like the Ergodox for keyboard data, plus 1 wire for the LED data wire?

So that this all makes a little more sense... I'm *really* trying to connect the two halves using pogo pins and magnets. (again, I've got my reasons for the build. Solidifying ideas and techniques now)

Offline Tye

  • Thread Starter
  • Posts: 69
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #4 on: Wed, 05 October 2016, 00:50:30 »
Ahh... I might have just answered my own question above.

If I use a five conductor pogo pin connector, then I could use four conductors just like the Ergodox with the expander for keyboard data. The 5th conductor for the LEDs doesn't even need to know about the expander. Power will get passed to the left half from the USB right half then distributed to the expander and LEDs. The sequence for programming the rows for the LED would be a little weird because I'd have run LED data wire for each half before connecting them but that's a minor programming issue.

Does that seem feasible???
« Last Edit: Wed, 05 October 2016, 01:35:46 by Tye »

Offline tobsn

  • Posts: 216
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #5 on: Wed, 05 October 2016, 08:06:23 »
I'm going to use HDMI connectors... I need 11 for rows/cols and 2 more for the LEDs I think. Should work ;)

Offline spindle

  • Posts: 28
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #6 on: Thu, 06 October 2016, 15:33:50 »
For various build and design reason, I don't really want to run a full microcontroller in each half.

Personally if you're handwiring, the 2 promicro route is easier than the IO expander, but if you have other reasons why that's not an option, fair enough.

I'm *really* trying to connect the two halves using pogo pins and magnets. (again, I've got my reasons for the build. Solidifying ideas and techniques now)
That sounds interesting. Have you started prototyping this yet? I feel like you'd need very strong magnets to keep the springs in 5 pogo pins together reliably, but it would be cool if you can get it working.

Offline Tye

  • Thread Starter
  • Posts: 69
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #7 on: Fri, 07 October 2016, 19:12:50 »
Personally if you're handwiring, the 2 promicro route is easier than the IO expander, but if you have other reasons why that's not an option, fair enough.
I'm using this build as an excuse to finally learn PCB design. Lots to learn. Even if I fail the first one, I'll give it a second shot applying the lessons learned. That said... Why do you think it's easier? (I'm not so far along that I can't change the design)
 
That sounds interesting. Have you started prototyping this yet? I feel like you'd need very strong magnets to keep the springs in 5 pogo pins together reliably, but it would be cool if you can get it working.
Parts are arriving daily but I don't have the pins in just yet. I've been researching for weeks. It looks like just a few of the kind I want are going to cost a ridiculous amount but, meh, I'll have something cool to show off that I designed and built.

Offline spindle

  • Posts: 28
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #8 on: Mon, 10 October 2016, 16:09:45 »
If you're making a PCB it doesn't really make a difference, but if handwiring I find it's easier to solder since the IO expander would need a protoboard (not actucally a big deal since the ergodox one comes in a DIP package know that I think about it) and easier to debug since you can check the matrix of each half separately.  Really, it's probably just my personal preference since it's what I'm more familar with.

One advantage though is you have the option of plugging the USB cable into either half or using each half separately. This makes it look nicer since it can be symmetrical.
But if you don't care about those things then the IO expander is the way to go.

Offline tobsn

  • Posts: 216
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #9 on: Mon, 10 October 2016, 16:39:52 »
I'd like to build a split with a the least amount of connections in between but having WS2812 on both sides... is there a dummy tutorial for me somewhere?

Offline Tye

  • Thread Starter
  • Posts: 69
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #10 on: Tue, 11 October 2016, 13:46:30 »
Thanks for the input, all. It looks like the IO expander is the way to go for this build.

tobsn, I haven't really found a good tutorial. My IO expander arrived a few days ago from Amazon. If you want to go this route, I'd highly recommend picking one up. The last few days I've just been playing with it on a breadboard. Before that I didn't really get how the IO expander worked but now that I've physically wired everything up it's fairly straightforward. I hope that knowledge transfers to the PCB I'm designing. But if you want to do it this way, buy an IO expander onine and use the Ergodox schematics as a starting point.

As far as four wires vs five wires, I'm going to stick with five. For me, it's the least work from a hardware/software/knowledge perspective and means I'll probably be able to keep everything in my QMK keymap.c and not worry about modifying other QMK files. Easier for me to maintain. If you do this, obviously, you'll need to use some other connector than a TRRS.

(and finally... I'm still learning this so I reserve the right to say "I'm wrong" later!)

Offline monkeyplusplus

  • Posts: 43
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #11 on: Wed, 12 October 2016, 11:32:22 »
Thanks for the input, all. It looks like the IO expander is the way to go for this build.

tobsn, I haven't really found a good tutorial. My IO expander arrived a few days ago from Amazon. If you want to go this route, I'd highly recommend picking one up. The last few days I've just been playing with it on a breadboard. Before that I didn't really get how the IO expander worked but now that I've physically wired everything up it's fairly straightforward. I hope that knowledge transfers to the PCB I'm designing. But if you want to do it this way, buy an IO expander onine and use the Ergodox schematics as a starting point.

As far as four wires vs five wires, I'm going to stick with five. For me, it's the least work from a hardware/software/knowledge perspective and means I'll probably be able to keep everything in my QMK keymap.c and not worry about modifying other QMK files. Easier for me to maintain. If you do this, obviously, you'll need to use some other connector than a TRRS.

(and finally... I'm still learning this so I reserve the right to say "I'm wrong" later!)
I've been planning out a similar hand wired build, and I was planning on using standard mini b connectors with a five conductor cable to connect both halves. Any reason that wouldn't work? You could also investigate USB C if you were adventurous, heh. :)

Offline tobsn

  • Posts: 216
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #12 on: Wed, 12 October 2016, 14:58:31 »
USB C is reversible - that might screw up your wiring I think

Offline monkeyplusplus

  • Posts: 43
Re: Best way to connect split board with WS2812 LED strips in both sides?
« Reply #13 on: Wed, 12 October 2016, 15:01:43 »
Yeah, you'd have to account for that when designing a little breakout board for sure.