W9KE Satellite Tracker - Software


Project Home  Rotor  MicroController  Motor Controller  Yaesu G-5500  Software  Virtual G-5500   iPoint 

All the difficult and challenging software required for this project has been written by others. This software simply takes the output from one of the many satellite tracking programs and converts the heading information from the tracking program into simple motor movements. I use SatPC32 and have done all my testing using this program. There are many other fine satellite tracking programs out there. They should work if they support the Yaesu GS-232 controller (most do).

Before using the program you will need to set up a few things. The source code listing shows several constants near the top of the program. You should find some lines that look something like this.

MaxAzimuth = 360     'maximum azimuth in degrees - 360 for most rotors (450 possible for G-5500)
MaxElevation = 180  'maximum elevation in degrees - 90 or 180 most common (check your rotor)

These lines set the maximum rotation angle for the rotors. Be sure to set them to match your rotor setup. Some rotor-antenna setups will not allow high elevation angles check your rotors to make sure these values are set correctly.

The next part of this page describes setting up the stepper motor part of the program. You can skip over this part if you are not using stepper motors. After that is the part describing how ot set up the G-5500 portion of the program. You can skip the G-5500 part if you are not using the G-5500. The program source code is fully commented and is self documenting.


Stepper Motor Setup


At the top of the source code there are a number of constants defined. You may need to change these to match the characteristics of your stepper motors. The most important lines should look something like this.

'================= Motor Parameters================================

'values depend on motor characteristics and load
'initial values are a starting point - adjust for your setup

'motor degrees per step multiplied by 100 - depends on motor step size and gearing
Motor1StepSize = 90   'my azimuth motor - 200 steps per rev - 1:1 gearing HALF step
Motor2StepSize = 90   'my elevation motor - 200 steps per rev - 1:1 gearing HALF step

HowSlow = 1   'controls speed of stepper motor (bigger number = slower)
'serial lcd display is slow compared to motor step speed so lcd updates
'and cpu operations will limit the maximum speed of the motor
'even in the worst case it is still many times faster than the G-5500

HowClose = 100   'margin of error for motor moves in degrees multiplied by 100

The program uses integer math. To maintain some reasonable degree of accuracy all the angles are multiplied by 100. All this is hidden from the user when the program runs but you must be aware of it when adjusting the constants. For example - if the heading is 123.45 degrees it is stored internally as 12345 but would be displayed as 123 degrees on the LCD. Stepper motors have a step size - this is the number of degrees it moves each time the motor steps. Most quality stepper motors have a step size of 1.8 degrees. These motors can be operated in what is called half step mode where the motor steps only half a step in each move. The program uses half step mode by default. A standard 1.8 degree stepper (200 steps per revolution) operated in half step mode will move 0.9 degrees per step. To enter the 0.9 degree step size into our program setup we multiply it by 100.

The constant HowSlow is a unitless relative value. The bigger you make the number the slower the motors will turn. The constant HowClose determines how close we try to get to the actual heading when moving. There must be some margin for error. It is set to 100 which is 1 degree multiplied by 100. No real point or need to change this value.

The remainder of the constants define which I/O lines are used to interface to the various devices. If you did not change the I/O line use from that described on the microcontroller page you should not have to change any of these.


G-5500 Setup


If you have added the G-5500 function the A/D constants will probably need adjusting. Unfortunately the G-5500 uses an analog pot for the position feedback to the control. A part of the constant section at the top of the source code will look something like what is shown below. AFTER you have setup your G-5500 control to work correctly with the instructions contained in the manual, then you can adjust these values. Remember we are working in the analog world where everything is plus or minus a bit and close is good and really close is great.

Never forget that on page 2 of the manual for the G-5500 it states  "Pointing Accuracy:  +- 4 percent".  At an azimuth of 360 degrees that is plus or minus 14.4 degrees. Do not worry if your display is off a little bit.

'================= A/D converter parameters ==================

'The next four values may need to be tweaked to adjust for your rotors
'Adjust these values only after you have adjusted your G-5500 rotor control box
'according to the instructions in the manual that came with your G-5500.
azAdZeroOffset = 90   'adjust to zero out reading when az = 0
elAdZeroOffset = 20   'adjust to zero out reading when el = 0
'adjust the next two values to provide the best overall agreement between
'the rotor control box and the value displayed on the lcd
'revolution" for azimuth is 450 for G-5500
'revolution" for elevation is 180 for G-5500
'ADMaxValue = 4095 since we are using a 12 bit A/D
azAdToDegrees = 97   '(ADMaxValue * 10) / Az degrees per "revolution" = 91
elAdToDegrees = 230   '(ADMaxValue * 10) / Az degrees per "revolution" = 228

Be sure to adjust these values only after you have adjusted your control box for the G-5500. If you change the setting on your control box you may have to adjust these values again.

For more information on various parts of the project click on the links at the top of the page.