Ardufocus is a full open source Moonlite compatible automatic focus controller. The source is still under heavy development so things move around a bit.
After buying the CCD, filter wheel and filters I was broke but still wanted to have an automatic focuser.
This was a very important part of the design as I didn't want to spend time and effort dealing with ASCOM and INDI drivers, the Moonlite focuser is a well known, reputable rock solid focuser. The serial protocol used by them was easily reversed engineered (plain ASCII) and most of it was already documented on the Internet.
Another big point was to made it as cheap as possible recurring to as few parts as needed. That's the reason why the 28BYJ-48 stepper motor was chosen, out-of-the-box using the ULN2003 gives you a really cheap (less than 2€) focuser for medium loads (380gcm). If you require the focuser to driver heavier loads (800gcm) then the motor itself can be modded into a Bipolar stepper motor and driven by the A4988 step stick which will cost you less than 1€.
Using off-the-shelf components such as the Arduino Nano and easily available parts Ardufocus is aimed to be build by anyone with a soldering iron and some patience, no degree in electronics required.
It was built on top of a standard ATmega 328 Arduino such as UNO, Pro or Nano; currently it does not support the Mega or any other ARM based board.
Currently it supports two main motor/controller configurations:
- Bipolar stepper motor with a A4988 driver
- Unipolar stepper motor with a ULN2003 driver
The option #1 (bipolar/A4988) will allow your focuser to drive bigger loads, the motor used can range from the modified version of the 28BYJ-48 to a NEMA17. If you're on a budget or have lighter loads then the option #2 (unipolar/ULN2003) combo can be used.
I have no issues driving an ASI1600MMC-Cool with a ZWO EFW8 and a 0.85x field flattener using the modified version of the 28BYJ-48 with a A4988 driver on an ED80 telescope.
This BOM is to be used by the prefboard version of the controller. A PCB specific BOM will be published soon, in the meanwhile check the schematic for specific parts.
Common components:
- 1x Arduino Nano
- 1x Electrolytic capacitor 10uF 25V
- 1x Electrolytic capacitor 100uF 50V
- 1x NTC 10K
- 1x Resistor 1/4W 10K
- 1x DC Power connector (male, female pair)
Bipolar/A4988 components:
- 1x 28BYJ-48 stepper motor (12V version)
- 1x A4988 stepper motor driver module
Unipolar/ULN2003 components:
Optional components:
To connect your controller box to the motor you have two main options, either you use a direct connection and the controller will always be attached to your telescope or you use the following:
- 1x DB9 connector (male, female pair): This will allow the cable to be connected to the motor.
- 1x GX12-4 or GX12-5 connector (male, female pair): This will allow the cable to be connected to the controller box.
There are two main blocks of objects, one being telescope specific will need to have a motor support, a motor cover and the mechanical drive. The second is common among all implementations and it is the controller box where all the electronics are kept safe from the environment.
Have a look at Thing #2446069 to download the latest version and read the print instructions.
Download objects:
I have designed the required mechanical parts to attach a 28BYJ-48 stepper to the Skywatcher ED80 telescope.
Download objects:
The wiring of the focuser has changed since commit 8375767, you should remove any physical conections between the AREF and the 3.3V pin, not doing so may damage your board.
A capacitor is used on the Arduino's reset line to keep it high during serial connect/disconnect which is mandatory for normal operation but in order to flash the firmware to the board the capacitor must be disconnected, otherwise you need to syncronize a manual push of the reset button when uploading to the board.
For the complete Eagle files have a look at the PCB folder, as an alternative you may perfer to build the Preforated Board version. Please note that the dual motor setup is a work in progress and is not yet supoprted by the firmware.
J Archbold (ozarchie) made an alternative PCB design which is available here.
Download the bipolar schematic
To use this configuration you must edit the config.h
file:
// You should only enable *ONE* of the following drivers
// The ULN2003 shall be used with the unmodded version of 28BYJ-48 or any other
// Unipolar stepper motor. The A4988 driver should be used with Bipolar stepper
// motors or the modded version of the 28BYJ-48 (see the doc/ folder).
#define USE_A4988_DRIVER
//#define USE_ULN2003_DRIVER
Download the unipolar schematic
To use this configuration you must edit the config.h
file:
// You should only enable *ONE* of the following drivers
// The ULN2003 shall be used with the unmodded version of 28BYJ-48 or any other
// Unipolar stepper motor. The A4988 driver should be used with Bipolar stepper
// motors or the modded version of the 28BYJ-48 (see the doc/ folder).
//#define USE_A4988_DRIVER
#define USE_ULN2003_DRIVER
Ardufocus is 100% compatible with the Moonlite focuser protocol thus the original single-motor drivers can be used for manual control of the unit, if you need to integrate with SGP, APT or any other ASCOM based software then the universal ASCOM driver should be installed.
This is an quick example how to setup SGP to work with Ardufocus.