Star Seeker |
|||||||||||||||||||||||||||||||||||
"Find It Now, Find It Fast" |
|||||||||||||||||||||||||||||||||||
ECE 476 Final Project
|
|||||||||||||||||||||||||||||||||||
Contents |
|||||||||||||||||||||||||||||||||||
1 |
Introduction |
||||||||||||||||||||||||||||||||||
Our project involves the construction of a telescope mount which automatically rotates a telescope to track a star selected by the user. This project intends to create an automatic application for users who wish to track stars without the hassle of adjusting the telescope themselves. Users would be able to track a given list of stars, or input their own data for the telescope mount to track their own desired star. The project consist of two main components: the mechanical construction of the mount and the software required in accepting user input and operating the mount itself.
|
|||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
2 |
High Level Design |
||||||||||||||||||||||||||||||||||
2.1 |
We wanted out project to have a significant hardware and software component. By choosing to design and build a telescope mount, we were be able to accomplish this. The mount would require significant machining, along with the addition of electrical components such as a motor, pulleys, an LCD screen, a keypad and a Mega32 MCU, which would give us experience in hardware design. The software to accept user input, calculate local sidereal time (LST), find the coordinates of a given star, and operate the motor would do the same in software design. We also deemed that the project would fit within the budget constraints. The mount was constructed out of scrap metal scavenged from the machine shop, while the pulleys, motor and screws were sampled and donated from companies like [Lin Engineering]. Most of the cost went towards using the LCD, keypad and Mega32 components. The project was also motivated from Ian’s love of star/aurora-watching. The idea was further strengthened by a website by Jerry Oltion [link], which was our original challenge. However, his idea was too difficult to implement in the short period of time we were given and therefore we decided to simplify it. We also decided this would be an innovative use of scrap materials and some electrical components.
|
Figure 2.1.1: Original ball mount idea. Click on the picture for a larger version |
|||||||||||||||||||||||||||||||||
2.2 |
The precise tracking of a star requires calculations to determine the elevation and azimuth of a star, given its right ascension, declination and exact time at which it is being tracked. The software has to calculate the local sidereal time of the observation, and together with information of the user’s location, is able to determine where the star will be in the sky. The local sidereal time is synchronized to the movement of stars across the sky, just as the local solar time is synchronized to the movement of the sun across the sky. Declination and right ascension are like latitude and longitude coordinates for a star. Declination is measured in degrees from the equatorial plane, while right ascension is measured in degrees or hours right of the First Point of Aries.
|
Figure 2.2.1: The blue circle describes the locus of the sun relative to the earth. The first point of Aries is the position of the sun relative to the earth during the northern vernal equinox. Image credit: [METU] |
|||||||||||||||||||||||||||||||||
2.3 |
Before the time can be used to track a star, it needs to be converted to the local sidereal time. This is because local solar time does not progress at the same rate as sidereal time. Suppose the earth did not rotate at all. During the course of a year, to an observer at a point on the earth, the sun will appear to make a full rotation around the earth, because of the earth's motion around the sun. However, the earth does not rotate around the stars, so this "extra" day must be compensated for. Because of the way the earth rotates around the sun, its motion actually cancels out one full rotation about its axis. Thus, while there are 365.25 solar days in a year, there are 366.25 sidereal days in a year. To convert from local time to local sidereal time, we used the following procedure:
|
||||||||||||||||||||||||||||||||||
2.4 |
There are two reference frames used in our code. One is the ground plane, that is the x- and y-axes span the ground plane, with the z-axis pointing to the zenith. The other reference frame is the equatorial reference frame, used to position the telescope, since it is tilted at an angle parallel to the equatorial plane. In this reference frame, the x- and y-axes span the equatorial plane, while the z-axis points to the star Polaris. The elevation and azimuth of the stars are calculated based on the ground reference frame, using the following formulas: Let In the actual code, we convert the hour angle to radians for use in the math.h cosine function.
|
||||||||||||||||||||||||||||||||||
The elevation and azimuth then have to be rotated into the equatorial reference frame, so that the telescope is able to know where to rotate to. This is done in the following manner: Let the latitude of the observer be λ. We need to rotate to , where , and . With , we need to find the elevation and azimuth in the equatorial reference frame. New elevation = atan2([2], 1); atan2 produces a result between -pi and pi, so we need to convert this to degrees between 0 and 360. These formulas were used from what we learnt from the ECE 415 GPS Design class and also sourced from the following [website]
|
Figure 2.4.1: Rotation from the ground plane to the equatorial plane |
||||||||||||||||||||||||||||||||||
2.5 |
The MCU acts as a controller for both the user input and the motor turning the telescope. The LCD screen prints out prompts for certain data for the user, who uses the keypad to input the required information. The motor, LCD and keypad are connected to the microcontroller board via the usual 8-pin connections. The mount is constructed out by milling, drilling and lathing scrap pieces of metal obtained from the machine shop and then built together using screws, hinges and bolts. The design was thought out and drawn by us. Figure 2.5.1: Picture of our setup. Click to enlarge. We initially wanted to implement a gear system to move our telescope mount when tracking a star. However, due to difficulty in finding suitable low-cost parts, we decided to forgo the idea and instead implement the pulley system which was much easier and the parts were easier to sample and find.
|
Figure 2.5.2: High level block diagram of our setup
|
|||||||||||||||||||||||||||||||||
2.6 |
Our telescope mount was designed in accordance to the IEEE standards as specified on their website [www.ieee.org]. The Hours:Minutes:Seconds timekeeping in our program should conform to the Coordinated Universal Time (UTC) standard, although the time inputs are set by the users. Our project does not communicate with other devices.
|
||||||||||||||||||||||||||||||||||
2.7 |
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
3 |
Hardware Design |
||||||||||||||||||||||||||||||||||
3.1 |
The mount was built by us according to our desired specifications. The pieces making up the mount was constructed using the mill and lathe machines in the Rhodes Hall machine shop. The mount consists of the following parts:
The base, lid and sides of the mount and the pulley rods were made from scrap metal obtained in the machine shop. These were machined according to the specifications listed in [Appendix B].
|
Figure 3.1.1: Picture of the front of the mount. Click to enlarge. Figure 3.1.2: Picture of the back of the mount. Click to enlarge. Figure 3.1.3: How we mounted the pulleys. Click to enlarge.
|
|||||||||||||||||||||||||||||||||
3.2 |
The circuit consisted of the following components:
As we intended, the stepper motor is connected to the pulley system via an O-ring. As the motor turns, the pulleys rotate and turn the telescope as needed. The elevation of the telescope can be adjusted by sliding the horizontal rod back and forth the slit along the side plates. One calculation that we had to take into account here was the step-down of the rotation ratio between the motor and the pulleys. We had to had a 1:80 step-down ratio in order to accurately position our telescope. By utilizing pulleys of different radii, we were able to achieve the necessary step-down.
|
||||||||||||||||||||||||||||||||||
3.3 |
We tried soldering our own custom PC board and protoboard to save costs. These worked well all the way throughout the lab until they suffered a catastrophic failure without reason. We tried for hours to debug the circuit boards, with help from the TA's, but were unable to discern a reason for the sudden failure. We had to use the STK500 instead. Fortunately, we were only just able to meet our budget, thanks to the large amount of scrap we managed to acquire at the Emerson Lab.
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
4 |
Software Design |
||||||||||||||||||||||||||||||||||
4.1 |
Our program consists of a few main parts. The main state machine controls the user inputs, while two separate functions calculated the local sidereal time and the elevation and azimuth of the desired star to be tracked. Other functions include control for the keypad and the motor. There are two modes of operation: manual and automatic. In manual mode, the user uses the scroll buttons to move the motor as he/she wishes. In automatic mode, the user enters the star coordinates (or chooses them from a list) and his time and location, and the program will automatically calculate where to point the telescope to. Tracking can be done in either mode. Initialization Code The initial date variables are set to initialized to Jan 1, 2004, 12 midnight GMT. Timer0 Interrupt Timer1 Interrupt Motor Control Code:
|
||||||||||||||||||||||||||||||||||
4.2 |
The program also has a list of stars that the user can choose to track, without having to manually input declination and right ascension coordinates. The following stars are available: (Coordinates in the square brackets are the declination and right ascension of these stars, and the name in the brackets is the Constellation the star is in)
See the [Star Chart]
|
||||||||||||||||||||||||||||||||||
4.3 |
This takes in the solar time variables and calculates the local sidereal time according to the math discussed above in Background Math. Our reference Greenwich Sidereal Time at our 1 Jan 2007 12AM GMT epoch is 6:38:18.1 Using the right ascension and declination, we calculate the elevation and azimuth in radians. We then perform the coordinate frame rotation (as discussed in Background Math) to obtain the true elevation and azimuth of the star relative to our location. Special attention was paid to the units. All angles were converted to decimal degrees, and times converted to seconds. For the math.h trigonometric functions, the degrees were converted to radians.
|
||||||||||||||||||||||||||||||||||
4.4 |
The keypad control code was reused from the previous ECE 476 labs with the addition of a few buttons. The standard 0-9 keys were preserved, with the addition of "-" and “.” keys for floating point input. A “backspace” button was also included to correct typing errors. With a star list that we had to display on the LCD screen, we also decided to implement “Scroll Up” and “Scroll Down” buttons. These buttons are also used to manually calibrate and move the telescope mount.
|
||||||||||||||||||||||||||||||||||
4.5 |
Figure 4.5.1 Program Flow State Diagram The state diagram here shows the number of steps that the program takes the user through to obtain the desired parameters to perform the star tracking. Data such as time, longitude, latitude and star information (right ascension and declination) have to be inputted by the user before the program is able to use the motor to move the telescope to track the star. We also have a manual tracking mode that requires no data input. We need the following data:
After the users input the required data, they are given an option on their subsequent use of the mount to keep using the old information (i.e. track the previous star). This gives them an easy way to automatically revert to the star that they have been tracking. The state machine also consists of different tracking modes which the user can choose from.
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
5 |
Results |
||||||||||||||||||||||||||||||||||
5.1 |
The telescope mount is functional and working properly. The state machine that we designed for user input works as intended in acquiring the required data for star tracking. The telescope mount rotates the telescope right after the calculations of the star position are done. There is also little or no downtime between using the keypad buttons to calibrate the telescope mount’s orientation. The local sidereal time interrupt executes every 15956 cycles (at 62.5ns) to increment the local sidereal time clock. This is approximately 1/1000 of a sidereal second. In reality, this clock should be executing every 15956.16 cycles. However, this is not possible with the ATmega 32. Thus, we gain 0.28415 cycles every 1/1000 sidereal second, or 0.63934 sec every 10 hours. This is acceptable since we do not intend to be running the mount for more than 2-3 hours. There is also a limit to the floating point accuracy when calculating the number of seconds that passed since our epoch.
|
||||||||||||||||||||||||||||||||||
5.2 |
With the high step accuracy of our motor and our step-down pulley system, we were able accurately track the position of a star to within approximately 0.01 degree. However, the rotation of the telescope to the star's position has an accuracy of 0.5 degrees, due to the accuracy of floating point division. Our various tracking modes also work as intended; the user is able to calibrate the telescope manually and fast tracking mode for the telescope mount rotates the telescope ten times faster. We are satisfied with the construction of the mount as it is stable and solid enough to support and turn a telescope.
|
||||||||||||||||||||||||||||||||||
5.3 |
Safety was observed throughout the construction of the mount. We complied with all the rules and regulations of the Emerson Lab machine shop while using the machines. We enrolled in the Basic Machining course taught by George Petry to be fully certified to use the red apron machines - the mills and the lathes. Safety goggles were worn at all times in the machine shop, and we took care to observe all the safety procedures while using the machines. In the ECE 476 lab, we made sure to solder our boards properly and safely. All this was also done in the consideration of those working with and near us. Therefore, no one was hurt during the process of the entire project.
|
||||||||||||||||||||||||||||||||||
5.4 |
We did not in any way interfere with other people’s projects, making sure that our mount parts and boards were kept away from others. The user interface of the telescope mount is simple and easily understandable. This makes is usable for almost everyone.
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
6 |
Conclusion |
||||||||||||||||||||||||||||||||||
6.1 |
The initial idea of building a telescope mount was extremely daunting. The designing and machining aspects were deemed too hard and time-consuming that we were worried that we would not finish the project on time. However, after we scaled down our designs and obtained the materials, we were able to make relatively quick progress on the mount. The code was written with relatively few bugs. The few problems which arose was when we were dealing with printing float variables to the LCD screen and also scrolling through the list of stars on the LCD screen. The two functions that we used to calculate LST and rotate coordinate frames were also particularly challenging to write. We were able to overcome these few difficulties and finished the project. We are extremely happy that the telescope mount is fully functional. Given more time or a larger budget, we would add a Hall sensor to our mount, which would detect the rotation of the mount and provide feedback as to its actual direction, to enable us to more accurately track a star. We would also add a motor to control the elevation of the mount, so that the process can be more automated. Currently the user has to manually adjust the elevation of the mount.
|
||||||||||||||||||||||||||||||||||
6.2 |
Other than the formulas obtained from a website mentioned earlier, all circuits, digital code and mechanical designs were built and written by Ian Quek and Kevin Goh. There are no patent opportunities for our project. We did not have to sign any non-disclosures to get sample parts.
|
||||||||||||||||||||||||||||||||||
6.3 |
Our project was designed and built by accordance of the IEEE code of ethics: We, the members of the IEEE, in recognition of the importance of our technologies in affecting the quality of life throughout the world, and in accepting a personal obligation to our profession, its members and the communities we serve, do hereby commit ourselves to the highest ethical and professional conduct and agree:
|
||||||||||||||||||||||||||||||||||
6.4 |
There are no legal considerations for us since we do not transmit anything.
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
7 |
Appendices |
||||||||||||||||||||||||||||||||||
7.1 |
Please click on this [link] for the C code.
|
||||||||||||||||||||||||||||||||||
7.2 |
Figure B.1: Front of Mount: Concept Art
Figure B.2: Back of Mount: Concept Art
Figure B.3: Part A: Holder for threaded rod to keep the mount tilted
Figure B.4: Part B: Mounting sheet for the pulleys and the motor
Figure B.5: Part C: Base sheet
Figure B.6: Part D: Initial Pulley Mount - for the pulley that is connected to the motor
Figure B.7: Pulley Telescope Mount: For the telescope to be mounted on
Figure B.8: Part F: Holder for Part A. Connects the base to the threaded rod holder.
|
||||||||||||||||||||||||||||||||||
7.3 |
|
||||||||||||||||||||||||||||||||||
7.4 |
Ian Quek: Kevin Goh:
|
||||||||||||||||||||||||||||||||||
7.5 |
|
||||||||||||||||||||||||||||||||||
Page Copyright Ian Yik Oon Quek and Tze Wei Kevin Goh | |||||||||||||||||||||||||||||||||||