Skip to content

500 Heading Calibration

Anthony Good edited this page Sep 2, 2020 · 6 revisions

Potentiometer / Voltage Input Sensors (FEATURE_AZ_POSITION_POTENTIOMETER & FEATURE_EL_POSITION_POTENTIOMETER)

Initially, the calibration is written to the unit using these settings:

#define ANALOG_AZ_FULL_CCW_EEPROM_INITIALIZE 1
#define ANALOG_AZ_FULL_CW_EEPROM_INITIALIZE 1023
#define ANALOG_EL_FULL_DOWN_EEPROM_INITIALIZE 1
#define ANALOG_EL_FULL_UP_EEPROM_INITIALIZE 1023

These settings are written to EEPROM only upon the first boot up of the code, or will be written to EEPROM if the \Q command is executed.

There are two methods to calibrate potentiometer sensors at runtime:

Yaesu GS-232 Emulation

If you have the Yaesu GS-232 emulation activated, on the serial interface issue the O command and manually rotate the rotator to full counter-clockwise 180 degrees and send a carriage return. Then issue the F command and manually rotate the rotator to full clockwise (270 degrees on a 450 degree rotator, or 180 degrees on a 360 degree rotator) and send a carriage return.

The elevation can be calibrated similarly with the O2 and F2 commands at 0 degrees and 180 degrees, respectively.

The calibration settings are written to non-volatile EEPROM memory.

Extended Commands

\?AO                - azimuth full CCW calibration  (Alpha OSCAR, not Alpha ZERO)
\?AF                - azimuth full CW calibration
\?EO                - elevation full DOWN calibration
\?EF                - elevation full UP calibration   (Echo OSCAR, not Echo ZERO)

The \A and \B commands are intended mainly for rotary encoders and should NOT be used for potentiometer / analog voltage sensors. Easycom and DCU-1 do not have any commands for calibration.

I2C Sensors

\Ax[xxx][.][xxxx]   - manually calibrate azimuth
\Bx[xxx][.][xxxx]   - manually calibrate elevation

Rotary Encoder Sensors and Pulse Input

\Ax[x][x]           - manually calibrate azimuth
\Bx[x][x]           - manually calibrate elevation

Calibration Tables

If you have an azimuth or elevation sensor that is not linear and requires a calibration lookup table, that is provided in the code here:

#define AZIMUTH_CALIBRATION_FROM_ARRAY {180,630}

#define AZIMUTH_CALIBRATION_TO_ARRAY {180,630}

#define ELEVATION_CALIBRATION_FROM_ARRAY {-180,0,180}

#define ELEVATION_CALIBRATION_TO_ARRAY {-180,0,180}

To enable it, activate FEATURE_AZIMUTH_CORRECTION and/or FEATURE_ELEVATION_CORRECTION and configure the arrays above. The from array is for the values coming from the sensor, and the to values are what you want to translate the values to. Values that are between from values are extrapolated so there is no need to fill the arrays with every possible value, just end points and a reasonable number of points in between, depending on how nonlinear your sensor is and how much accuracy is needed. Note that you must have an equal number of members in each from and to array. The azimuth and elevation correction features apply to any sensor when activated.

Calibration tables should not be used in place of the calibration commands above. The calibration table functionality is designed to correct non-linearities in the sensor range. This manifests itself as headings that are correct at the full clockwise and counter-clockwise positions, or fully down and fully up positions, but is inaccurate at points in between.

Heading Calibration for Incremental Shaft Encoders with Z Pulse

Recalibration of the system will occur automatically every time the rotor bearing passes thru the Z pulse bearing. The Z pulse bearing should be placed mechanically at an azimuth bearing that the rotor will frequent, usually in the center of the range of motion, like due North. Similarly place the elevation Z pulse at a bearing that is conveniently measured, like 45 or 90 degrees.

Heading Calibration Using Sun or Moon Position

The azimuth and elevation can be calibrated to the current sun or moon position using the \XS and \XM commands, if the sun or moon is visible. This feature is intended to be used by manually rotating an antenna towards the sun or moon and peaking for maximum solar noise or EME signals, and then executing the appropriate command. The rotator controller clock must be accurately set to Zulu time for this feature to work accurately.

Push buttons for sun and/or moon position calibration can be added to the hardware using FEATURE_SUN_PUSHBUTTON_AZ_EL_CALIBRATION and FEATURE_MOON_PUSHBUTTON_AZ_EL_CALIBRATION.

IO Pins for this are set in this area:

#ifdef FEATURE_SUN_PUSHBUTTON_AZ_EL_CALIBRATION

#define pin_sun_pushbutton_calibration 0 // normally HIGH, have button pull LOW

#endif //FEATURE_SUN_PUSHBUTTON_AZ_EL_CALIBRATION

#ifdef FEATURE_MOON_PUSHBUTTON_AZ_EL_CALIBRATION

#define pin_moon_pushbutton_calibration 0 // normally HIGH, have button pull LOW

#endif //FEATURE_MOON_PUSHBUTTON_AZ_EL_CALIBRATION

Heading Sampling / Averaging

There are several settings to help you tweak the behavior of the heading sample.

#define AZIMUTH_SMOOTHING_FACTOR 0

#define ELEVATION_SMOOTHING_FACTOR 0

The smoothing factor settings make the unit average a fraction of the newly sampled heading with the current heading. These factors can be set from 0 to 99.9. The higher the number, the higher percentage of the current heading is used in the averaging formula.

#define AZIMUTH_MEASUREMENT_FREQUENCY_MS 100 #define ELEVATION_MEASUREMENT_FREQUENCY_MS 100

The measurement frequency settings determine how often headings are sampled. The unit is in milliseconds (mS).

Clone this wiki locally