Variable Speed Bipolar Stepper Motor


Senior Member
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.

Ok, so i just quickly read this, and im guessing you are reading the signal into the picaxe from rc reciever, then controlling motors.
an instant thought i had was to use 2 picaxes one reading in from the rc, and then transmitting a serial line, or binary databus over the 8 pins to the other which is controlling the stepper
another idea i just had...

one picaxe reads value from rc reciever, if slow then pin 0 high, fast increses to pin 8 (8 or so steps)
the other picaxe reads the input as pin 0 (slow) rotates slowly, rechecks and so on...

also means you can add other stuff to the boat like lights, smoke for a chimney, or even have a 'passenger' wave using a servo connected to his arm with a rod lol

hope this helps :D


Senior Member
Thanks Roboteernat,a parallel databus would work. If I use a -18 as the "slave", I only have 5 input pins, but that should give enough resolution for the speed control (29 steps for speed, 1 for lock, 1 for free-wheel). Serial communication would probably not work since the motor would stop whilst reading the serial data (for about 20ms by my reconing).
Simple on-off switching is much easier. Just read the pulse width then turn pins on or off according to coded ranges, and switch the load through transistors/relays/MOSFETS. I have made such a system based on -18 with 4 switches (code and PCB available for anyone interested).
I would still like to avoid the complexity of a second Picaxe if possible. Any other ideas?