Instructables

How to reverse engineer a schematic from a circuit board

Featured
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
1-40 of 56Next »
Sangstbk8 months ago
Hi Throbscottle,

Could you explain more detail for me about delayering PCB by heating it up. What temperature? how long I need to keep it in this temperature? What machine can help me to do heating up like that?

Thanks
Sangstbk1 year ago
Hi,

How can I get a photo of internal layer of PCB? How can I break PCB to layers
throbscottle (author)  Sangstbk1 year ago
I think the only way you could do this is with x-ray equipment, as someone else suggested. If you wanted to physically split the pcb into layers, it might be possible to do this by heating it up until it starts to de-laminate. Of course, this would completely destroy the board in the process.
AKA the A1 year ago
If you need a good quality image of the pcb with even lighting, get a flatbed scanner... even the cheapest one will beat a consumer-level camera... Just get take off the lid and replace it with either a black cloth or make a suitably large box to keep ambient light out...
shams2 years ago
UBUNTU !!!
Absolutely brilliant. Thank you for this, I cannot place a finite number on the possibilities this opens to me.
demyhr3 years ago
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.
skylen demyhr2 years ago
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.
throbscottle (author)  demyhr3 years ago
It seems that the more I discover, the more complex this becomes! However, even an incomplete schematic is better than none at all, and this is a relatively un-complicated digital TV decoder. I will try the scanner method at some point.
iffee3 years ago
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
Biotele iffee3 years ago
Take an x-ray picture.
wwward iffee3 years ago
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.
Euphy iffee3 years ago
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.
cyphunk3 years ago
excellent!
anyway to identify these components? http://www.trafficlights.com/images/T3_photos.jpg I want to try and build one.
T3_photos.jpg
throbscottle (author)  Donotmatthews3 years ago
The various components will be marked with their values and part numbers. Looking at the photo, at top left you have a potentiometer, which will be marked with it's value probably in kilo-ohms - you will have to look for a figure ending in K, or possibly A or B (one of these means logarithmic, one means linear, but I can't remember which is which - this one will be linear), next to it you have a standard looking red LED and what is probably it's current limiting resistor, then the two blue cylinders are electrolytic capacitors, which will be marked with their value in microfarads (uF) and voltage, just in front of them is what looks like a glass bodied diode (possibly a zener), then going right again is probably a rectifier diode. The big stripey thing next to that is a resistor, probably 1 or 2 watt. The big black box is a fuse holder. Just in front of that you have 3 devices which looking at the wiring diagram on the web-site tell me are triacs - you will have to look at their markings to find out the exact type - you can look these up on the internet and 99% of the time be able to find some data - next to those are 3 resistors which look like they feed the control signal to the triacs. The 8 legged animal is some sort of chip - again you will have to look at the markings to find out what it is, though again looking at the web site, it is probably a micro-controller, and above that is another resistor. Next to that you have a dual dip switch. Without knowing more about the circuit, I can't really tell you more. The resistor colour code, in case you don't know it, is
Black = 0, Brown = 1, Red = 2, Orange = 3, Yellow = 4, Green = 5, Blue = 6, Purple = 7, Grey = 8, White = 9.
First two bands are the base value, 3rd band is the multiplier (ie, number of noughts) so brown, grey, red woudl be 1800 ohms, or 1.8K, brown, grey, black would be 18 ohms, brown, grey, blue would be 1800,000 ohms, or 1.8M.

The fourth band is tolerance, used to be gold or silver for 5% or 10%, but now red or brown for 2% or 1% is common. There may be also a band to indicate temperature coeffecient. Gold and silver are sometimes also used for the 3rd band to indicate divide by 10 or 100.

At first I thought you had one of these and wanted to clone it, but it looks like you just want to build your own version from the photo of the one they are selling! Cheeky :-) Unless you can program your own microcontroller, your best bet is to find a free circuit diagram to build one yourself, or better yet, design your own, rather than try to copy a proprietary design from a photo.

I'm sorry to say there just isn't enough information in a photo like this to be able to work out any more than the basic power control - it has the triacs connected to the lamp outputs, these are fed by what look to be high value (and possibly special purpose) resistors from the microcontroller. It looks like there is a very basic live power supply to give the low voltage DC. There may of course be SMD's underneath the board, which of course you can't see, though it looks unlikely.

I hope this is helpful to you - wish I could give you more useful information.
Great Instructable. You might want to also mention this:
http://www.instructables.com/id/Find-schematics-wiring-diagrams-etc-for-everyda/
throbscottle (author)  siliconghost3 years ago
Wow - cool! I will look to see if there is a UK equivalent!
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
tomkawal3 years ago
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

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
throbscottle (author)  aetienne34933 years ago
Artefacts are things which don't really exist, like optical aberrations - like if the light has made a shiny spot, or something has got blurred and looks like it is a slightly different shape, or you have coloured edges to the tracks - tricks of the light and shadow, things like that.

You can use the clone tool by finding a spot that looks the same as the place you want to correct, ctrl-click (I think, you will have to check) that spot, then paint over the place you want to correct. It will copy the first spot over the second. Use blur for if you have a small detail you want to remove. Just paint over the spot until you have blurred it enough.

Looking at your picture, I would seriously consider hand tracing it and missing out most of the graphical techniques, since it's a fairly simple board. Also, as mentioned in a previous comment, if you have a scanner you will probably get a better image by scanning the board.

Good luck!
alright thanks
throbscottle (author)  aetienne34933 years ago
Oh, apparently I also meant physical bits of dirt, hairs etc as well as optical aberrations.
captthud3 years ago
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.
Mike443 years ago
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
If you have a scanner available, I've found them easier to get board pictures than a camera. Also a lot of scanners let you zoom in to get those tiny id numbers on small parts
throbscottle (author)  criswilson103 years ago
I wish I'd done this! I was put off the idea by thinking the resolution would be too low, but I think that would be outweighed by the picture quality. I'm curious to know what you use board scans for!
I use scanners to scan boards for repair and reverse engineering. Most of the time they are obsolete boards from odd equipment. The last one I did was a controller board for an automated shrink wrap machine from the early 1980s. The manufacturer was out of business and no replacements board was available. So I scanned the front and back of the board in to get the rough trace pattern off the board and to make it easier to read the part values for everything.
You can actually get rather insane resolutions on a scanner, something like 1000dpi+. For example, here's a board I had scanned in a while ago - I don't remember what resolution I had scanned it in at, but it wasn't anywhere near the max resolution of the scanner. http://nookdevs.com/images/f/ff/Board_scan.jpg

Also, hats off on this bit of reverse engineering! I had had to reverse a low/medium complexity board a while ago, which only used through-hole components (90s era board). I had done it by hand (w/ multimeter..), and that was quite a challenge! The board you are working on is significantly more complex :)
Have to agree there. The default on one of my canon scanners was taking up-wards of 7 to 8 minutes to do a scan! I was bewildered but allowed it to finish, the file was HUGE! I realized why after my photo software stated it could not handle a resolution over 1250 dpi the scanned image was over 3000dpi
I then changed the default to 275dpi for scan to computer and 75dpi for copy to paper. There is an Instructable here http://www.instructables.com/id/Take-detailed-photos-with-a-scanner/ that shows using a Scanner for Macro Photography.
Haha! I was just about to suggest this same thing!
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.
"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!
jolshefsky3 years ago
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!
throbscottle (author)  jolshefsky3 years ago
If you can output your work from AppleWorks into postscript format, pstoedit will output svm files for openoffice. It will also output schematic files, but I think their usefulness is limited for this.
rammstein23 years ago
very nice and much of hard work you put i there!! Anyone knows how to do it in windows??(for the pstoedit part)
throbscottle (author)  rammstein23 years ago
Find the pstoedit home page - there is a link to a Windows version there.
GIMP is an open source program that can also be used in windows. It can be found at:

http://gimp-win.sourceforge.net/
speedhump3 years ago
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.
1-40 of 56Next »