Sign in with STEVE

steve/hobby-servo

Hobby servo: SG90, MG90S, Futaba S3003 and MG996R, with a single-arm horn.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 50 lines · Python · STEVE runtime · checked
Download
1"""Hobby servo with a single-arm horn. The case's underside is on the XY plane, centred on the origin, the case's long side along X, the output shaft up at the +X end.
2Fit dimensions come from each maker's drawing in the README; the shaft's place, the tabs' thickness, the holes and the horn are proportions, for looks."""
3from steve import Model
4
5designation = "SG90" # Servo
6detail = "full" # full: with the horn, tab holes and output shaft; simple: case and tabs only
7
8# type: (case length, case width, length over the tabs, height to the tabs' top, height to the case's top, height overall)
9# SG90: Luxorparts item 87897 sheet, update Nov 30, 2017: 22.8, 12.4, 32.0, 15.6, 26.7, 15.6 + 15.8 (horn included).
10# S3003: Luxorparts item 87902 sheet, update Nov 30, 2017: 40.5, 20.2, 54.2, 29.5, 39.4, 29.5 + 19.0.
11# MG90S and MG996R: Tower Pro drawings, https://www.electronicoscaldas.com/datasheet/MG90S_Tower-Pro.pdf and MG996R_Tower-Pro.pdf: MG90S 22.5, 12, 32.5, 21, 35.5; MG996R 40.3, 20, 53.6, 26.6, 36.6, 47.6.
12# The MG90S drawing gives no case top: 0.75 of the way from the tabs to the top, for looks.
13SERVOS = {
14 "SG90": (22.8, 12.4, 32.0, 15.6, 26.7, 31.4),
15 "S3003": (40.5, 20.2, 54.2, 29.5, 39.4, 48.5),
16 "MG90S": (22.5, 12.0, 32.5, 21.0, 31.9, 35.5),
17 "MG996R": (40.3, 20.0, 53.6, 26.6, 36.6, 47.6),
18}
19
20length, width, span, tab_top, case_top, overall = SERVOS[designation]
21tab = 0.1 * width + 1
22shaft_x = length / 2 - width / 2
23model = Model()
24with model.sketch("case_sketch", on="XY", name="Case") as sk:
25 sk.rect("case_rect", (-length / 2, -width / 2), (length / 2, width / 2))
26model.extrude("case", "case_sketch", distance=case_top, name="Case")
27model.plane("tab_plane", on="XY", offset=tab_top - tab, name="Tabs")
28with model.sketch("tab_sketch", on="tab_plane", name="Tabs") as sk:
29 sk.rect("tab_rect", (-span / 2, -width / 2), (span / 2, width / 2))
30model.extrude("tabs", "tab_sketch", distance=tab, name="Tabs")
31if detail == "full":
32 with model.sketch("holes_sketch", on="tab_plane", name="Tab holes") as sk:
33 sk.circle("hole_left", (-(span + length) / 4, 0), 0.08 * width + 0.5)
34 sk.circle("hole_right", ((span + length) / 4, 0), 0.08 * width + 0.5)
35 model.extrude("holes", "holes_sketch", distance=tab, op="cut", name="Tab holes")
36 horn = 0.14 * (overall - case_top)
37 model.plane("boss_plane", on="XY", offset=case_top, name="Boss")
38 with model.sketch("boss_sketch", on="boss_plane", name="Boss") as sk:
39 sk.circle("boss_circle", (shaft_x, 0), 0.32 * width)
40 model.extrude("boss", "boss_sketch", distance=0.35 * (overall - case_top), name="Boss")
41 with model.sketch("shaft_sketch", on="boss_plane", name="Output shaft") as sk:
42 sk.circle("shaft_circle", (shaft_x, 0), 0.17 * width)
43 model.extrude("shaft", "shaft_sketch", distance=overall - case_top - horn, name="Output shaft")
44 model.plane("horn_plane", on="XY", offset=overall - horn, name="Horn")
45 with model.sketch("horn_sketch", on="horn_plane", name="Horn") as sk:
46 sk.slot("horn_slot", (shaft_x, 0), (shaft_x - 1.2 * width, 0), 0.25 * width)
47 model.extrude("horn", "horn_sketch", distance=horn, name="Horn")
48model.material("abs", color="#26282b")
49result = model.result()
50

Hobby servo as an assembly envelope: case, mounting tabs, output shaft and a single-arm horn. Case, tab and height dimensions from the makers' drawings; the shaft's place, holes and horn are proportions, for looks. See the README.

Hobby servo

A hobby servo as an assembly envelope. The case's underside is on the XY plane, centred on the origin, the long side along X, and the output shaft points up at the +X end.

Source

Servo Case Over the tabs To the tabs' top Case top Overall Source
SG90 22.8 x 12.4 32.0 15.6 26.7 31.4 Luxorparts item 87897 sheet, Nov 30, 2017, https://www.kjell.com/globalassets/mediaassets/701916_87897_datasheet_en.pdf
S3003 40.5 x 20.2 54.2 29.5 39.4 48.5 Luxorparts item 87902 sheet, Nov 30, 2017, https://naylampmechatronics.com/img/cms/Datasheets/000219_servo_s3003.pdf
MG90S 22.5 x 12 32.5 21 not given 35.5 Tower Pro drawing, https://www.electronicoscaldas.com/datasheet/MG90S_Tower-Pro.pdf
MG996R 40.3 x 20 53.6 26.6 36.6 47.6 Tower Pro drawing, https://www.electronicoscaldas.com/datasheet/MG996R_Tower-Pro.pdf

Proportions, for looks only: the output shaft's place and size, the boss, the tab thickness, the tab holes and the horn. S3003's sheet gives a tab hole pitch of 48.3 and a row of 10, which aren't modelled, so don't drill from this model: take the holes from your servo's drawing. The MG90S case top isn't on its drawing, so it's 0.75 of the way from the tabs to the top.

Clones of these servos vary. The cable isn't modelled.

  1. 1.0.0 Latest
More #servo
STEVEMIT

steve/nema-stepper-motor

NEMA stepper motor envelope: frames 8, 11, 14, 17, 23 and 34, with common models such as 17HS4401 as presets.

0 32 sizes 0 17 hours ago v1.1.0
STEVEMIT

steve/hex-head-screw

Hexagon head screw, fully threaded, ISO 4017 / DIN 933, M1.6 to M36, any length, with catalogue sizes as presets.

20 86 sizes 0 2 hours ago v2.4.2
STEVEMIT

steve/button-head-screw

Hexagon socket button head screw, ISO 7380-1, M3 to M16, any length, with catalogue sizes as presets.

12 66 sizes 0 2 hours ago v2.2.2
STEVEMIT

steve/hex-nut

Hex nut, ISO 4032, M2 to M12.

9 9 variants 0 4 days ago v1.1.0