flatcoilwind Version 1.0

This is a small collection of small MATLAB scripts and functions for drawing flat coil patterns for motors.  

Version 1.0 Initial Release: August 31, 2011

----------
To run it: 

1. Unzip the *.m files into a directory that is in your MATLAB or GNU OCTAVE path.

2. Type 'flatcoilwind' at the command prompt.

3. Adjust the parameters at the top of 'flatcoilwind.m' to change coil geometry.

4. If you want to make files, set "outputpath" to your desired directory.

4. Set fileOutputEnable=1 and fileKicadEnable=0 to create a script file that can be run by EAGLE PCB.

5. Set fileOutputEnable=0 and fileKicadEnable=1 to create a module that can be read by KiCad.

------------------------------------
To import a coil pattern into EAGLE:

1. Start Eagle and make a new board.

2. Select the "Wire" button (next the "T" for "Text") and then select the *straight* wire bend.
   We want the wires to be placed as straight lines.
   
3. Go to File -> Script and navigate to the flatcoil .scr file generated by MATLAB
   An example filename is "flatcoil_31-Aug-2011_01.02.18.scr"
   
4. Click "Open"

5. Every time the "Connect Signals?" box pops up, click "OK"

6. Save and edit your new board.  You are on your own from here!

------------------------------------
To import a coil pattern into KiCad:

1. Start KiCad and click on the "PCBnew" button to start a new board.

2. Click on the button called "Open module editor".

3. Go to File -> Load Module -> Load from File (Import)

4. Navigate to where MATLAB created the .emp file and click open
   An example filename is "flatcoil_31-Aug-2011_00.34.40.emp"
   
5. Select a working library and save the new coil module to the library.

6. Now you can place the coil pattern as a module in a PCB layout.  
   You're on your own from here!


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  
%  Copyright 2010, 2011 Matt Moses   
%  mmoses152 at gmail dot com
% 
%  This file is part of flatcoilwind. 
%
%  flatcoilwind is free software: you can redistribute it and/or modify
%  it under the terms of the GNU General Public License as published by
%  the Free Software Foundation, either version 3 of the License, or
%  (at your option) any later version.
%
%  flatcoilwind is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%  GNU General Public License for more details.
%
%  You should have received a copy of the GNU General Public License
%  along with flatcoilwind.  If not, see <http://www.gnu.org/licenses/>.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%