Script Coils for PCB Engines

PCB inductors are a topic that has come up here at Hackaday a number of times, perhaps most notably in [Carl Bugeja's] electromagnetic feats. But there's still a lot to learn about creating the inductors themselves, and [atomic14] recently investigated creating them automatically by script.

A simple spiral trace is quite easy to create, but when creating, say, a circular array of coils for an electric motor, more complex shapes are required. Drawing a trapezoidal spiral is a surprisingly difficult task for a script, and we face a variety of algorithms to achieve a usable design.

After perfecting the algorithm, how to integrate it into KiCAD? The PCB CAD package has its own built-in Python environment, but it's not the most flexible for development. The solution is to write a simple JSON interpreter in KiCAD and leave the generation of the spiral to an external script that passes a JSON. This also leaves the possibility of using the same code in other PCB packages.

You can watch the whole video under the pause. In the meantime, for more PCB electromagnetism, watch [Carl Bugeja's] Supercon 2019 interview.

Script Coils for PCB Engines

PCB inductors are a topic that has come up here at Hackaday a number of times, perhaps most notably in [Carl Bugeja's] electromagnetic feats. But there's still a lot to learn about creating the inductors themselves, and [atomic14] recently investigated creating them automatically by script.

A simple spiral trace is quite easy to create, but when creating, say, a circular array of coils for an electric motor, more complex shapes are required. Drawing a trapezoidal spiral is a surprisingly difficult task for a script, and we face a variety of algorithms to achieve a usable design.

After perfecting the algorithm, how to integrate it into KiCAD? The PCB CAD package has its own built-in Python environment, but it's not the most flexible for development. The solution is to write a simple JSON interpreter in KiCAD and leave the generation of the spiral to an external script that passes a JSON. This also leaves the possibility of using the same code in other PCB packages.

You can watch the whole video under the pause. In the meantime, for more PCB electromagnetism, watch [Carl Bugeja's] Supercon 2019 interview.

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow