43m Subreflector Firmware

ukrainianlegalElectronics - Devices

Nov 2, 2013 (4 years and 6 days ago)

88 views

43m Subreflector Firmware


Introduction


The 43m deformable sub reflector has, as its name implies, the capability of altering the surface shape
by way of an on
-
off 4 actuator control sy
stem. The
subreflector

controller

consists of an MOD5270
networked microcontroller which receives position commands over a Telnet interface, and will in turn
close the actuator position error
(s)
.


Architecture


The deformer controller consists of the following components:

-

MOD5270 Microcon
troller from Netburner. This is a network enabled microcontroller that
supports a number of hardware interfaces including GPIO, SPI, I2C, RS232, RS485, timers, etc.
Deformer control simply requires use of MOD5270’s RS485 interface to monitor the LVDT
pos
ition sensors, and the GPIO interfac
e to activate digital outputs which

drive the actuator
relays.

-

DIO card built by NRAO. This card provides a 50 pin Samtec mount
ing connector that routes the
MOD5270’s GPIO to discrete logic devices on the DIO card. Th
is in turn, controls 4 relays that
can switch 110v to any of 4 actuators.

-

LVDT position sensors HC
-
485 from Measurement Specialties (formerly Schaevetiz). These
sensors have a RS485 communication interface over which the MOD5270 can readout position
inf
ormation. They mount
to the 4 stiffening fr
ame members of the subreflector as illustrated in
Figure 1.

-

Electromechanical Actuator (115 VAC), from Duff
-
Norton. Each of 4 actuators is controlled by
the MOD5270 by way of the DIO card interface. Like the

LDVT position sensors, they mount to
the stiffening frame member as shown in Figure 1.


Figure
1

-

Actuator, Position Sensor mount

Control System Topology


Figure 2 shows the major control system components.


Figure
2

Deformer Control System Topology


Firmware


Xilinx
VHDL



The motherboard for the Netburner MOD5270 is the “digital card” which was used on the PTCS
digital servo project. This card bring nearly all of the Netburner’s

I/O lines through a Xilinx 3AN xxx FPGA
which in turn, has I/O lines physically connected through a 50 pin SAMTEC connector that pl
ugs onto the
DIO card. I
t was necessary to write a small bit of VHDL to properly tie the Netburner’s GPIO lines (24
pins)

to the FPGA’s I/O pins that control the DIO card logic. The FPGA logic is accessible in a public CVS
repository at
/home/gbt2/43m/2.0/43m/devices/antenna/DeformableSubreflector/Subreflector_VHDL/
DigitalBoardI
nterfaces.vhd .


Netburner




An embedde
d app
lication was developed that enables a user

control
of
subreflector
deforming
through

a set of ASCII commands over a Telnet interface. This allows either a human or machine to
connect to the Telnet port and enter
actuator
position set points.

The embedded application can be
broken down into four separate components: an Actuator interface, an LVDT interface, an Position
Control task, and a command interface. These components are discussed in detail below. The code for
the embedded applicati
on is stored in the CVS repository at
/home/gbt2/43m/2.0/43m/devices/antenna/Deformabl
eSubreflector/Subreflector_Firmware/ .



Actuator Inte
r
face



Open loop control of the deformer actuators is implemented by changing the states of GPIO
lines. For each
actuator there is a pair of GPIO lines that the Netburner uses to put the actuator into up,
down or stop motion states.

GPIO lines GIO9 through GIO12 w.r.t. the 50 pin connector are dedicated
to controlling actuator motion states.
Actuators are distribut
ed over 2 74LVC374 chips

on the DIO card,

with each chip
controlling 2 actuators. Toggling a Netburner GPIO line connected to a 74LVC374 chip
will latch the line states
for
the associated actuator(s). The state table in Figure 3 shows GPIO line
states
required to put an actuator into up, down or stop states.


Actuator 0

Actuator 1

Actuator 2

Actuator 3


Up

Down

Stop

Up

Down

Stop

Up

Down

Stop

Up

Down

Stop

GIO9

H

L

L

X

X

X

H

L

L

X

X

X

GIO10

L

L

H

X

X

X

L

L

H

X

X

X

GIO11

X

X

X

H

L

L

X

X

X

H

L

L

GIO12

X

X

X

L

L

H

X

X

X

L

L

H

Latch

Toggle 1
st

74LVC374 latch

Toggle 2
nd

74LVC374 latch

Figure
3

-

Actuator motion states vs GPIO states

Through empirical testing we have determined that an unloaded actuator

has a travel velocity of
~ 1.9 cm/sec. Thus, turning an actuator for
the
20 mSec

control cycle

will move it ~ .046 cm.


LVDT Interface


The LVDT interface is controlled by the Netburners 2
nd

RS232 port that is connected to an B&B
Electronics 485LDRC9 R
S232/485 converter. This, in turn, connects to 4 Measurement Specialties
(formerly Schavetiz) HC 485
-
250 LVDT position sensors.
Since the RS232 interfaces on the Netburner
and 485LDRC9 converter are both DCE, the 3 wire cable between them is wired in a
crossover
configuration

[Figure 4]
. The HC 485
-
250 LVDT sensor is setup to communicate using ASCII commands,
with the serial port configured for 19200 bps, 8 bits, No parity, 1 stop bit. Each LVDT sensor is given a
unique address of 1
-
4 so that the Netbu
rner can address them individually.


Figure
4

-

RS232/485 connections


Control Sequence


If a position set point deviates fro
m the LVDT readout by 1mm,
the control logic will
determine

the sign
of the positio
n error, and
accordingly,

pulse the actuator
in the up or down direction
. The fundamental
control period is

T
on

= 20mSec, which

moves the actuator ~.5mm.

This sequence is repeated until the
position error is < 1mm.
In the event of a disconnected/faulty LVDT sensor, the control
algorithm
places

an actuator into a

“faulted” state if it cannot close the position loop within 50 attempts. A
faulted actuator can only be fixed through human intervention
, by entering a “cl
ear
fault” command
over the Telnet interface.


Command Interface


The command interface for the Deformable Subreflector is implemented through the Netburner’s
network interface. Either a human or computer can connect to the Telnet interface (port 23)
and send
ASCII commands that monitor and control the actuators. The command set is as follows:

-

“help”


lists the set of commands along with a brief description

-

"act_up <actuator>”
-

moves specified actuator (0
-
3) up

-

“act_down <actuator>”
-

moves specif
ied actuator (0
-
3) down

-

“act_stop <actuator>”
-

stops the specified actuator (0
-
3)

-

“get_pos <lvdt>”
-

returns most current lvdt position

-

"set_pos_tgt <actuator>”
-

sets a position target for an actuator

-

"get_state”
-

returns state information for all f
our actuators
. States are: 0x01 = STOP, 0x02 =
UP, 0x04 = DOWN, 0x80 = FAULT. Each actuators state is saved in 4 separate bytes in a 32 bit
work. State of actuator 0 is saved in the LSB.

-

"clr_fault <actuator>”
-

Clears the fault assoc
iated

with an actu
ator

Connecting to the Telnet port via a VT100 terminal is an excellent first order method for testing the
operation of the deformer. Connecting to the Telnet port via a “C” or Python program allows the
deformer to be controlled through an M&C
type
system
.