How to reverse engineer a schematic from a circuit board

How to reverse engineer a schematic from a circuit board
This project is a result of needing to service a domestic electronic item without being able to obtain a circuit diagram.

The process proved to be very long and painstaking, but also very rewarding.  The steps presented here are not exact, and you will no doubt find your own way of working which is more effective in the case of any particular board.  However, I believe the basic procedure is essentially correct for the majority of boards which are too complex to reliably hand trace. Without the need to invent the process, things should progress more quickly.

For simple boards, it is probably better to use pencil and paper to draw the board onto squared paper, replacing components with their symbols, and changing track crossing places to avoid components.

For complex boards, it is too easy to lose your place using this method. The next "level" of complexity from a simple, drawable board, would probably be a good candidate for the tracing methods described in step 16 of this instructable, missing out all the image editing procedures, and modified accordingly.

At a higher level of complexity, as on the board shown in this project, I decided there were too many tracks for hand tracing to be reliable, and used the graphical techniques described. These methods arise partly from the photographs I took being too unevenly lit and inadequately sharp.  Better photos means less work.

All the editing was done on a laptop running Linux. Windows versions are available of the main tools, Gimp, Inkscape, AutoTrace and Dia, but I don't know if a Windows version is available of the utility pstoedit, needed for an unfortunate extra workaround step. I'm sure another workaround can be found, if it isn't.

I also discovered as a result of this project that completely hidden traces can exist - in my diagram there is a transistor with it's base apparently unconnected, but I can't find a connection or through hole for it. I assume it's completely hidden in some way.

I'm pleased to say that after creating the diagram, I was able to use it to confirm the suspected faulty part.

Addendum: since writing this instructable I have discovered there are such things as "blind vias" - where the hole only goes part-way through the pcb and is connected to an inner layer only. It would appear that the board I worked on here utilises these, as a number of components appear to be missing connections. I believe, unfortunately, that these are hidden in the SMD pads themselves, so impossible to find without de-soldering. So if you end up with an incomplete looking schematic, that could well be why. Google for "blind pcb vias" to learn more.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Tools and equipment

Tools and equipment
You will be working from photographs, and need some software.

You need:
*  A good camera, preferably with a tripod
*  Even lighting - a badly lit picture will cause a lot of extra work.  A bounced flash is only just good enough.  A ring flash may be your best option if you have access to one.
*  A computer
*  Internet access, to look up components (but see note)
*  A multimeter - not essential, but helpful (depending on how precisely you need to know how the circuit works, if you are dealing with SMD's, the ability to measure capacitance could prove useful)
*  A strong magnifying glass - you may need to check details which you can't make out from the photos.
*  A photo editing program.  I use the Gimp, which is free, and these instructions are Gimp-specific.  I also used the vector program, Inkscape, to clean up the lines.
*  A program to turn the photo into a vector line-drawing.  I use AutoTrace, which is free.  I chose AutoTrace specifically because it has a "centre-line" option, originally designed to help pick out text in an image, but ideal for this job.  I found AutoTrace picks up too much detail to be useful for general cleaning up though.
*  A program to manipulate vectors.  I use Inkscape, which is free, and these instructions are Inkscape specific.
*  A program to draw manipulate diagrams.  I use Dia, which is free, and comes with an excellent set of component symbols (but see caveat, in step 18)
*  As the current version of Dia has a problem importing svg files, and an intermediate program, pstoedit, was needed.
*  A graphics tablet is a big help, I discovered, especially for hand-tracing some of the tracks.
*  Lots and lots of time and patience...

A note about finding datasheets on the internet.
It's an absolute blessing that data for components is widely published on the internet.  However, component markings are not necessarily complete or clear, and you should study the context of the device to make sure you have identified the device correctly.  For example, on the board I used in this instructable, there is an 8 pin chip identified "7101".  I found datasheets for an opto-isolator, an op-amp, a voltage regulator, and other devices before discovering that is almost certainly a DC/DC converter, confirmed by an inductor being connected as shown in the example circuit. SMD components have markings that may bear no resemblance to the part number. There are several guides published on the internet, this is one of them: http://elektronik.googlecode.com/files/SMD_Catalog222.pdf

« Previous StepDownload PDFView All StepsNext Step »
52 comments
1-40 of 52next »
Feb 21, 2012. 5:40 AMshams says:
UBUNTU !!!
Jan 22, 2012. 11:24 AMmoomooplatter says:
Absolutely brilliant. Thank you for this, I cannot place a finite number on the possibilities this opens to me.
Jan 20, 2011. 6:59 PMdemyhr says:
As a retired "professional" doing design and layout of complex multi-layer (30 +) PCB's I must say there are limits to what can be done reverse engineering these boards. It is impossible to see inner traces of boards with internal power and ground planes even with x-ray techniques. I suppose one could probe with an ohmmeter but with many of the boards I have designed this would take a lifetime.

On the other hand I have used GIMP in conjunction with a flat-bed scanner quite successfully for measurement purposes. Scanning at 1200 dpi gives an accuracy slightly better than 0.001" and using the measurement function of GIMP dimensions can be determined quite accurately.

All in all a good instruct-able given a few caveats.
Oct 24, 2011. 2:40 PMskylen says:
I know someone who reverse engineered a multi-layer PCB by carefully shaving the board down, one layer at a time using a precision CNC milling machine, taking capturing high resolution images of each layer throughout the process. I was really amazed by the quality of the results. Very clever, I thought.
Feb 8, 2011. 11:23 PMiffee says:
I have an AVR similar to the picture attached.

The components and PCB have been potted with some compound. How this compound can be desolved.?
AVR2.jpg
May 12, 2011. 3:33 PMBiotele says:
Take an x-ray picture.
Mar 26, 2011. 8:23 AMwwward says:
I have reverse engineered many potted boards. I use a heat gun and heat the potting compound. When heated enough the compound starts to flake off. Patience, and you will have it.
Feb 8, 2011. 11:56 PMEuphy says:
Epoxy potting compound is pretty hard to remove. I've only ever managed to remove it from things I didn't want to keep (ie hit it with a hammer), and even then it was untidy. However:

http://www.instructables.com/answers/Dissolving-Epoxy/
http://kevtris.org/Projects/votraxpss/unpot.html

And there are a couple of other pages on the internet about various attempts.
Mar 9, 2011. 1:26 AMcyphunk says:
excellent!
Feb 22, 2011. 9:46 AMDonotmatthews says:
anyway to identify these components? http://www.trafficlights.com/images/T3_photos.jpg I want to try and build one.
T3_photos.jpg
Feb 8, 2011. 7:43 PMsiliconghost says:
Great Instructable. You might want to also mention this:
http://www.instructables.com/id/Find-schematics-wiring-diagrams-etc-for-everyda/
Feb 9, 2011. 12:19 PMsiliconghost says:
No problem! Please let me know if you find a UK equivalent.

FYI, I just added a reference to your Instructable from my video page as well.

- John
Feb 3, 2011. 5:01 AMtomkawal says:
Some advices for taking a picture sound like overengineering of reverseengineereing. At good light no need for tripod.

Guys, to take a photo of PCB, any regular printer scanner seems to do the job.

I use polarising filter to contrast the text on IC.
Also good to have microscope, backlight for details of PCB etc.
cheers

Feb 1, 2011. 1:02 PMaetienne3493 says:
what are artefacts and how would you get rid of them with the clone and blur tools? here's what i have so far
RRC green side 1.png
Feb 2, 2011. 7:19 AMaetienne3493 says:
alright thanks
Jan 22, 2011. 10:02 AMcaptthud says:
I started reading this with skepticism - "There's no way to magically generate a schematic from a PCB." While there wasn't any magic* I'm very impressed by your creative use of software and the flow of data. Circuitry aside, this is an excellent introduction for advanced image editing.

+10,000 points for doing it all with open source software on Linux. There's so much amazing stuff that people don't know about. I've been using Inkscape and Gimp for a while, but I haven't seen AutoTrace or Dia before. TIme to hit the repositories!

*Revealing the PCB holes with masks and channels seemed magical, even if it's just math.
Jan 21, 2011. 9:54 PMMike44 says:
Man, this looks like a lot of work, especially doing it in something that looks like MS Paint. Why not just use a real PCB program off the top to map out the board? Place all the components as you spot them out, draw the rats nest in between to however far you need to go, then create the actual PCB. At least I think it would be easier. There's tons of free, basic PCB software out there: http://www.olimex.com/pcb/dtools.html. Even: http://www.suigyodo.com/online/e/index.htm
Jan 20, 2011. 9:15 PMpellepeloton says:
I might do this to my EEEPC power supply regulator section.
I accidentally reversed the polarity when I replaced the car power supply and let the blue smoke out!
As you all might know, electronics works with blue smoke ? If you let the blue smoke out, the gadget does not work anymore.
Jan 20, 2011. 9:10 PMpellepeloton says:
"Michael Jennings is a reverse engineer and what he does is technical jobs for certain companies and as soon as he is done, his memory of the work he has done is wiped out. " That is the simplified plot for Ben Affleck starred movie.

Be careful to do this reverse-engineering as some company might want to erase your memory, lol!
Jan 20, 2011. 6:58 AMjolshefsky says:
Excellent explanations and good use of tools. It would be nice to go straight to something like Eagle, for its electrical rule checking (ERC), but that's obviously yet another headache.

I've also been surprised that there's no solid standard for making vector graphics portable and platform-independent. I had done work in AppleWorks and had absolutely no way to get that data into OpenOffice's drawing package. I got a weak copy via some convoluted Encapsulated PostScript; SVG gave me nothing but false starts and dead ends.

That reminds me ... I have to get back on that project!
Jan 17, 2011. 10:52 AMrammstein2 says:
very nice and much of hard work you put i there!! Anyone knows how to do it in windows??(for the pstoedit part)
Jan 20, 2011. 6:59 AMvanmankline says:
GIMP is an open source program that can also be used in windows. It can be found at:

http://gimp-win.sourceforge.net/
Jan 20, 2011. 7:22 AMspeedhump says:
Photographing a circuit board is difficult to do without a good copy stand and even with one your right-angles always end up not quite right. You need Adobe PhotoShop or a similar application to help you out. First note the actual dimensions of the board. Take your shot (flash doesn't help) so take outside it in daylight on a dull day to eliminate harsh shadows. Filling your viewfinder with circuit board is a sure way to ensure that your image suffers from pincushion or barrel distortion, so pull back a bit and allow a good margin. Put the result up on your screen. Go to IMAGE SIZE and adjust it to the size of your board. Next > SELECT ALL and then > EDIT > TRANSFORM > DISTORT and drag the image so the circuit board fits exactly in the frame. It is easier if you reduce the size of your frame on the screen so you can see corners of your distorted image when you pull them outside the frame.
Jan 20, 2011. 8:47 AMnubie says:
Sometimes lighting the PCB from the back is helpful.

If you have a sparse 2-sided board or a single sided board it can make the traces much easier to see.

Also high voltage and low voltage sections of a circuit will usually be separated on the PCB and it is very easy to see this if you light it from the back. I did this and found I could simply break the CFL high voltage part off of the board in the second picture (I replaced it with LEDs)
DSCF4355.JPGDSCF0467.JPG
Jan 20, 2011. 10:56 AMLaserDave says:
VERY nice write-up, I am very impressed!! Nobody can accuse you of not including enough detail. :)

I am very curious to know how many hours you would estimate (honestly) that you put into this board.

The reason I ask is because I am the same way - when I want to achieve something I won't be stopped by difficulty or time expense to get something like this done. (Lately, it has been 3D technical/mechanical drawings in Sketchup that I put a frighteningly excessive amount of visual detail into, spending 10-12hrs/day for 10-14 days to complete, and think nothing of it) Perfectionist much??

It's refreshing to see that there are others that will expend extreme effort, ESPECIALLY when it means the difference of whether or not an electronic item gets discarded.

An alternative method that I thought I'd mention might be good for those who are doing simpler boards. I have used it with great results on many occasions, but I do realise that it's not for everyone:- -

Using a variety of differently-coloured markers, paint the traces as you follow them along the board. Use the same colour along a trace on one side over to the other when encountering a via. Drawing the parts on paper or computer, you can roughly wire point to point as you determine trace routes. When you have drawn a given trace, simply paint over it with black to indicate it is completed. The famous Sharpie markers come in more than two dozen colours, although there will be some that won't show up well on the board. These are "permanent" and hold up well while handling, but a bit of acetone, alcohol, lacquer thinner, WD-40 or other solvent will easily remove the ink. Of course you can use certain colours exclusively for Ground, Power, Data etc. and a million other ways of optimising the process to your taste. It's actually kind of fun too.

Thanks for the 'ible, there are many valuable methods and techniques in here that can be used for other purposes too. Also, the SMD Catalogue reference is a gem and exceedingly useful.

Cheers from Canada!!
Jan 20, 2011. 2:22 PMmario59 says:
FANTASTIC instructable!
SIMPLY AMAZING ! ! !
You taught me alot!
Jan 20, 2011. 1:47 PMPeterTheUnGreat says:
Superb and inspiring - this is a very nice way to reverse engineer a complex board. Thanks for sharing.
Pete
Jan 20, 2011. 12:57 PMjamwaffles says:
Absolutely brilliant Instructable! This has inspired me to reverse engineer some stuff now :-P Thank you for the how-to and the time you took to write it :-)
Jan 20, 2011. 10:57 AMrtty21 says:
Subscribed!
1-40 of 52next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
31
Followers
9
Author:throbscottle