Need Help Arduino controlled Stepper Motor Proportional Control
Looked at the basics via the Arduino website but nothing really covered this method of control.
A stepper motors speed can be altered via the use of proportional control. The feedback sensor is a potentiometer, which should tell the stepper motor when to stop.
Here are the basics of what I know the code must contain
Kp = 1;// the gain of the proportional control must contain a multiple factor
error = Setpoint -actual position; // provides the error value
output = error*Kp; // this will provide the drive for the stepper
The stepper should stop when the setpoint value equals the actual value. So the stepper should move faster to its target the further away it is.
Using a ULN2004A for the driver and have this setup for the circuit.
Any help explaining or showing an example code upon how to accomplish this task would be appreciated. No idea how to make this affect the stepper speed or even do this control feedback. Am in need of some help.