# Thread: Drive a 1.8 degree stepper at 1 RPM

1. ## Drive a 1.8 degree stepper at 1 RPM

Hi all, my first post and I am more than a little confused.

I have a 1.8 degree step uni-polar motor that I need to turn at exactly 1 RPM. I have wired the motor as a 4 wire Bi-polar motor.

I have worked out that there are 200 steps per revolution and 60 seconds in a min so 200/60=3.3Hz
But when I drive the motor at (what I think is 3.3Hz!) it turns way too slow(maybe 1/10 RPM) What is wrong?
Here is a bit more info on how I am driving the motor

I have made an Astable ocillator circuit with a 555 timer chip, see link
LM555 Timer Circuits

From the calculator on the page I have worked the resistance and capacitor needed to give me the 3.3Hz pulse.

The step is then fed to a stepper motor driver( see link )
EasyDriver Stepper Motor Driver

The only way I can get close to 1 RPM is to drive the motor at about (what I think is!) 25Hz but I need it to be spot on.
Where am I going wrong?

Am so confused any help would be great.

Ceefna

2. Your 'spot-on' frequency is probably 26.666Hz. I think your drive seems to be set to 8 microsteps. This turns your motor into a 1,600 step motor and 1,600 divided by 60 is 26.666Hz.

Mariss

3. Hi thanks for the quick reply, Just timed the motor at 3.3Hz and it took about 6 mins to do a revolution so it looks like you are spot on, 6 times too slow.
Will try it at 26.666Hz and let you know if it fixes the problem.

Thanks

Ceefna

4. Hi again, at 26.653Hz (closest I can get with the resistors I have) the motor does one revolution in 57 seconds but surly it should be going too slow not too fast.

This is a hybrid stepper does this matter?
In the 555 timer link i posted I have used the calculator and got resistor 1 at 214K resistor 2 at 163.7K and a 0.1uf cap giving 26.653Hz so it should be a bit slow not fast.
Do you think this is just tollerances in electronic components?
any ideas?
Ceefna

5. 555 timer circuits are not usually very precise. Component tolerances and drift can easily give you a frequency that differs from the ideal calculation.

I'm not certain what type of capacitor you are using, however typical capacitor tolerances could easily be greater than 10% for certain types.

As for the resistor values, have you actually measured them or are you using standard values?

If you really need a more stable and precise clock source, you may wish to investigate the possibility of using a crystal-controlled oscillator with a divider circuit (and perhaps even a temperature-controlled or compensated crystal oscillator) as your primary frequency standard).

6. H, the capacitor I am using is a tantalum bead capacitor. I have just checked the specs and it has a 20% tolerance! I have been measuring the resistors with a multimeter so I am sure they are ok to 2 decimal places.
I would love to be able to use a crystal-controlled oscillator with a divider circuit how hard would this be to build? would i easily be able to get the desired 26.666Hz frequency?
Thanks so much for all your input.

Ceefna

7. There are many different approaches to generating a 26.666 Hz signal based on a crystal oscillator, and offhand I'm not sure which would be the simplest way.

Presumably you could start with a fairly common 32 kHz crystal that is usually used as the timebase for a digital clock (for example: Crystal 32kHz - SparkFun Electronics) and use some combination of programmable counter ICs to divide by 1229 to come up with 26.662 Hz. Depending on the circuit capacitance, temperature, and other factors, the crystal might not run at precisely 32,768 Hz, so for example if it were able to run at a slightly different frequency, such as 32,772 Hz instead, then that division ratio would give you 26.665 Hz, and so on.

But there's probably a better way to get there than simply setting up an integer division of the starting frequency. For example, the period of a waveform corresponding to 26.666 Hz is 37.5 ms (if I have done my math correctly), or half of that would be approx. 18.75 ms. (if you wanted to achieve a 50% duty cycle, which is probably not necessary for your application).

Inexpensive microcontrollers (for example, PICs) with a crystal-controlled timebase of perhaps 4 MHz (or maybe with a common NTSC TV timebase crystal frequency of 3.579545 MHz) ought to be able to give you timer resolutions on the order of microseconds or even better (disclaimer: I haven't worked with a PIC for five years, and I haven't verified my assertion, but I believe that I'm in the right ballpark). So the microcontroller should be able to generate 26.666 Hz to a high degree of accuracy.

(I just remembered that you're in the UK, so NTSC timebase crystals may not be as common there as they are here, but you should be able to get something similar easily enough.)

Maybe I'm overlooking an even simpler way to get there, though...

8. Of course you could also simply use variable resistance values to trim your 555 circuit, if the frequency drift will stay within your requirements.

9. Many thanks for the reply doorknob, as I have consumed more than one vodka this evening most of your math has gone straight over my head! As you say Pal is the standard here. I had thought about using a trim pot to get the desired timing with the 555 but I really need this to be very accurate so I think my best option is to research the crystal/divider.
As this is completely alien to me am learning as I go.

What I am trying to make is a portable long exposure camera mount. Next yeam I am traveling to the Himalayas and would love the chance to take some once in a lifetime pictures. The conditions in the UK for this thing are poor so if I could build a timer that would pulse the stepper to exactly 1 RPM then with the correct 1436.1 to 1 gearing that would sidereal track perfectly. I know this has little to do with CNC but you guys can control your motors far more precisely than I need.

Thanks so much for your time.

Ceefna

10. It certainly sounds like an interesting idea. Many years ago (1993 IIRC) I built a crude panoramic digital camera that used a stepper motor to control its rotation, but the camera was stationary for each slit scan photo, and so precision drive was not a requirement.

Are you going to use a polar mount for the camera, then?

I'm reasonably certain that some modern telescope drives use a crystal-controlled time base.

Just curious - what level of angular misalignment can you tolerate?

11. Glad you are interested in my project.The mount will be polar aligned then any misalignment can be removed by drift alignment( as long as it is tracking at sidereal rate( 1436.1 mins to the day as apposed to 1440 mins in 24 hours) once I get the motor turning at exactly 1 RPM then the rest of the gearing is 14 to 55. 12 to 48. 12 to 48. 14 to 80 then 12 to 48. Lots of gears but ratios multiplied together give you 1463 to 1.

I have already built an eq fork mount with the motors from a GOTO mount which works perfectly with my 12" telescope but this would be a pain to get in my hand luggage for India!
Just hope you can help me with the know to drive a stepper, the rest of the build is easy.

Ceefna

12. I expect that I can help you put something together that will meet your requirements. I'm thinking that the microcontroller approach will be simpler than the programmable integer divider approach that I mentioned.

Do you have any experience programming microcontrollers (or are you interested in learning)? It doesn't have to be a PIC - something like an Arduino should work as well, and since you can get an already-built-up board you wouldn't have to wire it up from scratch. (I have an Arduino board, although I have not yet worked with it, but it should be fairly straightforward to program it.)

Also, do you need to control anything else along with the motor, or can you dedicate the microcontroller to driving the stepper? And, what kind of controls might you want to have over its operation (or is a simple on/off all that you need)?

BTW, I'm curious about the fork mount that you put together. Did you make it from aluminum or steel or plywood or something else? Do you have a picture or a pointer to some plans?

This is somewhat off topic, but I have a very ambitious long-term plan to build an aluminum, servo-operated, gimballed, two-axis azimuth/elevation fork mount for a small telescope (80mm refractor) that would have an attached digital video camera. My eventual goal is to be able to rapidly slew the telescope in two axes (from horizon to horizon, if necessary) under computer control, so that the telescope and camera can track moving objects in the sky such as birds, aircraft, fireball meteors, satellites, UFOs, and the like. So I'm on the lookout for practical plans for DIY fork assemblies, if you have any suggestions.

Page 1 of 18 123411 ... Last

1. ###### help with a small project - precise 1rpm motor &amp; circut - Page 2 - All About Circuits Forum
03-19-2013, 12:23 AM