Pulses to control stepper motor

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
User avatar
Externet
Posts: 1888
Joined: Fri Feb 01, 2002 1:01 am
Location: Mideast USA
Contact:

Pulses to control stepper motor

Post by Externet »

Hello everyone.
Trying to find clues to build a device, I need your suggestions.
My very old car suffers of extensive modifications inflicted by me.<p>Its on-board engine computer puts out 4000 square wave pulses per mile for an inexistent digital speedometer, I need to convert them to 1000 revolutions per mile to make the mechanical speedometer+odometer work.<p>The plan is using a LM 2917 frequency-to-voltage converter chip, and its output should make a stepper motor canibalized from a printer spin accordingly. (4000 pulses must translate to 1000 revolutions)
[The mechanical speedometer output at the transmission is not available any more, now there is a hall sensor in place to feed speed data to the computer]<p>Instead, direct coupling to an interface would mean the stepper motor would have to turn 90º every pulse.<p>Or, any other approach you may brew.<p>Thanks,
Miguel<p>[ March 03, 2003: Message edited by: Externet ]<p>[ March 03, 2003: Message edited by: Externet ]</p>
- Abolish the deciBel ! -
User avatar
haklesup
Posts: 3136
Joined: Thu Aug 01, 2002 1:01 am
Location: San Jose CA
Contact:

Re: Pulses to control stepper motor

Post by haklesup »

You want a divide by 4 digital circuit. You can make one using two JK flip flops (or one Dual). Use a 4027 and you won't have to worry about supply voltage as much. 40xx series logic can run from 3V to 15V<p>Make sure that the pulses from your engine sensor are same or lower voltage than the logic circuits or you could blow the input pins.<p>Using a 4027; pins 10, 11, 16 to Vdd, 4, 7, 8, 9, 12 to ground, 15, 6, 5 tied together, 13, 3 tied together and connected to input (4000Hz signal), Pin 1 is the output and should be 1000Hz. Voila!
User avatar
Externet
Posts: 1888
Joined: Fri Feb 01, 2002 1:01 am
Location: Mideast USA
Contact:

Re: Pulses to control stepper motor

Post by Externet »

Hello and thanks, haklesup.<p>I do not see the 'voilá' at all.<p>Using the ÷4, how do you make a stepper motor turn 360º with every single pulse?<p>Without the division, the stepper motor would need to turn only 90º per each pulse, somewhat less jerky ride, as some smoothness is desired.<p>Unless other opinions, I believe the DC voltage output from a frequency-to-voltage converter chip should control a stepper motor driver speed circuitry.
That is what I don't know how to achieve. A voltage controlled speed for a stepper motor.<p>Miguel
- Abolish the deciBel ! -
russlk
Posts: 563
Joined: Thu Dec 06, 2001 1:01 am
Location: New Hampshire
Contact:

Re: Pulses to control stepper motor

Post by russlk »

What you are looking for is a servo loop. If you have a stepper driver that responds to DC voltage input, you need a generator on the motor shaft to feed speed info back to an analog summer at the input.<p>There is a way to use a DC motor as both motor and generator in a servo loop. The motor is driven by pulses. In between the drive pulses the motor is generating a voltage proportional to its speed. You can read that voltage with a sample and hold and use it as feedback to control the speed.<p>[ March 02, 2003: Message edited by: Russ Kincaid ]</p>
chessman
Posts: 292
Joined: Tue Jan 14, 2003 1:01 am
Location: Issaquah, WA
Contact:

Re: Pulses to control stepper motor

Post by chessman »

What I'm not understanding is: What's the point of the stepper motor??<p>
Is it to turn the shaft of the odometer?<p>If so, the stepper driver circuit could be made to respond to a logic 1 or 0. 1 is on, and 0 is obviously off. Use a 555 chip to generate a constant-length pulse that activates the stepper driver enough to turn the shaft a full 360 degrees. The output of the 4027 (1 pulse every thousandth of a mile) will trigger the 555 to generate that constant pulse.
User avatar
Externet
Posts: 1888
Joined: Fri Feb 01, 2002 1:01 am
Location: Mideast USA
Contact:

Re: Pulses to control stepper motor

Post by Externet »

Thanks Russ; I will explore that route with pulses driving a DC motor.<p>Thanks, chessman; the stepper motor would turn the speedometer+odometer mechanical shaft synchronized to the computer pulsing.<p>Another way I am looking at is the output of the LM2917 F/V converter to feed a LM566 VCO and its square wave output to feed a plain stepper driving circuit.<p>Miguel
- Abolish the deciBel ! -
grant fair
Posts: 184
Joined: Sun Feb 23, 2003 1:01 am
Location: Toronto
Contact:

Re: Pulses to control stepper motor

Post by grant fair »

For reading speed, why not just use a frequency to voltage converter chip and read the voltage with an analog (moving needle type) voltmeter?<p>Grant
Grant
chessman
Posts: 292
Joined: Tue Jan 14, 2003 1:01 am
Location: Issaquah, WA
Contact:

Re: Pulses to control stepper motor

Post by chessman »

I would strongly advise against a frequency/voltage converter. The typical frequencies you would experience would range from 2Hz to 16Hz. It would take a hell of a circuit to get the accuracy required at this range of frequencies.<p>The way I would go is to have the 4027 divide the 4000 pulses/mile to 1000 pulses/mile. This chip would feed a 555 timer configured in one-shot mode. The 555 would feed another 555 (a dual 555 chip could be used...) set up as monostable. This 555 would send a series of pulses to the stepper driver circuit.<p>The exact length of all these varios pulses depends on the driver circuit and the actual limitations of the motor.<p>Basically, I don't think you will get the results you are after from a frequency/voltage converter.
User avatar
Externet
Posts: 1888
Joined: Fri Feb 01, 2002 1:01 am
Location: Mideast USA
Contact:

Re: Pulses to control stepper motor

Post by Externet »

Thanks, Grant.
If I am going to such effort for such a simple thing, I prefer to go all the way and have the odometer working too.<p>Thanks, chessman.<p>At 60 miles/hour = takes 60 seconds to run 1 mile
At 6 miles/hour = takes 600 seconds to run 1 mile<p>The main frequency range expected is from
4000 pulses/mile ÷ 60 seconds/mile = 66.6 Hz
down to
4000 pulses/mile ÷ 600 seconds/mile = 6.66 Hz<p>Which appear, as you say, somewhat low to obtain accuracy.
But that's as much as I can think of...<p>I am looking at hardware per Russ's comments too.<p>Digesting, digesting... <p>Miguel
- Abolish the deciBel ! -
Colinr
Posts: 33
Joined: Wed Oct 23, 2002 1:01 am
Location: UK
Contact:

Re: Pulses to control stepper motor

Post by Colinr »

you could use a standard stepper moter driver ic that takes in pulses and rotates the moter one position per pulse now it depends on your stepper motor ie How many steps per one full rotation normally this is either 24 or 48 <p>For 48 steps you will need to multiply the input signal by 12 to get the motor to tern 90 deg per step and by 6 for the 24 steps per revelotion. <p>Thier are several ways to multiply the frequency but to specify on more information is needed on the input pulse signal.
rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: Pulses to control stepper motor

Post by rshayes »

I have seen a very few 90 degree stepping motors in military surplus. I suspect that the torque would be quite low for these units. Stepping motors also do not like inertial loads at high stepping rates.<p>The low speeds are the problem, as well as the wide ratio of speeds, possibly 20 or 30 to one. These would make a multiplier based on phase locked loops very difficult to design and slow to respond (possibly tens of seconds).<p>One possibility would be to drive the speedometer with a DC motor, possibly geared down, since DC motors don't like running at low speeds. A pickoff on the odometer shaft could be used to generate 4 pulses per revolution. These pulses could be compared to the input pulses by using an up-down counter. If the count was substantially above zero, the DC motor's speed would be increased until the pulse rates were equal. Operation might still be rather erratic at low speeds, however.
L. Daniel Rosa
Posts: 400
Joined: Tue Dec 25, 2001 1:01 am
Location: Bellingham, WA
Contact:

Re: Pulses to control stepper motor

Post by L. Daniel Rosa »

Perhaps the information is there and I didn't see it... Is this a viscous coupling speedometer connected to the odometer? If so, then making the odometer work properly will do them both. 4000 pulses per mile is ideal for a 90° per step motor driver. The odometer won't be much of a load, and if changing speeds does bother the stepper the errors may come close to cancelling. I don't know what you'll choose for controlling the stepper, but if you decide on a µC you might consider one with non-volatile ram and using a digital readout. I hope my opinion is worth 2¢.<p>Dan
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests