Vous êtes sur la page 1sur 3

Gcoil v1.

1
Gcoil is a program which generates Gcode to be used on a CNC coil winding machine or normal milling
machine with a coil winding attachment. Both the spindle and the feeding rails must be CNC controlled.
Gcoil only supports simple cylinder/square coils at the moment.

Usage:
Modify the variables and press Generate. The program will create a file called "coil" in the same directory
as the program. Any existing file will be overwritten. Use the generated Gcode file with a CNC program
such as Mach3 or EMC2. Note that the units in Gcoil must be the same as in the Gcode program. So if the
Gcode program uses inches, use inches as a unit in Gcoil as well.

Program settings:
-File extension: the file extension of the generated file. Use the extension your Gcode program expects.
The format is a normal text file.
-Comment character: The first character used which indicates that a line is a comment and will be ignored
by the CNC program. This is different for each program. This is used to add layer number information to
the Gode. Available when "add layer number" is enabled. The most common comment character is "(".
This character will be automatically terminated with ")".
-Add layer numbers: layer number information will be added to the Gcode with a comment character so
the CNC program will ignore that line.
-Amount of turns: the amount of turns your coil must have.
-Coil length: the length of the coil. This will determine the working area of the feeder. Note that this is not
necessarily the same length as the bobbin. For example, when using insulation material between layers of a
multilayer coil, the length of the bobbin must be greater then the length of the coil.
-Bobbin diameter: the outer diameter of the bobbin where the first layer is applied. Together with the max
wire speed, this is used to calculate the spindle speed when the spindle speed is set to variable.
-Wire diameter: the diameter of the wire used, including the insulation. Use a micrometer to get an
accurate value. The wire will never touch the previous winding with zero space between it. Therefore a
slightly larger value than the actual wire diameter must be entered here. The correct value must be found
by experimentation.
-Wire speed: the travelling speed of the wire. Together with the bobbin diameter it is used to calculate the
spindle speed. This will give a constant wire feeding speed which will create constant tension on the wire
as the amount of layers increases. Available if variable RPM is selected.
-RPM: the RPM of the spindle. Available if fixed RPM is selected.
-Feeder start position: the position of the feeder when starting the winding procedure. This is where the
centre of the feeder nozzle lines up exactly with the start of the winding. The real starting position is
calculated by the program using the wire diameter.
-Feeder offset: The offset the feeder will have from the normal position when winding. This is to allow for
feeder nozzle or pulley play (runout) and will make the coil more tightly wound.
-Feeder axis: the stepper motor axis which is connected to the feeder.
-Spindle axis: the stepper motor axis which is connected to the spindle.
-Add insulation layer routine: add code which will pause the machine so you can add an insulating sheet
between each layer for a multilayer coil.
-Pause command. The type of M code which will instruct the CNC program to pause movement. The type
of pause command depends on your CNC program settings. Available commands are: M0 (program stop),
M1 (optional program stop), M6 (tool change).
-RPM during routine: The RPM at which the spindle will rotate while applying an insulating layer. 6 is a
good value to start with. This is for only one rotation.
-Material thickness: the thickness of the insulation material.
-Overlap: The amount of overlap of each insulation layer with itself. This is to calculated the amount of
insulation material needed and does not make a change to the Gcode.

The settings are saved in a file called “settings_coil.dat”. Do not modify this file manually. If the file
becomes corrupted, delete the file and restart the program. A new settings file will be automatically
generated.
Insulation layer routine:
To be used when using multilayer coils which will be subjected to high voltage.
Before starting with each layer, the machine will pause. A layer of insulating material can now be added
and secured using adhesive tape. When the machine is started again, the spindle will rotate slowly for 1.5
revolution. During this time the insulation sheet can be guided onto the bobbin or the alignment can be
checked. Then the machine will stop again. Now the wire location must be checked so that it doesn't end
up on the wrong side of the previous winding. When the machine is started again, it will run at full speed
to complete another layer.

Axis logic:
Gcoil and subsequently your CNC program will treat your coil winding machine as a normal CNC milling
machine. Therefore you have to be very careful which axis you use. It is recommended to include limit
switches in your machine. Because of the fact that the spindle motor is seen as a linear axis and not as a
true spindle or milling head, the position value in the CNC program will reflect the amount of turns instead
of the distance travelled. The reason for the spindle being treated as a normal axis instead of a milling head
is because not all controller boards can handle spindle commands or any other type of 4th axis.

Handling thin wire:


When handling very thin wire, care must be taken not to break the wire when running the machine. There
must be a certain amount of friction between the source coil and it's axis to provide adequate tension
during winding but too much can break the wire. For this use the acceleration and deceleration values of
the CNC program. A small acceleration value prevents the wire from breaking. Use a small deceleration
value when using a large heavy source coil if it has very little friction with it's axis. This is to prevent the
source coil from continuing to rotate due to inertia when the spindle is decelerating which can cause the
wire to tangle up. A good accelerating/decelerating value to start with in 1 RPM/min (1 unit/min).

The acceleration and deceleration is handled by your CNC program as there is no Gcode for it. The
difference in variables like acceleration/deceleration will be very different from a CNC milling machine. It
is therefore advisable to use different configuration files for the two machines when using the same CNC
program.

Output variables:
The program outputs several variables:
-Amount of layers. The amount of wire layers needed to complete the coil.
-Minimum flange diameter. The flange size needed for the coil to fit onto the bobbin.
-Max RPM generated. Useful when using the variable RPM setting.
-Total wire length. The amount of (copper) wire needed.
-Total insulation length. The amount of insulation material needed.
-File generated. The name of the file, in the same directory as the program.

If you want to make a single layer coil and the amount of layers is more then 1 (taking into account
rounding errors) then the relation between bobbin length and amount of turns is incorrect.

CNC program setup:


For the feeder axis, the amount of pulses per unit travelled must be set as normal. For example: the stepper
motor has 1.8 degrees of rotation per full step. This means that a full rotation needs 360/1.8=200 steps. If
the driver board has 1/8th micro stepping enabled, there are 200x8=1600 steps needed for a full rotation. If
the leadscrew has a pitch of 3 mm per rotation, then the axis will travel 3 mm per 1600 steps, which is
1600/3=533.333 steps per mm. So the value entered for steps per unit is 533.333 in this case.

For the spindle axis, the amount of pulses per unit travelled must reflect the amount of pulses per rotation
instead. For example: the stepper motor has 1.8 degrees of rotation per full step. This means that a full
rotation needs 360/1.8=200 steps. If no micro stepping is enabled, then 200 must be entered in the box for
steps per unit.

Disclaimer:
Adding insulation layers or applying back pressure to the wire with your fingers involves moving your
limbs close to moving parts. This is very dangerous and no responsibility on part of the author is taken
resulting in any type of injury or other damage done.
This program can potentially damage your machine or make it behave unpredictably. Therefore it can
cause serious personal injury and damage to hardware. Use this program at your own risk. The author is
not responsible of anything whatsoever related to this program.

Both the program and it's source are provided free of charge and with no license.

Please provide any bug reports to: schouten.tjeerd-at-gmail-dotcom

Vous aimerez peut-être aussi