How to untangle Kicad schematic without associated Kicad PCB? - Page 1
Forum section: electronics / general

author: ogulpal
author_rank: Contributor
timestamp: January 01, 2024, 04:42:24 pm
content: First time using Kicad.I have painstakingly drawn the schematic from an existing board by hand-tracing all the connections using two pictures of the PCB and the actual PCB.The result is a tangled mess of a schematic and no associated PCB in Kicad.Moving symbols around and rotating them is a nightmare because it breaks existing connections and creates new, non-existent ones...How do I untangle the mess so that the schematic is actually readable without traces crossing each other?See attached for what the schematic looks like.

author: ataradov
author_rank: Super Contributor
timestamp: January 01, 2024, 05:14:30 pm
content: First of all, start with replacing power and ground lines with corresponding power ports. This will eliminate a lot of the mess.Then use labels going in and out of the small functional blocks. Then you can move the blocks without creating more mess. Rearrange components within the blocks. Then either restore the labeled wires, or keep them as is, if it makes more sense.

author: ogulpal
author_rank: Contributor
timestamp: January 01, 2024, 07:48:55 pm
content: Thanks. I can’t really tell functional blocks because I don’t know much EE. I don’t know what blocks I’m looking at or where they’re delineated for the most part.Part of why I went through this exercise is to attempt to identify the discrete blocks in that system… But it’s proving hard to do, even more so with the tangle.I’ll update the power, do you have any practical advice for identifying the blocks? How could I describe them to a search engine based on the components I see to get a typical example schematic of one and its name? Kind of like a reverse search.

author: ataradov
author_rank: Super Contributor
timestamp: January 01, 2024, 08:05:27 pm
content: It is really hard to describe.Even without identifying anything, you can start cleaning up this schematic as is. Start with placing inputs on the left and close together (AC neutral is in the middle of the mess). Output go on the right. Then move components until you get a minimal number of wires intersecting. This alone would make the schematic better.Make sure that wires don't go through the components. Moving the wire that goes though D1 out of the way will make things much better right away.Your RAY1 is missing some connection as well. And C6 is not fully connected.

author: Benta
author_rank: Super Contributor
timestamp: January 01, 2024, 08:33:18 pm
content: The "G" hotkey is your friend (drag instead of move).That will keep the connections as you move parts around.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: January 02, 2024, 01:20:10 pm
content: First, such a mess is normal during reverse engineering.You don't have to use theGkey (often) in the schematic editor. You can just drag a box around a schematic section to select it and then drag that selection elsewhere, and the wires will stretch while doing so. And you are right, it is (far too) easy to create faulty connections this way. It helps a bit if you1. Draw a box over a section to select it.2. Start dragging the selection.3. Press the X or Y key to mirror the selection (while keeping the mouse button depressed) This creates diagonal lines and is much less likely to create faulty connections.About function blocks. C2 is a capacitive dropper combined with R3 as a bleeder resistor, R4 as a current limiting resistor and DZ1, C3, C4 (and R12) form a stabilized power supply voltage for the rest of the circuit. Anode of the zener is also connected to AC Neutral, so that gives a good "Ground" reference to start organizing the rest of the circuit. Also, mirror that part of the circuit so higher voltages are on the "top" and low voltages on the bottom. This is a general rule to make schematics more readable.Use the backtick key (Just under  on US keyboard) to highlight a net. Your "AC Neutral" (GND) net is a very big mess that goes all over the place. Turn that net into a straight line and the other things will find a better place.The MCR100 thyristor is probably some (phase related?) timing or delay circuit. I guess there are some errors around Q1. That part of the circuit does not make much sense to me. It will be difficult to figure out what that circuit does when you lack the generic electronic background.Another (and probably the very most important) step is to use:PCB Editor / Place / Add Imageto add the photograph of your project directly into the PCB editor. That way you can mostly draw tracks over it to verify the schematic and the netlist. Any errors you made during creation of the schematic will make themselves very clear.Normally you add two images to the PCB Editor for reverse engineering. One from the front so you can see all the parts on the PCB, and the image for the back is normally mirrored, so you can look at it as viewing "through" the PCB. It also helps if you have good images, and often some pre-processing is done in some graphic program. Do some parallax and barrel distortion correction, maybe enhance contrast. You get the best pictures (with least distortion) if you make the pictures from a physical great distance, and then zoom in. A few meters distance combined with a telephoto lens would be ideal.It is also easier to work from the PCB as a start. Think about the following workflow:1. Create, Pre-process and import images of the PCB.2. Load them into the PCB editor3. Draw the PCB outline in the right size and scale the images to fit the PCB outline.4. In the schematic editor, create all (or a few) of the schematic symbols.5. Assign footprints to the schematic symbols.6. Put those schematic symbols on the PCB (With ), and put them in the correct location.7. Select a connection on the PCB, and create that connection in the schematic.8. Press  again to get the updated netlist on the PCB.9. Draw a PCB track between those two footprints.10. Re-iterate until the whole PCB is done.

author: ogulpal
author_rank: Contributor
timestamp: January 05, 2024, 09:01:38 am
content: Thanks for the tips, I eventually managed but had to start over from scratch as it was less work than untangling the original version.

author: metertech58761
author_rank: Frequent Contributor
timestamp: March 02, 2024, 05:31:59 pm
content: I was just now working on a schematic I'd transcribed from an extremely MESSY diagram the original OEM drew, so I well understand the need to go back and clean up / unfold sections...One little trick that works VERY well when paired with the G command:If you know you want to 'flip' a component around another one without breaking the connections, draw a pair of 'spur' lines on either side, then drag the component - the lines 'outside' the spurs you drew will stay put.