Arduino telescope focuser

My goal was to use Arduino board to drive a stepper motor (from an old printer) that would be controlled via PC or hand held remote. Bipolar stepper motors can not be controlled directly with Arduino board so I had to use additional driver circuit (Allegro A4983). Ardunio feeds driver with three signals: step, enable and direction which determine the angular speed and direction of rotation. Remote has six buttons but so far only four are used for increasing/decreasing speed and movement control. Computer communicates with board over RS232 port with ASCOM drivers made by ejholmes. ASCOM standard is used in many astronomy software like MaximDL, Sharpcap,.. so you do not need additional software to control focuser.
Focuser works better than expected and is mainly used during imaging planets and DSO objects. Focusing by hand at that time is less accurate and almost impossible. The whole project costed me few € because I already had everything at home except a shaft coupler.Link to a source code for the focuser. Fell free to use, improve and comment, your feedback is desired.

Here is a picture of my telescope focuser with one of the focuser knobs removed and motor focuser attached instead of it. The motor’s and focuser’s shaft are joint directly by a shaft coupler.

Motor and circuit attached to focuser and telescope, ready for test under clear sky.
6-button remote, connected to Arduino by two 4-wire stretchable telephone RJ11 coiled cables.
Focuser wiring diagram

Helpful links at building this device:

More pictures in gallery
Ejholmes github site for ASCOM driver