Get cash back on your astronomy and other purchases: Ebates Coupons and Cash Back

Thursday, February 27, 2014

First Arduino based stepper control for my barn door tracker

I've put together my first prototype for stepper motor control of my barn door tracker.  I used an Arduino Nano V3 compatible and one of the little 5V 28BYJ-48 stepper motors from eBay.  A pair of the stepper motors with driver boards cost about $5.  For the motor's gear I used a 16 tooth 32 pitch pinion gear for an RC truck.  It has the correct 5mm bore.












Yes, I know the circuit looks like a bit of a rat's nest at the moment, but I included several features that I think will be useful.  Once I have it all worked out and put on a PCB, it should (hopefully) be much neater.  I've got a pot for adjusting the speed, a start stop button, a switch to set speed to normal or high, a button to reverse direction, and a magnetic reed switch which I plan to use as an emergency stop when it reaches the end of the threaded rod if I forget to stop it in time.  There are also a couple of LEDs to indicate running and high speed.  I'm thinking of using high speed and reversing to try to do drift alignment.

I'm using a breadboard power supply to provide the 5V for the motor and a 9V 1.5A wall wart power supply to power it all.

For rough alignment I hold a green laser pointer against the wood strip parallel to the hinge line, but I'd like be able to align it better, so hopefully drift alignment will work.

I had a clear night a few days ago and tried out the setup.  The controls worked well and the concept proved good, but I don't think this is the right motor for the setup either.  Whether I took a 5 second exposure or 1 minute, the stars trailed the same amount.  I think there is either too much vibration or the low resolution of the motor doesn't give smooth enough steps.  It could also be slop in the gear train.  This motor only gives 32 steps per revolution, with the gearing of 64:16, that gives 128 steps per minute to turn the big gear one revolution.  If I put my finger on top of the gear, I can feel the vibration as it takes steps.  What do you expect for something so cheap?

I've ordered a SM-42BYG011-25 stepper and EasyDriver from SparkFun. This motor uses 200 steps per revolution and the EasyDriver can do 8 step microstepping (each step is broken into 8 microsteps).  That means this combination can give 1600 microsteps per revolution of the motor.  With the 4:1 gear ratio, that will give me 6400 steps per revolution of the main gear.  Should be much smoother.  Hopefully that will arrive in the next couple of days.

No comments:

Post a Comment