Ang servo The servo motor — the pulse is the command, and the pot inside is how it knows

Malalim na aralinDeep dive 14 · after deep dive 09

Tagalog: draft — for Kate / Janet to check.  Kung may servo sa mesa, hawakan habang nasa scene 3 — pilitin ang horn at pakinggan.  If a servo is on the bench, hold it during scene 3 — push the horn and listen to it fight back. That sound is the whole page.

Ang servo — bench card Positional servo, 3-wire, 50 Hz PWM

Ang servo ay hindi motor lang. Motor + gears + potentiometer + maliit na computer sa loob. A servo is not a motor. It is a motor, a gear train, a potentiometer and a tiny controller in one box — and that is why you tell it an ANGLE instead of a speed.

Ang 4 na dapat tandaan · The four that bite

1. Hindi serial ang 3-wire lead. It looks exactly like a data bus and it is not one. One wire carries a pulse whose WIDTH is the command. No addresses, no clock, no bytes (deep dive 12).

2. Sariling 5 V ang servo. Jumper sa 3.3 V. Club rule. A servo pulls amps when it moves and far more when it stalls. Feed it from the ESP32 board and the 3.3 V rail sags until the board resets — which looks exactly like a code bug and is not one.

3. 3.3 V na signal ay OK sa 5 V na servo. Only the POWER needs 5 V. The signal is read as a threshold, so a 3.3 V GPIO pulse drives a 5 V servo perfectly. Do not add a level shifter you do not need.

4. PAGSAMAHIN ang ground. Separate supply means two grounds. Join them or the pulse has no zero to be measured against, and the servo sits there twitching or dead. This is the number one cause of a "broken" servo in a club build.

Ang pulso The pulse. Sent every 20 ms — 50 times a second — forever, not once.

Haba ng pulsoPulse widthPosisyonPosition
1.0 ms1000 µs0°One end of the travel
1.5 ms1500 µs90°Centre. The "neutral" every servo wakes up looking for.
2.0 ms2000 µs180°The other end
Ang 20 ms ay hindi nagbabago — ang LAPAD lang ng pulso. The 20 ms frame never changes. Only the width of the pulse inside it does. Some servos accept 0.5–2.5 ms for a wider sweep — check before you trust it, because driving past the real end stop makes the motor grind against a mechanical limit it cannot reach.

Ano ang nasa loob Inside the box, in the order the work happens

ParteAno ang trabahoWhat it does
DC motorAng lakasSpins fast and weakly. On its own it is useless for holding a position.
Gear trainBagal pero lakasTrades that speed for torque. Plastic gears in cheap servos, metal in the ones worth buying for a bot.
Output gear + hornAng lumalabasThe splined shaft your arm or rudder bolts to.
PotentiometerAng mataBolted to the output gear. As the horn turns, the pot turns, and its resistance tells the board where the horn actually is. This is deep dive 09 doing a real job.
Control boardAng utakHolds a comparator and an H-bridge (deep dive 08). Compares wanted vs actual and drives the motor either way until they match.

Ang loop The feedback loop — the one idea on this page

1. Pulso galing sa ESP32 → boltahe na GUSTO. 2. Pot → boltahe na TOTOO. 3. Comparator: may pagkakaiba? 4. Umandar ang motor hanggang maging zero. 5. Hintay. The board never counts turns and never knows how far it has gone. It only ever asks "am I there yet?" and runs the motor in whichever direction shrinks the error. That is why a servo fights you when you push the horn — you created an error and it is doing its only job.

Torque — ang numero sa gilid That weight printed on the case is NOT the servo's weight

Ang 25 kg ay 25 kg·cm: 25 kg sa 1 cm mula sa shaft. Torque is force times distance, so the further out you bolt the load, the less it can lift. The arithmetic is just division:

Distansya sa shaftKayang buhatin (25 kg·cm servo)What this means for a bot
1 cm25 kgShort, stubby arm. Strong.
2 cm12.5 kgTwice the arm, half the lift.
3 cm8.3 kg
5 cm5 kgA long arm throws away most of the servo you paid for.
10 cm2.5 kgA 25 kg servo that lifts 2.5 kg. Design the arm SHORT.

Bilis: nasa segundo kada 60°. Mas mataas ang boltahe, mas mabilis. Speed is quoted as seconds per 60° (e.g. 0.12 s/60°). More volts means faster and stronger — and hotter. Stay inside the printed range.

Kuryente Current: the number that decides your battery and your wiring

GinagawaKuryenteWhy it matters
Nakahinto, walang loadKaunti langIdle. Almost nothing.
Humahawak ng bigatKatamtamanHolding a position against a load still costs current.
UmaandarMataasMoving is the normal working current.
STALLPinakamataasJammed, or commanded past its end stop. Current shoots up, the gears grind and the servo cooks itself. A stalled servo is a servo being destroyed.

Tatlong uri Three things that all use the same 3-wire lead

UriAng utosUse it for
Positional servoAnggulo (0–180°)A rudder, a claw, a weapon arm, a steering linkage. Has the pot inside.
Continuous rotationBilis at direksyonA drive wheel. The pot has been disconnected — 1.5 ms now means STOP, not centre, and it has no idea where it is.
ESC + brushlessBilis langThe hovercraft's lift and thrust fans. Same pulse, same lead, no position control at all, and it needs arming before it will run.

Paano namamatay ang servo Four ways to kill one, in the order they happen in a club

1. Walang common ground — twitching or dead. Join the grounds. 2. Pinapakain mula sa board — the 3.3 V rail sags and the ESP32 resets mid-move. Own 5 V supply. 3. Lumabas sa end stop — commanded to 200° on a 180° servo. It stalls against a plastic wall until something gives. 4. Pinilit pabalik — back-driving the horn by hand with power off strips the gear teeth. Never use a servo horn as a handle.

Saan ito sa atin: ang rudder ng hovercraft, ang braso ng bot, at ang anumang bahagi na kailangang tumigil sa EKSAKTONG anggulo. Source: The Engineering Mindset, "Servo Motors, how do they work?" (YouTube 1WnGv-DPexc). The 3.3 V jumper rule, the 3.3 V-signal-is-fine point and the common-ground warning are ours, not the video's.