My almost completed pcb design in KICAD requires a coil which needs to be accurate in dimension (coil is optimized using a optimization calculation algorithm developed in our lab which needs to be realized as is). If I draw using gui tools in KICAD, it is hard to make it accurate in terms of coordinates even with lowest possible grid size. I am looking for something similar to Allegro PCB editor where we can draw traces using instructions in KICAD. I believe it is possible since, I saw a python console in Pcbnew tool. Can somebody help with any information or tips that can at least draw lines with coordinates provided in instructions?

  • \$\begingroup\$ How accurate do the coil dimensions need to be? \$\endgroup\$ – Andy aka Jul 5 '17 at 18:53
  • \$\begingroup\$ variation of 0.001 mm is acceptable. If I use coordinates to draw the line, trace segment length will be accurate and calculation of length, width would be much easier. That is why I need to know if it is possible to draw using commands or instructions KiCad \$\endgroup\$ – sbz Jul 5 '17 at 19:04
  • 1
    \$\begingroup\$ How will you control PCB thickness, warping and copper thickness variations. What about PCB dielectric unknowns and triboelectric effects? What about proximity to other components affecting things? I mean if you need an accuracy of 0.001 mm, other variations are going to make a mockery of it. \$\endgroup\$ – Andy aka Jul 5 '17 at 19:07
  • \$\begingroup\$ I need to make it dimensionwise accurate. Calculation of inductance is of not that important since it is a prototype. clearance between the traces, length of the traces and width of the traces is important at this point. If you know any commands or instruction that can help draw the traces based on coordinates will help. That is why I name the variation in terms of mm (unit of dimension). \$\endgroup\$ – sbz Jul 5 '17 at 19:13
  • 1
    \$\begingroup\$ Good luck getting a board made with anything like that accuracy, 0.1mm track and gap is about as small as is cheap, 0.05 or so is pretty much state of the art, 1um (a few wavelengths at typical PCB photo lithography wavelengths) is fiction. Remember also that traces are not rectangular in section, being more trapezoidal, this is inherent in the process. You can draw it but good luck finding someone who can make the thing. \$\endgroup\$ – Dan Mills Jul 5 '17 at 20:28

You can use the Python console like this:

import pcbnew
from pcbnew import wxPointMM
board = pcbnew.GetBoard()
tracks = board.GetTracks()
new_track = pcbnew.TRACK(board)

Alternatively, you can click on a track in pcbnew and type 'E' (or right-click and select Properties) Selecting Track Properties

This will bring up the Track and Via Properties window where you can choose the start/end positions to finer than the user grid. Track and Via Properties

  • \$\begingroup\$ I will try the Python code in the console. But I already tried the alternative way you mentioned. Selecting trace and pressing 'E' is for changing the trace width. May be my hot keys are not like yours. But, I believe Python Code should work \$\endgroup\$ – sbz Jul 5 '17 at 21:23
  • \$\begingroup\$ If you are in the "Legacy Canvas" mode, the 'E' hotkey will change track width. You can select the OpenGL canvas (where all new development is happening) by going to "View" -> "OpenGL Canvas". This will allow you to edit the track properties as I show above. \$\endgroup\$ – Seth Jul 6 '17 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.