Author Topic: Inkscape pcb tracing  (Read 2970 times)

0 Members and 1 Guest are viewing this topic.

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Inkscape pcb tracing
« on: February 12, 2024, 03:00:35 pm »
I don't know how to use Inkscape where you can make the 2 circuit overlap front and back and automatically draw a trace that you can load into Ltspice and see the circuit how it work? Ok, I just want to know where the 5 input is connected so I'd know the ESD protection of each wire. If you are very good in tracing. Please demonstrate how Inkscape work by tracing just where the 5 input go. Thanks.

2013701-0

2013707-1
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19512
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Inkscape pcb tracing
« Reply #1 on: February 12, 2024, 04:28:38 pm »
I don't know how to use Inkscape where you can make the 2 circuit overlap front and back

RTFM, looking for "transparency" or "alpha". Probably best to use a tool where you can overlay layers.

Quote
and automatically draw a trace that you can load into Ltspice and see the circuit how it work?

Good luck automatically reversing a schematic from a PCB layout.

If you manage to do it, turn it into a product and become as rich as Croesus.

Quote
Ok, I just want to know where the 5 input is connected so I'd know the ESD protection of each wire. If you are very good in tracing. Please demonstrate how Inkscape work by tracing just where the 5 input go.

How much are you paying, what is the payment mechanism, and what are the Ts & Cs?
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: tooki

Offline Andy Chee

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: au
Re: Inkscape pcb tracing
« Reply #2 on: February 12, 2024, 05:26:49 pm »
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19512
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Inkscape pcb tracing
« Reply #3 on: February 12, 2024, 06:02:11 pm »


I wonder why the OP didn't find that?

A typically crap "talking heads" yooootoooob vid. I spent a couple of minutes, and even with the chapter headings I couldn't find out the workflow they were suggesting. 52mins of ums and ahs when I could read the info in 30-60s? I think not. Oh yes, "part 2 to come later".

I wonder how they do that with a double-sided PCB with mounted components?
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Andy Chee

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: au
Re: Inkscape pcb tracing
« Reply #4 on: February 12, 2024, 06:58:30 pm »
I could read the info in 30-60s
Ahhh, but can the OP do the same?  I'm not so sure.  Given the vibe of several threads the OP has started, I suspect they need all the hand holding they can get!
 

Offline tatel

  • Frequent Contributor
  • **
  • Posts: 448
  • Country: es
Re: Inkscape pcb tracing
« Reply #5 on: February 12, 2024, 07:19:02 pm »
even with the chapter headings I couldn't find out the workflow they were suggesting. 52mins of ums and ahs when I could read the info in 30-60s? I think not. Oh yes, "part 2 to come later".

I agree
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19512
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Inkscape pcb tracing
« Reply #6 on: February 12, 2024, 07:35:34 pm »
I could read the info in 30-60s
Ahhh, but can the OP do the same?  I'm not so sure.  Given the vibe of several threads the OP has started, I suspect they need all the hand holding they can get!

Difficult to judge.

It would be polite and considerate of the OP to tell us what research he has done, with what result. I'm not holding my breath.

We would all benefit if he read and actioned some of the hints at  https://entertaininghacks.wordpress.com/library-2/good-questions-pique-our-interest-and-dont-waste-our-time-2/
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: tooki

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Inkscape pcb tracing
« Reply #7 on: February 12, 2024, 08:10:46 pm »
How the heck are we supposed to know what input 5 is?

Fortunately that board appears to be not that hard to reverse engineer. It's all through hole, which is a big help and is only two layer.

Take a better photograph of the non-component side, avoiding the reflection of the flash. I would use a flatbed scanner, rather than a camera, if available. Change the colour balance, so it's blue or red, adjust the transparency, mirror and overlay it on the picture of the component side. You can then write the component values on the picture and trace out the circuit. Note there might be hidden traces on the component side, under some components: use a multimeter on continuity to find these.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Inkscape pcb tracing
« Reply #8 on: February 12, 2024, 10:15:51 pm »
I don't know how to use Inkscape
Then start with the tutorials.  It is a very useful free tool, as the results are publication quality.

I've started the work for you; just download this loop123.inkscape.svg file.

Attached is how I like to organize my Inkscape, with the abovementioned SVG file open.
If you don't see either of them, you can bring them up via the Object menu, Layers and Objects... and Fill and Stroke....  Afterwards, the icon will bring either toolpad to the top on the right.  The draw vector lines tool is the Pen tool, on the left just under the spiral.

In the Layers and Objects toolpane, when you hover on top of a layer name, three small icons will pop up on the right.  The square one controls opacity (and blend mode); the eye toggles whether that layer (and everything in it) is visible or not, and the lock disables all modifications to objects on that layer when locked.  The lock is extremely useful, because clicking on any visible object not locked will select it, no matter what the layer.

I've more or less placed the two images on top of each other, with the back flipped horizontally.  When you hide it, you see the component side of the PCB, and both component and solder side traces (of the ones I bothered to do for you).  Some you will have to beep out using a multimeter, because they're hidden by the chip sockets or wires.  This is such a simple two-layer board that when you get comfortable with Inkscape, it is only a day's work to unravel the entire circuit.

After you have done that, you can use the Inkscape image to create a schematic for the key components in e.g. KiCAD or EasyEDA.  When you have that, you re-verify the connections by comparing the schematic connections to what your multimeter says when probing those points.  Then, you have the schematic covering the key parts of the design, and you can work out what is doing what, and how.

No, I am not going to do the work for you.  I felt it was correct for me to get you started, because I suggested using Inkscape for this in the first place, and it didn't take me long.  Also note that you can use multiple photographs, and stitch them together –– I like to use GIMP for that –– before placing them in the Inkscape SVG file.  The hardest part is aligning the component and solder-side images.  I feel GIMP's Tools > Unified Transform Tool is better than Inkscape here, because it allows skewing the image by dragging at the corners.  (One pastes all images to the same GIMP image, and uses layers just like in Inkscape.  When complete, make sure only one side is visible, then Select > Select All, Edit > Copy Visible, File > Create > Create from Clipboard..., which one can then crop via Image > Crop to Content, and finally File > Export as a PNG image.  JPEG images are lossy, PNG images are not, and the somewhat larger file size does not matter here.)
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #9 on: February 12, 2024, 11:00:01 pm »
Thanks a lot. I'll try to trace just the initial stage, not the whole product.

In the close-up photos below. The 5 pins from left to right is IN-, Gnd, IN+, V+, V- for the brown,red, orange, yellow and green wire.

Initially I tried to do it by eyes and multimeter but remember with the ISO-Z. It took me several pages of paper to draw the connections and I did many mistakes, and you get tired with many wrong turns. So I will try Inkscape this time at least just the input connections. Also a constant multimeter probe can introduce ESD too if it picks up static, isn't it.

In my initial manual trace. I just couldn't understand why the input had to pass through the Omron relay. I wanted to know if the input goes directly to the AMP01 main amp or has to pass through the TLE2061AIP chip first. I am trying to evaluate the ESD protections inside or sacrificial components that can be easily replaced.  Btw.. I'm just interested generally in BCI (Brain-Computer Interface).

2014313-0

2014319-1

2014325-2

2014331-3
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #10 on: February 12, 2024, 11:17:20 pm »

To continue above comments. I was stuck initially at the relay and still am. For the 5 input pins. I'm only concerned with IN-, IN+. It goes directly to the center pins of the Omron G6H relay. And looking at the relay schematic, it doesn't even say what the middle pins do. Can you at least tell me what is the function of the relay and where does the IN-, IN+ come out in the relay so I can continue, Nominal Animal? Many thanks.

https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/1041/G6H_Rev8_4_2010_ds.pdf

2014367-0
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Inkscape pcb tracing
« Reply #11 on: February 13, 2024, 12:44:49 am »
I'm only concerned with IN-, IN+. It goes directly to the center pins of the Omron G6H relay. And looking at the relay schematic, it doesn't even say what the middle pins do.
It is Omron G6G-2, to be specific.  If we look at the relay from above the component side, the pins are
    1  10
    2  9
    3  8
    4  7
    5  6
Pins 2, 3, 4 form one switch, and pins 9, 8, 7 form another.  Pins 1 (+) and 10 (-) are the power to the relay.  Pins 5 and 6 are not connected.

(In my SVG image, the pins are on both sides in this order, because I flipped the solder side image horizontally; as if we had x-ray vision through the PCB, and are always looking from above the component side.)

When the relay is not energized (no current flows between pins 1 and 10, same voltage potential in them), then pins 3 and 4 are connected together, and pins 8 and 7 together.   When the relay is energized (5 V between pins 1 and 10, about 28 mA of current flowing), then pins 3 and 2 are connected together, and pins 8 and 9 together.  (Could also be exactly the opposite: I'm not 100% certain. You can use a multimeter (when the device is completely unpowered and unconnected) to measure if by default pins 3-4 and 7-8 are connected as I think, or whether it is the reverse with 3-2 and 8-9 connected by default.)

This is why this is called a dual-pole, dual-throw (DPDT, or 2P2T) relay.  The two poles are pins 3 and 8, and they connect to the pins on either side, depending on whether the relay is energized or not.

The purpose for this relay is obviously to disconnect the input from the differential signal path when the calibration signal is enabled.  I did not see this relay before, so I thought it was done in the button; but now I think the button simply energizes this relay when the calibration signal is emitted.  This is good, because signal quality will be much better over such a relay than over a manual switch, the relay being completely enclosed with no external moving parts permitting dust/dirt ingress.  You can see the yellow and the red wires are connected to the relay poles (pins 8 and 3), with 10 (-) connected to the ground pour on the component side, and pin 1 (+) connected to the transistor just above and to the left of the relay.  (This is so that only a small current is needed to energize the relay.)

During normal operation, the differential input signal from the red and yellow wires goes through the relay and to the pins just below the poles, and from there, to the two topmost traces in the component side image, just below the three-pin white connector.  The image is cropped so I don't see where they go from there.

I assume that when the calibration button is pressed, the button press energizes the relay, so that the differential input signal is no longer connected, and instead comes from the pin beneath the front panel blue wire.  The connection from relay pin 2 is on the component side, so I cannot see where it is connected to, but I suspect to the signal ground nearby.
 
The following users thanked this post: loop123

Offline Andy Chee

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: au
Re: Inkscape pcb tracing
« Reply #12 on: February 13, 2024, 06:48:19 am »
I felt it was correct for me to get you started, because I suggested using Inkscape for this in the first place, and it didn't take me long. 
Incidentally, was there any particular resource that you drew upon? (no pun intended). 

For example, I posted above a random YouTube search about reverse engineering, but what website did you first learn your technique from?
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Inkscape pcb tracing
« Reply #13 on: February 13, 2024, 07:38:03 am »
I felt it was correct for me to get you started, because I suggested using Inkscape for this in the first place, and it didn't take me long. 
Incidentally, was there any particular resource that you drew upon? (no pun intended). 

For example, I posted above a random YouTube search about reverse engineering, but what website did you first learn your technique from?
I've done image processing –– not much true graphic design, but professional work using for example Adobe Photoshop, Macromedia Freehand and Adobe Illustrator –– for years before I started with electronics, so it was obvious to me.

If you look at how e.g. BigClive does his reverse engineering, he uses the same technique of mirroring one side so the images match, but he seems to prefer printed images rather than working with a vector graphics program.

If we explore my approach a bit, then it might be helpful to start with the pads, and perhaps use different colors for different types of pads (say power pads, ground pads, and signal pads on different sides of the board all having different colors; noting that this board has at least two completely isolated domains/power and ground sets), using copy-paste on a filled circle of a fixed size.  Then, enabling Snap and Snap to Centers of Objects, one can draw the traces much faster, since anywhere near a pad (circle) the endpoint will snap to the center.  Using different colors for the traces, for both different sides of the board, and different types of traces (key signal traces, power traces) can also help.  Each continuous trace should be their own path (which means combining segments using Path > Combine, Ctrl+K), so that one can finally Combine directly connected pads also.  That way, one can expand the Layers and Objects, and use the Eye icon to blink each connected pad set, to immediately see where an IC pin is connected to.

There are additional tricks one can do, like creating a outline filter effect for a pad or trace, and then using the Edit > XML Editor to move the filter to the entire layer instead.  (It is just deleting the filter: url(#filtername); from the style attribute of the object it was edited to, and adding the same style attribute with the same filter: url(#filtername); value to the target layer.)

Most important is to get good, rectilinear images of the boards first, perhaps even move the wires temporarily out of way to see the traces as well as possible.  I wouldn't even try to get everything in a single image per side for a board this size, I'd use an upside-down tub or something with a camera hole (as described by BigClive!) as a stand for my cellphone camera, and snap a couple of dozen images, moving the board around underneath; and stitch them together in Hugin/GIMP/Photoshop/etc. one side at a time; and finally mirror one side and skew and scale them so they overlap as well as possible.  If you download and open the SVG image I did, you'll notice I didn't get them well matched... I didn't bother, because the pictures were cropped, and not the full board.  If this stage is done well, the rest is easy; if this stage is not done well, the end results won't be too helpful either.

I've only looked at small breakout boards this way – sufficiently small to be imaged in a single photo – but Hugin might be useful if you need to stitch multiple photos together.  There are many alternatives, of course.
 
The following users thanked this post: loop123

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #14 on: February 13, 2024, 08:26:47 am »
I'm only concerned with IN-, IN+. It goes directly to the center pins of the Omron G6H relay. And looking at the relay schematic, it doesn't even say what the middle pins do.
It is Omron G6G-2, to be specific.  If we look at the relay from above the component side, the pins are
    1  10
    2  9
    3  8
    4  7
    5  6
Pins 2, 3, 4 form one switch, and pins 9, 8, 7 form another.  Pins 1 (+) and 10 (-) are the power to the relay.  Pins 5 and 6 are not connected.

(In my SVG image, the pins are on both sides in this order, because I flipped the solder side image horizontally; as if we had x-ray vision through the PCB, and are always looking from above the component side.)

When the relay is not energized (no current flows between pins 1 and 10, same voltage potential in them), then pins 3 and 4 are connected together, and pins 8 and 7 together.   When the relay is energized (5 V between pins 1 and 10, about 28 mA of current flowing), then pins 3 and 2 are connected together, and pins 8 and 9 together.  (Could also be exactly the opposite: I'm not 100% certain. You can use a multimeter (when the device is completely unpowered and unconnected) to measure if by default pins 3-4 and 7-8 are connected as I think, or whether it is the reverse with 3-2 and 8-9 connected by default.)

This is why this is called a dual-pole, dual-throw (DPDT, or 2P2T) relay.  The two poles are pins 3 and 8, and they connect to the pins on either side, depending on whether the relay is energized or not.

The purpose for this relay is obviously to disconnect the input from the differential signal path when the calibration signal is enabled.  I did not see this relay before, so I thought it was done in the button; but now I think the button simply energizes this relay when the calibration signal is emitted.  This is good, because signal quality will be much better over such a relay than over a manual switch, the relay being completely enclosed with no external moving parts permitting dust/dirt ingress.  You can see the yellow and the red wires are connected to the relay poles (pins 8 and 3), with 10 (-) connected to the ground pour on the component side, and pin 1 (+) connected to the transistor just above and to the left of the relay.  (This is so that only a small current is needed to energize the relay.)

During normal operation, the differential input signal from the red and yellow wires goes through the relay and to the pins just below the poles, and from there, to the two topmost traces in the component side image, just below the three-pin white connector.  The image is cropped so I don't see where they go from there.

I assume that when the calibration button is pressed, the button press energizes the relay, so that the differential input signal is no longer connected, and instead comes from the pin beneath the front panel blue wire.  The connection from relay pin 2 is on the component side, so I cannot see where it is connected to, but I suspect to the signal ground nearby.

Many thanks. Note this was not the same board as before with the ISO122. This is the main amplifier where the ISO122 plugs into. Both have calibration switches. I'll now try to figure out the detour before it gets to the main AMP01 amp. Just want to have idea of the ESD paths inside. Remember you hold the inputs with the hands the whole day, unlike other circuits where it just stays there.
 
The following users thanked this post: Nominal Animal

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #15 on: February 20, 2024, 10:12:05 am »
Hi Nominal Animal,

I spent some hours reading the Inkscape tutorial and loading them up. I was able to load front pcb and back pcb and adjust the transparency. But how can you just flip horizontally the back? Even when I first loaded the back and flipped it. When I imported the front. The front was automatically flipped. It's like all the layers were flipped at the same time. Even locking it and pressing the eye icon doesn't flip only one layer. How did you flip the back only?

And how did you choose the dots and lines in your drawing for the trace? Which option did  you choose the dot and and the lines here?  I was just tracing if the input has an RFI filters at all. Thanks.

2025587-0

 

I don't know how to use Inkscape
Then start with the tutorials.  It is a very useful free tool, as the results are publication quality.

I've started the work for you; just download this loop123.inkscape.svg file.

Attached is how I like to organize my Inkscape, with the abovementioned SVG file open.
If you don't see either of them, you can bring them up via the Object menu, Layers and Objects... and Fill and Stroke....  Afterwards, the icon will bring either toolpad to the top on the right.  The draw vector lines tool is the Pen tool, on the left just under the spiral.

In the Layers and Objects toolpane, when you hover on top of a layer name, three small icons will pop up on the right.  The square one controls opacity (and blend mode); the eye toggles whether that layer (and everything in it) is visible or not, and the lock disables all modifications to objects on that layer when locked.  The lock is extremely useful, because clicking on any visible object not locked will select it, no matter what the layer.

I've more or less placed the two images on top of each other, with the back flipped horizontally.  When you hide it, you see the component side of the PCB, and both component and solder side traces (of the ones I bothered to do for you).  Some you will have to beep out using a multimeter, because they're hidden by the chip sockets or wires.  This is such a simple two-layer board that when you get comfortable with Inkscape, it is only a day's work to unravel the entire circuit.

After you have done that, you can use the Inkscape image to create a schematic for the key components in e.g. KiCAD or EasyEDA.  When you have that, you re-verify the connections by comparing the schematic connections to what your multimeter says when probing those points.  Then, you have the schematic covering the key parts of the design, and you can work out what is doing what, and how.

No, I am not going to do the work for you.  I felt it was correct for me to get you started, because I suggested using Inkscape for this in the first place, and it didn't take me long.  Also note that you can use multiple photographs, and stitch them together –– I like to use GIMP for that –– before placing them in the Inkscape SVG file.  The hardest part is aligning the component and solder-side images.  I feel GIMP's Tools > Unified Transform Tool is better than Inkscape here, because it allows skewing the image by dragging at the corners.  (One pastes all images to the same GIMP image, and uses layers just like in Inkscape.  When complete, make sure only one side is visible, then Select > Select All, Edit > Copy Visible, File > Create > Create from Clipboard..., which one can then crop via Image > Crop to Content, and finally File > Export as a PNG image.  JPEG images are lossy, PNG images are not, and the somewhat larger file size does not matter here.)
 

Offline sparkydog

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: Inkscape pcb tracing
« Reply #16 on: February 20, 2024, 08:57:33 pm »
I spent some hours reading the Inkscape tutorial and loading them up. I was able to load front pcb and back pcb and adjust the transparency. But how can you just flip horizontally the back? Even when I first loaded the back and flipped it. When I imported the front. The front was automatically flipped. It's like all the layers were flipped at the same time. Even locking it and pressing the eye icon doesn't flip only one layer. How did you flip the back only?

Select thing-you-want-flipped and press 'h'. It's not a display operation, it's an edit operation. AFAIK there is no way in Inkscape to just view something flipped.

And how did you choose the dots and lines in your drawing for the trace? Which option did  you choose the dot and and the lines here?

In SVG, "broken" (i.e. dashed/dotted) lines and markers at line vertices are object properties. Don't make a dashed line by drawing each dash! Make sure the "Fill and Stroke" properties pane is visible (ctrl-shift-F) and select the 'stroke style' tab therein. There are several built-in options for 'dashes'. You can also define your own, but for your purposes, you probably won't need to do so.

If you haven't already discovered it, ctrl-shift-V will change the style of the selected object to match the style of whatever you last copied. That's really useful when you just changed the style of one object and realize there are three others you want to look the same.
 
The following users thanked this post: loop123

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Inkscape pcb tracing
« Reply #17 on: February 21, 2024, 02:33:13 am »
But how can you just flip horizontally the back?
Like sparkydog said: you select the one object, then select Object > Flip Horizontal (or press H).

All operations in Inkscape affect the currently selected object.  When you use the Selector tool, the topmost one on the left side (the mouse cursor one), you can click on any object to select it, or press Shift and click on objects to add to or remove from the set of selected objects.  For example, in my SVG file, the background image is object "image837" (I was too lazy to rename them!), and when selected, it is shown highlighted in the Layers and Objects pane, under the Back layer.  (The layer is automatically expanded.)

At the bottom of the Inkscape window, there is a status bar, which will tell you exactly what is currently selected.  When you have an image selected, it will tell you "Image width×height: embedded in layer Layer." with the size in currently selected units (my SVG has them all in "pixels", "px").  Images can also be just linked, or referred to by path.  When you copy or move the SVG file, the image file must move accordingly.
When you have for example all the traces selected on Back-Traces layer, it will say "67 objects of type Path in layer Back-Traces."

And how did you choose the dots and lines in your drawing for the trace? Which option did  you choose the dot and and the lines here?
I showed that explicitly in reply #8, the loop123-stroke.png image:
After you draw a polyline using the Pen tool (the one just under the spiral on the left side toolbar), its properties are shown in the Fill and Stroke pane.  Markers generate the small end dots, Join determines how corners in the polyline are drawn, Cap determines how end caps are drawn (except in this case, they will be hidden by the end dots anyway), and Order determines the order in which fills and strokes and end dots are drawn; I selected the first one, fills on the bottom, then strokes on top of fills, with end markers on top.

There is no fill (on Fill pane, the × is selected, with text No paint shown below); the stroke is red (I use RGB, RGBA = ff0000ff; equivalently RGB = 255, 0, 0, 100; equivalently HSL = 0, 100, 50, 100).

In Edit > Preferences, Tools, Pen Tool, you can select either Last used style, or This tools own style:.  If you like a specific style (here, 2px wide red lines), you can select such a line you have already drawn, and click on the Take from Selection button in that dialog, to set it as the default.

For the markers, the size and shape is dictated by which one you select in the list.  These do not typically "stick", and you need to set them for each polyline separately.  However, you can use Edit > Select All (or press Ctrl+A) to select all objects in the current layer, and then set the end markers for all of them at once.  In other words, you can leave the end markers alone when drawing, and just set them for all traces on the current layer at once.  (On my machine, this is for some odd reason slow, so I do tend to set them immediately when I end a polyline (using right-click).)

If you haven't already discovered it, ctrl-shift-V will change the style of the selected object to match the style of whatever you last copied. That's really useful when you just changed the style of one object and realize there are three others you want to look the same.
Ah yes: equivalent to Edit > Paste... > Style.  Nice!

Until very recently, I used Inkscape 0.92 (in Linux Mint 20.3 Una), and it did not have this feature yet, so this was an useful discovery for me too; thanks!



In File > Document Properties, there are three extremely useful sub-panes:
  • Display

    This lets you define the logical size of the document being manipulated.  When the output is printed media, it is useful to use inches or centimeters or millimeters here, because that way the output is exact.  (If you have a correctly set-up and accurate printer, you can print anything in exact size, including PCB images, from SVG files.)

    When the output is scalable digital media, with no set physical size per se, I like to use the Custom format in pixels (px) with Scale = 1.000.  Then, the ViewBox setting determines the coordinate range displayed.  When opened in e.g. a browser, the ViewBox setting is then the key; the browser will automatically scale the SVG to fit the usable area.  If opened directly in a browser, it will fit the window width; if referred to as an image in say a forum post, it will scale to the post area width.  In all cases, it is as sharp as is possible, with no degradation in quality, no matter how large they are zoomed.  This is because the Paths (polylines and curves) are vector elements, defined mathematically.
     
  • License

    This lets you define the license of the SVG file.  This too is new (compared to 0.92, which I used for years).  I could not set it, because I did not know loop123's stance towards the copyright of the board images.  If I had set it, it would be CC0 Public Domain Dedication, which basically means "Everyone can do whatever they like with this document; the author does not assert any copyrights to it".   In forums like this one, it is especially useful, because it is embedded in the file itself, and specifically lets others know they are free to modify and reuse the image.  In general, the other Creative Commons licenses listed there are equally useful.
     
  • Grids

    Grid is a placement aid, enabled whenever you have Snap to grid enabled.  Each grid is specific to the SVG file being edited (it is stored in the SVG file itself), and you can have as many grids as you like.  Rectangular grid is what you'd expect, and axonometric grid is typically used to define a triangular grid.
    This is basically what makes Inkscape so useful when drawing diagrams and such: you just define a suitable grid, enable snap to grid, and everything you draw will automatically snap to grid intersections.  At any point, you can turn off the grid (# key), or enable/disable snap to grid (% key), and instead use e.g. snap to centers, vertices, intersections, et cetera.

    In this particular case, because we are drawing on top of a photograph, the grid isn't very useful.

I particularly like to use a regular rectangular grid to draw 3D diagrams in 2:1 isometric view:

[img width=128]https://www.nominal-animal.net/answers/cube.svg[/img]

The displayed (optimized) version (cube.svg) is a tiny, 1153-byte file; and the Inkscape original (cube.inkscape.svg) contains the grid and other settings making it very easy to modify.  The reason the displayed version by default scales to the maximum size is that it has viewboxing enabled when saving the optimized version.  This means the SVG file does not claim a specific width or height, only describes its displayed coordinate range (viewbox!).
To repeat, because these are vector graphics, they can be scaled indefinitely large or small without any degradation in the image quality.

The way paths (traces, when tracing two-sided PCBs) can be combined (in all vector graphics programs, not just in Inkscape) means you can eventually combine each connected net to a single path, which in turn helps when tracing pad, via, and through-hole connections.  Personally, at that phase, I would keep both KiCAD/EasyEDA/some other schematic capture program open at the same time as examining the connections in Inkscape, with the board and a multimeter (in either ohms mode, or diode connectivity) nearby, to draw the relevant part of the schematic.

Please note that although I'm familiar with these tools, I did not recommend this approach to solve the underlying problem because I like these tools, but because I've found these tools to be efficient when doing this sort of stuff.  The reason I do not recommend directly trying to capture the schematic, is that it is extremely difficult to see things you do not expect when looking for something; in other words, that directly tracing the schematic based on probing the PCB, is just too error-prone, because of the limitations and nature of the human focus when concentrating on something and expecting a specific result.  (For proof of this, please view the selective attention test youtube video.  I guarantee you will be surprised by the result.)

Instead, the underlying problem is divided into separate tasks where you do not expect anything specific, and are trying to capture all details, keeping your eyes open.  This reduces the number of errors and mistakes, and also lowers the cognitive load (making the task easier), and makes the entire process more efficient.

Yes, there is a steep learning curve, but I assume the way I created the PCB tracks from the two partial images shown, is proof that this approach does work; although the next step, combining the connected traces to single paths, and then using that information to create the relevant schematic, is yet to be done.
 
The following users thanked this post: loop123

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #18 on: February 22, 2024, 01:00:18 am »
Many thanks for the details guys.  Nominal, your explanations are so good you must write books on tutorials of different topics:)

Inkscape is the most counterintuitive software I have ever used. I can easily draw lines in Autocad or Photoshop the first time I used them. But in Inkscape, I have to spent several hours just to be able to draw one line. They could have put "save setting" right at the Stroke Style for example but one need to take detour at other setting and click "Add Selection" for example. Without this. The pen size defaults back to 1.0mm after one draw.

I could draw them now including the dots, no problem. My question is the following.

2028710-0

When I drew the trace. It is automatically saved in for example in the Back or Front folder. But the problem with it is that you can't make the Front pcb appear as well as the traces saved from Back. Did you create the Back Traces folder and manually transfer each trace from the Back to it? (the above is from your example). If yes, how do you select all the dozens of traces and copy them from Back to Back Traces.  If not, how do you make all the traces done in Back saved to Back Traces for example?

Here are my entries.

2028728-1

Here all the traces are saved in Back folder. I need to copy it one by one to the Back-Traces at top? I want it saved automatically to the Back-Traces folder.



« Last Edit: February 22, 2024, 05:05:54 am by loop123 »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Inkscape pcb tracing
« Reply #19 on: February 22, 2024, 05:30:40 am »
When I drew the trace. It is automatically saved in for example in the Back or Front folder.
No, they are not folders!  They are layers.

Think of drawing stuff on transparencies.  In that SVG file, you have four such transparency films: Front, Back, Front-Traces, and Back-Traces, with Front at the bottom and Back-Traces at the top.

(You can drag the layers in the Layers and Objects pane to change their order, or use the and buttons in that pane to move the currently selected layer.)

The nature of SVG files is such that each object can have an unique ID, and Inkscape does assign these automatically.  You can also set those names yourself, as long as each name starts with an ASCII letter (uppercase or lowercase A to Z), followed by any number of letters, digits 0-9, or underscore _.  (Technically, dashes -, colons :, and periods . can also be used, but may cause problems when embedded in HTML files when viewed with certain browsers.)

In Inkscape 1.0, the Layers and Objects pane started to expose the list of objects within each layer.  These objects also have an order, just like the layers themselves, with the topmost object in that list being topmost also visually (but within that layer).  In other words, the object order within the layer determines which objects are drawn on top of other objects; and the layer order determines the order of the layers in the stack of visible objects.

After you select a tool, say the Pen tool (just below the spiral icon), you can see the current settings in the bottom left corner of the Inkscape window.  You can see the Fill and Stroke color, stroke width in Display units, opacity (O:), and the currently selected layer.  There are even copies of the Eye and Lock icon there to show/hide and lock/unlock the current layer there.  (You can change the Display units in File > Document Properties, Display pane, as it typically defaults to millimeters or inches, depending on the template you chose when creating the new document.)

But the problem with it is that you can't make the Front pcb appear as well as the traces saved from Back.
Sure you can!


Did you create the Back Traces folder and manually transfer each trace from the Back to it?
Of course not!

What you do, is select the target layer before you start drawing a new line (or any other object).  For example, in the above image, I have the Back-Traces layer selected.  (You can also see it is selected at the bottom of the window.)

Locking the other layers like I have in the above image is not strictly necessary, but it means the currently selected layer will not change.  Locking means an object or objects in that layer cannot be selected or modified.  Selecting any visible non-locked object will also change the current layer to the layer of that object, so it is easy to "accidentally" change the selected layer if you're not focused; locking the other layers means that won't happen.

If you set the Layers and Objects pane like in the above picture, all new objects you draw will be placed in the Back-Traces layer.

You can use the eye icon in the Layers and Objects pane to show/hide the PCB layers whenever you want, too.  It's just one click away.

The input goes to the switches before it goes to other part. So I need to know the pins of the switches to have idea where it goes out.
When the device is not powered at all, you can use a multimeter (in ohms mode, or in diode continuity mode) to check the switch pin connections in both states –– when pressed, and when not pressed.

(Typically, the voltage across the multimeter pins when in resistance mode is about half a volt, and should not damage any components on the PCB.  The diode continuity mode voltage is higher, but very low current, so it too should be safe.)

Here all the traces are saved in Back folder. I need to copy it one by one to the Back-Traces at top?
To move a bunch of objects from one layer to another, just expand the object list in the Layers and Objects pane, click on the topmost one (of the objects you want to move to another layer), then keep SHIFT key pressed and click on the bottommost one (of the objects you want to move).  This selects them all.  You can then drag them all, just like you would drag a bunch of files in a folder or desktop, to another layer in the Layers and Objects pane.

(Hmm.  I guess that in that sense, it does work exactly like folders in list view.  But the key point is that object order within a layer determines how they are stacked on top of each other, visually; and the layer order determines how the layers are stacked on top of each other, visually.  The eye icon that appears in the Layers and Objects pane whenever you hover on top of a layer name lets you hide an entire layer at once.)

The switches have to be traced to determine if the unit has RFI filter in the input. That is all I wanna determine. It's not to copy the product.
Most of the "intellectual property" of that product is in its component selection and PCB design.  I do not know about Canada, but in Western countries, generally speaking, reverse-engineering the schematic to find out if the product is safe or to verify the product does what it is supposed to do is not illegal at all.

Publishing those schematics, or creating a derivative or replacement based on those schematics, is a murkier issue.  Many Western countries do have exemptions for interoperability and perhaps soon repairability, but they do vary.  On the other hand, biomedical amplifiers are nothing rare or magic: they are well researched in peer-reviewed articles, and their design principles well known.  They really involve a lot of careful design, but no "tricks" or special "innovations"; much more about checking and verifying all the tiny details, than inventing anything novel.
« Last Edit: February 22, 2024, 05:35:55 am by Nominal Animal »
 
The following users thanked this post: loop123

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3361
  • Country: nl
Re: Inkscape pcb tracing
« Reply #20 on: February 22, 2024, 09:52:56 am »
Why are you still using Inkscape? KiCad can import (and scale, and add transparency) for such pictures, and it has already been mentioned at least 3 times in this thread. When using KiCad, you also get all the benefits of a regular PCB design project such as DRC for (among other things) guaranteed clearances between tracks. When doing this in KiCad, you also re-create the schematic along the way, and at the end you will have a fully editable PCB project (and easy to create gerber files and order PCB's and such.)
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Inkscape pcb tracing
« Reply #21 on: February 22, 2024, 12:04:21 pm »
Why are you still using Inkscape? KiCad can import (and scale, and add transparency) for such pictures, and it has already been mentioned at least 3 times in this thread. When using KiCad, you also get all the benefits of a regular PCB design project such as DRC for (among other things) guaranteed clearances between tracks. When doing this in KiCad, you also re-create the schematic along the way, and at the end you will have a fully editable PCB project (and easy to create gerber files and order PCB's and such.)

I already explained this:

Please note that although I'm familiar with these tools, I did not recommend this approach to solve the underlying problem because I like these tools, but because I've found these tools to be efficient when doing this sort of stuff.  The reason I do not recommend directly trying to capture the schematic, is that it is extremely difficult to see things you do not expect when looking for something; in other words, that directly tracing the schematic based on probing the PCB, is just too error-prone, because of the limitations and nature of the human focus when concentrating on something and expecting a specific result.  (For proof of this, please view the selective attention test youtube video.  I guarantee you will be surprised by the result.)

Instead, the underlying problem is divided into separate tasks where you do not expect anything specific, and are trying to capture all details, keeping your eyes open.  This reduces the number of errors and mistakes, and also lowers the cognitive load (making the task easier), and makes the entire process more efficient.

At the core, the reason is the same why one bothers to draw schematics in the first place, instead of just designing the PCB directly.  And, why anyone should bother writing comments in their source code, as after all, the compiler ignores all those and it is thus "wasted effort".  It is all to overcome the human limitations, via clever tool use.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3361
  • Country: nl
Re: Inkscape pcb tracing
« Reply #22 on: February 22, 2024, 01:27:57 pm »
This question:
Why are you still using Inkscape?

Was not for you. (Nominal Animal) but for loop123, the OP.

An you (Nominal Animal) may write:
I already explained this:

Please note that although I'm familiar with these tools,

loop123 apparently has a different opinion:
Inkscape is the most counterintuitive software I have ever used. I can easily draw lines in Autocad or Photoshop the first time I used them. But in Inkscape, I have to spent several hours just to be able to draw one line.

And I guess he does not like Inkscape very much in the first place.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Inkscape pcb tracing
« Reply #23 on: February 22, 2024, 01:35:24 pm »
This question:
Why are you still using Inkscape?
Was not for you. (Nominal Animal) but for loop123, the OP.
And yet, it explains the reason why one should not do it the way you suggest; with even a link to a Youtube video you can view to check if you are prone to the issues the use of a separate program (Inkscape) is supposed to solve.

I suppose you just don't like answers that do not conform to your preconceptions, eh?
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #24 on: February 23, 2024, 02:35:38 am »
Thanks Nomimal. I was able to use all your instructions and got some idea of the circuit. But I don't intend to trace all and reproduce them because I'd just like to know if there is an RFI input. So Inkscape is enough for me. I spent days learning and inputting it. Don't want to do with it with KiCad again. I'm not a regular pcb user.

2030594-0

Earlier. you wrote: " For the markers, the size and shape is dictated by which one you select in the list.  These do not typically "stick", and you need to set them for each polyline separately.  However, you can use Edit > Select All (or press Ctrl+A) to select all objects in the current layer, and then set the end markers for all of them at once.  In other words, you can leave the end markers alone when drawing, and just set them for all traces on the current layer at once.  (On my machine, this is for some odd reason slow, so I do tend to set them immediately when I end a polyline (using right-click).)".

It is very easy to use Edit, Select All and put the dot globally at once. But you mentioned putting dots at every line by right clicking. When I right click below after drawing a line, I got the following, which option which I click to quickly enable dot because you wrote "(using right-click).)" at the end. If you meant going to Stroke Style inside the menu, it would take long to manually put dot at every line.  Thanks!

2030600-1

 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Inkscape pcb tracing
« Reply #25 on: February 23, 2024, 05:21:28 am »
But you mentioned putting dots at every line by right clicking.

Here is the exact steps.  First, I do like I explained above, select the target layer I want the traces to be in, and lock the other layers.  Then I switch the Layers and Objects pane to the Fill and Stroke pane by clicking the icon at the top of the pane area.  Then, I select the Pen tool (the one below the spiral on the left side).  Here is what you see at this point (if you start with a blank document, for clarity):


Next, I left-click on the polyline starting point.  Do not drag; that creates a curve instead of a polyline.  (If you do an accidental click, you can always press Ctrl+Z to undo just the last path point, without canceling the entire path.  Press Esc to cancel the entire path.)  You see the starting point stick, and you can freely place the next path point:


I add each path point to the polyline by left-clicking the end of each new line segment:


Note that you can use your mouse scroll wheel and Ctrl+scroll to zoom in and out without breaking the polyline/curve draw mode.  You can even change layer visibilities.  Let's say this is the final point in this particular trace segment:


At this point, we right-click anywhere in the document area, to tell Inkscape we have added all the curve/polyline points, and this path is complete for now.  This will not add a new line segment, and will just "finish" all previously set line segments and curve segments in the path:


At this point, the newly created path is selected, and you can click on any Marker in the Stroke style tab of the Fill and Stroke pane, to pop up the marker selection tool window:


When you click on a marker shape, you can also change its properties.  (This is particularly useful when using arrowheads.)  Here, I just used the dot marker:


Clicking any other Inkscape window or tool, outside the marker selection tool window, will close the marker selection tool window; I like to click on the clear area below the Fill and Stroke pane for this.  You can then click on the other end marker, and select it the same way, and close it too the same way.  You'll end up with something like this:


If you notice your path points need a bit of moving, use the second tool from the top, Node tool.  This lets you move, add, delete, and convert (from vertex (AKA sharp corner) to curve tangent and vice versa) path points in the currently selected path.  If you have added the markers, those will come along automatically.  If you change the path color (in the Stroke paint tab of the Fill and Stroke pane), the marker colors will change as well.



 
The following users thanked this post: loop123

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Inkscape pcb tracing
« Reply #26 on: February 23, 2024, 06:29:17 am »
In another post, I mentioned that it might be easier to first mark all vias and pins using the Ellipse/Arc tool (the circle one).  When you draw a circle, you can use the Rx: and Ry: to set the semiaxis lengths (half of horizontal diameter, and half of vertical diameter, respectively), and the fill color in the Fill tab of the Fill and Stroke pane.  When you have a suitable dot designed, just Edit > Cut (or press Ctrl+X), and you can paste (Ctrl+V, as usual) them to the currently active layer.  With the Select tool (topmost), you can move them.

In the upper right corner of the Inkscape window, there is a magnet icon for Snapping.  To the right of it is the small triangle for its details:


Click on the Advanced mode to see all the details, and enable only Cusp nodes and Object midpoints.  (If you make sure Bounding boxes is not checked, it does not matter if Edges, Corners, Edge midpoints, or Centers is checked; I just "cleaned up" the others to focus on the two important ones.)  Also make sure the topmost, Enable snapping is checked; you can also press % key to toggle this.


After you have placed all the dots for the pins and vias –– perhaps using slightly different colors to make it easier to see what is what? ––, drawing the trace polylines is much easier, because you don't need to hit the dot exactly; Inkscape will Snap the vertex/cusp/end point to exactly the center of the dot.


I do not know which approach of the two (polylines with end markers; or dots for pins, pads and vias) is more efficient.  One thing to note is that if you do use dots, you can right-click on them and select Object properties..., and rename their identifier (ID:) to something more descriptive, like say "Switch1_pin6".  (Again, it should start with an uppercase or lowercase letter A-Z, followed by any number of letters, digits 0-9, or underscores.  Other characters, including space, can cause issues later on.)

Furthermore, the Title: field in that same pane is also the tooltip text, when you open the SVG file in a browser.  When you hover the cursor on top of that object, the browser will show the tooltip text for you.  Consider it a comment field, as it can contain any text you like.

The same also applies to paths and even images: Inkscape will name paths as pathNNNN by default, and images as imageNNNN, with NNNN an unique number, but you're absolutely free to use better names.  The ID is also shown in the Layers and Objects pane, when you expand the contents of a layer, so functional names (like say ISO122_p5 for pin 5 of ISO122 IC on the PCB) can help a lot.



One important/useful trick: whenever you open an SVG file in Inkscape created by somebody else, or perhaps a program like Graphviz, first unlock all layers, and select Edit > Select All on All Layers (or Ctrl+Alt+A), and then Object > Ungroup (or Shift+Ctrl+G), and repeat these, until the status bar at the center bottom of the Inkscape window says No groups to ungroup.

SVG files do not actually have a concept of "layer"; they only have a "group" concept that Inkscape uses to implement layers.  This means that when you open an SVG file not created in Inkscape, it usually has lots of groups that makes editing it difficult.  Simply ungrouping everything is like separating everything so you can modify them individually.

I habitually use Graphviz to generate graphs from simple text descriptions, and gnuplot to plot curves and 3D surfaces from numerical data; and both can create SVG files you can finesse in Inkscape.  They both do group the elements, so unless you know about the aforementioned "select all on all layers, then ungroup; repeat until no groups left" trick, they can feel horribly difficult to edit.  With the trick, everything in them is editable.

SVG itself is an XML-derived format, and editable as a plain text file in any text editor.  (The current specification is here, but the vast majority of SVG files use only the path elements, with an occasional circle or rect.)
In loop123.inkscape.svg, the bulk of the contents is the two embedded PNG files, encoded in Base64.  I also used Inkscape 0.92 to create it originally, and one of its "bugs" is that it leaves a lot of unneeded metadata and definitions around unless you deliberately "clean" them out.

Instead of using image or plotting libraries to generate graphs or visualization images, I just have my scripts and programs emit SVG instead.
If you look at my home page, the image of Tux is also SVG, and regardless of your device precision (or zoom level, try Ctrl++ and Ctrl+-), it will always be sharp, never blurry like JPEG images; and it is also tiny, just a 21749 bytes total.



I am not saying this to try and make you fall in love with Inkscape and SVG images.  To me, they are only tools that help me overcome the limitations of my rather badly limited brain; that's all.  The learning curve is steep, but because of all the additional things you can do with Inkscape and SVG files, I claim it is worth the time and effort to learn for everyone who creates or modifies images conveying information.

I personally used Aldus/Macromedia Freehand for years (before the turn of the century), then Adobe Illustrator for a few years, before ever touching Inkscape.  They are all vector graphics editors, with plenty of alternatives; with Illustrator being the "professional" commercial software package everything else aspires to beat.

To repeat, I do not create a schematic from PCB images directly, because I know I will miss and mix/confuse the details.  It is just the nature of my focus; I definitely did not see the gorilla in the selective attention video.  Separating the "discovery" phase from the "understanding" phase helps with this, just like explaining a software/hardware development problem you are having to an inanimate rubber duck often helps you reorganize your thoughts and understanding (so that one usually realizes the solution midway through the explanation).

After tracing all the tracks –– and in your PCBs, they do seem to go all over, so I do not believe you can get by with doing just part of the PCB; I believe you will have to trace all the tracks on the full PCBs, even if you are interested in the circuits involving a couple of the ICs only ––, I would draw a small schematic involving those ICs, and how they are interconnected.  For the isolation amplifier, I would do the sensor signal path separately from the calibration signal generation, if at all possible.  My intent there would NOT be to draw the full schematic for the entire PCB, but to use the Inkscape traces to discover the connections, and verify them using a multimeter in ohms or diode connectivity mode.  (The reason for that is again the same: if I use a single source, I am likely to miss/mix/confuse some details.  But, when I use two separate sources, I can cross-check myself and my own work, with an eye open for any discrepancy; and if noticed, I immediately get into the paranoid "okay, I screwed something here, but what and where and why?" -mode.  I WILL make errors, but I use tools to discover them before I rely on the erroneous results, so I have at least a chance to learn from my mistakes.  While the extra steps may seem to be unnecessary work, I do them because without, I will make an unacceptable amount of errors.)

Maybe others do always perfect work in minimal time, but I definitely do not.
 
The following users thanked this post: RAPo, loop123

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #27 on: February 23, 2024, 09:51:02 am »

I'm puzzled. Even if you don't put the dots when drawing lines/traces and you do it globally at once by selecting all objects in all layers and using the marker only once at the end. It will only take a second to put dots in all lines automatically. You said it takes so long. What computer are you using? Celeron? Just to have idea because it will take much longer by accessing marker and putting dots at every line!

Thanks for the tips about Control-Z. It is very useful. I think i'll trace the entire circuit. But with hundreds of crisscrossing lines. Won't it get confusing. Also just because all is traced doesn't mean one can already understand the circuits.

Hope you can really write books because you are so good in explanations. Inkscape Demystified would be a good book for you to publish. Didn't you write any books before?

 
But you mentioned putting dots at every line by right clicking.

Here is the exact steps.  First, I do like I explained above, select the target layer I want the traces to be in, and lock the other layers.  Then I switch the Layers and Objects pane to the Fill and Stroke pane by clicking the icon at the top of the pane area.  Then, I select the Pen tool (the one below the spiral on the left side).  Here is what you see at this point (if you start with a blank document, for clarity):
(Attachment Link)

Next, I left-click on the polyline starting point.  Do not drag; that creates a curve instead of a polyline.  (If you do an accidental click, you can always press Ctrl+Z to undo just the last path point, without canceling the entire path.  Press Esc to cancel the entire path.)  You see the starting point stick, and you can freely place the next path point:
(Attachment Link)

I add each path point to the polyline by left-clicking the end of each new line segment:
(Attachment Link)

Note that you can use your mouse scroll wheel and Ctrl+scroll to zoom in and out without breaking the polyline/curve draw mode.  You can even change layer visibilities.  Let's say this is the final point in this particular trace segment:
(Attachment Link)

At this point, we right-click anywhere in the document area, to tell Inkscape we have added all the curve/polyline points, and this path is complete for now.  This will not add a new line segment, and will just "finish" all previously set line segments and curve segments in the path:
(Attachment Link)

At this point, the newly created path is selected, and you can click on any Marker in the Stroke style tab of the Fill and Stroke pane, to pop up the marker selection tool window:
(Attachment Link)

When you click on a marker shape, you can also change its properties.  (This is particularly useful when using arrowheads.)  Here, I just used the dot marker:
(Attachment Link)

Clicking any other Inkscape window or tool, outside the marker selection tool window, will close the marker selection tool window; I like to click on the clear area below the Fill and Stroke pane for this.  You can then click on the other end marker, and select it the same way, and close it too the same way.  You'll end up with something like this:
(Attachment Link)

If you notice your path points need a bit of moving, use the second tool from the top, Node tool.  This lets you move, add, delete, and convert (from vertex (AKA sharp corner) to curve tangent and vice versa) path points in the currently selected path.  If you have added the markers, those will come along automatically.  If you change the path color (in the Stroke paint tab of the Fill and Stroke pane), the marker colors will change as well.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3361
  • Country: nl
Re: Inkscape pcb tracing
« Reply #28 on: February 23, 2024, 10:30:45 am »

I suppose you just don't like answers that do not conform to your preconceptions, eh?

Nope, that's not it. I disagree here, but don't consider it a preconception. Sure, it is a bit of extra work to re-create the schematic too, but I have done it myself and it's not nearly as bad as you seem to suggest. Parts of the schematic can often beguessed and quickly drawn.  The Images of the PCB will remain the reference during the reverse engineering, and if there is a discrepancy between the schematic and the PCB, it's usually easy to spot differences between the pictures (provided they are of good enough quality) and the drawn PCB tracks.

And in the end, the schematic itself is an extra sanity check. You can analyze the schematic (you can even simulate it) to see if it makes sense. And on top of that you have DRC (and ERC to a lesser extend) as extra tools to check whether everything fits together in a proper way, (or if it does not: to indicate areas that need more attention).

And it's also not just me.
Have a closer look at the last ten minutes by the video linked to by Andy Chee. I agree the video is pretty low on information density. It's mostly a few guys fooling around and having fun. But they do have a workflow close to how I would do it myself (Note I saw maybe 5 minutes of that video).

For KiCad the workflow is mostly:

1. Creating of decent images.
2. Post processing of images. Contrast, removing distortions, etc.
3. Create KiCad project.
4. Put symbols in the schematic. Add meta info to the schematic (RefDes, resistor values, footprint info, etc).
5. Put the footprints on the PCB.
6. Use PCB Editor / Place / Add Reference Image. to add the images
7. Draw the PCB outline (preferably from making physical measurements for the sizes).
8. Pan / scale the image.
9. If it does not fit very well, maybe go back to the first steps. Fitting images are important.
10. Put a few footprints on their proper locations. (Either use the picture or physical measurements as reference).
11. When physical measurements are used, they can be used to spot image distortion.
12. Now you can spot a connection in the image.
13. Draw that connection in the schematic.
14. >[F8] to update the PCB, and then draw that connection as a PCB track.
15. Repeat until finished.

There is a bit more to it. It's just a rough outline of the workflow. Along the way you will want to shift and re-organize the schematic. If pictures are not clear enough you may have to go back to the physical PCB as a reference, maybe even measure parts, Set up net classes, maybe create schematic symbols or PCB footprints, etc.
« Last Edit: February 23, 2024, 10:58:20 am by Doctorandus_P »
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3361
  • Country: nl
Re: Inkscape pcb tracing
« Reply #29 on: February 23, 2024, 11:01:43 am »
And also, there are several other youtube video's for reverse engineering a PCB with KiCad:

https://www.youtube.com/results?search_query=kicad+reverse+engineering+pcb

I quickly skimped though the video below, and it seems to be much better than the earlier posted video link.

 

Offline sparkydog

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: Inkscape pcb tracing
« Reply #30 on: February 23, 2024, 10:53:00 pm »
I had to take about 80 pcb shots just to align the front and back pcb image. The key is trying to get pictures where all the sides are straight.

Go back and re-read Nominal Animal's comment on how Big Clive does it. To wit, get yourself a rig (I don't see why a pinhole is necessary) that lets you a) hold the board level on a steady surface, and b) hold a camera level relative to the board at a fixed distance. This could be as simple as a repurposed cardboard box. Use this to take many pictures of the board with small offsets. Stitch the results together in e.g. hugin. This will get you an image that isn't distorted (it may be rotated, but that's a trivial fix by comparison) and has reduced perspective distortion.

Alternatively, find a photogrammetry program that actually works for you, take a dozen or so photos at various angles, and use that to reconstruct a 3D model. Pop said model into e.g. Blender, rotate it until it's axis-aligned, and use that to generate an orthographic-projection image.

Sure, you might get a "lucky" single shot that's good enough, but proper technique and a little extra work will get much better results more reliably. (That said, just having a simple rig to ensure that the board and camera are level with respect to each other will make your life much easier.)
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #31 on: February 24, 2024, 07:44:42 am »
This may be the last pcb ill ever analyze. How do write text on the pcb bec I want to put label on the diodes path to make clearer. But I tried tracing again and again. The diodes really have this schematics. What could be its purpose? What happens when you have Vin+ of 10 microVolt with Vs+ of 7.2 just separated by a diode? what could be its purpose. Anyone pls give some clue.

2033000-0
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #32 on: February 24, 2024, 10:55:16 am »
After some reflections. Could it be a reverse battery  protector for the circuits? On its default mode. The diodes wont conduct. With reversed battery. It will short v+ and v-. The result being the amplifiers wont get reversed voltage. But if you continue using reverse battery with high current and no fuse. The wire or pcb trace will just burn up?

If the theory is sound. Why is the differential inputs connected to the diodes. Could it be when the input voltage is very high. It will short the inputs resulting in no output?
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #33 on: February 25, 2024, 12:56:21 am »
This may be the last pcb ill ever analyze. How do write text on the pcb bec I want to put label on the diodes path to make clearer. But I tried tracing again and again. The diodes really have this schematics. What could be its purpose? What happens when you have Vin+ of 10 microVolt with Vs+ of 7.2 just separated by a diode? what could be its purpose. Anyone pls give some clue.

(Attachment Link)

The Inkscape tracing is beginning to bear its fruits. The following circuit has the same 4 diodes at input. The purpose appears to be to clamp excessive input voltages to V+ and V-.

2034722-0
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Inkscape pcb tracing
« Reply #34 on: February 25, 2024, 05:47:55 am »
I'm puzzled. Even if you don't put the dots when drawing lines/traces and you do it globally at once by selecting all objects in all layers and using the marker only once at the end. It will only take a second to put dots in all lines automatically. You said it takes so long.
It is slow in Inkscape 0.92, instant in 1.3.2.

I think i'll trace the entire circuit. But with hundreds of crisscrossing lines. Won't it get confusing. Also just because all is traced doesn't mean one can already understand the circuits.
The next step is to select traces that are connected together (by say a trace on the other side), and Path > Combine (or press Ctrl+K), and adjust their color, so each set of connected traces is the same color/shade.

Didn't you write any books before?
Not books, but some teaching materials and such; and I've tutored a few friends in math and physics.

I had to take about 80 pcb shots just to align the front and back pcb image. The key is trying to get pictures where all the sides are straight.
Yep.  A rig to hold the camera is useful.  By "pinhole" –– me fail English ––, I meant that any box or tub with a hole large enough for the camera lens will work; the hole doesn't need to be very large, maybe finger thickness, but a larger hole will work too.  The idea is to put your phone on top of the box or tub, camera down through the hole, so you can move the entire rig to take the pictures.  Makes stitching them much easier.

I just want to figure out the purpose of the diodes (see photos for the third hidden one).
ESD and overvoltage protection!  Such diodes are robust, and you need to really abuse them to get them to short.  Let's say the forward voltage drop of these diodes is about 0.3V.

Any voltage on Vin+ below Vs- -0.3V is clamped to Vs- -0.3V by the topmost diode in your hand-drawn schematic.
Any voltage on Vin+ above Vs+ +0.3V is clamped to Vs+ +0.3V by the second diode from top.
Any voltage on Vin- above Vs+ +0.3V is clamped to Vs+ +0.3V by the third diode from top.
Any voltage on Vin- below Vs- -0.3V is clamped to Vs- -0.3V by the bottommost diode in your hand-drawn schematic.

In an ESD event Vs+ and/or Vs- will vary a bit for a very short time, but the voltage on the Vin+ and Vin- pins will always stay within Vs- -0.3V .. Vs+ +0.3V because of the diodes.

Anyway, is there a command inside Kicad to scan the images with Inkscape traces and just create full KiCad schematics of the components and circuits so you can run the circuit like Pspice?
I don't think so.

To repeat: I personally need the extra step between PCB tracing and schematic capture, to avoid making too many errors.
If I use KiCAD or EasyEDA or whatever for tracing the PCB from the board images, or directly drawing the schematic while examining the traces, the number of errors and details I'll overlook makes me crazy.  I don't like doing buggy work.

From the point you are now, I'd join the connected traces into nets, add the informative text labels, and adjust the trace/net/text colors according to the logical purpose of the net.  Supply rails and ground would each have their own color, so would different input stages.

Only then would I start schematic capture, placing the components first, then using the Inkscape document to check which component pin or pad is connected to which net, and a multimeter to verify non-obvious connections in ohms/resistance or diode/continuity/beep mode.  It is this double-checking that lets me trust my own work.  I know it sounds like extra work, but I do claim that it does help with the selective attention issue when doing direct-to-schematic/pcb-capture, i.e. missing connections or traces because you're too focused on the logical track at hand.  When you are focused on tracking where this track goes, it is too easy to miss the gorilla, say a track continuing through a pin/pad elsewhere.  That is the nature of human focus, and this dividing into steps with double-checking is my way to work around my own limitations.

If others can do equally good job faster or without the extra step, good for them, but I do suspect their bug rate will be higher.

I wonder how you trace the ground. It would be easier to just write Gnd in the pins connected to ground instead of drawing all traces between ground pins making such a huge crisscrossing, isn't it?
I'd use a specific color for ground pins.

I'd also add text labels nearby with the same color, describing each net.

Also how to write text because I'd like to write where Vin+, Vin- is in the inputs.
See the A four down from the spiral?  It is the Text tool, also activated by pressing T.
When that tool is active, you can click on anywhere to place a text element.  A small cursor will appear, and you can just type the text.  The text properties –– font, style, size, row spacing, superscript, subscript, and horizontal and vertical alignment –– are at the top of the Inkscape window, just below the menu bar.
The text properties affect the currently selected portion of the text, so I normally just type the text "blind", select all of it (by pressing Ctrl+A), and then adjust the text properties until I'm happy with it.  By default, the next text element I create will have those new settings.

The same tool can be used to edit existing text elements.  The mouse cursor will turn into a vertical line mark when you hover on top of a text element, and if you click there, you're back in text edit mode, at that point in the text.

Text elements are just like all other objects: they will be placed in the currently selected layer.  So, you'll typically want to lock the other layers, and select the target layer, so that you don't accidentally change the target layer by selecting an existing object on another layer.

If you use a nonstandard font, you can convert any text object into a combination of filled paths, by selecting one or more text objects (with the same text color), then Path > Object to Path (or press Shift+Ctrl+C).  If they all had the same text color, you can combine them into a single path using Path > Combine (or by pressing Ctrl+K, equivalently).  Such path/paths will have no stroke, only a fill, with the fill color being the text color.  However, it will no longer be editable as text; it will be just some elaborate filled combined curves.

Useful trick: when saving SVG files, I always save the master file in Inkscape SVG format, then a copy as an Optimized SVG after converting all text objects to paths.  The Inkscape SVG version is the one I edit, and the Optimized SVG version is the one I publish or import into other programs when needed.  To convert all text objects to paths, simply select any one text object, then Edit > Select Same > Object type (or press Shift+Alt+A), and finally Path > Object to Path (or press Shift+Ctrl+C).  When you save a file, the format is set in the lower right corner, default being Inkscape SVG.  When you use the Optimized SVG format, after you select the file name and click Save, Optimized SVG Options tab will pop up.  I tend to select Convert CSS attributes to XML attributes, Collapse groups, and Work around renderer bugs; in SVG Output tab, Remove comments, optionally Embed raster images (if you want to include any PNG/JPEG/etc. images you had linked to, in the final optimized SVG file), and Enable viewboxing if used for browser viewing – but NOT selected if used for printed media with physical measurements; in IDs tab, Remove unused IDs, and if you defined any IDs by hand, put the prefixes into the Preserve IDs starting with field, separated by spaces.
This is how you can use funky fonts in SVG images and have them show up correctly, just like I have on my home page.
 
The following users thanked this post: loop123

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Inkscape pcb tracing
« Reply #35 on: February 25, 2024, 09:18:17 am »
I'm puzzled. Even if you don't put the dots when drawing lines/traces and you do it globally at once by selecting all objects in all layers and using the marker only once at the end. It will only take a second to put dots in all lines automatically. You said it takes so long.
It is slow in Inkscape 0.92, instant in 1.3.2.

I think i'll trace the entire circuit. But with hundreds of crisscrossing lines. Won't it get confusing. Also just because all is traced doesn't mean one can already understand the circuits.
The next step is to select traces that are connected together (by say a trace on the other side), and Path > Combine (or press Ctrl+K), and adjust their color, so each set of connected traces is the same color/shade.

Didn't you write any books before?
Not books, but some teaching materials and such; and I've tutored a few friends in math and physics.

I had to take about 80 pcb shots just to align the front and back pcb image. The key is trying to get pictures where all the sides are straight.
Yep.  A rig to hold the camera is useful.  By "pinhole" –– me fail English ––, I meant that any box or tub with a hole large enough for the camera lens will work; the hole doesn't need to be very large, maybe finger thickness, but a larger hole will work too.  The idea is to put your phone on top of the box or tub, camera down through the hole, so you can move the entire rig to take the pictures.  Makes stitching them much easier.

I just want to figure out the purpose of the diodes (see photos for the third hidden one).
ESD and overvoltage protection!  Such diodes are robust, and you need to really abuse them to get them to short.  Let's say the forward voltage drop of these diodes is about 0.3V.

Any voltage on Vin+ below Vs- -0.3V is clamped to Vs- -0.3V by the topmost diode in your hand-drawn schematic.
Any voltage on Vin+ above Vs+ +0.3V is clamped to Vs+ +0.3V by the second diode from top.
Any voltage on Vin- above Vs+ +0.3V is clamped to Vs+ +0.3V by the third diode from top.
Any voltage on Vin- below Vs- -0.3V is clamped to Vs- -0.3V by the bottommost diode in your hand-drawn schematic.

In an ESD event Vs+ and/or Vs- will vary a bit for a very short time, but the voltage on the Vin+ and Vin- pins will always stay within Vs- -0.3V .. Vs+ +0.3V because of the diodes.


Why did you ignore the Vs+ of 7.2V and Vs- of 7.2V? Remember the right of the diodes are connected to the power supply. The clamping voltage is about 7.5V +-  (if the diode forward drop is 0.3V) or 8V +- (if the diode forward drop is 0.7V), not 0.3V.

Lets use example of 50V input voltage.

2035358-0

IF the Vs supply is steady enough and able to maintain 7.2V then 50V at input will cause current through R1 and D2 to Vs.
Since forward voltage of the diode is about 0.7V and Vs is 7.2V voltage drop across R1 is

Vr1 = 50V - (0.7V + 7.2V) = 42.1V, right?

Your website doesn't work. No contents inside except your logo and email address like this.

2036474-1

Is your degree Physics? What part of physics do you tutor? I'm interested in physics beyond the Standard Model. And may need your help to formulate a theory.

Thanks for the rest of the Inkscape tips. But I won't continue tracing all circuits anymore. It's enough to know there is no RFI filters at the input. So I want to add RFI filters for now.
« Last Edit: February 25, 2024, 11:46:15 pm by loop123 »
 

Offline sparkydog

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: Inkscape pcb tracing
« Reply #36 on: February 26, 2024, 06:30:37 pm »
I had to take about 80 pcb shots just to align the front and back pcb image. The key is trying to get pictures where all the sides are straight.
Yep.  A rig to hold the camera is useful.  By "pinhole" –– me fail English ––, I meant that any box or tub with a hole large enough for the camera lens will work; the hole doesn't need to be very large, maybe finger thickness, but a larger hole will work too.  The idea is to put your phone on top of the box or tub, camera down through the hole, so you can move the entire rig to take the pictures.  Makes stitching them much easier.

Ah, yes, that's how I expected such a rig would work. Note that "pinhole" has a specific meaning in photography, which perhaps led to some confusion. Here, the goal is just for the rig to have enough structure to hold the phone/camera more-or-less securely. (As a gross oversimplification, the less material you remove for the lens to look through, the more sturdy that structure will be.)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf