Author Topic: A simple tool to aid in reverse engineering a PCB  (Read 11479 times)

0 Members and 1 Guest are viewing this topic.

Offline intabitsTopic starter

  • Frequent Contributor
  • **
  • Posts: 319
  • Country: au
A simple tool to aid in reverse engineering a PCB
« on: November 30, 2018, 05:11:48 am »
Top Image


Bottom Image


Merged for tracing


« Last Edit: June 05, 2019, 09:47:18 am by intabits »
 
The following users thanked this post: kripton2035, all_repair, 001, 4cx10000, t1d, jack-daniels

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2289
  • Country: us
    • medpants.com
Re: A simple tool to aid in reverse engineering a PCB
« Reply #1 on: November 30, 2018, 06:21:57 am »
Works great until it's double sided or more  :P
 

Offline 001

  • Super Contributor
  • ***
  • Posts: 1170
  • Country: aq
Re: A simple tool to aid in reverse engineering a PCB
« Reply #2 on: November 30, 2018, 06:24:22 am »
Do You use X-ray machine?  :wtf:
 

Offline Archangel1235

  • Newbie
  • Posts: 4
  • Country: in
Re: A simple tool to aid in reverse engineering a PCB
« Reply #3 on: November 30, 2018, 06:30:00 am »
Do You use X-ray machine?  :wtf:

He's just keeping two images one on top of the other with some transperency
 

Offline BBBbbb

  • Supporter
  • ****
  • Posts: 289
  • Country: nl
Re: A simple tool to aid in reverse engineering a PCB
« Reply #4 on: November 30, 2018, 09:37:21 am »
Adding some cropping and centering would make it useful. You cannot rely on having two perfectly superimposed images.
If you have to open some more powerful image editor to adjust the images for your SW, you might as well finish the job there playing with transparency.
 

Offline intabitsTopic starter

  • Frequent Contributor
  • **
  • Posts: 319
  • Country: au
Re: A simple tool to aid in reverse engineering a PCB
« Reply #5 on: November 30, 2018, 11:41:03 am »
Works great until it's double sided or more  :P

It is just a simple thing, for simple jobs. Exploring an idea.
But with double sided PCBs, it would still be of value I think. Traces under components would be a problem, but it apart from that, it would allow a trace to be followed around the PCB from top to bottom through vias and pads.

If you find yourself tracing out a (simple-ish) PCB, even double sided, it's got to be a help.

Adding some cropping and centering would make it useful. You cannot rely on having two perfectly superimposed images.
If you have to open some more powerful image editor to adjust the images for your SW, you might as well finish the job there playing with transparency.

As to alignment, I envision just having a corner jig to position the PCB with stability, and a camera on a small tripod looking down on it.
Take a snap, flip the PCB, position into the corner, take another snap.
Use dumb old MS-paint to crop the images, using the corner jig edges as one reference, and just make sure that the X-Y pixels counts are similar on both images. Done.
Or just select the PCB area, also easy.
But yes, cropping, scaling, rotation and alignment facilities could be added.

I'm just presenting an idea here, not a finished, all singing, all dancing product.
This could be taken a lot further, with a facility to add overlaid component designators, marking pad and via positions, and maybe even component outlines.
Then a facility to click all the pads in a net, resulting in a netlist for input to some other EDA system.
 
The following users thanked this post: jack-daniels

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: A simple tool to aid in reverse engineering a PCB
« Reply #6 on: November 30, 2018, 12:09:18 pm »
That looks like an undamaged IBM mainframe card. Do you have any more?  If so send me a PM.  I'd like to buy one.

I have one I bought in the 60's for the transistors, but the connectors were broken off before they were scrapped.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17729
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: A simple tool to aid in reverse engineering a PCB
« Reply #7 on: November 30, 2018, 02:36:02 pm »
I have done this in the past. Scanners make very good work of taking a picture of a PCB that will be easy to line up with another picture of the same PCB.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: A simple tool to aid in reverse engineering a PCB
« Reply #8 on: November 30, 2018, 03:14:40 pm »
All that's needed now is the software to read the image and draw the schematic. :)
.  That took much longer than I thought it would.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17729
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: A simple tool to aid in reverse engineering a PCB
« Reply #9 on: November 30, 2018, 03:25:09 pm »
All that's needed now is the software to read the image and draw the schematic. :)

Killjoy ;)
 

Offline intabitsTopic starter

  • Frequent Contributor
  • **
  • Posts: 319
  • Country: au
Re: A simple tool to aid in reverse engineering a PCB
« Reply #10 on: November 30, 2018, 04:56:46 pm »
That looks like an undamaged IBM mainframe card. Do you have any more?  If so send me a PM.  I'd like to buy one.
I have one I bought in the 60's for the transistors, but the connectors were broken off before they were scrapped.
Indeed it is. This particular one is the error amplifier for a power supply (full PS schematic in the ZIP). I too bought them without the fingers back in the '60's.
But in the late 70's it was ME breaking them off for the gold. I had about 7000 of them.

I still have quite a few, but being in the US, it would probably be cheaper for you to buy them on eBay.
People do want a lot for them, but I don't think they sell many, so I reckon they'd take a lower offer.
Look for "IBM SMS card" (which stands for Standard Modular System)
If you can't get one at a reasonable price, you can PM me.
 

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2289
  • Country: us
    • medpants.com
Re: A simple tool to aid in reverse engineering a PCB
« Reply #11 on: November 30, 2018, 04:57:54 pm »
It is just a simple thing, for simple jobs. Exploring an idea.
But with double sided PCBs, it would still be of value I think. Traces under components would be a problem, but it apart from that, it would allow a trace to be followed around the PCB from top to bottom through vias and pads.

If you find yourself tracing out a (simple-ish) PCB, even double sided, it's got to be a help.

Could be an interesting exercise to try, I would think traces under traces would be the biggest problem visually.  That said, I wonder if you could adjust the colors for each layer, like CAD software does, and then overlay them.  Maybe the contrast of colors could be enough to distinguish them with some practice.
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 2758
  • Country: us
Re: A simple tool to aid in reverse engineering a PCB
« Reply #12 on: November 30, 2018, 08:55:56 pm »
That looks like an undamaged IBM mainframe card. Do you have any more?  If so send me a PM.  I'd like to buy one.

I have one I bought in the 60's for the transistors, but the connectors were broken off before they were scrapped.
Yes, that is an SMS card, used in 1401, 1620, 707x and 709x machines by the zillions.  (7094 had 11,000 SMS circuit cards!
Totally blows my mind how they even kept such a machine running.)

These are certainly collector's items today.

Jon
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: A simple tool to aid in reverse engineering a PCB
« Reply #13 on: November 30, 2018, 09:07:57 pm »
Use a scanner with a transparency adapter and cut a mask that puts the PCB in the middle of a piece of opaque paper so the light from the transparency adapter doesn't wash out the image by shining around the sides. Take both reflective and transmissive images. Bracket your transmissive exposures.

Shining a light through often is the key to figuring out where inner traces go.

Also photos taken like that often make neat 'electronics' images artistically.
« Last Edit: November 30, 2018, 09:51:51 pm by cdev »
"What the large print giveth, the small print taketh away."
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17729
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: A simple tool to aid in reverse engineering a PCB
« Reply #14 on: November 30, 2018, 10:14:39 pm »
Yes if you need a "photo" of a PCB and it needs to be in the flat a scanner is the best way, and way more resolution than a camera.
 

Online CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5173
  • Country: us
Re: A simple tool to aid in reverse engineering a PCB
« Reply #15 on: November 30, 2018, 10:20:37 pm »
Some work with an image editor (changing hues etc) prior to superposing the images can help on double sided boards.  If you are really familiar with image editing you can do even more to separate traces, hardware, components and solder mask.
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: A simple tool to aid in reverse engineering a PCB
« Reply #16 on: November 30, 2018, 10:41:47 pm »
I use Photoshop especially with boards that have been photographed at different angles. You identify or make your own fiducials and then apply the warp/transform filters with the mirror and of course transparency tools. CS2 is free since they abandoned their servers. Somehow I have CS6 for free too, I don't know what happened there.. But GIMP should do too.
« Last Edit: November 30, 2018, 10:44:38 pm by Macbeth »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: A simple tool to aid in reverse engineering a PCB
« Reply #17 on: November 30, 2018, 10:45:19 pm »
Only tool you need after such a photos is brain.
[edit] You shall consider it as an compliment because photos are pristine
« Last Edit: November 30, 2018, 10:47:02 pm by ogden »
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: A simple tool to aid in reverse engineering a PCB
« Reply #18 on: December 01, 2018, 12:36:33 am »

As to alignment, I envision just having a corner jig to position the PCB with stability, and a camera on a small tripod looking down on it.
Take a snap, flip the PCB, position into the corner, take another snap.
Use dumb old MS-paint to crop the images, using the corner jig edges as one reference, and just make sure that the X-Y pixels counts are similar on both images. Done.
Or just select the PCB area, also easy.
But yes, cropping, scaling, rotation and alignment facilities could be added.

A better solution is to get rid of the tripod (so that you can use a phone instead of a camera/scanner that may not be on hand, find a good angle where you don't have glare, etc.) and instead find 4 points that you know the position on the board (e.g. 4 corners). Then you can warp the image to get rid of any trapezoidal distortion due to the camera not being exactly perpendicular with the board. In theory this could be done with any 4 points (they don't have to be right angle corners but those are the simplest) automatically - it is called finding a homography transform.

https://docs.opencv.org/3.4/d9/dab/tutorial_homography.html (see the part on perspective removal)
https://www.learnopencv.com/homography-examples-using-opencv-python-c/

That's basically what the Photoshop/Gimp do when you ask them to do perspective correction.

The layer alignment can be done in a similar way - first rectify the images up as above and then you can find a transform between matching points that will scale and align one layer over the other one. All that this needs is solving a system of linear equations.

It can be done semi-automatically - e.g. have the user mark the points with a mouse.

A few other features I have found useful or wished to have:

- filling the traces with color so that you can easily see the individual nets
- marking of the components and their pins
- have a way to generate a netlist/rough schematic out of the above - e.g. this could be perfectly doable with KiCAD where the schematic is just a large text file.
« Last Edit: December 01, 2018, 12:40:01 am by janoc »
 
The following users thanked this post: KE5FX

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21612
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: A simple tool to aid in reverse engineering a PCB
« Reply #19 on: December 01, 2018, 06:41:20 am »
Yeah, I do this.  Usually I color the layers so they're easier to follow; which is more effective here with silver traces, than with modern green boards (so one layer stays normal and the other is rotated to red or whatever).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17729
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: A simple tool to aid in reverse engineering a PCB
« Reply #20 on: December 01, 2018, 08:14:24 am »
I curse the man that put a camera in a phone. they hidiously distort the image, hence why i still paid hundreds of pounds for an SLR.
 

Offline Dubbie

  • Supporter
  • ****
  • Posts: 1114
  • Country: nz
A simple tool to aid in reverse engineering a PCB
« Reply #21 on: December 01, 2018, 08:20:19 am »
The lens in your average phone camera doesn’t have particularly bad distortion. I know because it have measured it on my phone many times.
« Last Edit: December 01, 2018, 06:34:40 pm by Dubbie »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17729
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: A simple tool to aid in reverse engineering a PCB
« Reply #22 on: December 01, 2018, 08:23:49 am »
The distortion in your average phone camera doesn’t have particularly bad distortion. I know because it have measured it on my phone many times.

Until you realize how many people are having facial surgery because they beleive their phones :)
 

Offline Dubbie

  • Supporter
  • ****
  • Posts: 1114
  • Country: nz
Re: A simple tool to aid in reverse engineering a PCB
« Reply #23 on: December 01, 2018, 08:27:14 am »
I think that is just the reality of rectilinear projection on a wide angle lens closeup.
 
The following users thanked this post: janoc

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17729
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: A simple tool to aid in reverse engineering a PCB
« Reply #24 on: December 01, 2018, 09:12:10 am »
I think that is just the reality of rectilinear projection on a wide angle lens closeup.

define wide angle lens..... most camera's that are not SLR's are sold on their equivalent to 35mm frame lons length. This is because the field of view depends on the lens length and the frame size. Once the world had defined standards the last being the 35mm frame format. with this format a 50mm lens gave the closest match to a human eye's field of view and sense of pespective. Anything less was wide angle or fisheye in extreme cases and anything more was telephoto. Wide angle having potential distortion and fisheye - well they called that an artform. Then digital came along and sensors got smaller, this meant that the lens for the same field of view had to be shorter. My first bridge camera had a 6mm sensor and my lens was marketed as a 18-300mm, in reality it was 6.2-66mm. I used to find zommed shots more pleasing and eventually worked out this was because at 50-66mm i was getting a truer prospective. Zoom lenses themselves are a compromise and introduce distortion. I have kept my 50mm prime lens that came with my camera because it is very useful for any people shots. Having recently compared two photos with the same people taken with that lens and a phone I can assure you that there is a difference. You won't see it in buildings etc but in faces that we humans are particularly attentive to and all the more so when it is our own there is a difference. Distortion is not constant and worse at the edges of a lens.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf