Application of Single Chip Microcomputer in Control System of Equatorial Astronomical Telescope

Publisher:暗里著迷Latest update time:2011-12-17 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction

Looking at the current domestic telescope market, telescopes of all sizes are equipped with computers to achieve PC control. This has invisibly increased the production cost of the product, and made some small and medium-sized telescopes that originally did not need to be equipped with a computer also have to be equipped with a computer. Without a computer, they can only perform some simple manual operations, which is extremely painful. I have mainly done some crude research in this aspect, and used the assembly language of a single-chip microcomputer to compile a program for the telescope to automatically find stars, realizing the function of the handle box automatically finding stars.

System Hardware Overview

The core part of this control system is a CPU with dual serial ports (W77E58 chip), which can communicate with the host computer and the handle box at the same time, or communicate with them separately. An XC95108-84 is responsible for counting and frequency division, and an MC146818 clock chip is used to generate sidereal time. Some peripheral interface circuits are attached. For details, see (Figure 1). Because this article focuses on the algorithm part, the hardware part will not be described in detail.

Lower computer system block diagram (Figure 1)

Three software parts

Specifically, the software can be divided into four parts: PC (industrial computer) part, handle box part, lower computer part and power amplifier module part. The PC and handle box communicate with the main computer CPU (W77E58) of the lower computer respectively, connected by serial cables to achieve communication, and the power amplifier module (drive part) is connected to the lower computer directly by a data cable. Below we mainly introduce the design process and algorithm ideas of the lower computer software:

1. Design ideas

We should make clear the purpose of this design, that is, to realize the function of automatic star finding of the telescope. Specifically, we must first accurately calibrate the position of the telescope, that is, select a known star in the sky, manually operate the handle box, find it in the center of the telescope's field of view, and place it in the center of the crosshairs of the main mirror. At this time, the coordinate position of this star is input through the handle box, and the calibration replaces the original position of the telescope. Then, with this star as the basic point, according to the hour angle and declination, find any unknown star in the sky. Since the system has a power-off protection module in the program, for the telescope, it only needs to be calibrated once after debugging, and the system will be shut down each time thereafter. The current real-time position of the telescope will be automatically saved, which brings great convenience to users. When automatically searching for stars, we input the astronomical coordinates (α, δ) of the sky star into the telescope. The telescope selects a suitable path according to the current position of the sky area it is pointing to and the position of the target star to be found. The right ascension and declination motors are driven to rotate to point to the target star, so that the target star falls into the field of view of the telescope. After searching for stars, it automatically switches to tracking. The pointing of the telescope and the coordinates of the celestial body are linked through the sidereal time. Therefore, we need to know the sidereal time. Before each observation, we need to calibrate the sidereal time. The sidereal time is manually calibrated by the program and displayed on the panel. According to the formula t+α=s①

Where t is the hourly angular position of the star

α is the right ascension of the star

s is the local sidereal time

Obviously, we can match the hour angle of the telescope with the hour angle of the star. In the tracking state, in order to overcome the influence of the earth's rotation, the hour angle moves at a uniform speed of 15 arc seconds per hour and second in the direction opposite to the earth's rotation. Therefore, in terms of right ascension, it is mainly to collect local local star time in real time, refresh the display continuously, calculate the hour angle of the target star, and finally make the dynamic hour angle value of the telescope equal to the hour angle of the target star, so that the right ascension star search is completed; in terms of declination, because the declination of the star is constant, we only need to make the dynamic declination display value of the telescope constantly close to the declination value of the target star. However, for equatorial telescopes, it is necessary to consider the location of the telescope in the sky area and the location of the target star, select a suitable star search path, and ensure that the posture of the telescope tube is correct. As for the limit part, it can be set according to customer requirements. [page]

2. Lower computer software flow chart

3. Subroutine part

(1) Keyboard input and display part

In this system, we selected the 8279 chip, queried the key value in the program, and sent it to the fixed unit. If no key is pressed, #0FFH is sent to the fixed unit, and then the unit is queried. If it is #0FFH, it returns, otherwise it transfers to the corresponding function subroutine according to the key value content of the unit; and the display part mainly splits the data to be displayed into 7 bits (this system uses 7-bit digital tube display), and sends them to the display buffer respectively. The 7 corresponding fonts are taken out from the table by looking up the table and sent to the 8279 data port to realize dynamic display. The keyboard scanning and display mode of 8279 are realized by initialization programming. The 8279 initialization part program is as follows:

MOV DPTR, #7FF0H; 8279 chip status address

MOV A, #0D1H; Clear command

MOV @DPTR, A; command word sent in

LL: MOV A, @DPTR; Read 8279 status word

JB ACC.7, LL ; Clear wait

MOV A, #08H; Input external decoding on the left side of the display, double key interlock mode

MOV @DPTR, A; command word sent in

MOV A, #2AH; Clock programming command

MOV @DPTR,A; command word sent in

RET; Return

(2) MC146818 clock part

The MC146818 chip is a programmable clock chip produced by Motorola. It is used in this system to read and write sidereal time. Some of the main operations are chip initialization, read time operation, and write time operation. When using this chip to perform read/write time operations, you must pay attention to first query its status to see if it is refreshing data. If it is, you must wait until the refresh data action is completed before reading/writing the chip, otherwise it is easy to make mistakes. The initialization part of the MC146818 program is as follows:

MOV DPTR,#0BFCAH; A register port address

MOV A,#26H; Command word

MOVX @DPTR,A

INC DPL; B register port address

MOV A,#1AH; command word

MOVX @DPTR,A

RET; Return

Read time subroutine:

MOV DPTR, #0BFCAH

AA: MOVX A, @DPTR; Read status word

ANL A, #80H

JNZ AA; Is the chip being refreshed? No, read data

MOV DPTR, #0BFC0H; countdown unit

MOVX A, @DPTR

MOV @R1, A

INC R1

MOV DPL, #0C2H; read unit

MOVX A, @DPTR

MOV @R1,A

INC R1

MOV DPL, #0C4H; read time unit

MOVX A, @DPTR

MOV @R1, A

RET; Return

The subroutine for writing time is similar to the above and will not be described in detail.

(3) Serial communication subroutine

W77E58 realizes dual serial port communication. After initialization, it enters the main process and checks the serial ports one by one to see if there is a communication data request. If there is, it enters the communication subroutine and returns. Otherwise, the program will directly execute and send the data of the lower computer to the handle box and the industrial computer respectively, waiting to receive the control command. The specific initialization procedure is as follows:

[page]

MOV TCON,#50H; Timer/Counter Status Setting

MOV TMOD,#21H; Timer/Counter Mode Setting

MOV PCON,#00H; Power controller settings

MOV SCON,#53H; Serial port 0 working mode setting

MOV TL1,#0FDH; Count constant setting

MOV TH1,#0FDH

MOV SCON1,#53H; Serial port 1 working mode setting

MOV TH0,#3CH; Count constant setting

MOV TL0, #0B0H

RET; Return

(4) Calibration subroutine flow chart

(5) Automatic star search program

First, according to the input right ascension value of the target star, the local sidereal time S is taken out, and converted into the hour angle value to of the target star through calculation. Then the real-time position value tt of the telescope is read. Different star-finding paths are selected according to the differences in the sky areas where their right ascension hour angles are located. The specific situations can be divided into the following types:

1) If the hour angles of the telescope and the target star are in the same celestial region (with the central column of the telescope as the axis, divided into two major celestial regions, east and west, which is artificially set), drive the declination axis first, then drive the right ascension axis, until the target star is found and start tracking.

2) If the hour angles of the telescope and the target star are in different celestial regions, that is, searching for stars across celestial regions, first drive the declination axis to point to the North Pole, then drive the right ascension axis, and then drive the declination axis again until the target star is found and tracking begins.

In addition, since our position feedback information comes from an incremental circular grating encoder and the degree of declination is always in the range of (-90, 90), special processing is required.

What remains is the typical pursuit problem. Taking right ascension as an example, the specific flow chart is as follows:

4. Conclusion

After more than a month of actual use and observation, the telescope system runs well, smoothly and noiselessly, finds stars accurately and with high precision, and can be applied to all kinds of large, medium and small telescopes.

Reference address:Application of Single Chip Microcomputer in Control System of Equatorial Astronomical Telescope

Previous article:A gas stove voice control device based on SPCE061A single chip microcomputer
Next article:Development of a medical sterilizer control system based on single chip microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号