Use a two-axis motion controller with two independently current-regulated stepper channels, two compatible encoder inputs, an RS-232 ASCII command interface, and an isolated power-disconnect output. Let the controller close each position loop and report motion complete; use the Linux PC as the sequence supervisor. Cutting controller power during each antenna measurement changes the startup-position problem, so the encoder type and recovery sequence must be resolved before hardware selection.
Electrical and Motion Limits
The number that matters is 3 A per phase. This current sets winding heating and the minimum continuous output rating of each driver channel; the motor's 12 V rating alone does not size the controller supply or relay.
If 12 V and 3 A are matching steady-state ratings for the same winding segment, the derived winding resistance is R = V / I = 12 / 3 = 4 ohms. Copper loss is then P = I²R = 3² × 4 = 36 W per energized winding segment. This is heat, not logic. The total supply load still depends on the driver's current-regulation method, the number of simultaneously energized phases, speed, acceleration, mechanical load, efficiency, and whether one or two axes move together.
| Selection quantity | Known requirement | Limit or ambiguity | Where to read the deciding value |
|---|---|---|---|
| Axis count | One or two independent axes | Both axes may require simultaneous control | Controller axis and concurrency specifications |
| Motor winding | 12 V unipolar stepper | Lead arrangement and permitted drive topology are unspecified | Motor wiring diagram and driver compatibility table |
| Phase current | 3 A per phase |
Peak, RMS, hold-current, and winding-segment definitions are unspecified | Motor datasheet and driver current-setting definition |
| Feedback | Optical encoder | Incremental versus absolute, resolution, output circuit, and supply are unspecified | Encoder label, datasheet, and controller input specification |
| Host interface |
RS-232 carrying ASCII commands |
Baud rate, framing, flow control, command grammar, and status messages are unspecified | Controller communication manual |
| Power isolation | Remove power from controller and both motors during antenna tests | Supply voltage, input current, inrush, and DC contact duty must be measured or specified | Power-supply label, controller input specification, and switching-device ratings |
Symptom-to-Cause Reading
Motion errors in this application divide into current, timing, feedback, reference, and switching problems. Separate them by measurement rather than compensating with extra commands.
| Observed symptom | Likely mechanism | Deciding check |
|---|---|---|
| Motor or driver overheats while stationary | Full phase current remains applied at hold, or the current setting uses a different peak/RMS convention | Measure phase current in hold and compare the driver's current-setting definition with the motor rating |
| Encoder reaches the target late or overshoots | The PC closes the loop through Linux scheduling, serial transport, parsing, deceleration, and mechanical coast | Log target crossing, stop-command transmission, driver response, and final encoder count |
| Position changes after a power cycle | An incremental encoder or controller counter loses the absolute coordinate, or the load moves while torque is removed | Compare the pre-shutdown count, mechanical reference, startup count, and homing result |
| PC receives completion before motion stops | The response acknowledges command receipt rather than final position and zero motion | Read the command-state definition and correlate the response with encoder velocity |
| Relay operates but EMI remains | Only part of the noisy power path was opened, or conducted/common-mode paths remain through signal shields and the PC | Measure controller supply voltage and repeat the antenna noise measurement with communication and shield paths isolated methodically |
| One axis disturbs the other | Shared supply sag, grounding, current capacity, or non-independent firmware scheduling | Compare voltage, encoder error, and completion behavior during single-axis and simultaneous moves |
Position-Control Mechanism
Stepper commands describe intended motion; the encoder measures achieved motion. A controller that accepts stepper moves but merely displays encoder counts is not automatically a closed-loop position controller. The required feature is an encoder-based stop or position loop for each axis, with a defined completion condition and fault response.
Map antenna angle to encoder position before selecting resolution. When the documented count scale is counts per antenna revolution, use target counts = target angle / 360 degrees × counts per antenna revolution. If the encoder sits on the motor side of a transmission, include the measured transmission ratio and account for backlash between the motor and antenna. Establish separate sign conventions and zero references for elevation and azimuth.
Controller-side feedback gives the shortest deterministic path from target crossing to deceleration. PC-side monitoring can work at low speed with generous error tolerance, but final error becomes a function of variable serial and operating-system latency. If PC monitoring is unavoidable, characterize worst-case stopping distance at every planned speed and load, then place the stop threshold ahead of the target by the measured distance. Recheck that offset after changing acceleration, mechanics, serial settings, or antenna load.
Controller and Driver Architecture
Select by electrical interfaces and state behavior, not by the presence of a serial connector. A suitable architecture contains two independent motion channels, each with a current-regulated driver rated for the motor connection, an encoder counter compatible with the encoder output, configurable acceleration and deceleration, position comparison, and explicit completion and fault status.
A unipolar motor may expose center-tapped windings, but the lead count and permitted connection have not been specified. Match the actual motor wiring diagram to the driver's supported topology. Confirm whether the advertised driver current is continuous, peak, RMS, or total; a channel described only as 3 A is not yet proven compatible with a 3 A per-phase motor.
The controller must retain two independent targets and report which axis completed or faulted. For autonomous testing, it also needs a queryable startup state, position state, motion state, limit state if limits are fitted, and driver fault state. Hardware limit inputs and a repeatable home reference are valuable for preventing a software or coordinate error from driving the antenna beyond its mechanism.
RS-232 Command and Completion Contract
The PC needs a transaction contract more precise than “send ASCII and wait for done.” Verify the physical RS-232 interface, connector pinout, baud rate, data framing, flow control, line termination, checksum behavior if present, command echo, timeout behavior, and recovery after malformed or interrupted commands.
Define separate states for command accepted, motion active, motion complete, and motion fault. Motion complete should mean that the selected axis reached its position window and satisfies the controller's stopped-motion rule, not merely that the command entered a queue. Read both rules in the controller manual because the position window, settling behavior, and completion semantics are product-specific.
Use one transaction identifier or an unambiguous axis-and-command association if the protocol provides it. After a timeout, query status before retransmitting a move; blind retransmission can duplicate a relative move. Favor absolute-position commands for antenna angles because a repeated absolute target does not accumulate the same error as a repeated relative displacement.
Power Isolation and Restart State
An RS-232 port is a signaling interface, not a relay-coil power output. Use an isolated digital-output or serial-controlled switching interface to drive a properly rated relay, contactor, or solid-state switching stage. Rate its contacts for the actual switched circuit, particularly DC voltage, continuous input current, startup inrush, and interruption of an inductive load; an AC contact rating does not establish the same DC breaking capability.
Choose where to disconnect power. Opening the controller's incoming supply removes the driver switching source and avoids switching individual motor phases. If “all power” includes auxiliary encoder or interface supplies, enumerate every feed and decide whether encoder position must remain observable during the antenna test. Do not interrupt energized motor leads with underspecified contacts; inductive arcing can damage contacts and driver outputs.
Power removal eliminates holding torque. The antenna can move under gravity, cable force, wind, or transmission backlash. An absolute encoder can report position after restart if its interface remains valid and the controller accepts that coordinate. An incremental encoder normally requires retained counting power or a repeatable home operation after count loss. The startup sequence must therefore obtain a valid coordinate before accepting another antenna angle.
Commissioning Procedure
- Record the motor lead arrangement, winding resistance, 12 V rating basis, and whether
3 A per phaseis peak or RMS. Resolve the driver's current convention against the same definition. - Identify the encoder as incremental or absolute. Record its supply, electrical output, documented count resolution, index behavior if present, and mounting location relative to gearing and backlash.
- Configure one axis at reduced current and conservative motion settings. Verify motor direction, encoder direction, and count stability by moving a small mechanically safe distance in each direction.
- Set the phase-current limit from the motor and driver documentation. Measure current and temperature during hold, repeated positioning, and the longest planned move; compare them with the manufacturers' limits.
- Calibrate antenna angle against encoder counts across the usable travel. Measure approach error from both directions so backlash is visible rather than absorbed into a single scale factor.
- Test controller-side stopping at increasing speed and load. Record commanded position, final position, settling behavior, and completion indication for both axes.
- Implement the PC sequence as status-driven operations: confirm ready, command the angle, wait for accepted status, monitor fault status, wait for genuine completion, verify final encoder position, then authorize the antenna test.
- Command the driver to a nonmoving state, verify encoder stability, and operate the isolated power disconnect. Confirm that controller and motor power are absent at the intended nodes before collecting the EMI-sensitive measurement.
- Restore power and wait for an explicit ready state rather than a fixed guessed delay. Re-establish position from an absolute reading or home the mechanism before the next move.
- Repeat the sequence with both axes moving, serial interruptions, rejected commands, power cycles, and deliberate position deviations within safe mechanical limits.
Verification Criteria
Accept the system only after the measurements cover the worst planned operating profile. Verify phase current at standstill and motion, motor and driver temperature after repeated cycles, supply behavior during simultaneous-axis acceleration, and relay or contactor temperature during repeated switching.
For each antenna angle, log commanded counts, final counts, approach direction, completion status, and the angle measured at the antenna. Set the permissible position window from the antenna-test accuracy requirement, then prove that every final position stays inside it. A serial completion response without an independent final-count check is insufficient during commissioning.
Run an EMI comparison with motion electronics powered, disabled but powered, and disconnected by the proposed switch. This separates switching noise from conducted or coupled noise that remains through communication, encoder, grounding, or shielding paths. Record the exact powered state used for production measurements.
Recurring Integration Pitfalls
Treating the motor's 12 V label as the complete supply specification leads to poor driver selection. Current-regulated stepper systems must be selected from phase current, winding data, driver topology, input range, thermal capacity, and motion duty together.
Another common error is placing the position loop in the PC because encoder data is already available there. The resulting stopping error varies with communication and scheduling latency. Keep the fast stop decision in the motion controller and let the PC manage antenna-test sequencing.
Power cycling also exposes hidden state assumptions. Relative coordinates, incremental counts, queued moves, and completion flags may reset differently. Query each state after startup and reject motion until the coordinate reference is valid. Finally, distinguish a relay command from proof of isolation: use supply measurement or auxiliary contact feedback to verify that power actually changed state.
FAQ
What happens if the Linux PC monitors the encoder and sends the stop command?
The final angle includes Linux scheduling, RS-232 transmission, controller parsing, deceleration, and mechanical coast. Measure worst-case stopping distance at each operating speed, or move the encoder stop function into the controller.
What happens if controller power is removed with an incremental encoder?
The controller can lose its count, and the unpowered antenna can move because holding torque disappears. Retain the coordinate with suitable powered hardware or perform a repeatable home operation after every restart.
When should I stop commissioning and contact official support?
Stop when the driver current definition, encoder electrical interface, DC switching rating, or startup-coordinate behavior cannot be obtained from the product documentation, or when measured current, temperature, or position departs from documented limits. Remove power if uncontrolled motion, wiring heating, or contact damage appears; record the wiring, settings, measurements, and fault state, then escalate to official support for the affected controller, driver, motor, encoder, or switching hardware.