Arduino Star Tracker

This project aims an automatic control for telescopes, is based on Arduino and is low-cost!

The control utilizes a calibration method and various settings which enable you to control any type of mount (not just equatorial and altazimuthal) pointed at any direction.

The total cost of upgrading your mount should be around 75 USD (SkyWatcher SynScan GOTO Upgrade for EQ3-2 costs around 460 USD).

Features

See future work for missing features (like communication via USB or Bluetooth). Some implemented and working freatures:

Hardware setup

0. What you will need:

1. Parts modification and tuning

You should add the four resistors between STEP-GND and DIR-GND pins to avoid a jitter of stepper motors at startup.

A typical extender for A4988 has an ENABLE pin, however, we do not need it. Instead, we need a pin for controlling microstepping. That is why you should hardwire the three microstepping pins and you should add a single pin to control them. Search for microstepping resolution truth table of A4988.

A cheap IR remote control might have a weak diode. In that case, you won’t be able to control the mount from a distant places. So I recommend you to replace the diode with a better one.

You also need to tune potentiometers of stepper drivers. Search for How to set output current limit on A4988 stepper driver. This can reduce noise produced by the motors or you can remove problems with skipping of steps.

Use the potentiometer connected to the LCD to adjust contrast.

2. Wiring

Wiring diagram

Software Settings & Uploding to Arduino

0. Prepearing libraries

The following list contains libraries you will need to sucessfuly compile the Star Tracker project (most of them is included in the Arduino IDE by default):

At first, make sure you have already installed all the libraries.

1. General configuration

Next, you should modify the src/config.h file to fit your needs. Familiarize yourself with all the definitions in the file. You should definitely change LONGITUDE, LATITUDE, REDUCTION_RATIO_xx and DEG_PER_MOUNT_REV_xx variables! You also need to change DEFAULT_POLE_xx if you use an altazimuthal mount.

You may encounter a problem with stucked motors. In that case, I advice you to adjust ACCEL_STEPS_xx, ACCEL_DELAY_xx, FAST_DELAY_START_xx and FAST_DELAY_END_xx. Change these definitions in order to change motors speed or ac/deceleration.

2. Remote control

You need to change definitions of key codes to fit the protocol used by your favourite remote control. Take look at the beginning of the src/keypad.h file. There are few definitions of KP_KEY_xx where xx describes the particular key. To figure out codes used by your remote control, upload the following sketch to your Arduino:

#include <Arduino.h>
#include <IRremote.h>
#include "src/config.h"

IRrecv ir(KEYPAD_IR_PIN);
decode_results results;

void setup(){
    Serial.begin(9600);
    ir.enableIRIn();
}

void loop(){
    if (!ir.decode(&results)) {
      delay(5);
      return;
    }
    Serial.println(results.value, HEX);
    ir.resume();
    delay(500);
}

Then open the Serial monitor and observe the key codes of pressed keys. Note that you will receive 0xFFFFFFFF when you hold a key continuously.

You can also change mapping of these keys to particular actions in the src/control.h file (but be careful as these keys and actions should not cause conflicts and ambiguity).

3. SD card and catalogue

Take an empty and formatted microSD card and copy there the content of the SD directory. It should be a single file catalog.csv which is a limited version of Stellarium catalogue of deep space objects. You can delete or add object to this file, however the structure and meaning of columns should be preserved.

4. Real Time Clock

The src/rtc_ds3231.h file contains implementation of Clock class for DS3231 module. In case you use other module or you want to obtain time from NTP servers, implement the Clock interface and change some lines in Star_Tracker.ino.

5. Camera trigger

Similarly, you may need to change the implementation of the camera trigger control. The src/CanonEOS1000D.h file contains implementation of CameraController class for Canon EOS1000D. If you have other camera with other trigger logic, you should create a new implementation of CameraController and change some lines at Star_Tracker.ino. Note that in this case, you may also need a different wiring!

Notes on precision

The only loss of precision is caused by Arduino’s floating point unit which cannot work with 64-bit floating point numbers. Especially while computing extremal values of some goniometric funcions (tangens and other functions which are reduced to computing tangens). These problems can occur while pointing to stars near celestial pole. The GoTo feature can miss few arc minutes and alignement can be imprecise in that case. However points with lower DEC values should be handled properly.

The tracking with very badly aligned mount can also be imprecise after some time because the speeds of DEC and RA motors are computed just once at the start of the movement. Unfortunately these speeds does not have to be constant necessarily.

Future work