Arduino Focuser 2

This is a simplified version of the Arduino Focuser, no Rotary encoder, no keypad, no LCD readout.

I'll describe the basic connections and setup, details left up to you...

Parts: 

--Arduino (Uno, others untested) 

--Stepper driver: ( e.g. Pololu A4899 or  DRV 8825   

      https://www.pololu.com/product/1183 or https://www.pololu.com/product/2982 )

--Stepper motor:  I have found geared steppers to be an excellent choice.  They have more torque with much less weight and the planetary gearbox provides great holding strength so power does not need to be maintained (continuous hold) on the stepper between moves.  

   (e.g. RobotShop Unipolar Stepper   or  StepperOnLine Geared Stepper )

--Connectors, cables, jumpers, power supply, enclosure, mechanical couplers, mounting brackets, etc....

 This was very helpful for mounting:  https://www.adafruit.com/products/1297  

  If perfect alignment is too difficult a zero backlash coupler can help:  ebay coupler  

Basic Wiring diagram

NOTE: the use of 12volt supply.  This will need to be capable of supply current for the stepper motor (Check your motor specifications).  I have used this power supply scheme for years and haven't had any issues.  

Setup: 

Setup your stepper driver according to manufacturers instructions.  For Pololu drivers set the current limit based on your stepper motors maximum current rating.  NOTE: the voltage rating on the stepper motor indicates the voltage used for the current rating measurement.  With a current limiting driver it is actually better to use higher voltages to achieve maximum torque.  (see: http://blog.inventables.com/p/stepper-motors.html for explanation and great summary of stepper motor wiring).  12 volts is a good choice for obvious 'astronomy reasons'.  

One can test stepper function manually by powering up the circuit, connect ENABLE and DIR to ground. The stepper should be engaged and you should not be able to turn the shaft with your fingers.  Now alternate touching STEP to +5v and ground, the motor should step each time.    

Use:

Download the Arduino firmware from below.   Open in the Adruino editor.  *** Define the pin selections for STEP, DIR and ENABLE on BOTH the main .ino page and the Init.ino page ***.  (Any pin is fine. Default is as pictured above  DIR - 4, ENABLE - 5, STEP - 15).  Upload the firmware to the Arduino.  Select the proper COM port and open the serial monitor.  You should see the firmware version, Reverse setting and the current position.  Enter M 100# and the motor should turn 100 steps and show the position progress.  

Here are the Serial commands:  

G# - returns current position (e.g. P 1234;M false#) at position 1234 and not currently moving

P 1234#  - saves the current position as 1234

M 5678# - moves the focuser to position 5678 (Note: absolute position, NOT number of steps to move) 

R 0# or R 1#  - Toggles the direction.  Reference: R 0 turns motor counterclockwise with increasing position (looking at back of motor, easier to visualize direction when mounted on OTA).  

C 0# continuous hold off, C 1# on.  This can be used to hold the focuser in place but consumes power if running from battery.  Also make sure your current limit is set properly on your stepper driver. 

To use your focuser with focus software you'll need to install ASCOM and download and install the scopefocus ASCOM driver from below.  

Once attached to your telescope you will likely need to adjust some of the stepper parameters.

In particular you'll need to adjust the stepper.setMaxSpeed(xxx) and stepper.setAcceleration(yyy) on the init tab.  For a small stepper 200 for both is a good starting point.  For the stepper in the picture below 200 and 1000 respectively works.  I use a 70:1 geared stepper and use values of 10000 for both.   Just play with settings trying to have smooth gradual start/stop, with reasonable speed and no loss of torque.  Even a small stepper should turn against squeezing the shaft.  

Example : shows basic  connections and use 5 pin DIN connectors/cable for stepper motor. 

(Note: Pulse pin in different location)  

 Latest stable and tested versions are firmware 2.0.0.7 and Driver 6.0.4

Driver 6.0.6

 - added the capability to utilize 2 drivers with a single application (e.g. ASCOMPAD)

 - install both 606 and 606B  

Firmware 2.0.0.7

 - added command for continuous hold C 1# is on C 0# is off.  

 - fixed skipped single steps

Driver 6.0.4

 - allows for setting continuous hold and reverse from driver

Driver 6.0.5 

 - fixed logging error