My first venture into the world of stepper motors.
I had no problem getting the bipolar stepper (salvaged from a printer) to work via an L293 bridge driven by a Picaxe-18. Variable speed easily achieved by a variable pause between each step (as long as the pause >4ms).
I now need to control the stepper based on pulses from an RC receiver.
150-200 ms pulses for proportional speed control
130-149 ms pulses for locked motor
>130ms for free-wheel (motor off)
The application is a winch on a model tugboat.
The problem is that, during the time that the receiver pulse width is being checked (could take up to 17ms waiting for the next pulse), no motor switching can take place. I currently re-check the pulse width after each 4-step motor drive sequence.
At slow motor speeds this is not a probem, but at fast speeds the delay when reading the input pulse becomes significant,and the motor goes:
step,short pause,step,short pause, step, short pause, step short pause, long pause etc.
What I really need is something equivalent to pwmout which continues to run in the background whilst the input pulses are re-measured.
The only thing that I can think of is another Picaxe dedicated to measuring the receiver input pulses which would send an interrupt to the other Piaxe if there was a significant change.
Any suggestions for a solution greatfully received.
Â
I had no problem getting the bipolar stepper (salvaged from a printer) to work via an L293 bridge driven by a Picaxe-18. Variable speed easily achieved by a variable pause between each step (as long as the pause >4ms).
I now need to control the stepper based on pulses from an RC receiver.
150-200 ms pulses for proportional speed control
130-149 ms pulses for locked motor
>130ms for free-wheel (motor off)
The application is a winch on a model tugboat.
The problem is that, during the time that the receiver pulse width is being checked (could take up to 17ms waiting for the next pulse), no motor switching can take place. I currently re-check the pulse width after each 4-step motor drive sequence.
At slow motor speeds this is not a probem, but at fast speeds the delay when reading the input pulse becomes significant,and the motor goes:
step,short pause,step,short pause, step, short pause, step short pause, long pause etc.
What I really need is something equivalent to pwmout which continues to run in the background whilst the input pulses are re-measured.
The only thing that I can think of is another Picaxe dedicated to measuring the receiver input pulses which would send an interrupt to the other Piaxe if there was a significant change.
Any suggestions for a solution greatfully received.
Â