Skip to content

Script to generate Carl Bugeja styled PCB motors for KiCad with Python

License

Notifications You must be signed in to change notification settings

hstarmans/pcb-motor

Repository files navigation

PCB Motors

Packages to generate a PCB motor, Carl Bugeja style, for KiCad using Python

History

Carl Bugeja shared several projects where eletric motors are made directly using PCBs, see Hackaday and Youtube. Drawing these circuits can be a pain. This scripts automates the fabrication. The scripts only supports Archimidean spirals. Trapezoids are a more popular choise and most likely work better. An implementation/plugin for kicad can be found here.

Install

Install poetry and python

sudo apt install python3 python3-pip
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -

Use poetry to install the dependencies in pyproject.toml

poetry install

Change parameters in the script and run it

poetry run python spiral.py

The script modifies the base_kicad_pcb and creates a spiral.kicad_pcb. This can be opened with KiCad and should contain the motor. This design can be attached to another pcb via Kicad PCB import method. This feature is only available if KiCad PCB is run in standalone mode. Disable the rat's net before doing so. At the moment, the user still needs to add connect the coils using the via's.
It can also be useful to change set the net to the same number as the one you plan to use in the final layout.

Working of the motor

The magnetic field of a circular ring is shown below; fieldloop. The commutation and switching of motor is outlined here. A pancake motor provides an alternative implementations of a PCB motor. It was not used as there is no open source design available.

Ideal number of stator magnets

The optimal number of magnets can be found from this document and goes into depth in the winding factor https://things-in-motion.blogspot.com/2019/01/selecting-best-pole-and-slot.html. The information is based off the paper 'Distribution, coil-span and winding factors for PM machines with concentrated windings' by S.E Skaar et al. and the book 'Design of Brushless Permanent-magnet Machines' by J. R. Hendershot and T. Miller. See the 'recommended reading' list above for more information on this book. The emotor.com glossary page is also useful for reference.

Packing of circles on a circle

https://math.stackexchange.com/questions/942775/how-many-circles-with-radius-r-1-can-be-inscribed-in-circle-with-radius-r-2

Some facts & equations

Standard grade neodymium magnets have a maximum operating temperature of 80 degrees Celsius.
Force between two magnets follows a square law, ideally the PCB is thin!
Heat generated by the PCB equals $P=R \cdot I^2$, here P is power, I is current and R is resistance of the coil.

The resistance of a PCB trace is;
$R = \frac{\rho L}{T W}(1 + \alpha (T_{amb} – 25))$
Here, R is the resistance; L is the length of the trace; T is the thickness of the trace; W is the width of the trace and Tamb is the ambient temperature in Celcius. Alpha is the resistivity of copper which is 0.39 percent for each degree.
Torque is defined as $\tau = F \cdot R$, if the magnets are further away from the center you can excert more force. The magnetic field produced at the centre of a current-carrying coil of 𝑁 turns is;
$B=\frac{\mu N I}{2R}$, here 𝐼 is the current in the solenoid, $\mu$ is the magnetic permeability and R is the radius.

Results

Script creates a 4 layer PCB motor with 6 poles. The front copper layer is shown below,
toplayer
The In1.Cu layer is shown below. The style of these connections is named "Carl Bugeja" styled PCBs.
layer1

Video

A voltage of 5V was applied over the board. The current reached 0.7 amps. Over time the temperature of the board stabilized at 60 degrees Celcius.

Watch the video

Control software

Gateware to pulse the motor can be found here.

About

Script to generate Carl Bugeja styled PCB motors for KiCad with Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages