Reverse Engineering PCBs, Front and Back Photos/Scans - Page 1
Forum section: electronics / general

author: SeoulBigChris
author_rank: Regular Contributor
timestamp: November 15, 2024, 04:39:16 am
content: In recent years, I have seen somebody on YouTube (maybe Dave and/or Louis Rossmann, other?) take either scans or high quality photos of the front and back of a PCB. These images are massaged into a tool that has a slider, and lets you fade back and forth between the front and back images, for purposes of backing out the connections. But I can't find that tool by search.What tool am I remembering? Or am I dreaming?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: November 15, 2024, 01:53:34 pm
content: That was probably just a regular pixel editing program. Gimp, Krita, or any of the commercial variants. In such programs you can import separate images in layers, and for each layer you can set opacity (transparencey), scaling, and you can limit any operation to a subset of the layers (such as drawing lines, erasers, color correction, etc). If you post a screenshot, or a link of what the GUI looks like, the program is probably easy to identify.On a side note. in KiCad you can usePCB Editor / Place / Add Reference Imageto add such images directly into the PCB editor, and you can scale them and set opacity. This way you can place footprints and copper tracks directly over the image graphics.It's very easy to find plenty of examples with a simple search:https://www.youtube.com/results?search_query=pcb+reverse+engineeringFor this kind of work "high quality" pictures are important. but "high quality" here is in different areas then for general photography. Colors are not high on the list, but shadows can be annoying. Barrel distortion is one of the first things to attempt to avoid. Taking the picture from a long physical distance, and then zooming in on the PCB helps to reduce distortion. Resolution also does not need to be very high. As long as text on IC's is readable, and the thinnest tracks are 5 or more pixels wide, the resolution is high enough.Having experience with such graphical programs is a real benefit. Rotation and barrel distortion can be corrected quite easily. It is also possible to first load images in KiCad, and when you see halfway though the process that a part of the picture can not be lined up with the PCB, you can do things like:Export a picture of the PCB from KiCad.Load it in your favorite graphic program on a separate layer.Use the graphic program to locally "stretch" the picture to make it fit the PCB better.Use these newly generated pictures and put these in KiCad's PCB editor.But if the distortions are small enough, you can of course also just shift the picture a bit.For completeness: There is specialized software for this, but you'd have to ask to get a price quote. There are also companies who do this commercially. You can send them a multi layer PCB, and they send you back high resolution scans or even Gerber files of each layer. The PCB is usually destroyed in the process, as each layer is removed after scanning to expose the layer beneath it.

author: SeoulBigChris
author_rank: Regular Contributor
timestamp: November 15, 2024, 09:01:23 pm
content: Thanks for the info. It’s some really good stuff, although I was more asking about a simpler program that one would use after they had already massaged the PCB images into a suitable caliber using the techniques you describe.My hazy recollection was this was not a super high end tool purpose made for PCB applications. Nor did it do any heavy image processing itself, if any at all. It was more like a general purpose image viewer that happened to offer this feature — the ability to fade between two images, perhaps using a slider or a hotkey?In fact, I’m pretty sure that I’ve seen an example Python script before that did just that, so the worst case I could cobble together such a tool from scratch.Also that’s a good point about KiCad’s recent features. I’ve done this recently for a couple of basic projects and it was helpful. Although in one case I also had a schematic.While KiCad schematic editor can import an image, the tool doesn’t have the concept of layers so it’s awkward to do this for tracing reasons.

author: thm_w
author_rank: Super Contributor
timestamp: November 15, 2024, 09:47:17 pm
content: Dave used to use irfanview but I don't know if it has that feature:https://www.irfanview.com/Now hes using Drawboard, for marking up images.Maybe there was another app but I can't remember.Paint.netwill do what you want, add a layer and then go to layer properties and slide the transparency up and down.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: November 16, 2024, 01:44:58 am
content: Quote from: SeoulBigChris on November 15, 2024, 09:01:23 pmIn KiCad's schematic editor, you can import a picture in two different ways:Schematic Editor / File / Import / GraphicsSchematic Editor / Place / Add ImageThe first is fit for adding things such as logo's onto the paper, while the second one is much more fit for reverse engineering.