Coil Winder Code Help

Hi,
I am trying to build a NC Coil winder for some projects I have. I have the parts and built the machine but can’t sort out the code. I am very new to coding, while I can mutter through it I just don’t know enough to change what has been done.

Please see attached code .ino file. I found this on “http://openactuator.org/” and it will work for me except for the use of L9110 motor controllers. I would like to use A4988 drivers instead. They will reduce wiring by half, be better on the stepper motors and allow me to use my 24V dc supply.

Can anyone help me!!

Thank you.

OpenCoilWinder.ino (10.4 KB)

It would be worth trying a very simple change first to see if it works.
Change this

Stepper stepperWinder(WINDER_MOTOR_STEPS, 9, 10, 11, 12);
Stepper stepperSlider(SLIDER_MOTOR_STEPS, 5, 6, 7, 8);

to

Stepper stepperWinder(WINDER_MOTOR_STEPS, 9, 10);
Stepper stepperSlider(SLIDER_MOTOR_STEPS, 5, 6);

where pins 9 and 10 are the connections to the step and direction pins on the A4988 (likewise for pins 5 and 6). Or use any I/O pins you wish.

...R

Thank you, I will try this tonight.

The solution sort of works, I got the motors turning, but very slowly and high pitch from each. I also found the motor speed was sum what slow and not sure why it has a limit to 75 rpm. I will mess with motor steps per rev and other functions to see if I can improve it further.

Would you suggest anything else?

Thank you.

Don't worry about the whining noise - that's just the high-frequency current switching by the A4988.

I'm guessing that you have not tried it with the L9110 motor drivers and you don't know whether it would behave differently with them.

Also, are your motors identical to those the program was designed for?

It would be a good idea to try this Simple Stepper Code just to check that your motors are working properly on their own.

...R
Stepper Motor Basics

"http://openactuator.org/"

Thanks for sharing.

I have several recommendation link when first time i try to use A4988 stepper motor driver as a follow :

Goodluck for your next step :).

cheers,
niel.

Almost 200 post's and you can't figure out how to insert a link?

Sorry for the long delay.

Thanks to everyone who replied! I got it working almost perfect every time. My only issue is getting the correct length and winding numbers so I don't over/under travel on windings per length. (Not hard just a little math and experiment).

Thanks again!