Repository navigation
Getting Started
The generator is pure Python (3.11 to 3.15) and needs only numpy. There is also a Web Tool that needs no installation.
python -m pip install -r requirements.txt-
Open
Generators/Single Coil Set Generator/Parameters/and look at the files you can edit:Board_Parameters.py,RX_Parameters.py,TX_Parameters.py,Rotor_Parameters.py,IC_Parameters.pyandSilkScreenSuggestion_Parameters.py. The Parameter Reference Single Coil Set Generator explains every setting. The defaults already build a board. -
Go to the
Generators/Single Coil Set Generatorfolder and check the parameters without writing anything:cd "Generators/Single Coil Set Generator" python Generator/Run/RunCoilGenerator.py --check
-
Generate the boards:
python Generator/Run/RunCoilGenerator.py
-
Open
Stator.kicad_pcbandRotor.kicad_pcbfrom the new folder inGenerators/Single Coil Set Generator/Output/with KiCad 7, 8, 9 or 10. KiCad reads each board's design rules from the project file next to it (Stator.kicad_pro,Rotor.kicad_pro). See KiCad Compatibility.
python Generator/Run/RunCoilGenerator.py # Check, then write Stator + Rotor
python Generator/Run/RunCoilGenerator.py --check # Check only, write nothing
python Generator/Run/RunCoilGenerator.py --stator # Only the stator
python Generator/Run/RunCoilGenerator.py --rotor # Only the rotor (the stator geometry is built but not written)
python Generator/Run/RunCoilGenerator.py --no-color # Plain text, no coloursWhether a warning about the finished boards (a clearance, the board edge, the page, the rotor) stops the run is not a command-line option any more: set
GENERATOR_MODE to "strict" in Board_Parameters.py (the default "normal" writes the boards anyway).
Colours: red = error (nothing is written), yellow = warning, green = success.
The analyser and optimizer are not on main. They are under construction on the analyser_and_optimizer branch.
The generator runs from any folder; it finds the other folders itself. A run never overwrites anything: if the output
folder name already exists, __1, __2 and so on are added. See
Project Output Organization.
- The parameters are checked (Checks, Errors And Warnings).
- The RX coils and their fingers are built, then the TX coil with its terminal where it keeps the largest gap from the RX copper (with
RX_TABS = "single", as close to the two fingers as the clearance allows). The board is turned so that the terminal sits at 0° (to the right), and the finished copper is checked. - The rotor is built and checked.
- The electrical estimate is printed and checked against the receiver IC limits in
IC_Parameters.py. - The run decides: any error stops it (nothing is written); with
GENERATOR_MODE = "strict"every warning about the finished boards counts as an error, and--checkstops here on purpose. - The boards and
Parameters.txt(the summaries, every value used, and copies of the parameter files) are written. - Then a lead-cutting suggestion is drawn on the silkscreen of the stator: where to break each RX coil and where the
TX ends get their vias. It changes no copper and never stops a run; the coordinates are printed and added to
Parameters.txt. See Silkscreen. - Last, two SVG pictures of the boards are drawn into the same folder:
<folder name>_Representative.svgto look at, and<folder name>_Actual.svgwith the copper 1:1 in mm. A picture that cannot be made is only a warning; the boards are not affected. See Output Pictures.
Every board carries a filled-in KiCad title block. There are no terminals or pads: you break the coils out yourself, where the silkscreen suggests or wherever you like.
Note
Every model and estimate in this project is unvalidated against hardware. Test boards are ordered and have not been measured yet.
The Dual Coil Set Generator builds two coil sets on one stator (a coarse inner set and a fine outer set, each with its
own IC) and one rotor disc with two rings. It uses the Single Coil Set Generator's own code, so both folders must stay
next to each other. Its settings are the files in Generators/Dual Coil Set Generator/Parameters/
(Dual_Board_Parameters.py, Dual_RX1 / Dual_RX2, Dual_TX1 / Dual_TX2, Dual_Rotor1 / Dual_Rotor2, Dual_IC1
/ Dual_IC2 and Dual_SilkScreenSuggestion_Parameters.py). The defaults build a 1x / 16x board.
cd "Generators/Dual Coil Set Generator"
python Dual_Generator/Checks/Dual_CheckParameters.py # Check the parameters only
python Dual_Generator/Run/Dual_RunCoilGenerator.py # Check, then write Stator + Rotor
python Dual_Generator/Run/Dual_RunCoilGenerator.py --check # Check only, write nothingThe options --stator, --rotor and --no-color work as for the Single Coil Set Generator. Each run writes a new
DualCoil_... folder in Generators/Dual Coil Set Generator/Output/, with the boards, Parameters.txt and the two
output pictures. Start with the
Quick Guide To Parameters Selections - Dual Coil Set Generator.
- Pick the loop count for your use: Choosing A Rotor And Stator.
- Understand the features: Stator Features, Rotor Features, Board Features, Silkscreen, and the same for the Dual Coil Set Generator.
- Check and improve a design (analysis and optimization are under construction): Suggestive Analysis And Optimization.
| Previous | Next |
|---|---|
| Contents | Web Tool |
Code: PolyForm Noncommercial 1.0.0 · Web Tool: PolyForm Strict 1.0.0 · Docs and images: CC BY-NC-SA 4.0 · Output of the tool and commercial use: 0.2 % commercial terms or written permission (License) · Repository
Start Here
Working Principle / Mathematics - Generator
Design Guide - Single Coil Set Generator
Design Guide - Dual Coil Set Generator
- Stator Features
- Rotor Features
- Board Features
- Dual Layout
- Silkscreen
- Quick Guide To Parameters Selections
Reference
- Parameter Reference Single Coil Set Generator
- Parameter Reference Dual Coil Set Generator
- Checks, Errors And Warnings
- Electrical Estimate
- Suggestive Analysis And Optimization
- Project Output Organization
- Output Pictures
- KiCad Compatibility
- Regression Testing
Research And Community
