Home/Projects/Caldwell/APT_V2

APT 2.0 - Repairing the APT


Project Leader: Keith Rickard

Members: Simon Dawes, Mark Loveday

The APT has been out of commission for about 5 years, with a string of failures.
  1. The fluid light guide went opaque - a generous gift from the BAA enabled us to buy a new one.
  2. The BBC Model B used to control the telescope stopped working - it was a rare 64kB version and the National Museum of Computing generously swapped it for a working model they had.
  3. The drives failed, after investigation we found that the 20 year old soldering, was the problem and a member (and ESA engineer) re-soldered and loomed-up the stepper controller boards - looks like the inside of a satellite now :-))
  4. The BBC Model B software keeps crashing, at the point where it wants to format the data drive, we have tried different drives, media and cable so think the original software is corrupt, - we only have one software disk so have become stumped.

The above has led us to consider a new approach, based on keeping what we know works but bringing the software and computing up -to-date - which has other advantages that will become apparent later.

The main APT page on this website contains many useful documents and notes can be found here.

The first step is to propose and program the control software, our approach is based on using a Raspberry Pi and an Arduino to interface with existing stepper motor controllers and the photo multiplier circuitry.



It might seem odd, keeping a photo multiplier tube in the age of CCD's but it does have some advantages.
  1. We have one and it works so is proven (and free)
  2. The photomultiplier results in a single data point this is easier to automate than an array of a few million data points so keeps the data management simple - great for an automatic telescope designed solely for variable star observation
  3. The photo multiplier tube provides milli-mag accuracy as good as any CCD so there is no accuracy advantage moving to CCD.

Software

Global Variables

case sensitive
Name
(case sensitive)
Type
Notes
observer[]
list
provides a list of observer names, one value per observer
location[]
list
holds 5 values
[0] location name - string
[1] Location Latitude - string
[2] Location Longitude - string
[3] Location Height - string
[5] Observatory reference
objects[][]
2 dimensional list
(4x6)
holds details for...
[0][x] variable star
[1][x] comparison star
[2][x] check star
[3][x] sky

[x][0] object name - string
[x][1] object RA - string
[x][2] object DEC - string
[x][3] object epoch for RA and DEC positions - string
[x][4] RA offset - the number of steps to get to this object from the previous object in RA steps - integer
[x][5] DEC offset - the number of steps to get to this object from the previous object in DEC steps - integer
- note object 0 the offsets are the number of steps from object 3
measurement[][]
2 dimensional list
(8xX)
where X is the number
of measurements made
holds measurements of variable, comparison, check and sky, each row holds one set of measurements,
each measurement has it's own time (in JD) associated with it.
[x][0] time of variable measurement (end time) - double
[x][1] counts for variable brightness - double
[x][2] time of comparison measurement (end time) - double
[x][3] counts for comparison brightness - double
[x][4] time of check star measurement (end time) - double
[x][5] counts for check star brightness - double
[x][6] time of sky brightness measurement (end time) - double
[x][7]counts for sky brightness - double
where x is incremented for each set of measurements, the first measurement is x=0
raPMT[]
1 dimensional list
these hold the moving average for the measured objects, using the following approach...
moving average=(rolling average+new measurement)/2
[0] = running average for Variable
[1] = running average for Comparison
[2] = running average for Check star
[3] = running average for Sky
objectlist[][]
2 dimensional list
(24xX)
where X is the number \
of previous objects observed
where objects[][] holds the details for the object currently being observed, objectlist[][] holds the details for all past
observations, the idea being that the observer will be able to load previous observations to reduce the set-up time.
each row stores a single set of object details in the following format...
[x][0] variable name - string
[x][1] variable RA - string
[x][2] variable DEC - string
[x][3] variable coordinate EPOCH - string
[x][4] variable offset RA - integer (steps)
[x][5] variable offset DEC - integer (steps)
then the form continues for the comparison star, check star and sky values up to [x][23].
commands[][]
2 dimensional list
(X x 3)
where X is the number of commands)
This holds a list of Arduino commands and the number of the Arduino the commands are appropriate to
in the format of a 3 column array.
[x][0] contains the command
[x][1] contains the name of the Arduino that can work with that command
[x][2] contains the port number to send command on.
serialdetail[][]
2 dimensional list
(3 x 5)
This holds the serial port details for communication
[x][0] name of device (string)
[x][1] speed
[x][2] databits
[x][3] parity
[x][4] stop bits
[0][x] table header
[1][x] assumed to be PMT/DRIVE 'PD'
[2][x] assumed to be HANDBOX 'HB'
logginglevel
integer
Used to define teh level of logging, during development and debugging this is set to 4
1= fatal errors only | 2= recoverable error, 3= user notification, 4= verbose logging
menu
2 dimensional list
(X x 5)
This holds the menu structure for the handheld
[x][0] text to display
[x][1] up index: this is the index of the menu item to display when navigating up the menu hiarachy
[x][2] next index: this is the menu item to display when navigating to the next item in the menu
[x][3] previous index: this is the menu item to display when navigating to the previous item in the menu
[x][4] this is the name of the procedure to call when selecting a menu item, however if a number it indicates the index of the next item in the menu to display
The menu is structured to give two lines per item, in general the top line will be the item in the menu and the bottom line will be guidance on what to press
scope
2 dimensional list
(6 x 2)
holds drive characteristics
[x][0] holds characteristic title in English
[x][1] holds characteristic
[0][1] sidereal stepping rate in interupt ticks
[1][1] arc sec per step in RA
[2][1] are sec per step DEC
[3][1] Fast slew rate (in interrupt ticks)
[4][1] Medium Slew Rate (in interrupt ticks)
[5][1] Slow slew rate (in interrupt ticks)
[6][1] integration time in number of interrupts
[7][1] number of integrations to average
[8][1] interrupts per second
[9][1] keyboard check frequency (checks per second)
[10][1] Spiral unit steps, this is the smallest number of steps to step in the spiral search sequence
[11][1] integration time for spiral search
[12][1] filter #1 name
[13][1] filter #2 name
[14][1] filter #3 name
[15][1] filter #4 name
[16][1] filter #5 name
[17][1] filter #6 name
[18][1] default filter


see also Interrupts section

Files

Name
(case sensitive)
Type
Notes
example
file
observer.csv
csv file
holds a list of observers in csv format
must be in the program folder but will be created with default values if not found

location.csv
csv file
holds observatory location details in csv format
must be in the program folder but will be created with default values if not found

measurement.csv
csv file
holds measurement values for all 4 objects in csv format
If the file already exists it will be appended if not it will be created. Idea is multiple nigts observations will all save to the same
file if the same object is being observed, and each result will be added after each round of observations so a system crash
doesn't result in lost data.

objectlist.csv
csv file
This file holds the same data as objectlist[][] array, so that the array can be stored and reused

serial.csv
csv file
This holds the serial set-up details that are transferred to the serialdetail[][] array

menu.csv
csv file
Holds the data that is written into the menu array to create the handheld menu. This will allow me to update the controls just from a CSV file for minor updates, but also means there isn't a need for hard coding the menu structure making updates easier.

scope.csv
csv file
Holds some data on the physical characteristics of the drive, if not present the software will create it using default values but this allows tweaking to optimise the telescope - see scope array for details

Menu Navigation

The hand controller comprises of a 16 key keypad which will hopefully be backlit in red. There will also be a red-lit 16x2 character LCD screen. Navigating through the menu will be consistent as described below
APTkeypad.jpg
*
#
2
8
4
6
A
B
C
Select/Enter
Exit/go up the menu
move Dec drive '+'
move Dec drive '-'
move RA drive '-' and previous menu item
move RA drive '+' and next menu item
High Slew Rate
Medium Slew rate
Low slew rate

Interrupts

The Arduino will be given an interrupt rate by the python software, this is the number of interrupts per second to perform. Typically this will be 400. The scope array and scope.csv file will hold details of these interrupts. The values in 'scope' reflect how frequently the arduino should do something so a '1' would indicate every interrupt, a 2 every second interrupt, a 10 every 10th interrupt.

Centering a star

The original BBC basic routine used a spiral search sequence to find a star, we have kept this approach.
Detailed notes are available in the BAA Paper
1) move East until star not in pinhole, note position, move west until star no longer in pinhole, move to position in the middle of these two extremes
2) repeat above for North south positioning
the stepping is at 0.1 pinhole diameters and the PMT integration time is 0.5s,

Spiral Search

Detailed notes are available in the BAA Paper

The spiral search moves the telescope by the radius of the pinhole, in the BAA paper this is termed a 'jump' if after 4 circuits of the spirial the search has failed to find the star the telescope stops.
If the star is found then the centering is started, if centering fails then it is assumed that bright cloud is across the telescope and the routine returns to the star, continues to track, but pauses all other operations for a short period.
APT_spiral.JPG


Physical Characteristics

Detailed notes are available in the BAA Paper
  • Pinhole diameter = 60"
  • angle telescope moves per step 1.5"
  • 1 hop (0.1 x pinhole diameter) = 4 steps in Dec and int(4/cos(declination of star) steps in RA
  • 1 jump = 5 hops i.e. radius of pinhole

Detecting a Star

Detailed notes are available in the BAA Paper
Threshold of star detection = (star value + sky value)/2
star and sky values use a moving average where moving average = (old moving average+new value)/2

Hardware

There is a separate page for hardware and interfacing.



Copyright © 2005-2017 Crayford Manor House Astronomical Society Dartford, Kent.Registered Charity Number 1156678. All rights reserved. No part of this website may be reproduced.
Page edited 56 times. Last edit by - kickitharder kickitharder on Jun 1, 2015 5:25 am. This site contains 560 pages
CMHASD - APT_V2