How to draw repeatable LED's in schematic along a string?

Hi everyone,

I have been making PCB’s with a lot of WS2812-2020 SMD LED’s and copy and pasting the LED on the schematic take a lot of time and space.

Does anyone know of a quick way to draw the LED’s in a schematic by maybe just saying it is repeated 200x and when I go to make the PCB it will have 200 LED’s to move around and all have the correct nets?

The net between the LEDs will be difficult as each data connection between the 2 LED’s needs a new unique net.

Thanks!

Maybe you thought of this already…but what I would do is draw one or two, then copy-paste and put those in, to get four, then copy the four to get eight; copy the eight to get sixteen etc. I don’t think it would take a lot of work to get to 200. Maybe I am misunderstanding something.

You could use hierachical sheets. Then you can put 20 leds on one page/sheet and include it 10 times. It’s descibed in the documentation

1 Like

Yeah I’ve been using EasyEDA and just copied and pasted but the nets need to be updated manually as they are also copied.

Will I need to update the nets manually though?

I was hoping to do something like having the net x=x+1

Why do you need to assign or update nets? In KiCad nets just happen when parts are connected together. Can’t you remove the nets before pasting from EasyEDA? Or just start from scratch?

The easiest is just to not nameing the nets as pointed out by retiredfeline.

If you name the nets in a hierachical sheet and include the sheet twice in your root schematic, then the result will be two nets with the same name but with different paths. I’m not 100% sure on this or the vocabulary, but that’s my understanding.

If you have two sheet instances of the same sheet, named “Sheet 1” and “Sheet 2”, and the sheet jas a net named “LED-VCC”, then on your pcb layout I believe that there will be two nets named “/Sheet 1/LED-VCC” and “/Sheet 2/LED-VCC”

I guess you’re right. I know I need to do nets for the 5V and GND pads but the other one could just be a wire and it’ll figure it out for me. I’ll need to read up on hierarchical sheets to give it a go.

Ok cool. I’ll give it a shot and hopefully my sheets get a lot cleaner and more condensed.

Thanks everyone

Use hierarchical labels to connect your sheets. Think of hierarchical sheets as components.

create your sub-sheet (“substring”) like this:

duplicate the instance and connect it to your first one. repeat.

auto-annotate all sheets, switch to the pcb editor and update from schematic:

You can also nest sheets to multiply repetitions. “large_string” contains 5 instances of substring, leading to 125 LEDs with 5 instances of “large_string”. You’d need to draw just 3 simple schematic sheets for this because each instance references the same sheet, but creates a new set of components and nets.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.