steve/nema-stepper-motor
NEMA stepper motor envelope: frames 8, 11, 14, 17, 23 and 34, with common models such as 17HS4401 as presets.
Hobby servo: SG90, MG90S, Futaba S3003 and MG996R, with a single-arm horn.
| 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. |
| 2 | Fit 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.""" |
| 3 | from steve import Model |
| 4 | |
| 5 | designation = "SG90" # Servo |
| 6 | detail = "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. |
| 13 | SERVOS = { |
| 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 | |
| 20 | length, width, span, tab_top, case_top, overall = SERVOS[designation] |
| 21 | tab = 0.1 * width + 1 |
| 22 | shaft_x = length / 2 - width / 2 |
| 23 | model = Model() |
| 24 | with model.sketch("case_sketch", on="XY", name="Case") as sk: |
| 25 | sk.rect("case_rect", (-length / 2, -width / 2), (length / 2, width / 2)) |
| 26 | model.extrude("case", "case_sketch", distance=case_top, name="Case") |
| 27 | model.plane("tab_plane", on="XY", offset=tab_top - tab, name="Tabs") |
| 28 | with model.sketch("tab_sketch", on="tab_plane", name="Tabs") as sk: |
| 29 | sk.rect("tab_rect", (-span / 2, -width / 2), (span / 2, width / 2)) |
| 30 | model.extrude("tabs", "tab_sketch", distance=tab, name="Tabs") |
| 31 | if 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") |
| 48 | model.material("abs", color="#26282b") |
| 49 | result = model.result() |
| 50 |
| 1 | name = "steve/hobby-servo" |
| 2 | version = "1.0.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "Hobby servo: SG90, MG90S, Futaba S3003 and MG996R, with a single-arm horn." |
| 6 | description = """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.""" |
| 7 | tags = ["servo", "rc-servo", "sg90", "mg996r", "s3003", "mg90s", "actuator", "motor"] |
| 8 | |
| 9 | [parameters.designation] |
| 10 | type = "choice" |
| 11 | default = "SG90" |
| 12 | choices = ["SG90", "MG90S", "S3003", "MG996R"] |
| 13 | label = "Servo" |
| 14 | |
| 15 | [parameters.detail] |
| 16 | type = "choice" |
| 17 | default = "full" |
| 18 | choices = ["full", "simple"] |
| 19 | label = "Detail" |
| 20 | description = "full: with the horn, tab holes and output shaft. simple: case and tabs only." |
| 21 | |
| 22 | [[presets]] |
| 23 | id = "SG90" |
| 24 | title = "SG90 servo" |
| 25 | params = { designation = "SG90" } |
| 26 | aliases = ["SG-90", "Servo-sg90", "SG90 servo", "9g servo", "9g micro servo", "micro servo"] |
| 27 | standard = "maker's drawing" |
| 28 | |
| 29 | [[presets]] |
| 30 | id = "MG90S" |
| 31 | title = "MG90S servo" |
| 32 | params = { designation = "MG90S" } |
| 33 | aliases = ["MG90S servo", "MG90", "metal gear micro servo"] |
| 34 | standard = "maker's drawing" |
| 35 | |
| 36 | [[presets]] |
| 37 | id = "S3003" |
| 38 | title = "S3003 servo" |
| 39 | params = { designation = "S3003" } |
| 40 | aliases = ["Futaba3003", "Futaba 3003", "S3003 servo", "Futaba S3003", "standard servo"] |
| 41 | standard = "maker's drawing" |
| 42 | |
| 43 | [[presets]] |
| 44 | id = "MG996R" |
| 45 | title = "MG996R servo" |
| 46 | params = { designation = "MG996R" } |
| 47 | aliases = ["MG996R servo", "MG996", "MG995", "high torque servo"] |
| 48 | standard = "maker's drawing" |
| 49 | |
| 50 | [[presets]] |
| 51 | id = "SG90-simple" |
| 52 | title = "SG90, simple" |
| 53 | params = { designation = "SG90", detail = "simple" } |
| 54 | aliases = ["SG90 simple"] |
| 55 | standard = "maker's drawing" |
| 56 |
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.
| 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 | # Hobby servo |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## Source |
| 6 | |
| 7 | | Servo | Case | Over the tabs | To the tabs' top | Case top | Overall | Source | |
| 8 | |---|---|---|---|---|---|---| |
| 9 | | 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> | |
| 10 | | 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> | |
| 11 | | MG90S | 22.5 x 12 | 32.5 | 21 | not given | 35.5 | Tower Pro drawing, <https://www.electronicoscaldas.com/datasheet/MG90S_Tower-Pro.pdf> | |
| 12 | | 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> | |
| 13 | |
| 14 | **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. |
| 15 | |
| 16 | Clones of these servos vary. The cable isn't modelled. |
| 17 |
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.
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.
| 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.
NEMA stepper motor envelope: frames 8, 11, 14, 17, 23 and 34, with common models such as 17HS4401 as presets.
Hexagon head screw, fully threaded, ISO 4017 / DIN 933, M1.6 to M36, any length, with catalogue sizes as presets.
Hexagon socket button head screw, ISO 7380-1, M3 to M16, any length, with catalogue sizes as presets.
Hex nut, ISO 4032, M2 to M12.