# Stepper/time equation problem

• Jun 27th 2012, 02:44 PM
Flotilla
Stepper/time equation problem
Hi, I have an equation that I have been staring at for hours. Hope this is in the right section, it's a weird one.
i have a stepper motor attached to a clock to essentially have my clock run at the wrong time. I am trying to come up with a formula to calculate the delay needed to get certain time ranges.

The way it is currently set up the clock takes 4 mins 14 seconds 'real time' to run 60 mins of 'clock time' with the pulse delay set to 1000ms. Every time I send a pulse the clock moves an increment.

I am trying to come up with a formula to adjust the pulse delay to get different running times.

In particular I am trying to get the clock to run 1.97 mins CT 'clock time' for every minute of RT 'real time'

I have worked out a formula for working out the delay on 1 minute of clock time that is almost there but I am now a bit stuck.

1000ms delay / 4.25minRT = 235.294
2000ms delay / 8.5minRT= 235.294

So

10minRT x 235.294 = 2353ms delay
2353ms delay = 10mins RT to do 1 min CT

I want to find out the delay to get 1.97mins CT in 1 min RT

Please, no suggestions for changing the clock design/workings. I am stuck with using this method and need to
come up with a formula to match the setup.

Hope this makes some sort of sense. At help appreciated, especially with workings.

\displaystyle \begin{align*} I\ &=\ \text{increment}\\ \\ &=\ \text{advance of clock-time with each pulse, in milliseconds} \\ \\ &=\ \text{no. of clock-milliseconds per pulse} \\ \\ &=\ \frac{\text{no. of clock-milliseconds}}{\text{no. of pulses}} \\ \\ &=\ \frac{3,600,000}{254}\ \ \text{i.e.}\ \ \frac{\text{milliseconds in one hour}}{\text{one pulse per second for 4 mins 14 secs}} \\ \\ &\approx 14173\\ \\ D\ &=\ \text{required delay} \\ \\ &=\ \text{required no. of milliseconds per pulse} \\ \\ &=\ \frac{\text{no. of clock-milliseconds per pulse}}{\text{required relative speed of clock}}\ \ \text{i.e. so that the higher the clock speed the lower the delay} \\ \\ &=\ \frac{I}{S} \\ \\ &\approx\ \frac{14173}{1.97} \\ \\ &\approx\ 7194 \end{align*}