Majadahonda
Observatory
Menu

HomeInstruments

Finding objects with digital setting circles

With a GoTo mount I can select a target and let the motors find it. I can even get by with imperfect polar alignment and little knowledge of where a nebula, cluster or galaxy lies. But what happens to my knowledge of the sky when I leave all the finding to the mount?

Before my summer holiday in 2020, I decided I missed that part of observing. One alternative is star-hopping: start at a familiar bright star and work across the field to the target. An equatorial mount’s setting circles can help with that journey. Both methods reward time spent learning the sky.

I packed a manual equatorial mount, a lightweight telescope and a sky guide. There was some nostalgia in the choice, but I wanted to see how much I could find for myself.

A manual mount is light, inexpensive and needs no power. Finding a faint double star takes more care than pointing at the Moon or a bright planet. The guide gives its right ascension and declination. With those coordinates I can work through one region at a time, moving from a known object to the next. My kit for the trip was an EQ3 mount, a red torch and the guidebook.

Finding a target myself and comparing the view with other observers’ descriptions was a pleasure. Reading the EQ3 circles in the dark was less rewarding. The declination scale is marked every 2° and right ascension every ten minutes. The pointer is hard to read precisely, the two scales sit at different angles, and a manual mount needs continual adjustment as Earth turns. I learned a great deal that summer and wanted to keep the manual experience while making the coordinates easier to read.

Commercial digital setting circles often work with Dobsonian mounts and communicate with a computer or tablet over USB or Bluetooth. I wanted something inexpensive that could operate on its own, so I built what I call the sDSC: Simple Digital Setting Circles.

sDSC1.jpg

sDSC: Simple Digital Setting Circles

The sDSC reads two encoders, one for right ascension (RA) and one for declination (Dec). A small screen displays the coordinates, and a keypad lets me synchronise them with a known star.

The idea is to operate with a manual equatorial mount according to the following sequence:

NOTE: For simplicity, the development has been made with observers from the northern hemisphere in mind, but I understand that it will be easy to adapt to the south.

This operation solves all the limitations of analogical circles: it is more precise, has more resolution, and is much more comfortable. In the following sections we go into more detail about how it works and how it can be built.

sDSC2.jpg

Of course the question arises, and isn't it easier to simply automate the mount with the corresponding GoTo kit? For me the answer is that possibly it is simpler, but it is more expensive and precisely the idea is to dispense with the GoTo and enjoy this additional complication to learn and have a different experience during visual observation. On the other hand, there are possibly many manual equatorial mounts in the storage room that can be given a second life with this system, much simpler and cheaper than motorize them.

Selection of sDSC components

Some commercial digital setting circles cost more than the mount itself, and the units I considered could cost more than three EQ3 mounts. My components came to about €30, excluding the homemade enclosure. The prices below record what I found at the time.

I considered both Raspberry Pi and Arduino. A Raspberry Pi running Linux would have more processing power than this task needed. An Arduino could read the sensors and drive a display and keypad without an operating system. The board cost €8.99 on Amazon when I bought the components.

I chose a two-line, 16-character LCD with a six-key keypad. Its pin headers fit directly onto the Arduino while leaving digital inputs free for the encoders. The display and keypad cost €6.99.

Encoder resolution depends on where the encoder sits in the drive train. To resolve 30 seconds of right ascension, for instance, I need 24 × 3,600 / 30 = 2,880 counts per full revolution of the RA axis. The EQ3 slow-motion shafts make several turns for one rotation of the mount, so even a 40-count encoder on each shaft is sufficient. My setup gives 5,120 counts per revolution in RA (about 17 seconds of time) and 2,580 in declination (about 8 arcminutes). That is enough for visual observing.

I used KY-040 quadrature encoders. They rotate continuously, and the phase of the two output signals identifies the direction of rotation. Each cost €2.23.

The EQ3 shaft and the KY-040 shaft are both 6 mm in diameter, so I used a flexible 6 mm-to-6 mm coupling. The example shown cost €2.39.

Imagen 3.jpg Imagen 4.jpg Imagen 5.jpg Imagen 6.jpg

The remaining parts are the brackets that secure the encoders to the mount. On the EQ3 a bent metal strip on each axis is sufficient, as the photographs show.

Imagen 7.jpg Imagen 8.jpg

When gluing the encoder support, I kept the adhesive clear of the tracks and pins on the PCB. Once the encoders were aligned with the shafts, I fixed their bases with double-sided tape.

Imagen 9.jpg

How it works

The sDSC offers three types of screens:

Imagen 13.jpg Imagen 11.jpg Imagen 10.jpg

Actually, we will only use the first two screens, the third one will be only for the adjustment and startup of the system the first time.

When the equipment is started, the screen shown is the RA and DEC screen, with values of AR=0 and DEC=90, since the equipment must be started with the telescope at the initial position (pointing to Polar). You can always return to this screen by pressing the RST (reset) key. You will see that the RA value increases, one second for each second elapsed: the equipment automatically update the RA, since there is no motor to compensate the Earth's movement.

During the first 3s after the start, the software allows to change the intensity of the backlighting with the UP and DOWN keys. After 3s, as we will see later, these keys have another function.

Also, during the initial 3s, pressing the SELECT key changes the display to show the encoder values. This option is interesting during the start-up process or for the calibration of the number of pulses per turn on each axis, which as we will see later, is a value that has to be entered in the Arduino board source code.

Once we are on the RA and DEC screen, we can move the telescope with the controls and the RA and DEC values in the display will reflect the changes read by the encoders. But if we haven't done any synchronization, the RA value won't have any real meaning. Not so with the DEC value which will reflect a valid data. The synchronization should be done with the following steps:

Here it is important to consider one aspect. The coordinates that have been entered in the equipment are J2000, so there may be small deviations in the current date of observation (JNOW). In visual observation this is usually not relevant. However, an option has been included in the keyboard handling to make small corrections to the current RA and DEC value. The display will indicate with ">" if RA or DEC is selected, and it can be changed with the LEFT key. Once what we want to adjust is selected, we can use the UP and DOWN keys to make small adjustments, for example, to set the JNOW value we read from an application on the smart phone.

And this is the simple way of operating the sDSC, a device designed to make digital setting circles that help us to handle our manual mount for a totally affordable cost.

Imagen 14.jpg

Overview of keypad operation

UP y DOWN:

SELECT:

LEFT:

RIGHT:

RST:

Summary of operation of the controls

The indications given below may seem a little complicated at first, but in reality, they are very intuitive and done a couple of times creates an easy and agile dynamic to locate any object in the sky.

Synchronising the setting circles

To move to the star that we will use for synchronization we have commented that we must do it with the slow motion controls. But is it possible to loosen the axis locks and move the mount axes without the controls? The answer is yes but bearing in mind an aspect that we will explain below.

If we do not use the controls, as the encoders have coupled to them, we will not generate the pulses, but as we are going to synchronize RA and DEC with the star data it could seem that this operation can be done without problems. With the right ascension there is no problem, however, we have to take into account that with the declination it is somewhat more complicated, since a turn of the declination control implies increasing or decreasing the declination depending on which side of the meridian we are.

Since, once the synchronization is done, we will use the declination control for the movement to our object, the sDSC must know if in which side of the meridian we are to apply the correct sign to the change in declination, increasing or decreasing depending on the direction of the turn. If we have done the movement with slow motion control, the sDSC already knows if we have gone to one side or the other of the meridian, but if we have gone without the controls it will not know.

To solve this, we must take into account these simple rules if we want to use the fast movements of the axes:

Wiring the components

The first step is to place the display, simply by anchoring it to the Arduino board (see the instructions provided by the supplier of the device, but it has no complications).

Regarding the encoders, the first thing to consider where the digital inputs/outputs of the Arduino's microcontroller are accessible once we have connected the display and keyboard board. The following digital signals are available in the upper right-hand connector: (see photo)

D13 D12 D11 D3 D2 D1 D0

The photo shows that a 7-pin strip has been soldered to make the digital signals accessible, although we will actually only use the 4 pins on the right.

A 2-pin strip has also been soldered to make +5V and GND accessible (see bottom of photo).

Each encoder requires 2 signals: CLK and DT, plus the 5V power supply.

We will use D1 and D0 for the RA encoder, and D2 and D3 for the DEC encoder.

The connections will be:

Right ascension:

D0: CLK of KY-040

D1: DT of KY-040

Declination:

D2: CLS of KY-040

D3: DT of KY-040

Imagen 20.jpg

For the connections we must make a 4-wire cable (CLK, DT, +5V and GND) long enough to connect each encoder to the display board.

NOTE: the SW pin of the encoders is not used.

The photo shows the way to connect using standard cables for connections on prototype boards. It is the way I have used to make a prototype, but it is not the right way to have a final product. From the explanations in this document, the recommended would be to place the assembly in a box and make the connections soldered, not with pin connection cables. On the other hand, possibly it's a good idea in the final mechanical enclosure to place a red transparent sheet over the display so that the light doesn't bother during the observation, because, although the backlight is adjustable, the blue color of the background and the white of the characters doesn't seem to be the most suitable.

Imagen 17.jpg
YouTube

Source code

The following provides the source code of the application. It is a version 1.0 and logically it is possible to include errors in situations that have not been foreseen, that's programming! The following versions will be the result of the experience of more time of observation, which will allow to detect failures and ideas of improvement will arise. The only aspect to take into account is that the Arduino system used has little memory and this limits the extension and complexity of the application, but in return it is so economical! Any suggestion and communication of detected errors will be welcome.

Regarding the customization for another mount or encoders, the only changes to be made in the application are the initialization of the variables ra_ratio, dec_ratio, ra_rotation and dec_rotation.

In the case of EQ3, and according to my calculations the correct values of the ratios are:

For one full revolution in right ascension (24 hours), I measured 5,120 counts.

int ra_ratio=5120;

For one full revolution in declination (360°), I measured 2,580 counts.

int dec_ratio=2580;

You must also define how the direction of rotation of the encoders operates, which will depend on how the coupling has been made.

In my case, with the mechanical solution that I have given, when the right ascension is increased, the encoder turns counterclockwise:

int ra_rotation = -1;

And in my case, for the declination, when turning clockwise we go east:

int dec_rotation = 1;

if in your implementation, it is the contrary, you only have to change the sign.

Only these four variables can vary from one installation to another.

The source code is included below:

// RA ENCODER
 double ra;
 int RA_pinA = 0; // Connected to CLK on KY-040
 int RA_pinB = 1; // Connected to DT on KY-040
 int RA_pinALast;
 int RA_aVal;
 int ra_encoder = 0;
 int ra_rotation = -1;
 int ra_ratio=5120; // number of pulses for a complete 24-hour turn in RA (each turn of the hand is 40 pulses)
  // DEC ENCODER
 double dec;
 int DEC_pinA = 2; // Connected to CLK on KY-040
 int DEC_pinB = 3; // Connected to DT on KY-040
 int DEC_pinALast;
 int DEC_aVal;
 int dec_encoder = 0;
 int dec_rotation = 1;
 int dec_ratio=2580; // number of pulses for a complete 360 hour turn in DEC (each turn of the hand is 40 pulses)
  char tmp[100];
 unsigned long time;
 int screen_type=1;
 int adjust_pos=1;
 int time_count=0;
 int backlight=50; // initial value in the range of 0 to 255
   // Star database for SYNC
 // Stars with magnitude <2.25 and declination >-25 (J2000)
 double ra_stars[]={4.60,10.33,3.13,6.63,12.90,13.80,2.07,5.60,5.68,9.47,15.58,0.13,19.85,14.27,5.42,5.92,5.28,7.58,0.95,20.68,11.82,0.73,11.07,5.43,17.95,2.12,14.85,6.00,1.17,3.40,6.38,13.40,2.53,7.75,7.65,17.58,10.13,5.25,20.37,5.80,0.68,6.75,13.42,18.62};
 double dec_stars[]={16.5,19.8,41,16.4,56,49.3,42.3,-1.2,-1.9,-8.7,26.7,29.1,8.9,19.2,6.3,7.4,46,31.9,60.7,45.3,14.6,-18,61.8,28.6,51.5,23.5,74.2,44.9,35.6,49.9,-18,54.9,89.3,28,5.2,12.6,12,-8.2,40.3,-9.7,56.5,-16.7,-11.2,38.8};
 const char *name_stars[] ={"Aldebaran","Algieba","Algol","Alhena","Alioth","Alkaid","Almach","Alnilam","Alnitak","Alphard","Alphecca","Alpheratz","Altair","Arcturus","Bellatrix","Betelgeuse","Capella","Castor","Cih","Deneb","Denebola","Diphda","Dubhe","Elnath","Eltanin","Hamal","Kochab","Menkalinan","Mirach","Mirfak","Mirzam","Mizar","Polaris","Pollux","Procyon","Rasalhague","Regulus","Rigel","Sadr","Saiph","Schedar","Sirius","Spica","Vega"};
 int tot_stars=44;
 int idx=-1;
  #include <LiquidCrystal.h>
 LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
  //***********************************************************************
 // Initializations at startup
 //***********************************************************************
 void setup() {
  pinMode (RA_pinA,INPUT);
 pinMode (RA_pinB,INPUT);
 RA_pinALast = digitalRead(RA_pinA);
  pinMode (DEC_pinA,INPUT);
 pinMode (DEC_pinB,INPUT);
 DEC_pinALast = digitalRead(DEC_pinA);
  lcd.begin(16, 2); // LCD init
 lcd.setCursor(0,0); // column, row
 lcd.print("DSC 1.0"); // print start message
  delay(300);
 lcd.clear();
  time = millis();
 ra=0;
 dec=90;
  analogWrite(10, backlight);
  }
  //***********************************************************************
 // Converts declination into degrees and minutes
 //***********************************************************************
 void ConvertDEC(double t, int *g, int *m) {
  int grad;
 int minute;
 int sign;
  if (t<0) sign=-1; else sign=1;
 t=t*sign;
 grad=t;
  minute = (t-grad) * 60 ;
  *g=grad*sign;
 *m=minute;
  }
   //***********************************************************************
 // Converts RA into degrees, minutes and seconds
 //***********************************************************************
 void ConvertRA(double t, int *h, int *m, int *s) {
  int hour=t;
 int minute = (t-hour) * 60 ;
 int second = ((t-hour)*60-minute)*60;
  *h=hour;
 *m=minute;
 *s=second;
  }
  //***********************************************************************
 // Print current star for syncing
 //***********************************************************************
 void Print_Star(void){
  int h, m_ra, g, m_dec, s;
  sprintf(tmp,"%s", name_stars[idx]);
 lcd.clear();
 lcd.print(tmp);
 lcd.setCursor(0,1);
 ConvertRA(ra_stars[idx], &h, &m_ra, &s);
 ConvertDEC(dec_stars[idx], &g, &m_dec);
 sprintf(tmp, "R:%02d %02d D:%02d %02d", h, m_ra, g, m_dec);
 lcd.print(tmp);
  }
  //***********************************************************************
 // Main loop
 //***********************************************************************
 void loop() {
  RA_aVal = digitalRead(RA_pinA);
 DEC_aVal = digitalRead(DEC_pinA);
 int x, mod;
 int g, h, m, s;
  // ******************** keypad control *******************************
 x = analogRead (0);
 if (x > 900) {
 // no key
 } else {
 if (x < 50) { // right
 } else if (x < 250) { // up
 if (time_count<6) { // during first 3s
 if (backlight<255){
 backlight=backlight+5;
 analogWrite(10, backlight);
 time_count=0;
 }
 } else if (idx==-1){
 if (adjust_pos==1) ra=ra+1.0/60; else dec=dec+0.1; // increment 1 minute in RA or 6 minutes in DEC
 if (ra>24) ra=23.9;
 if (dec>90) dec=90;
 } else {
 if (idx>0) idx--; else idx=tot_stars-1;
 Print_Star();
 }
 } else if (x < 450){ // down
 if (time_count<6) { // during first 3s
 if (backlight>0){
 backlight=backlight-5;
 analogWrite(10, backlight);
 time_count=0;
 }
 } else if (idx==-1) {
 if (adjust_pos==1) ra=ra-2.0/60; else dec=dec-0.1; // decrement 1 minute in RA or 6 minutes in DEC
 if (ra<0) ra=0;
 } else {
 if (idx<(tot_stars-1)) idx++; else idx=0;
 Print_Star();
 }
 } else if (x < 650){ // left
 if (adjust_pos==2) adjust_pos=1; else adjust_pos=2;
 } else if (x < 850){ // select
 if (idx>=0 && idx<tot_stars) { // if we are selecting a star for sync
 ra=ra_stars[idx];
 dec=dec_stars[idx];
 ra_encoder=0;
 dec_encoder=0;
 idx=-1;
 lcd.clear();
 } else if (time_count<6) { // during first 3s
 screen_type=2;
 lcd.clear();
 } else {
 idx=0;
 Print_Star();
 }
 }
 delay(200);
 }
  // ************ pulses in RA ***********************************
 if (RA_aVal != RA_pinALast){ // encoder rotating
 if (digitalRead(RA_pinB) != RA_aVal) { // pin A change first: clockwise
 ra_encoder ++;
 ra=ra+ra_rotation*24.0/ra_ratio;
 } else {
 ra_encoder--;
 ra=ra-ra_rotation*24.0/ra_ratio;
 }
 if (ra<0) ra=ra+24.0; else if (ra>24.0) ra=ra-24.0;
 }
 RA_pinALast = RA_aVal;
   // ************ pulses in DEC ***********************************
 if (DEC_aVal != DEC_pinALast){ // encoder rotating
 if (digitalRead(DEC_pinB) != DEC_aVal) { // pin A change first: clockwise
 dec_encoder ++;
 dec=dec+dec_rotation*360.0/dec_ratio;
 } else {
 dec_encoder--;
 dec=dec-dec_rotation*360.0/dec_ratio;
 }
 if (dec>90.0) { // detection of passage through the northern meridian
 dec_rotation=dec_rotation*-1;
 dec=180.0-dec;
 }
 }
 DEC_pinALast = DEC_aVal;
   // ************* display *********************************
 if ((millis()-time)>500 && idx==-1){ // every 0.5s and if we are not selecting a star
  if (time_count<100) time_count++;
 ra=ra+((millis()-time)/1000.0)/3600;
 time=millis();
  if (screen_type==1){
 ConvertRA(ra, &h, &m, &s);
 if (adjust_pos==1) mod='>'; else mod=' ';
 sprintf(tmp,"%cRA:%02dh %02dm %02ds", mod, h, m, s);
 lcd.setCursor(0,0);
 lcd.print(tmp);
  ConvertDEC(dec, &g, &m);
 if (adjust_pos==2) mod='>'; else mod=' ';
 sprintf(tmp, "%cDEC:%02d%c %02d'", mod, g, 223, m);
 lcd.setCursor(0,1);
 lcd.print(tmp);
  } else {
  sprintf(tmp, "RA enc:%04d %c", ra_encoder, mod);
 lcd.setCursor(0,0);
 lcd.print(tmp);
  sprintf(tmp, "DEC enc:%04d", dec_encoder, mod);
 lcd.setCursor(0,1);
 lcd.print(tmp);
  }
  }
   }