Servo, MG996R
The TowerPro MG996R: a standard-size servo with metal gears, for when an SG90 is not strong enough. Aliases: MG996R, metal gear servo, standard servo.
The signal is the same as every hobby servo's: a pulse fifty times a second whose
width names the angle, so the Arduino Servo library drives it with the same
attach() and write() as the SG90. The servo article explains
the pulses.
Pins
| Pin | What it does |
|---|---|
GND |
Ground, the brown wire. |
VCC |
Supply, 4.8 V to 7.2 V, the red wire. |
PWM |
The signal, the orange wire. |
Properties
min_pulse, max_pulse and range map the pulse onto the angle, 544 to 2400 us for
0 to 180 degrees by default, the Arduino library's window.
While it runs
Nothing to drag. The horn turns to where the pulses put it.
What the model gets right
From the MG996R datasheet:
Speed. 0.17 s per 60 degrees at 4.8 V and 0.14 s at 6 V: about 353 and 429 degrees a second. The model takes the speed from the supply, in a straight line between those two figures.
Dead band. 5 us: a pulse within 5 us of the last one it obeyed does not move it.
The supply. Under 4 V it does not move.
What it does not model
Torque (9.4 kgf.cm at 4.8 V and 11 at 6 V on the datasheet) and current. A real MG996R under load pulls amps, and on a board's 5 V pin it browns the board out; the model has nothing on the horn and will not.
Common mistakes
Powering it from the board's 5 V pin. Give it its own 5 V or 6 V supply, with the grounds joined.
See it in action
Parking barrier lifts an MG996R arm when an HC-SR04 sees a car, with a traffic light module saying when to go. Open it at /templates.