Skip to content

Getting Started

github-actions[bot] edited this page Nov 11, 2026 · 14 revisions

3. 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.

3.1 Install

python -m pip install -r requirements.txt

3.2 First Run

  1. 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.py and SilkScreenSuggestion_Parameters.py. The Parameter Reference Single Coil Set Generator explains every setting. The defaults already build a board.

  2. Go to the Generators/Single Coil Set Generator folder and check the parameters without writing anything:

    cd "Generators/Single Coil Set Generator"
    python Generator/Run/RunCoilGenerator.py --check
  3. Generate the boards:

    python Generator/Run/RunCoilGenerator.py
  4. Open Stator.kicad_pcb and Rotor.kicad_pcb from the new folder in Generators/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.

3.3 All Commands

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 colours

Whether 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.

3.4 What Happens In A Run

  1. The parameters are checked (Checks, Errors And Warnings).
  2. 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.
  3. The rotor is built and checked.
  4. The electrical estimate is printed and checked against the receiver IC limits in IC_Parameters.py.
  5. 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 --check stops here on purpose.
  6. The boards and Parameters.txt (the summaries, every value used, and copies of the parameter files) are written.
  7. 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.
  8. Last, two SVG pictures of the boards are drawn into the same folder: <folder name>_Representative.svg to look at, and <folder name>_Actual.svg with 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.

3.5 The Dual Coil Set Generator

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 nothing

The 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.

3.6 Next

Sinusoidal Coil Generator logo, click to see it spin

Previous Next
Contents Web Tool

Clone this wiki locally