DIY antenna automatic tracking system OpenATS

Category: Tags: ,

I. Introduction
The emergence of SDR allows us to use extravagant things, we can use SDR to do many things that radio stations cannot do, and it changes our perception of radio communication.

Anyone who plays radio may know that when communicating with satellites, since many satellites are non-stationary, an automatic tracking antenna is needed at this time. There are also commercial tracking antennas on the market.

However, the high price of commercial finished products made us stop. Now everyone can use the automatic tracking antenna to track satellites, not only for simple projects such as radio communication, but also to receive high-definition HRPT cloud images of weather satellites and so on. But most people do not have an automatic antenna, and even if they do, they are limited to radio communication.

After searching, I also found some open source projects, such as Bob’s CNCTRK based on Raspberry Pi, etc., as well as tracking antennas made with camera tripods with low accuracy. The camera tripod has low accuracy and low cost. If you just want to use it for radio communication and other projects, you can make it according to that. But now I want an antenna with higher accuracy, better control, and more suitable for future radio research. CNCTRK is not bad. The LinuxCNC open source system based on Raspberry Pi is also a very good open source project. If you need to know, you can find the information yourself. But I feel that the interface is not intuitive and flexible enough, and I am still not satisfied. So I decided to make it myself.

After searching for information, I finally decided to use the open source hardware platform Arduino to complete this project. Then more difficulties are waiting for me. I have never touched Arduino before and started to learn Arduino programming. Fortunately, it is based on the C language. Then, what motor is used in the mechanical system? Servo? Stepping? What is a servo, what is a stepping, I have never touched these things before. Learning from the beginning and accumulating little by little is a difficult process. I began to understand why there are so many people and so many fans in the world, and few people can make such a simple tracking system. It looks very simple , but it involves too much knowledge, including computer programming, electrical knowledge, microcontroller programming, mechanical design, geographic knowledge, radio knowledge, and so on.

The figure below is the azimuth angle, 360 degrees in a circle.

At first, my design was to use a cheap high-power DC motor plus a precision potentiometer as an angle sensor, which is equivalent to DIY a servo motor. Why did I choose this? Because I have an abandoned marine satellite communication antenna from Japan JRC. It comes with Sanyo’s DC motor and high-precision potentiometer to form a closed-loop control, which can be equivalent to a servo motor. Since they can achieve it, so can I. So I looked everywhere for how to use potentiometers and DC motors for closed-loop control, and I found a lot of code examples. So began a long process of programming and programming. Finally, I finished writing, and then set up a hardware test. At this time, something went wrong. Because the antenna inertia is too large, my system can’t brake at all, it’s almost useless. DIY servo requires hardware support, not just relying on Arduino as a controller. The price of the circuit board for DIY servo is also very high. So was forced to abandon this plan. Later switched to a stepping motor with high positioning accuracy. I am very satisfied with the cost and positioning accuracy of the stepper motor. But more difficulties came one after another. The stepping was open loop and there was no feedback. How to reset the antenna? How to prevent losing steps? So start to write the program, the program has a stepping motor step function, you can record all the steps taken, and then reset. Lost steps can only be accomplished by other methods such as prevention and frequent antenna calibration. I also want to use a servo motor, better motor control, better angle control, but the servo is too expensive. After the entire system is completed, the cost is high and it cannot be popularized.

(The motor in the picture below is a non-finished motor, and the power in the picture is insufficient after installation, so the 0.9N.m lengthened 42 stepper motor is replaced)

Later, I studied how Arduino can control stepper motors used in industry. Then start looking for information and code in the Arduino forum. Very difficult process, no one around can help you, you can only search for information from the forum and Google. Finally finished writing, and later the code can realize simple functions, but unfortunately, I found a better open source stepper motor control library AccelStepper. At this time, I suddenly felt very excited. Because this library is very good, with acceleration and deceleration itself with step-memory function, that is to say, using this library, you don’t have to consider those problems at all, just tell the program how many angles you want to rotate to!

Once again, delete the code and rewrite it…

The first is how to control the stepper motor and how to apply acceleration. Finally began to design the entire system. Using existing tracking software as the host computer (tracking platform) can greatly reduce my workload. And the current tracking software is very good. After deciding to use the existing computer tracking software platform, I started to find a suitable software as the host computer controller. There are many tracking software: Orbitron, WXtrack, Xtracker and other free satellite tracking software, which are all very good. And WXtrack personally thinks it is the best satellite tracking software, and many players think so. I have been using WXtrack to track satellites. Author David Taylor. Although he is very old, he has been updating and supporting the software. I really thank this gentleman in the radio field for his contributions.

The following is the tracking interface of WXtrack

After confirming WXtrack as the tracking software, I began to study WXtrack in depth. To use the tracker protocol supported by WXtrack by default for my system, it is even simpler. I studied all the control protocols that come with WXtrack and selected two of them, one is EasyComm and the other is KVH.

The angle data sent by EasyComm’s serial port is intuitive, but if the software is not registered, the data sent can only be integers, not accurate to the data after the decimal point. After contacting the author David.Taylor via Twitter and chatting a lot, the author said that the latest beta version to be launched has added this feature for free. I am disappointed with such a good software, but unfortunately it is not open source and the code is not open. KVH’s protocol data is found by grabbing the serial port data. The angle value it sends retains one decimal place. Although it is an integer, you can get an angle accurate to 0.1 by moving the decimal point one place in front. . The imperfect part is that the data it sends is sent separately. One piece of data is AZ (azimuth), and then another EL (elevation) is sent separately, and so on. The consequence of this is that if I do not control the Arduino programming manually, the antenna movement will first turn the azimuth angle, then the elevation angle, then turn the azimuth angle and then the elevation angle… it is too ugly and not smooth! Some careful people will think that if you rotate like this, the accuracy will be greatly reduced, and the satellite will not be aligned at all!

Then I turned to EasyComm, and then thought about whether there is a cracked version of WXtrack. There is indeed a 3.8.28 version of the registration machine, which can be completely cracked, so I downloaded it for experimentation and found that it can indeed output higher precision after cracking. I kept the two decimal places. If your conditions are good, please buy a genuine serial number to support the author’s dedication. If you feel that this is not good, please comment out the EasyComm part of the code and use the KVH mode. This mode does not require registration and can also meet the needs of most people.

In order to make a more perfect antenna, I thought of many things. I added a manual control function, so that we can control our antenna more flexibly and make our antenna more perfect.

This system is completely free and open source, and has a name: OpenATS (Open Antenna Tracking System), close to OpenBTS…

This system can also be developed into the field of UAV tracking, radio radar, etc., just define the output data format as azimuth and elevation. Easy to expand. Anyone can use it for free.

The antenna was originally made, but it has not been made public. After completing this antenna, I have the conditions to receive HRPT high-definition cloud images from NOAA and weather satellites. Use Hackrf to output .RAW16 radio data files through GNU Radio, and then use Taylor’s HRPT Reader software to output high-definition satellite cloud images. Much better than APT satellite cloud images.

I want to receive a high-definition HRPT format cloud image before publishing this antenna. However, my current living environment has no place to set up an antenna, and the electromagnetic environment is also very poor. After thinking about it, let everyone build their own automatic antenna! Below is the HRPT high-definition cloud image received by a player, which was decoded by Hackrf+Gnu Radio + HRPT Reader.

2. Production/use process
Required hardware:

A computer to run the WXtrack satellite tracking software.

Arduino, cracked version or genuine version can be used. If it is genuine, you can buy Genuino, which is divided into Nano and Mega versions. It is recommended to use Mega, which has better processing power and memory, and can be expanded later.

There are 2 stepper motors, preferably 57 stepper motors. The torque is larger, 2.0Nm or more is the best. Of course, the torque can also be increased by a reducer.

2 stepper motor drivers, which control the stepper motors respectively. 1 set of driver with 1 stepper motor, 57 step set is about tens of dollars.

One 24V switching power supply (for industrial use), the specific power depends on the sum of the power of your two stepping motors. If you choose 57 high-power stepper motors, you must choose a power supply of at least 10A.

Also, a stand that can rotate on the XY axis. This is not easy to buy, you can make it yourself, and the cost is not easy to estimate. If the bracket is not included, it only takes a few tens of dollars to complete the realized function, plus the cost of the bracket, less than 400 US dollars should be enough. It mainly depends on whether you use reducer and bracket accessories.

 

Construction process:
All programs and codes have been shared to mynetwork disk, you can download it.

1. Download and install the Arduino driver arduino-1.6.8-windows.exe, download and unzip the AccelStepper library, and copy the decompressed entire AccelStepper folder to the libraries folder of the Arduino program after installation.

Finally, copy the tracking antenna code into the IDE and upload it to the Arduino development board.

2. Build the hardware, the specific hardware wiring is very simple, that is, use the Arduino’s PWM interface to send pulses. The control interface of AZ azimuth is 3, dir direction control is 5, the control interface of EL elevation angle is 6, and dir direction control is 9. Either common cathode connection or common anode connection can be used (of course, you can modify the interface in the code yourself, and the corresponding peripheral circuit also corresponds to the interface).

The CLK+ of the AZ azimuth angle (also called PUL+ on some drivers) is connected to the digital interface 3 of Arduino, CW+ (some also called DIR+) is connected to the digital port 5, the CLK+ of the EL elevation angle is connected to 6, and CW+ is connected to 9.

Connect CLK- and CW- on the AZ azimuth driver together, and then connect to a GND interface of the arduino. Connect CLK- and CW- of EL elevation driver together, and then connect to another GND interface of Arduino.

The remaining EN+ (some of them are also called ENA+) and EN-, we will not pick up.

3. The wiring between stepper motor and driver, stepper motor such as common 2-phase four-wire motor, divided into A+, A-, B+, B- wiring, there are signs on the driver, according to their own stepper motor wire color Just connect the definition. The power supply on the drive can be connected to the output of the switching power supply, and the switching power supply can supply 24V voltage to the two drives.

Pay attention to the positive and negative poles.

The circuit diagram is as follows:

Instructions for use:
(1) Automatic tracking

To automatically track, go to download WXtrack3.8.28 with a registered machine version to run and crack the software (you must register or crack the software, you can also use the latest beta version of Tylor), update the ephemeris, the ephemeris update will prompt you to connect to the Internet or update failure, we Manually download the ephemeris file and put it under the program folder.

Run the WXtrack software on the computer, find the top menu, Tracker–Options will open the antenna tracker setting interface:

Then we click to select EasyComm I COM port.

Pass start can be set to 1, which means that the antenna will be woken up 1 minute ago.

 

Pass end is what instruction is sent after the tracking is completed. We enter the reset instruction of our antenna: “S” of course “0” is also possible, and Parking means parking the antenna.

We selected Park antenna. Then switch to the Port setup menu, select the COM port corresponding to your arduino, such as COM4, and select the 9600 rate set in the program

Then enter the Tracker-specific options menu and set EasyComm precision to 2, so that the serial port data output by the program will retain 2 decimal places, otherwise it is an integer, and the accuracy of the entire system is very low.

The computer software is set up. After the angle is adjusted, it can be tracked automatically!

(2) Manual control

For manual control, please open the serial monitor of the Arduino IDE or use other software that can send serial data (all kinds of serial debugging tools are available, please download by Baidu)

Set the serial port number corresponding to your Arduino (in the system management), and then set the baud rate to 9600.

When sending the angle command, follow the format: Azimuth Angle Elevation Angle (AZ EL), with a space in the middle, and the data is a floating point number or an integer. For example, if you send: 20 40, the antenna azimuth will turn to 20 degrees and the elevation angle to 40 degrees. Equivalent to: 20.0 40.0 You can enter a decimal point. If the subdivision is large, the recognition ability of the program can be accurate to 0.1 degree. If only one digit is entered, only the azimuth angle will be adjusted and the elevation angle will be 0. For example, if 20 is the antenna, the azimuth is turned to 20 degrees by default, and the elevation angle is 0 degrees. Input S or 0 to reset the antenna, that is, the azimuth and elevation angles are all 0 degrees.

Correction function

This function was added last. Since the antenna has been placed in the storage room, it is inconvenient to test, so no test was performed, only the code was written.

So this feature is waiting to be developed in the future, I don’t know if the code is easy to use or not. When recording a video, the code is different from the current code, so the commands in the serial port window in the video are different.

After a long period of operation, the antenna may lose accuracy due to the loss of steps of the motor. At this time, you can input commands to calibrate. To adjust the antenna simply and clearly, AZ and EL are adjusted separately.

The command to adjust the azimuth is: AA23 is the capital letter AA followed by a number, which can be a floating point number or an integer. That is to adjust the current angle of the antenna to 23 degrees.

The command to adjust the elevation angle is: The principle of EE56 is the same as above.

Finally, it is more important to say that when setting up the antenna, you need to level the antenna elevation angle (this can be done with a level), and you also need to align 0 degrees to the true north direction of the AZ azimuth, not magnetic north. So how to find the direction of true north is a difficult problem. I want to use the direction of the sun at 12 o’clock local time of the day as true south to determine it. Note that the time is not the current longitude time. You can use high-precision GPS to get the precise local time, and then determine the true north direction according to the sun projection method. There is a better and more precise method I hope everyone can share.

Three, known shortcomings/problems
1. During the automatic tracking process, you cannot turn off the software and switch to manual tracking. Otherwise, when the automatic tracking is turned off, the antenna stops at 0 o’clock by default.

The same is true when the power is turned off and on again.

2. Since this tracking is realized by software, it cannot be tracked by signal gain like the national satellite antenna, so the accuracy can only satisfy our amateur radio enthusiasts. After the actual construction is completed, it needs to be carefully adjusted. The delay of the program and the mechanical device can be compensated by advancing the system time of the host computer a few seconds. Specifically, adjust the best state of your antenna based on multiple tests. You can also reduce the acceleration parameters appropriately to advance the system time to make the antenna run more smoothly.
Looking forward to more people to improve.

Finished detailed picture:
The purpose of tying a red wine box is to maintain weight balance. I will replace the red wine box with a parabolic antenna in the future.

 

Reviews

There are no reviews yet.

Be the first to review “DIY antenna automatic tracking system OpenATS”

Your email address will not be published. Required fields are marked *