Custom Coil Winder Code Question... HELP!

I am building a custom coil winder using a 2560 and 2 stepper motors. The code is pretty simple to wind a coil back and forth by just modifying the multi-stepper example that is with the AccelStepper Library.

My problem is that i want to custom wind a coil in 1 direction... so i want to turn the winding motor until the wire guide runs across the width of the coil then stop the winding motor and move the wire guide back to 0 and then start winding again so every layer is in 1 direction and i need to wind about 500 wraps...

help need with the code to stop the winder and move the guide quickly back to zero then start both again at normal speeds...

any guidance is greatly appreciated!

The code I used is the multi-Stepper sketch in the AccelStepper library no need to repost it here..

There is a need, there are several versions of most libraries and we need to be talking
about the same thing, and to know we are talking about the same thing. Post a link.

How is that going to work? When the wire guide moves back to 0, there will be a 'pull' on the wire from the opposite end. Because of that, the wire will not tend to wind at the 0 position. Seems to me that it would have to be anchored at 0. Then the wind restarted. Without that I imagine a mess. - Scotty

this is the code i modified to wrap back and forth..

http://www.airspayce.com/mikem/arduino/AccelStepper/MultipleSteppers_8pde-example.html

// MultiStepper.pde
// -*- mode: C++ -*-
//
// Shows how to multiple simultaneous steppers
// Runs one stepper forwards and backwards, accelerating and decelerating
// at the limits. Runs other steppers at the same time
//
// Copyright (C) 2009 Mike McCauley
// $Id: MultiStepper.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $
#include <AccelStepper.h>
// Define some steppers and the pins the will use
AccelStepper stepper1(AccelStepper::DRIVER, 50,48);
AccelStepper stepper2(AccelStepper::DRIVER, 53,51);
void setup()
{  
    stepper1.setMaxSpeed(1.0);
    stepper1.setAcceleration(.5);
    stepper1.moveTo(24);
    
    stepper2.setMaxSpeed(10000.0);
    stepper2.setAcceleration(1000.0);
    stepper2.moveTo(1600000);
    
  
}
void loop()
{
    // Change direction at the limits
    if (stepper1.distanceToGo() == 0)
        stepper1.moveTo(-stepper1.currentPosition());
    stepper1.run();
    stepper2.run();
  
}

I changed the variables to match the speed im using it at.. i have two 400 step motors and im also using the big easy driver with default 1/16th step so it takes 6400 steps but i have a sprocket and chain to increase the speed 2:1 so its like a 200 a step stepper.... and 3200 steps now turn 1 360 rotation.

Im winding very small coils of 38 -44 awg. i read that a coil wound in one direction is more powerful than a coil wound back and forth wound so i want to try and test that.

GOHO:
I am building a custom coil winder using a 2560 and 2 stepper motors. The code is pretty simple to wind a coil back and forth by just modifying the multi-stepper example that is with the AccelStepper Library.

My problem is that i want to custom wind a coil in 1 direction... so i want to turn the winding motor until the wire guide runs across the width of the coil then stop the winding motor and move the wire guide back to 0 and then start winding again so every layer is in 1 direction and i need to wind about 500 wraps...

help need with the code to stop the winder and move the guide quickly back to zero then start both again at normal speeds...

any guidance is greatly appreciated!

The code I used is the multi-Stepper sketch in the AccelStepper library no need to repost it here..

There is quite a bit more to coil winding that you have left out. You need to anchor the end of each winding so it will not unwind if you ever release then tension on the wire. Moreover, you need to cover each winding with an insulating material, perhaps paper, then move your wire across the paper to your starting point. Now, wrap another layer of paper over the wire, so you have a nice smooth surface to wind the second layer of wire.

You need to disassemble a transformer of some kind to get an idea of how to wind multiple layer coils.

Paul

Most winding is boustrophodonic, ie back and forth along the bobbin, as this avoids wasting space having to
cross over a length-wise wire. Sometimes (at radiofrequencies) there are other schemes used to reduce
capacitive coupling between layers.

The coding of your motors depends on the physical arrangment of the things they move - with a drawing
of that how can anyone help?

GOHO:
Im winding very small coils of 38 -44 awg. i read that a coil wound in one direction is more powerful than a coil wound back and forth wound so i want to try and test that.

By all means test it but that idea seems contrary to basic electromagnetic theory. Besides, what do you mean by more powerful? The flux generated is proportional to the number of turns and is independent of the direction the winding takes along the axis.

Russell.

GOHO:
Im winding very small coils of 38 -44 awg. i read that a coil wound in one direction is more powerful than a coil wound back and forth wound so i want to try and test that.

Define "powerful" - power might mean more dense winding leading to more current and better thermal
conduction in the winding itself - but that's definitely done boustrophodonically, packing density is
maximized that way. (Although you can trade density in one part of a winding for another, for
instance to cram more wire into a motor slot at the expense of less dense packing outside the motor
stack).

Can you explain the purpose of the coils, I've already hinted RF has more complex requirements
for instance.

MarkT:
but that's definitely done boustrophodonically,

Thanks, I've learned a new word!

Russell.

Its a great word, originally used to describe some ancient scripts which were carved into stone this
way. Ancient Scripts: Word of the Day: Boustrophedon