Author Topic: Optimal Trace width for LED power  (Read 576 times)

0 Members and 1 Guest are viewing this topic.

Offline BlindAssassin111

  • Thread Starter
  • Posts: 28
  • Location: My Mind
Optimal Trace width for LED power
« on: Tue, 05 December 2017, 20:51:22 »
I am designing a custom fullsize keyboard (108key) and plan on using 132 SK6812 LEDs for both per switch RGB and under glow, and because of that I will need quite a bit of current to run these properly.

So the question is what is the best width for the traces in order to get power delivered efficiently and be able to handle the levels of current I will be needing? And along with that, What is the best way to route them on the PCB?

Another question, What do you think is the best way to power the LEDs? I was planning on using a 5v power brick that plugged into a barrel jack on the PCB and going from there. What amp rating would be optimal to run these? I know that the max current that these LEDs can draw, according to the datasheet, is 50 mA, which would mean in total I would have 6600 mA, which is quite a bit, would I truly need this much or is there a safe way to limit how much current is drawn that won't affect the brightness too much? And is there any failsafe that I should add in case something shorts out?

EDIT: Now that I look at it I may drop the LED count closer to 108, not seeing a feasible way to route the last 24 LEDs. So under glow may be out.
« Last Edit: Tue, 05 December 2017, 20:55:57 by BlindAssassin111 »

Offline emenelopee

  • Posts: 20
Re: Optimal Trace width for LED power
« Reply #1 on: Tue, 05 December 2017, 23:26:01 »
i can't remember the specific track widths (I'll check) but I didn't use anything special above the standard traces used for the key matrix. In either case the resistors (I have one per LED, all arranged in parallel in LED/resistor pairs) would give you greater resistance than the traces. I also added a rheostat in series with the LED clump to control the power going in to be able to adjust the current in case the LEDs get too loud. Full size, 106 keys, bright white LEDs all around.

In terms of how best to run the traces - I kept all traces on one side of the plate as much as I could (switch matrix, 5V traces for LEDs), to be able to have a mostly uninterruped ground plate on the other - I then just wired all the LEDs with direct traces to the 5v, then just dump the other end into the ground plane. Saves running the LED traces back to the controller.

NB: I used a Teensy++ using one 5V output, and connected (2) GND connections to the ground plane. Works swimmingly for me. I designed for 100Ohm resistors + 200Ohm rheostat, I kept being sent 1kOhm resistor so used those in the prototype to see how they worked. Full brightness is fine but I'd like to get them a little brighter. I haven't tried the 100Ohm yet but I get the feeling max will be waay to loud. Hence the rheostat to tune - LEDs are apparently finicky and vary even within batch.

EDIT: re-reading your post I see you're using RGB - this obv. complicates the traces above what I did which is single colour static. Full RGB for this many sounds like a routing nightmare. If it were amateur me I'd put as much keyboard matrix on one side of the board, then all the LED RGB on the other, then weave back to ground on the KB matrix face. I don't think you could do a ground plane unless you go three layer which is above and beyond what I know about dealing with. Keeping the split distinct, neat, and tidy.

EDIT2: LEDs are rated for max brightness - you can run them at much lower current (at least one-colour) for comfortable keyboarding. Full is way too much anyway. I was figuring, iirc, at 2mA per LED, though I'd need to double check my notes to confirm.
« Last Edit: Tue, 05 December 2017, 23:39:51 by emenelopee »

Offline BlindAssassin111

  • Thread Starter
  • Posts: 28
  • Location: My Mind
Re: Optimal Trace width for LED power
« Reply #2 on: Wed, 06 December 2017, 00:05:52 »
The reasons I wanted/need to use an external power supply are:
    1) The SK6812 LEDs require a cap on the power/gnd for each LED and from what I have been told there is a 10 μF limit over usb and with a recommended cap for each LED of 0.1 μF, even with just the key LEDs I am
        over the limit.
    2) The current required to drive at full brightness is way above what the USB would be able to do even if the caps weren't an issue.

Now do the LEDs need to be full brightness, probably not but I have never tested how bright the SK6812's get so I have no idea if I can run them lower and be happy. The goal is also to do a small GB to help fund this as it is quite expensive for just one person to jump into...

In regards to how you mentioned to run the traces, I am using a 4 layer board to simplify the routing as I don't want to use a couple thousand vias and spend the time to fit it on only 2 layers. It may not help cost, but at a quantity of only 10, I am happy with the cost and it is quite reasonable, may save money per board but it isn't enough for me to waste the days just trying to solve that, especially as the board is laid out minus the LED traces.

Offline emenelopee

  • Posts: 20
Re: Optimal Trace width for LED power
« Reply #3 on: Wed, 06 December 2017, 00:11:55 »
Oof, 4-layer? I fold, this complication is outside my level of knowledge - I kept mine as dumbed down as possible. Good luck, and keep the updates up!

Offline BlindAssassin111

  • Thread Starter
  • Posts: 28
  • Location: My Mind
Re: Optimal Trace width for LED power
« Reply #4 on: Wed, 06 December 2017, 00:27:05 »
4 layer isn't all that hard to do actually, this is my first time doing a pcb with that many layers as everything I have designed before was possible with 2 and some only needed 1. Just have to think of how you want to lay it out, and try and stick to only certain things on each layer and use vias only when necessary to reach things like SMD components on the other side of the board or if there is no other way to connect two pads. Only reason I am using vias on my board is due to the dumb pad layout of the SK6812 putting the power and ground diagonally on the chip which means you have to just multiple layers just to use those LEDs not matter how simple your pcb is...

Hopefully once I figure out the issues listed in the OP, I will be able to start an interest check and get this rolling sooner rather than later. Sadly need a higher post count though, despite having created my account in 2013...

Offline TalkingTree

  • Posts: 1851
  • Location: Italy
Re: Optimal Trace width for LED power
« Reply #5 on: Wed, 06 December 2017, 05:29:24 »
I usually use 20 mil for power traces and had no problems with either the MCU or the discrete LEDs but perhaps this calculator can help.

Offline BlindAssassin111

  • Thread Starter
  • Posts: 28
  • Location: My Mind
Re: Optimal Trace width for LED power
« Reply #6 on: Wed, 06 December 2017, 11:13:54 »
I usually use 20 mil for power traces and had no problems with either the MCU or the discrete LEDs but perhaps this calculator can help.

I found that calculator as well but when I put the max current in, the trace width for an inner 1 oz layer was 273 mil...which is massive. So not sure exactly where to go from here knowing that.
« Last Edit: Wed, 06 December 2017, 11:51:31 by BlindAssassin111 »

Offline emenelopee

  • Posts: 20
Re: Optimal Trace width for LED power
« Reply #7 on: Wed, 06 December 2017, 13:31:23 »
I hadn't actually seen this calculator before. Thanks to some serendipity it works out to 10 mil trace for the 420mA I'm drawing which is what I used, at least before I get to the ground plane. Phew, lesson learned. It makes me realise how little I know!

Having said that, I'd suggest investigating how bright you actually need your LEDs to be - full capacity is huge and I'm finding even 2mA is pretty much bright enough, at least for under-keylighting, and that would knock your 6600mA down by an order of magnitude.

Take this with a grain of salt - I'm no expert.

Offline BlindAssassin111

  • Thread Starter
  • Posts: 28
  • Location: My Mind
Re: Optimal Trace width for LED power
« Reply #8 on: Wed, 06 December 2017, 13:49:27 »
Having said that, I'd suggest investigating how bright you actually need your LEDs to be - full capacity is huge and I'm finding even 2mA is pretty much bright enough, at least for under-keylighting, and that would knock your 6600mA down by an order of magnitude.

Yeah I am thinking full bright may not be needed but I also don't know of a way to safely limit the current draw of the SK6812 LEDs, seeing as they have built in controllers and need a specific voltage to run properly. If I was able to drop the current needed down to even 3000mA that would only need a 36 mil trace on external layers (realized I have power on the back so should have looked at the external trace limit before, which was still massive at 105 mil).

Offline BlindAssassin111

  • Thread Starter
  • Posts: 28
  • Location: My Mind
Re: Optimal Trace width for LED power
« Reply #9 on: Wed, 06 December 2017, 21:40:17 »
Also if anyone knows the dimension in between cherry stabs, dimesnion "A", for a 6.25 spacebar I would appreciate it. Found the cherry specs but wasn't sure if the spacing is the same for the 6.25 as the 7 as that is the smallest space bar they spec out...

Offline TalkingTree

  • Posts: 1851
  • Location: Italy
Re: Optimal Trace width for LED power
« Reply #10 on: Thu, 07 December 2017, 04:53:46 »
Also if anyone knows the dimension in between cherry stabs, dimesnion "A", for a 6.25 spacebar
From center to center 3.96'' or 100.58 mm

wasn't sure if the spacing is the same for the 6.25 as the 7
7u is wider. 6.25u also works for 6u and 6.5u.

What software are you using?


Offline BlindAssassin111

  • Thread Starter
  • Posts: 28
  • Location: My Mind
Re: Optimal Trace width for LED power
« Reply #11 on: Thu, 07 December 2017, 12:43:22 »
I kinda figured that the stabs would be closer for the 6.25 but after hours of searching I couldn't find a footprint or anything accept for the older cherry pdf going over dimensions and 7 was the smallest they listed besides the 2's.

I am using KiCad.


Offline BlindAssassin111

  • Thread Starter
  • Posts: 28
  • Location: My Mind
Re: Optimal Trace width for LED power
« Reply #13 on: Thu, 07 December 2017, 15:49:12 »

Offline BlindAssassin111

  • Thread Starter
  • Posts: 28
  • Location: My Mind
Re: Optimal Trace width for LED power
« Reply #14 on: Sun, 10 December 2017, 13:00:35 »
Anyone have any ideas on what I should make the trace width? I am still designing the pcb and it would really help to know what the best route is. I currently have the traces set to 1mm(39.37 mil) and would like to know the best way to limit the power needed to run the now 120 leds, no longer be doing a full underglow just the bottom half of the board in order to do a glow ring around the front half for accent.

With that said, I would only be able to run them at half the max current, but don't know of a way to safely limit them.

Offline emenelopee

  • Posts: 20
Re: Optimal Trace width for LED power
« Reply #15 on: Sun, 10 December 2017, 17:41:48 »
Looks like it's time for some mockups? I'm not sure if your two uncertain variables - min driving current and preferred brightness of LEDs - can be easily answered by the hive mind...

Offline BlindAssassin111

  • Thread Starter
  • Posts: 28
  • Location: My Mind
Re: Optimal Trace width for LED power
« Reply #16 on: Sun, 10 December 2017, 18:33:17 »
Looks like it's time for some mockups? I'm not sure if your two uncertain variables - min driving current and preferred brightness of LEDs - can be easily answered by the hive mind...

I could do a small mockup but I am not sure of the best way to limit the current draw from the LEDs as I will be using QMK. Should I somehow just limit the max brightness via the firmware or is there a better way. That is truely the main issue, from there then I will be able to do a test as I already have a small sweet16 from 1upkeyboards that I can wire a single SK6812 to and find out how it looks.