Help with PCB making! (KiCAD)

Hi, I’m new to PCB making and could use som help with it.
I’m making a PCB for the OpenHornet F/A-18 autopilot panel, decided to use my own switches.

What I need help with is to create something I can send off for manufacturing.
I know nothing of resistors sadly, buttons I can barely manage.

Below is an image of progress so far, footprints for switches and PCB outline is in place.
All LED will be backlit at the same time, what resistor and where do I need them for all 14 LED to work?
My plan is to put LED output on top/bottom and switch output on the other.
The PCB can be two-sided so LED and switches doesn’t have to be crammed in the small space there is.
Does it sound resonable?

Switch spec:

1 Like

G’day @Lobinjaevel
I’ve contacted my electronics bud who has been helping me out with the MMJoy pcb
hopefully he’ll get back to me soon, or respond here directly, unless someone else beats him to it.

It looks similar to what I was doing with an A-10C CDU panel that I have in the works for a mate.
Similiarly we were running sets of 4 led backlit switches with occasionally a requirement for 3

as you can see depending on the no of switches, the LED specs and the power in, the resistance is going to vary based on the equation:
Resistor = (Battery Voltage – LED voltage) / desired LED current.

FYI: these were/are the switches we are using:

The LEDs on our switches require 12V, we are running the switch input of one arduino,
but the backlighting and dimming is being controlled off a seperate arduino board.
The overall back end framework is still being worked out, but all the lighting on all panels is running off that single (lighting) arduino board

In the meantime, might i suggest having a read of this sort of article:–%20LED%20voltage)%20%2F%20desired%20LED,010%20which%20is%20860%20ohms.

might be a nice primer for you. (unless I’m telling you how to suck eggs) :innocent:

PS: also another hot tip for young players, you can see in the schematic, we havent used connectors to map the switches, which in this case is a worthwhile use of a matrix
(I know guys - I’m actually not using a shift register this time, right!) :joy:

Using labels instead of connectors was another tip i picked up off my electronics mate to keep the schematics layout clean and intuitive, rather than having a complete mess of connectors running everywere.This allowed us to use the connectors only for the LED connections & nut that out quickly & easily.
In this instance with your relatively tiny PCB, not as much of an issue, but worth filing away for your next project which might be a bit larger.




Thanks for the great answer!
I’ve been following your mmjoy progress, will buy a couple of those boards when they are available :grin:

The LEDs will be powered by a 12V pwm box, along with LED strips in the sideconsoles. I will also be using those switches you use in your CDU for my DDI, MPCD and other smaller buttons.

I will read up on that article, I’ll post my findings here afterwards :slight_smile:

Don’t fully understand what the difference is between labels and connectors, but will try to read up on that aswell :grin:

Makes me regret skipping electronics class in school now, never thought of building a simpit then :joy:

Cheers mate :beers:

might just be the terminology im using…
instead of having to run the green line ‘connector’ (bus) from a common pin to a pin each of the switches… you can simply put a label in place and call it whatever you want, (in my instance above i was using C0x & R0y for the column/row connections of the swtich matrix), then as long as you have a short green ‘connetor’ line from the common pin to that label (if you look carefully you can see it), & all subsequent switch pins that are also connected to that common pin also have a label with the SAME text content, then KiCAD will recognise that as a common bus name.

Note: I think you can simply attach a label straight to a pin, it’s just my personal preference to include a short green bus line with at least 2 dots spacing between the label & pin
force of habit (OCD)

You can see in my example above horizontally the rows are a common shared label R08, R09… but if you look vertically between the switches you can see common column labels… C05, C06, C07, C08…
Similiarly for LEDs, the GND & PWM bus are labelled the same & are therefore connected to a shared bus, though the connections do not appear to be physically connected (between each of the rows) in this schematic.

It achieves the same result, its just not nearly as messy to look at.

Hoping to get some more traction (& progress) soon,
I’ve been a bit slack (with too many other things interfering)

1 Like

Making them work is easy, getting the correct brightness is a little harder.
If they are being powered by an adjustable PWM that you are using to control strips this might complicate things a little.

What you need to know is the forward voltage of the LEDs, usually varies by colour.
This can be found out with many, but not all multimeters, look for the diode function, here is a random vid that explains both ways to test, to get it quickly you could jump to the 3 min mark.

Forward voltage should be in the data sheet also.

Theory and practise are 2 different beasts.
Whilst i can suggest a hookup and resistance values, i can’t be sure weather they will be too bright or too dim, and if running from a controller that is running other LED’s you also have to consider relevant brightness, you don’t want a situation where the button lights are too dim whilst the strip is too bright, or the other way around.

Most bullet proof solution is to use a resistor in series with each LED, something like this…

This runs 11ma through an LED with a 1.8v forward voltage.
I suspect it might be a little bright at this level of power, but not overly so, and the PWM dimmer can help there.

So, in theory…
a) 1 resistor per LED between either the anode and positive or between the cathode and ground.
b) use the data sheet and the led calculator linked above to come up with a sane value factoring in LED forward voltage and amx rated current.

In practise…
Experiment with different resistor values to get the desired brightness, and possibly also to match the button brightness vs the LED strip.

:edit: Regarding labels.
Labels and wires in Kicad do the same job.
Useful for when running wires in KiCad can create a headache.
Use them often, but not always.
Following is an over simplified example (the example makes labels look bad, only because you wouldn’t ordinarily use them like this).

This is a section of a larger schematic where labels same a massive mess of wires.
Note just 1 example - Near top right of the micro controller at pin 9 is label ‘SCK_D15’
Same label can be found on the programming connector (pin 3) and on J4 header pin 1.
If not for the label this would be a tangled mess of green wires.

Lastly, terminology…
Wire - is pretty much a virtual wire
Bus - different meanings depending on context, but nothing in this thread is a bus (sorry to throw you under the… bus… @gadget :stuck_out_tongue_winking_eye:)
Label - a… virtual, virtual wire I guess? all lables with the same name are tied as if being a wire.

Sorry if this got long, feel free to ask any questions.


Thanks for the replies guys, great info!

@gadget It’s my lack of knowlege that confused me, not your terminology :wink:
Will try to understand schematics abit better to comprehend more of your info, I’m also a noob at KiCAD and PCBs :joy:

Thanks for the info and video, will check in the DCS FA18 what needs to be in the same circuit, might be that the strips go on a seperate PWM.
Never gave it a thought that the brightness might be that different, but will order a resistor pack and try them in a breadboard.
Would be a bummer if one is super bright while the other part is barely visible.
Thanks for the edits!

Will read up on all later today :beers:

Cheers guys!

1 Like

I bumped you up a level. Let me know if that helps :slight_smile:

Hey @gadget, just thought I’d put in a couple of comments. I’ve been a professional electronics designer for over 20 years (actually, I’m suffering a burn out now and had to walk away, but I couldn’t help but look) and I see some things I just wanted to make you aware of, if you are not already. I’m not trying to be critical, just trying to help out.

First, the formula you have above is really just Ohm’s law very lightly disguised.
V = IR => R = V/I (the formula above)

Second, I noticed you have 4 LED’s in series driven by your PWM signal. Just want to make sure that you know when you drive LEDs in series, the source will have to be able to drive the sum of the forward voltages. That is with 4 LEDs, assuming a Vf of 2.3 V, your source will have to be 9.2V at the absolute minimum. I’d make it 12 V to be safe. This is easily done, and you may already have it, I just can’t see it in the subcircuit you have here. I generally design LED banks in parallel because summing LED currents (in the ~15mA range) is pretty easy to do and stick with a 5V supply.

Oh, one more thing. When we talk about connections in a schematic, we generally use the term ‘net’. When labeled we call them net labels or net names. Incidentally, the schematic editor will name these nets internally, even if you do not. So, every connection in your schematic gets fed into a netlist, which in turn is used during PCB layout.

Finally, ( I know, I said a couple of comments, right…) @Lobinjaevel, I went and looked at the datasheet for the button you’ve selected. Datasheets used to be SO much better. sigh. Anyway, I recommend getting one switch and hooking it up in a breadboard to experiment with before you commit to your PCB. The diagrams they have on that datasheet are somewhat ambiguous, to put it nicely. If you have a current limiting power supply, you can dial in a current that produces the brightness that you want and use that as your design point. If you don’t want to use a PWM, you can always use a pot to dial in what you want; just make sure you get in the ball park first.


I have pre-made PWM circuits, (see pic). So I should dial in what i consider to be a good brightness, then meassure the current and work from there, re meassuring resistors etc?

Thanks for the input!


O.K. good. It looks like there’s a FET on there which the PWM driver will use to switch the voltage to your circuit. So, you will be connecting a supply voltage (+ and -) to two of those pins on the green connector and the other two will be going to your circuit.

Concerning dimming:
The PWM isn’t limiting current to your LEDs, it’s just setting a percentage of on time. So, if you cranked up the PWM out put to 100%, you’d burn out the LEDs.
Using a resistor will actually limit the current through the LED.

So, what you want to do is connect a resistor (start with 180 Ohms if you’re using a 5V supply) to the output pin of the green connector.
Connect the other end of the resister to your Switch. And then the switch ground to the return on the green connector.

If that isn’t clear, post the pinout of your PWM circuit and I’ll draw it.

Note: for some reason I can’t get the link to your switch to work anymore, but I think you were using a green RF 15 H. Is that the part?

Edit: Here’s a pic showing how to connect the LEDs. You could start by connecting a single LED (the grey hand drawn circuit) and testing that first. When you’re satisfied, go ahead with the blue connections.

1 Like

I thought of using a 12V 8.3amp powersupply, might be better with a 5V?
I have 12V led strips with pre-soldered resistors, that’s why I got the 12V.

Thanks for the clear image, will try that out when I by some resistors :grin:
And yes, RF15H with green LEDs :slight_smile:

Again, really appreciate the help :beers:

1 Like

:note, just opened this page this AM and noted that i had typed but not posted the following, so it might be a bit late now:

No worries mate.
Regarding testing different resistance values one of these can me handy…

A PCB with a bunch of resistors, just jumper the resistor value you need.
The above is a pretty basic version, these range up to the $1000+ for the super super gucci precise boxes.
If it’s something you think you might use a lot you can get one in a nice box with the more common dial interface…

1 Like

Much appreciated, have deleted the 2 additional posts end edited the first.
I’m a bit weird on forums, I’d rather be as useful and tidy as possible whilst keeping my post count to a minimum.

Cool! Will order one of those, that will come in handy!

G’day @Goblin

from memory the PWM is 12v, but we are still looking at the the entirety of cockpit panels not just the CDU panel that this example was off.

Thanks for the input though, electronics is definitely not my bag,
hence i’m creating the MMjoy board to help all the other misfits who look at electronics & stare until their eyes glaze over in confusion and walk away with little more than a migraine headache…

I very much (unashamedly) lean on @v81 for all my electronics tomfoolery
so if you notice me saying something that isnt quite right, (dont blame v81) please make sure to clarify it, the last thing i want to do is unintentionally spread misinformation.

I appreciate the input , not just myself and @Lobinjaevel 's benefit but for everyones
sometimes @v81 gets tired of slapping me and has to swap arms :pleading_face:


1 Like

Sure, the 12V supply will be fine. I only mention the 5V possibility because it’s a little more convenient (available on USB).

1 Like

Hello again, small progress but equally confused sadly :joy:

I’ve been trying to use a resistor calculator for LED in parallel, but I don’t think I’m doing it right.

This is my result with 12V input, 14 LED, 2V drop since they are green LED (generally for green?) and going for 20mA.

Is 35ohm resonable? :thinking:

I’m in over my head with the PCB, so will try the manual way, got decent space for the wireing, using 24awg.


1 Like

Edit: Oops. I just noticed your original post called for 35 Ohms. You can use a 36 Ohm 5%, or a 39 Ohm 10% resistor. These are standard resistor values that you can actually buy.

Here’s a quick calculation and an assumption of your circuit:

So, going with a 5 Watt 39 Ohm 10% resistor is good.
But to be closer, you could get a 5% 36 Ohm resistor. Cost difference is negligible.

Just an FYI:
This isn’t a great way to connect these LED’s but it will work and you wont have to do quite as much work. The reason is that the LEDs will have slightly different forward voltages (all within the datasheet spec); connected as shown means that some will not be fully in conduction. It’s o.k. to do this, but I would normally connect series resistors with each LED. That way a small voltage drop will develop across the series resistor and each LED will be fully on.

But, like I said, you’ll be o.k. with the single resistor.

1 Like

Okay, I thought it still needed one resistor per LED!

If I wire it in series, I believed that the voltage would be too low to power 14 LEDs?

I looked at series first, but mostly got confused since the voltage drop.

Thanks for taking the time to help! :beers:

When I say series resistor with each led, each R+LED sub-circuit is still in parallel with the other R+LEDs. In other words, in my drawing above, you’d have a resistor just above each LED.

1 Like
© 2020 | Articles Website | Forums Rules & FAQ