Skip to content

A rotor controller interface for the rot2proG controller from SPID Elektronik

Notifications You must be signed in to change notification settings

jaidenfe/rot2proG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

UBNL Logo

# rot2proG >University at Buffalo Nanosatellite Laboratory 2016
>Created By Jaiden Ferraccioli
>E-mail: jaidenfe@buffalo.edu
>Current Version: v1.0

This is a control interface for the SPID Elektronik rot2proG antenna rotor controller. Protocol documentation was adapted from http://ryeng.name/blog/3. The SPID protocol supports 3 commands: stop, status and set. The stop command stops the rotor in its current position and returns the aproximate position it has stopped in. The status command returns the current position of the rotor. The set command tells the rotor to rotate to a given position.

The rotor controller communicates with the PC using a serial connection. Communication parameters are 600 bps, 8 bits, no parity and 1 stop bit. In order for the computer to communicate with the rotor, the controller must be set to the "Auto" setting. This can be done by pressing the function key ("F") until you see an "A" displayed in the left-most screen on the controller.

All commands are issued as 13 byte packets, and responses are received as 12 byte packets.

===

Command Packet

Byte: 0 1 2 3 4 5 6 7 8 9 10 11 12
Fields: START H1 H2 H3 H4 PH V1 V2 V3 V4 PV K END
Value: 0x57 0x3? 0x3? 0x3? 0x3? 0x0? 0x3? 0x3? 0x3? 0x3? 0x0? 0x?F 0x20
  • START - Start byte (always 0x57)
  • H1 - H4 - Azimuth as ASCII characters 0-9
  • PH - Azimuth resolution in pulses per degree (ignored in command packet)
  • V1 - V4 - Elevation as ASCII characters 0-9
  • PV - Elevation resolution in pulses per degree (ignored in command packet)
  • K - Command (0x0F = STOP | 0x1F = STATUS | 0x2F = SET)
  • END - End byte (always 0x20)

===

Response Packet

Byte: 0 1 2 3 4 5 6 7 8 9 10 11
Fields: START H1 H2 H3 H4 PH V1 V2 V3 V4 PV END
Value: 0x57 0x0? 0x0? 0x0? 0x0? 0x0? 0x0? 0x0? 0x0? 0x0? 0x0? 0x20
  • START - Start byte (always 0x57)
  • H1 - H4 - Azimuth as byte values
  • PH - Azimuth resolution in pulses per degree
  • V1 - V4 - Elevation as byte values
  • PV - Elevation resolution in pulses per degree
  • END - End byte (always 0x20)

Positions are decoded using the following formulas:

az = H1 * 100 + H2 * 10 + H3 + H4 / 10 - 360
el = V1 * 100 + V2 * 10 + V3 + V4 / 10 - 360

Degree Per Pulse

Deg/pulse PH PV
1 0x01 0x01
0.5 0x02 0x02
0.20 0x04 0x04

NOTE: The PH and PV values in the response packet reflect the settings of the rotator controller. The Rot2Prog supports the following resolutions (always the same for azimuth and elevation):

===

Stop Command

Command Packet

Byte: 0 1 2 3 4 5 6 7 8 9 10 11 12
Fields: START H1 H2 H3 H4 PH V1 V2 V3 V4 PV K END
Value: 0x57 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0F 0x20

Response Packet Example

Byte: 0 1 2 3 4 5 6 7 8 9 10 11
Fields: START H1 H2 H3 H4 PH V1 V2 V3 V4 PV END
Value: 0x57 0x03 0x07 0x02 0x05 0x02 0x03 0x09 0x04 0x00 0x02 0x20

az = 372.5 - 360 = 12.5
el = 394.0 - 360 = 34.0
PH = PV = 0x02 (pulse for each 0.5 deg)

===

Status Command

The status command returns the current position of the antenna

Command Packet

Byte: 0 1 2 3 4 5 6 7 8 9 10 11 12
Fields: START H1 H2 H3 H4 PH V1 V2 V3 V4 PV K END
Value: 0x57 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x1F 0x20

Response Packet Example

Byte: 0 1 2 3 4 5 6 7 8 9 10 11
Fields: START H1 H2 H3 H4 PH V1 V2 V3 V4 PV END
Value: 0x57 0x03 0x07 0x02 0x05 0x02 0x03 0x09 0x04 0x00 0x02 0x20

az = 372.5 - 360 = 12.5
el = 394.0 - 360 = 34.0
PH = PV = 0x02 (pulse for each 0.5 deg)

NOTE: Status commands can be issued while the rotator is moving and will always return the current position

===

Set Command

The set command tells the rotator to turn to a specific position. The controller does not send a response to this command.

Azimuth and elevation is calculated as number of pulses, with a +360 degree offset (so that negative position can be encoded with positive numbers).

Rot2Prog supports different resolutions:

H = PH * (360 + az)
V = PV * (360 + el)

H1-H4 and V1-V4 are these numbers encoded as ASCII (0x30-0x39, i.e., '0'-'9').

Example
Pointing a Rot2Prog to azimuth 123.5, elevation 77.0 and a 0.5 degree per pulse value (PH=PV=2):

H = 2 * (360 + 123.5) = 967
V = 2 * (360 + 77.0) = 874

Byte: 0 1 2 3 4 5 6 7 8 9 10 11 12
Fields: START H1 H2 H3 H4 PH V1 V2 V3 V4 PV K END
Value: 0x57 0x30 0x39 0x36 0x37 0x02 0x30 0x38 0x37 0x34 0x02 0x2F 0x20

NOTE: The PH and PV values sent are ignored. The values used by the rotator control unit are set by choosing resolution in the setup menu. These values can be read using the status command if they are not known.

About

A rotor controller interface for the rot2proG controller from SPID Elektronik

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages