SM7LCB, Antenna Rotor Control

Last updated 31 May 2009. Back SM7LCB remote page

Presentation

This page will describe my rotor controller build around a PIC16F876 microprocessor. It will easy interface the YAESU G-800SDX but can in principal be used to any type of rotor with correct interface. The control interface used is based on the ICOM CI-V bus with the same physical interface and also data address format but commands are normal ASCII formatted text.

For this project I’m using PIC microprocessors see my PIC page for more information.

TOP


Schematic

The schematic for the circuit is shown in the figure below. As you see it more or less are only a microprocessor and some interface circuits.

Click on above picture for a PDF document.

The main part is a microprocessor from Microchip called PIC16F876(A).
  • The connector J1 is used to program the microprocessor (ISP) and also for power supply to the unit (+5VDC).
  • The buffer IC2A/B is used as an ICOM bus interface (CIV).
  • The buffer IC2C/D/E/F is used to buffer signals to the rotor (open collector max 30 mA).
  •  The switch S1 to select active low or high signals on the buffer IC2C/D/E/F.
  • The filter R16/C2 will give analogue value for the current speed (0-5V).
  • The connector J8 is the analogue input from the rotor (0-5V).

TOP


Software

The microprocessor needs to be loaded with the rotor control software. You can download the software here and then you need programming software, which can download the file into the microprocessor over the program interface (see the schematic).
The software is currently only possible to get in the HEX file format.

LCB rotor control software (PIC16F876A) for you testing, no version release.

LCB-R01 version 1.00, rotor control program for PIC16F876.

The hexfile include fuse (configuration bits) setting for the PIC processor. But if the PIC programmer you are using don’t get the fuse (configuration bits) setting from the file you may need to set then manual in the PIC programmer, see below

Name Use Setting
FOSC1, FOSC0 Oscillator Selection bits. 01 = XT oscillator
WDTE Watchdog Time Enable bit. 0 = WDT disabled.
PWRTE Power-up Reset Enable bit. 0 = PWRT enabled.
BODEN Brown-out Reset Enable bit 1 = BOR enabled.
LVP Low Voltage In-Circuit Serial Programming Enable bit. 0 = RB3 is digital I/O, HV on MCLR must be used for programming.
CPD Data EE Memory Code Protected. 1 = Code protection off.
WRT FLASH Program Memory Write Enable. Don't care.
DEBUG In-Circuit Debugger Mode. 1 = In-Circuit Debugger disabled, RB6 and RB7 are general purpose I/O pins.
CP1, CP0 FLASH Program Memory Code Protection bits. 11 = Code protection off.

TOP


Start Up

To start up the controller and to do the configuration/calibration you need a terminal program which can read/write ICOM CIV commands.

When you start up the controller you shall hopefully get a message from the controller there it reports it's software version etc.
It shall look like this "vLCB-R01v1.00".

TOP


Configuration

Before calibration of the rotor system there is a need to configure the controller. This is done by sending a set mode command to the controller. Below show to example of configuration.

Not that the default address of the controller will first time be 0xFF.

Azimuth configuration.

Maasscmlpb
example
M5510CALC5
  • aa = 55 give controller address 0x55.
  • ss = 10 give slave address 0x10 (not used).
  • c =  C give controller function.
  • m = A give azimuth mode.
  • l = L give limit function.
  • p = C give status send at "change of state".
  • b = 5 give a break activation time of 5 seconds.

Elevation configuration.

Maasscmlpb
example
M5510CELC5
  • aa = 55 give controller address 0x55.
  • ss = 10 give slave address 0x10 (not used).
  • c =  C give controller function.
  • m = E give elevation mode.
  • l = L give limit function.
  • p = C give status send at "change of state".
  • b = 5 give a break activation time of 5 seconds.

TOP


Calibration

After installation and configuration of the unit there is need to do calibration of the rotation system. I will describe calibration of two different rotor units which I have tested the controller with. Hopefully they will cover most cases of rotor systems.

DAIWA DC7055

The first thing to do is to measure the total rotation value in degrees for the DC7055. Usually the rotor will move more then 360 degrees. This value is needed if you want good resolution of the direction. If you don't that you can use 360 degree as rotation value. For my DC7055 i found it to be 374 degree. Now we can start the calibration,

Command Status information Text
S "sS--030.0" Enter calibration. Indicated with the 'S' in status message.
In calibration the value will indicate position in % of full value.
D sS--030.0" Move via DOWN/CCW command start position.
This position shall be indicated with low number value.
Z000.0 "sS--003.0" Set start position when reach the start position.
The value shall be in range 0-20%.
U "sS--060.0" Move via UP/CW command to end position.
This position shall be indicated with high number value.
E374.0 "sS--079.5" Set end position when reach the end position.
Use the measured rotation value here if need good resolution.
The value shall be in range 75-99%.
X360.0 "sS--079.5" Set the normal rotation limits (360.0).
QS "sS-O014.0" Exit with save of calibration data. Normal med in status see 'N'.
Status now indicate the normal reading at current position e.g. the end position. The end position is here indicated as 14 degree and the 'O' indicate over rotation because of the 374 degree rotation.
O320.0 "sN-320.0" Move the antenna to a known direction. At this direction you can now calibrate the offset by setting the real antenna direction value to the controller. The offset is calculated within the controller.

YAESU G-800SDX

This is a very good and easy modified rotor for this controller. After the calibration the antenna direction could be set in 1 degree resolution and this made if very us full for my 10 GHz 60 cm dish antenna. Before the calibration I measured the total rotation for the rotor to be 447 degree from start to end position. the following command were used to calibrate the rotor,

Command Text
S Enter calibration mode.
Z000.0 Move to start position and send start position command.
E447.0 Move to end position and send end position command.
X360.0 Set full rotation message.
QS Exit with save the calibration mode.

TOP


Commands

All command to this rotor controller is sent over the ICOM CIV bus and they are not following any used standard. The commands are using only ASCII characters for easy use. To get information how you shall embed these commands into the ICOM CIV bus please read link information for the bus itself.

In the ICOM CIV bus all ICOM radios have a common address (0x00). For LOGGER units on the same bus I have been using address 0x01 as a common address for units to broadcast information. In the command table below there is notes if the message can be sent over this common address. There is also a note it the command will return the standard ICOM messages for OK and NOT OK command. Check this return message if you want to no if it when OK or NOT OK! All commands are valid except that some of the command is not valid during calibration.

Command Function Common CIV OK Calibration
Movement status
?
and
status data decoding
Get movement status as “sCMO123.4”
  • Status message are send to a common address for LOGGER (0x01).
  • Status messages starts with the ‘s’ character.
  • During calibration C=’S’ and during normal operation C=’N’.
  • The current movement there M=’-‘ is no movement, M=’U’ movement going up and M=’D’ movement going down.
  • If rotor can mover over 360 deg the O=’O’ else O=’-‘
  • The direction in 123.4 deg
  • This message will automatically be send when direction is changed but not more then once a second.
YES YES YES
Stop movement
- Stop rotation (movement). - YES YES
Move UP/CW direction
U Go UP/CW. - YES YES
U100 Go UP/CW during 100 ms, 
time interval is 000-999 ms.
- YES YES
U100A Go UP/CW during 100 ms as "U100" with speed A (low), B, C and D (high). - YES YES
Move DOWN/CCW direction
D Go DOWN/CCW. - YES YES
D100 Go DOWN/CCW during 100 ms,
time interval is000-999 ms.
- YES YES
D100A Go DOWN/CCW during 100 ms as "U100" with speed A (low), B, C and D (high). - YES YES
Move to a direction
G123.4 Go to direction 123.4 degree (shortest way). - YES -
U123.4 Go UP/CW to direction 123.4 degree. - YES -
D123.4 Go DOWN/CCW to direction 123.4 degree. - YES -
Set offset
OC Clear current used offset setting. - YES -
O123.4 Set new offset. The current direction will be set to indicate direction 123.4 degree. - YES -
Unit setup
! Get the loaded software version information.
Example "vLCB-R01v1.00".
At power on. NO YES
M? Get current mode, see below.
The return status will start with small 'm' character.
- NO -
Maasscmlpb Set mode.
  • Unit address in hexadecimal number.
    aa = 33 will be address 0x33.
    Valid address range is 0x02 - 0xEF.
  • Slave address in hexadecimal number.
    ss = 44 will be address 0x44.
    Valid address range is 0x02 - 0xEF.
    Disable when set to 0x00 (not used).
  • Unit mode:
    c = C => unit as controller.
    c = S => unit as slave.
  • Rotor mode:
    m = A => azimuth mode.
    m = E => elevation mode.
  • Rotor end limit function (?):
    l = L => ?
    l = N => ?
  • Rotor status information type:
    p = P => Poll data with '?' command.
    p= C => Change of state status.
  • Break wait time in seconds:
    b = 0 - 9 seconds, zero no wait time.
- YES -
Calibration
S Start the calibration mode. - YES YES
Z000.0 Set start position to 000.0 degree. - YES YES
E400.0 Set end position to 400.0 degree. - YES YES
X360.0 Set the rotation information to 360.0 degree. - YES YES
Q Exit the calibration mode without save. - YES YES
QS Exit calibration with save of calibration data. - YES YES

TOP



SM7LCB
End of this page
Document made with Nvu