Author Topic: How to reverse engineer a simple through-hole board  (Read 15970 times)

0 Members and 1 Guest are viewing this topic.

Offline victorTopic starter

  • Regular Contributor
  • *
  • Posts: 110
  • Country: 00
  • Boy who writes code and take things apart
    • vitim.us
How to reverse engineer a simple through-hole board
« on: August 29, 2013, 01:58:34 am »
    This is a simple guide that I made to reverse engineer simple circuits.

    • Take the best pictures of both sides of the board that you can.
      You can use a scanner to scan the bottom side of the board, but not all scanners will be able   to focus the top layer because of the height of the components. 

      To this guide I used a 3MP camera of the iPhone 3GS without any special lighting or anything.    You will almost always likely to have a picture taken with better equipment and conditions.




    • Import then to a blank canvas on your favorite editing program. I'm using Adobe Fireworks,  you photoshop or almost any image editing software.
      The images must be in separated layers.


    • Use the Polygon Lasso tool to crop the board from the rest of the picture. Do the same for the other side.


    • Use CMD-X to cut and then CMD-V to paste. It will lift the selection from the background. And then just delete the background. Do the same for the other side.


    • Use the Rotation CW/CCW and Flip Horizontal/Vertical to adjust the pictures to the correct position.
      * You will want the bottom of the board to be mirrored, so it matches the components side.


    • Decrease the opacity of the top layer down to around 50%~75% so we can se through it.


    • The 2 images are not in the same size, or angle. So we will use the Distortion tool to resize and straighten the corners of the top side so it match the bottom side.

       * Alignment is critical, so take your time, use the zoom/magnifier and check if everything is aligned. Look for the holes in the board, it is the easier way to check if the board is misaligned.


    • Blending

      There are many methods that can be used to blend images.
      Not all will work on all cases.

      But I will go through a few of methods that may work for the majority of people.

      The adjustments are subjective and will depend on your board color, illumination, exposure, etc... there are many variables, play around and find what values works best for you.

      • Screen Blend

        • Drag the bottom side to upwards the components side (copper side's layer on top of component side's layer).
        • Darken the copper layer using Brightness/Contrast filter and set brightness to -50
        • Select the copper layer and select blend mode to Screen/Interpolation or Average and set to 80




      • Luminosity Blend

        • Drag the bottom side to upwards the components side (copper side's layer on top of component side's layer).
        • Increase the constrast of the copper layer using Levels filter, drag the pins to twords the hill.

        • Select the copper layer and select blend mode to Luminosity and set to 50




      • Brush + Threshold

        • Drag the bottom side to upwards the components side (copper side's layer on top of component side's layer).
        • Select the copper layer and use the Brush and draw lines connecting the solder pads/holes, you can also use the path/line tool to draw straight lines instead. Use a solid color that is not used by the solder mask. In this case the solder mask is green/yellowish, so I used blue.

        • Apply a Invert filter.

        • Use the Levels filter or Threshold filter to extract just the solid color.
          Drag the left pin all the way to the right.

        • Apply the filter Hue/Saturation and choose the color of the track of you preference rotating the Hue.

        • Select the copper layer and select blend mode to Additive and set the opacity to around 70 to adjust the intensity of the track.




    Now we are ready to write down the values, and then transfer it to a
CAD Software.[/list]
« Last Edit: August 29, 2013, 02:05:22 am by victor »
your body is limited, but not your mind
 

Offline Fsck

  • Super Contributor
  • ***
  • Posts: 1157
  • Country: ca
  • sleep deprived
Re: How to reverse engineer a simple through-hole board
« Reply #1 on: August 29, 2013, 02:03:47 am »
that's pretty clever actually, but I'm not sure it's faster than the old school method. though I suppose this way is far less error-prone.

"This is a one line proof...if we start sufficiently far to the left."
 

Offline ablacon64

  • Frequent Contributor
  • **
  • Posts: 370
  • Country: br
Re: How to reverse engineer a simple through-hole board
« Reply #2 on: August 29, 2013, 02:11:09 am »
Very interesting! Thank you for the post!  :)

I agree it takes time but it's precise.
 

Offline robrenz

  • Super Contributor
  • ***
  • Posts: 3035
  • Country: us
  • Real Machinist, Wannabe EE
Re: How to reverse engineer a simple through-hole board
« Reply #3 on: August 29, 2013, 02:18:29 am »
Nice technique and nice quality post :-+

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: How to reverse engineer a simple through-hole board
« Reply #4 on: August 29, 2013, 02:29:08 am »
Do you mind if I claim I thought of this first? Because I'm kind of embarrassed that I didn't... :-[

Nice :-+
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Re: How to reverse engineer a simple through-hole board
« Reply #5 on: August 29, 2013, 02:53:34 am »
Used this to great effect for reversing smd boards, though only 2layer

Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline victorTopic starter

  • Regular Contributor
  • *
  • Posts: 110
  • Country: 00
  • Boy who writes code and take things apart
    • vitim.us
How to reverse engineer a simple through-hole board
« Reply #6 on: August 29, 2013, 03:13:38 am »

that's pretty clever actually, but I'm not sure it's faster than the old school method. though I suppose this way is far less error-prone.

It don't take longer than 5 minutes, and if you take a decent picture you will be amazed how good it can look.

I made a pretty rusty picture with a phone holding the board with my hand, to show how little effort it take.

Actually it took me much longer to do this post than to do the thing itself.
your body is limited, but not your mind
 

Offline victorTopic starter

  • Regular Contributor
  • *
  • Posts: 110
  • Country: 00
  • Boy who writes code and take things apart
    • vitim.us
How to reverse engineer a simple through-hole board
« Reply #7 on: August 29, 2013, 03:18:29 am »

Used this to great effect for reversing smd boards, though only 2layer



I used this method to reverse engineer SMD as well. The good thing is you can use a scanner instead, the quality is much better.

But if you have multi layer board there's no hope.
your body is limited, but not your mind
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16366
  • Country: za
Re: How to reverse engineer a simple through-hole board
« Reply #8 on: August 29, 2013, 04:11:11 am »
Great tip there.
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: How to reverse engineer a simple through-hole board
« Reply #9 on: August 29, 2013, 04:48:34 am »
Neat trick, thanks for sharing !  :-+

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1289
  • Country: fi
Re: How to reverse engineer a simple through-hole board
« Reply #10 on: August 29, 2013, 06:06:05 am »
Do you mind if I claim I thought of this first? Because I'm kind of embarrassed that I didn't... :-[

Nice :-+
Me too. But i actually did think of it some time ago  :P 8) :P



Nice post however.
« Last Edit: August 29, 2013, 06:20:37 am by Kremmen »
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Kevin.D

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: england
Re: How to reverse engineer a simple through-hole board
« Reply #11 on: August 29, 2013, 08:23:57 am »
Nice idea and post ,thanks   .  :-+   
This method could be perhaps used to create a program that does the steps automtically working from
the two photo's ,with some optical recognition algo's to allign the top and bottom and recognize the traces ,and possibly even automaticaly identify most of the components used ,you could automate the whole process and  reconstruct a circuit diagram of the pcb. I dont know if there is any software currently available that could do this. ?
« Last Edit: August 29, 2013, 11:21:36 am by Kevin.D »
 

Offline Jon Chandler

  • Frequent Contributor
  • **
  • Posts: 539
    • Throw Away PIC
Re: How to reverse engineer a simple through-hole board
« Reply #12 on: August 29, 2013, 11:48:51 am »
I used a scanner when I needed to figure out the connections on a flat-flex breakout adapter.  It went from fine-pitch 50 pin connector to a couple connectors and a laser scanner in a hand held PocketPC with several transistors included.  I needed to create an in-line circuit board to access one of the serial ports included in the cable.

The connections were impossible to trace – too small to see without magnification but too difficult to follow across the 6" long piece if I had enough magnification to see it clearly.  Scanner to the rescue.  I put it right on the glass, scanned at max resolution and printed it out as large as possible on an 11 x 17 sheet.  Much better...big enough to see!  It was a little fuzzy around the 0603 components and transistor be still easy to make out the tracks.
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: How to reverse engineer a simple through-hole board
« Reply #13 on: August 29, 2013, 12:03:05 pm »
Reverse engineer? I was expecting to see a schematic. This is copying, more or less.

Nice detailed post though.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: How to reverse engineer a simple through-hole board
« Reply #14 on: August 29, 2013, 12:17:38 pm »
its one of the first steps to reverse engineering, work out the circuit connections and parts, then the functional blocks then profit :D
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: How to reverse engineer a simple through-hole board
« Reply #15 on: August 29, 2013, 12:27:07 pm »
I need to do this, and this is an excellent method, looks like.

There's a certain bit of electronics hardware that I want to redesign and/or reproduce for my own purposes.  Reversing the physical working hardware (the schematics from the vendor don't match their production hardware) will go very far towards my goal.  What I want to make isn't manufactured any longer, sadly, and it's a very niche bit of hardware.  CRT Arcade monitor chassis.
 

Offline envisionelec

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
Re: How to reverse engineer a simple through-hole board
« Reply #16 on: August 29, 2013, 12:54:09 pm »
Ah - one of my (many) tricks to reverse engineering. I also use an electron microscope for multilayer boards. It helps to know the owner. ;)
 

Offline ablacon64

  • Frequent Contributor
  • **
  • Posts: 370
  • Country: br
Re: How to reverse engineer a simple through-hole board
« Reply #17 on: August 29, 2013, 01:19:33 pm »
Ah - one of my (many) tricks to reverse engineering. I also use an electron microscope for multilayer boards. It helps to know the owner. ;)

That's an expensive toy you have. :)
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: How to reverse engineer a simple through-hole board
« Reply #18 on: August 29, 2013, 01:28:51 pm »
Do you mind if I claim I thought of this first?
do you mind if i claim i've done this so many times since before i joined in? nice trick yesss! if somebody like to argue, this method will lead to a more organized reverse engineering. i drew tracks and components symbols like in normal schematic in photo editor sw, and then rearrange it in eda software later. though i dont (never did) usually reverse engineer all the circuit, usually my intention is only to understand some portion of circuit or to make repair job easier. i also agree pencil and paper can do the same, but i believe we may need many papers and pencils and erasers to do so.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MacAttak

  • Supporter
  • ****
  • Posts: 683
  • Country: us
Re: How to reverse engineer a simple through-hole board
« Reply #19 on: August 29, 2013, 02:55:27 pm »
Beats the snot out of probing for continuity, resistance, and capacitance with a DMM for hours!
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: How to reverse engineer a simple through-hole board
« Reply #20 on: August 29, 2013, 08:31:37 pm »
also makes it far easier for dual layer boards, single layer is easy to pencil out, but even with 2 colours you loose your bearings on double sided stuff, even worse is when its heavily populated
 

Offline victorTopic starter

  • Regular Contributor
  • *
  • Posts: 110
  • Country: 00
  • Boy who writes code and take things apart
    • vitim.us
Re: How to reverse engineer a simple through-hole board
« Reply #21 on: August 30, 2013, 04:42:32 am »
Ah - one of my (many) tricks to reverse engineering. I also use an electron microscope for multilayer boards. It helps to know the owner. ;)

An electron microscope doesn't damage some chips? I never used one or had access to one.
your body is limited, but not your mind
 

Offline MrAureliusR

  • Supporter
  • ****
  • Posts: 373
  • Country: ca
Re: How to reverse engineer a simple through-hole board
« Reply #22 on: August 30, 2013, 05:31:30 am »
I'd like to add a technique that I find makes this much, much easier.

Mount your camera on a tripod, if you have one, and point it straight down at the table. Put a piece of paper down on the table, and put the board on top of the paper. Trace the shape of the board onto the paper. Now make sure the board is lined up (this works well with square/rectangular boards, obviously) and take your first picture. Now flip the board, line up with the trace, and take picture #2.

If your board is a weird shape (assuming my brain is working properly right now) you could also trace with a heavy marker, and then flip the paper as well, and then line it up facing the other way. This might help when you go to mirror and line up the images. (Or am I doing this backwards? My spatial awareness is only good when something's right in front of me)

The reason this works better is both pictures are the same aspect ratio and size, which makes it much easier to line up once you flip the images around. Then follow the rest of the instructions to blend the images together and you're all done!
--------------------------------------
Canadian hacker
 

Offline pickle9000

  • Super Contributor
  • ***
  • Posts: 2439
  • Country: ca
Re: How to reverse engineer a simple through-hole board
« Reply #23 on: August 30, 2013, 06:42:33 am »
When I was a lad (actually not a lad at the time) we used a flatbed scanner on a board component side down with a 200 watt incandescent above. The flatbed we had kept in focus up to almost 2 cm which covered most stuff. Cameras at the just didn't have the resolution. The beauty was you could see through most boards and the scanner light was bright enough to illuminate the components. No not perfect but this was a number of years ago. 
 

Offline victorTopic starter

  • Regular Contributor
  • *
  • Posts: 110
  • Country: 00
  • Boy who writes code and take things apart
    • vitim.us
How to reverse engineer a simple through-hole board
« Reply #24 on: August 30, 2013, 03:06:05 pm »

When I was a lad (actually not a lad at the time) we used a flatbed scanner on a board component side down with a 200 watt incandescent above. The flatbed we had kept in focus up to almost 2 cm which covered most stuff. Cameras at the just didn't have the resolution. The beauty was you could see through most boards and the scanner light was bright enough to illuminate the components. No not perfect but this was a number of years ago.

Yeah I'm doing this for a long time, I used to have a old flat bed scanner, those with fluorescent light and it was able to focus like 1~3 cm above the glass, but I can't with my actual scanner.
your body is limited, but not your mind
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf