BG7JAF / ardufocus

Open source automatic focus controller (Moonlite compatible) based on the Arduino platform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image

Donate Build Status GitHub issues GitHub stars GitHub forks Download beta

Ardufocus is a full open source Moonlite compatible automatic focus controller. The source is still under heavy development so things move around a bit.

Motivation

After buying the CCD, filter wheel and filters I was broke but still wanted to have an automatic focuser.

Design Goals

1. Moonlite compatible

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.

2. Cheap

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€.

3. Builder friendly

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.

Hardware

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:

  1. Bipolar stepper motor with a A4988 driver
  2. 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.

BOM

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:

Bipolar/A4988 components:

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.

3D printed objects

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.

Controller box

Image Image

Download objects:

Skywatcher ED80

I have designed the required mechanical parts to attach a 28BYJ-48 stepper to the Skywatcher ED80 telescope.

Image Image Image Image

Download objects:

Schematic and wiring

THIS IS AN IMPORTANT NOTICE

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.

Uploading the firmware

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.

PCB and Schematic

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.

PCB Top View

PCB Bottom View

Alternative designs

J Archbold (ozarchie) made an alternative PCB design which is available here.


A4988 driver with a Bipolar motor

Bipolar 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

Pinout

Bipolar


ULN2003 driver with a Unipolar motor

Unipolar 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

Pinout

Unipolar

Software

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.

Example configuration

Sequence Generator Pro

This is an quick example how to setup SGP to work with Ardufocus.

SGP Equipament Profile SGP Auto Focus settings SGP Filter settings

License

GNU GPLv3.

About

Open source automatic focus controller (Moonlite compatible) based on the Arduino platform.

License:GNU General Public License v3.0


Languages

Language:C++ 78.9%Language:C 20.5%Language:Shell 0.6%Language:Python 0.0%