rcbench panel help Deutsch

Servo

SERVO drives a servo, measures its current on the servo rail, runs an automatic test across supply voltages and searches the travel limits of the installed servo. It opens from the SERVO tile on the menu, on LIVE.

The workbench

The strip under the band holds SERVO's tasks: LIVE, TEST, PROGRAM and SETTINGS. A tab switch is no level: the home tag goes home from every task, and climbs one level only from a run's settings back to TEST and from a programmer back to PROGRAM's list. Each task keeps its page and selection until the panel restarts. Leaving SERVO switches the bench to SAFE.

TaskLeft card
LIVEthe horn's angle, the dial, the readings COMMANDED, MEASURED and CURRENT along its foot, and a run's box left of the dial
TESTthe AUTOMATIC TEST and LIMIT RUN cards, each with its SETTINGS, a summary line, its start hold, the last result and its file; SUPPLY's caps, read-only
PROGRAMthe list of programmers; a row opens its programmer over the left column (Servo programmer)
SETTINGSthe pages OUTPUT, SWEEP and DUT (Servo settings)

The right card is the output card, the same on every task: the type row, the meter line and plot, the supply line, SPEED, the TARGET row, CENTRE, SWEEP, RELEASE and ARM. Every row tapped there is 48px (7.2mm) tall or taller, and ARM is 60px. The rotary knob moves the horn on LIVE only.

At rest

SERVO while SAFE
SERVO while SAFE

While the bench is SAFE the horn is drawn dimmed and LIVE's left card reads ARM FIRST. The dial takes no position. The IOmcu writes a pulse of length zero to every servo PWM (pulse-width modulation) pin.

LIVE's readings, along the foot of the left card:

ReadingShows
COMMANDEDthe pulse width the screen commands, in us
MEASUREDthe horn's angle from the AS5600 output encoder while it is on and sees its magnet, -180.0 to +179.9deg; --- otherwise
CURRENTthe servo rail's current from its meter, in hundredths of an amp

The right card, from the top:

RowShows
type rowthe servo type, frame rate and pulse range in force: STANDARD PWM 50Hz 1000-2000
meter line and plotvoltage, current and power of the rail, plotted over the last 17.8s
SETthe supply's voltage and current limit, and its output switch
SPEEDthe rate the bench may move the output, 100% passes the command straight through
TARGETwhat the tester drives, protocol pins: SERVO PWM GPIO 2, PROG PORT 1 GPIO 13, or a warning; a tap opens Outputs, where it is picked (the TARGET row)

ARMED

SERVO while ARMED SERVO
SERVO while ARMED SERVO
  1. Hold ARM for 2s. The band then shows ARMED SERVO, and the button reads DISARM.
  2. On LIVE, drag anywhere on the sweep to command a position. The solid arm is the measured position, the faint arm the commanded one.
  3. Lifting the finger does not let go: the screen repeats the last position, so the servo stays where it was put.
  4. Tap DISARM, press STOP or leave the screen to switch to SAFE.

ARMED SERVO drives the servo outputs and a pulsing PROG PORT. Throttle outputs get no pulse.

ControlSAFEARMED
The dialrefusedcommands the position under the finger
Rotary knobrefused; the turn is not keptmoves the horn from the commanded value
CENTRErefused; drawn dimmedcommands PULSE CENTRE plus TRIM
SWEEP, PAUSE, PAUSEDrefused; drawn dimmedstarts, pauses and resumes the sweep
RELEASEsends the releasereturns the surfaces to their rest: 1500us for STANDARD PWM, 760us for NARROW 760
SPEEDsetset; a held position is sent again at the new rate
START TESTrefused: ARM FIRSTstarts the automatic test after its hold

The switch to ARMED sets the commanded value to the rest, the midpoint of the channel's end points, without TRIM. The first drag or knob turn starts from there. SWEEP is grey without a bound surface, without the link, or with an IOmcu older than 0.10.0.

The servo rail's meter

The line over the plot names the meter of the servo rail:

NameMeter
INA 0x41 CH2the INA3221 channel that watches the servo tester's target in SETUP > SENSORS, here 0x41's CH2: the mean current and voltage of its last 50ms window, 20 points a second
PD MINIthe PD mini supply's last sample, or the panel's supply model
The INA3221 as the rail's meter
The INA3221 as the rail's meter
A clipped window, in the warning colour
A clipped window, in the warning colour

The INA3221 becomes the meter 1000ms after its conditions hold: a channel of a fitted part watches the tester's target in SETUP > SENSORS (on an IOmcu older than 0.22.0, CH1 of its part), the IOmcu is 0.16.0 or later, and windows with current samples arrive. A window in which a sample hit the end of the range, 1.638A on a 0.1Ω shunt, shows in the warning colour: its mean is then a bound.

The panel's supply model as the meter, with the SIMULATED pill
The panel's supply model as the meter, with the SIMULATED pill

While the PD mini is disabled on SETUP, INTERFACES, the supply is the panel's model, and a SIMULATED pill sits on the plot. Its readings are simulated, not measured.

A reading that did not arrive is --- in LIVE's CURRENT, -- on the line and a gap in the plot.

The supply on SERVO

The SET line holds the SUPPLY screen's two set points and its output switch. A change on either screen is the change on both.

HV SERVOS ONLY
HV SERVOS ONLY

Standard servos are rated for 4.8 to 6.0V. A voltage raised from 6.0V or below to above 6.0V opens HV SERVOS ONLY. The voltage is applied after HOLD 2s TO APPLY is held; CANCEL drops it. OUTPUT ON with a set point above 6.0V opens the same warning.

SWEEP and PAUSE

SWEEP moves the servo along SETTINGS > SWEEP's CURVE (square, sine or triangle) at its SPEED, 0.05 to 5Hz, across RANGE, 10 to 100% of the travel. The IOmcu times the curve, so the link's timing does not shape it. While a sweep runs the button reads PAUSE. A tap holds the servo where it is and the button reads PAUSED; a tap on PAUSED carries the sweep on from that point.

A paused sweep
A paused sweep
SPEED LIMITS THE SWEEP
SPEED LIMITS THE SWEEP

SPEED LIMITS THE SWEEP replaces SPEED's label, in the warning colour, while SPEED is slower than the fastest change the curve asks for. The curve then moves as ramps. Raise SPEED, or lower SETTINGS > SWEEP's SPEED or RANGE. With the SWEEP page's defaults (sine, 0.5Hz, RANGE 80%) and TRAVEL 90deg each way it clears at SPEED 63%.

A finger on the dial, CENTRE, RELEASE, STOP, a switch to SAFE and leaving the screen end a sweep.

The automatic test

START TEST on TEST's AUTOMATIC TEST card steps the servo through the supply voltages chosen in the card's settings. At each step it measures the current at rest, moving and holding, times the travel, and finds the voltage at which the servo stops moving. START TEST is a 2s hold. It needs the bench ARMED and a supply that answers; otherwise the card's state line names the reason: ARM FIRST, NO STEP CHOSEN, SUPPLY NOT ANSWERING, RANGE TOO SMALL, A STEP IS OUTSIDE THE CAPS or LAST REPORT STILL WRITING.

TEST and its two run cards
TEST and its two run cards

The card's summary line names the steps and the length of each, 4.8 6.0V BROWN-OUT, 60s EACH. Under START TEST the state line, then the last result and its files, LAST: PASS ATEST004.CSV + .TXT.

A test run
A test run

TEST stays shown as the run starts, and the card's state line reads the step. LIVE shows its step and phase in a box left of the dial, under ARM FIRST, with the meter beside STOP TEST: PD mini, the channel, INA 0x41 CH2, or SIMULATION. The run ends early, the output off and the servo released, on STOP TEST, STOP, a switch to SAFE, a lost link, leaving the screen, a finger on the dial, CENTRE, SWEEP, RELEASE, a tap on a set point, or a change to the servo's settings. A run on the INA3221 also ends when the INA3221 stops being the meter, or when no window with both current and voltage arrives for 200ms (4 windows of 50ms): no INA3221 window for 0.2s.

A result
A result
A result read from the INA3221
A result read from the INA3221

The result stays in LIVE's box until CLOSE, and on the card's LAST line until the next run: PASS, FAIL or ABORTED and why, the longest travel time, the highest holding current, and the files the card took, ATESTnnn.CSV and + .TXT for the report, in USER/LOGS. With User logs OFF on SETUP > SD CARD the line reads USER LOGS OFF and no file is written.

The limit run

The limit run finds where the installed servo binds at each end of its travel. It can then lower the servo's own LEFT ANGLE and RIGHT ANGLE, so the servo stops short of the binding point. It is TEST's LIMIT RUN card; SETTINGS on the card opens its settings.

The limit run, ready
The limit run, ready
  1. Tap SETTINGS on the card, then LIMIT RUN to choose SEARCH ONLY or SEARCH + PROGRAM.
  2. With TARGET on PROG PORT, tap SERVO PULSES to choose KEEP or 1000-2000. It starts at KEEP.
  3. Tap the home tag to go back to the cards.
  4. Hold START LIMIT RUN for 2s while the bench is ARMED. A tap or a shorter hold starts nothing.
  5. TEST stays shown. The box on LIVE's left card shows the phase, the side and the pulse, and the output it drives.

The line under the button names the output and the meter, the whole time: OUTPUT PROG PORT 1 GPIO 13, CURRENT INA3221 0x41 CH2 or OUTPUT SERVO PWM GPIO 2, CURRENT INA3221 0x40 CH1. The TARGET row stays in sight as well.

The run reads only the INA3221 channel that watches the tester's target. With the PD mini or the model as the servo rail's meter, START LIMIT RUN stays grey and the line says why:

LineCondition
ARM FIRSTthe bench is SAFE
INA3221 NOT SET UP TO MEASURE SERVO SUPPLY CURRENTno channel of a fitted INA3221 watches the tester's target in SETUP > SENSORS
INA3221 OFFLINEno link, or the INA3221 does not answer
NO INA3221 MEASUREMENT WINDOWS YETthe INA3221 is not the meter yet
SERVO SUPPLY BELOW 3.0V OR NOT READthe last INA3221 window has no rail voltage, or less than 3.0V: an output that is off reads 0V
PORT PWM OFF. NO PULSES ON THIS PORT.TARGET is PROG PORT with PORT PWM off
NO SERVO PWM PIN, PINS NOT READTARGET is the bench's outputs, and no output is bound as SERVO PWM, or the binding is not read yet
CENTRE MUST BE BETWEEN PULSE MIN AND MAXthe pulse range does not hold PULSE CENTRE
LAST REPORT STILL WRITINGa test or a run is under way, or its report is still going to the card

The search steps outward from the centre, the low side first, 10us a step. Each position takes 250ms: 120ms to settle, then the mean of the next windows. An end binds when the current exceeds 1.8 times the free current and exceeds it by at least 0.15A. The endpoint is reported 25us back from the binding position. The bench's own PULSE MIN and PULSE MAX are not changed.

TARGETSearch
a SERVO PWM pinfrom PULSE CENTRE out to PULSE MIN and PULSE MAX; nothing is read or written
PROG PORTa read session first, then from the servo's NEUTRAL out to its own PULSE LOWER and PULSE UPPER, never past them

The read session holds the servo at PULSE CENTRE, switches the bench to SAFE, reads the servo with CONNECT, gives the port back with LEAVE and switches the bench to ARMED. Nothing is driven before it. The run ends as FAIL before any search when:

A first CONNECT that fails for another reason, or a read that does not complete, ends the run as ABORTED with programming port session failed.

The servo's pulses outside PULSE MIN and PULSE MAX
The servo's pulses outside PULSE MIN and PULSE MAX

A KST servo as delivered holds PULSE LOWER 900.0us and PULSE UPPER 2100.0us. The STANDARD PWM type's range is 1000-2000us, so that servo is refused at KEEP. Choose SERVO PULSES 1000-2000, or a PWM type whose range holds 900 to 2100us.

SERVO PULSES at 1000-2000 writes PULSE LOWER 1000.0us and PULSE UPPER 2000.0us in the read session, before anything moves, and reads them back. NEUTRAL is not written. A servo at those values already gets no write. With SEARCH ONLY these two values are the only write.

Programming LEFT ANGLE and RIGHT ANGLE

SEARCH + PROGRAM needs a KST or Chaservo servo on the programming port: TARGET on PROG PORT, the port in PWM, and 4.8V or more. With a PD mini, its output must be on and its set point counts; without one, the servo rail in the INA3221's last window counts. On the bench's outputs LIMIT RUN reads SEARCH ONLY and the settings' note says why. On PROG PORT every run starts with a read session, SEARCH ONLY included, and it needs a KST or Chaservo servo: with another servo the run ends with no KST or Chaservo servo read. A port not in PWM, a PD mini output that is off, or a supply under 4.8V keeps the button grey for SEARCH ONLY as well, and the card's state line names the condition.

The limit run, programming
The limit run, programming

The run writes in sessions of the servo programmer:

  1. The servo goes back to the centre for 1000ms.
  2. The run switches the bench to SAFE.
  3. CONNECT reads the servo.
  4. One write, with every limit check of the programmer.
  5. LEAVE gives the port back to PWM.
  6. The run switches the bench to ARMED and searches that side again.

The first write saves the servo's values to a backup file on the card. The run takes the servo as linear: PULSE LOWER and PULSE UPPER are the pulses at which it reaches the full travel that LEFT ANGLE and RIGHT ANGLE set. The share of a side at pulse p is (p - NEUTRAL) / (PULSE LOWER or UPPER - NEUTRAL). The unit of LEFT ANGLE and RIGHT ANGLE is not known, and the linear relation is an assumption.

Each bound side gets two writes, v0 the value its register held:

  1. The overset: v0 x the share at the first bound pulse x 1.03, rounded up. The stop stays reachable, close to the pulse limit. The run searches that side again. Free there, the run ends as FAIL, no stop after the overset write.
  2. The final value: the overset x the share at the last free pulse of that search, rounded down.

Example: NEUTRAL 1500.2us, PULSE LOWER 900.0us, v0 150, the first search free at 1000us and bound at 990us. The overset is 150 x 0.850 x 1.03 = 132. At 132 the search is free out to 930us; the final value is 132 x 0.950 = 125.

Near the pulse limit, where the overset would move the stop less than 20us, the run writes the final value at once: v0 x the share at the first search's last free pulse. The first bound side's first write also finds which register limits that side. Last, the run searches both ends again: PASS when both are free, FAIL when one binds. A run writes 8 values at most: the two pulses, two on each side, and two to find the register. A value below 50 is a soft limit: the 2s start hold is the consent to it.

What ends a limit run

Each of these ends the run as ABORTED, with the output off and the servo released:

A run that ends while it waits for ARMED also switches the bench to SAFE.

A run stopped after a write
A run stopped after a write

After a write the servo keeps the values last written. The box then reads RESTORE IN PROGRAM.. On the programmer, CONNECT and READ ALL, then RESTORE offers Settings before the limit run.. A session after the run saves its own backup file at its first write.

RESTORE after a limit run
RESTORE after a limit run

The result

The box on LIVE stays until CLOSE, and the card's LAST line until the next run. The box shows the verdict, the reason or the values, and the report's file name.

VerdictMeaning
FOUNDsearch only: an end binds; the endpoints are reported
FREEneither end binds; nothing is written
PASSprogrammed, and both ends free in the last search: LEFT 150>87 RIGHT 150>95
FAILan end still binds, or the servo cannot be programmed
ABORTEDa protection, the operator, the link, the meter, the supply or the programmer ended it
A programmed servo
A programmed servo
Search only
Search only

The report is a LIMITnnn.TXT of its own in USER/LOGS, written whatever REPORT says and not written with User logs OFF. It holds where the search ran, the endpoints of both searches, the servo's pulses and the pulse write, LEFT ANGLE and RIGHT ANGLE before and after with the shares, the overset and the final value, the values written, the writes sent and the sessions, the meter, the AS5600 angle at each last free position when it is fitted, and the verdict or the reason. Until the card has closed it, Wi-Fi and an update wait.

Current limitations