@rulecad/cad 0.7.66 → 0.7.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/EXAMPLES.md +38 -32
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@ print (a hole's diameter, a seat's depth, a part's outline). Each release lists
5
5
  its reason. A **fasten** is an entry in an assembly's `"fasten"` list: one screwed joint, naming the screw by thread
6
6
  and head, the parts it passes through and the part it ends in.
7
7
 
8
+ ## 0.7.67: the leg on the parts its builder has
9
+
10
+ ### Changed
11
+
12
+ - The worked leg (`examples/bench/projects/leg`, EXAMPLES chapter 14) runs on the parts on the bench, as the arm does:
13
+ a 17HS4401 at the knee in place of the NEMA 14, the 12 V bench supply with its current limit at 1.5 A in place of
14
+ the Mean Well LRS-50-24, and `"have": true` on the motors, the DRV8825s, the CNC Shield V3 and the supply. The
15
+ quadruped's and the crawl's knees are 17HS4401s too, at 1 A as their hips.
16
+ - The stand's gait is loaded with what rides its rods, `leg.stand_load`, the larger of the robot's share and
17
+ `leg.riding` (1.01 kg from `cad list`: the leg, its carriage, the bushings and the screws), not the share alone. The
18
+ stand's margins: knee 3.1 to 2.8 times, hip 11.4 to 8.5 times, at 0.5 A. `leg.robot_mass` is 4.2 kg (was 3.8):
19
+ the trot's worst knee goes from 1.7 times (a warning) to 2.3 times, the crawl's from 1.9 to 2.6.
20
+
21
+ ### Printed sizes
22
+
23
+ - The thigh (`leg/thigh`): the knee motor's four M3 holes move from the NEMA 14's 26 mm square to the 17HS4401's
24
+ 31 mm square, so the 17HS4401 bolts on. Reprint a thigh printed for a NEMA 14.
25
+
8
26
  ## 0.7.66: the Uno streamer keeps time (#181)
9
27
 
10
28
  ### Added
package/EXAMPLES.md CHANGED
@@ -4349,14 +4349,17 @@ a bench says otherwise.
4349
4349
  | | The arm (chapter 12) | The leg |
4350
4350
  |---|---|---|
4351
4351
  | Joint axis | Vertical: gravity never loads a motor | Horizontal: gravity is the load |
4352
- | Task | A pen's drag on paper, 0.3 N | A robot's weight on the foot, 7.4 N |
4353
- | Worst torque | 0.2 N m at the shoulder | 0.451 N m at the knee, 0.147 N m at the hip |
4354
- | Margin at the motor | 8 times (shoulder, at 0.5 A) | 3.1 times at the knee, 11.4 times at the hip, at the same 0.5 A |
4352
+ | Task | A pen's drag on paper, 0.3 N | The weight on the foot, 9.9 N on the stand |
4353
+ | Worst torque | 0.22 N m at the shoulder | 0.608 N m at the knee, 0.198 N m at the hip |
4354
+ | Margin at the motor | 8 times (shoulder, at 0.5 A) | 2.8 times at the knee, 8.5 times at the hip, at the same 0.5 A |
4355
4355
  | What decides the link length | Reach across a sheet, and how far the elbow's error swings | The lever on the foot: the shorter, the less torque |
4356
4356
 
4357
- The same gearbox on a NEMA 17 at the hip and a NEMA 14 at the knee. A 1.5 kg robot trotting puts its weight on two feet at a time, so
4358
- each leg carries up to 0.75 kg: that is the stand's load, and it is what this leg weighs by itself, near enough: 765 g of motors, gears and
4359
- prints. So the carriage's own weight stands in for the robot's body, with nothing added.
4357
+ The same gearbox with a 17HS4401 at the hip and another at the knee: the motor the arm uses at both its joints, and the one on the
4358
+ bench (chapter 12). A NEMA 14 at the knee would be 90 g lighter, but it is a part to buy, and the 17HS4401 is in hand. A 1.5 kg robot
4359
+ trotting puts its weight on two feet at a time, so each leg carries up to 0.75 kg (`leg.share`). On the stand, the foot carries
4360
+ whatever rides the rods: the leg itself (855 g of motors, gears and prints, and its bearing), the carriage and its two bushings, and the
4361
+ screws, 1.01 kg in all (`leg.riding`, summed from `cad list`). That is more than the share, so the stand's load, `leg.stand_load`, is
4362
+ the larger of the two: the carriage's own weight stands in for the robot's body, and is a little more than it.
4360
4363
 
4361
4364
  The thigh is 100 mm, the shortest that keeps the knee's 43 mm gearbox radius clear of the hip's (43 + 43 and a little to swing past), and
4362
4365
  the shin 100 mm to match. At 170 mm of standing height the foot is under the hip with the knee bent 32° each way, and the
@@ -4395,6 +4398,8 @@ The stack of the same gearbox with the motor's face as zero, what the leg stands
4395
4398
  "lift": {"value": 15, "unit": "mm", "rule": "The foot's lift in swing", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
4396
4399
  "robot": {"value": 1.5, "unit": "kg", "rule": "The small robot the leg is sized for first; the quadruped built from these parts weighs more, and the chapter says how much", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
4397
4400
  "share": {"value": "robot / 2", "unit": "kg", "rule": "Each leg's share in a trot, the most: two feet down at once", "kind": "default", "source": "Statics: the weight split over the two feet in stance", "checked": "2026-11-09"},
4401
+ "riding": {"value": 1.01, "unit": "kg", "rule": "What rides the stand's rods, and so stands on the foot: the leg (its two 17HS4401s 560 g, its prints 295 g, the 6800 5 g), the carriage 92 g, its two LM8UU 32 g and the screws 24 g", "kind": "derived", "source": "cad list leg/stand, summed by hand", "checked": "2026-11-23"},
4402
+ "stand_load": {"value": "max(share, riding)", "unit": "kg", "rule": "The stand's load in its gait: the robot's share, or what rides the rods if that is more, since the foot carries all of it", "kind": "derived", "source": "Statics: the carriage, lifted off its stops, stands on the foot", "checked": "2026-11-23"},
4398
4403
  "scale_h": {"value": 25, "unit": "mm", "rule": "A kitchen scale's height: the foot's ground is its top. Yours differs", "kind": "estimate", "source": "A guess at a common 5 kg scale: measure yours", "checked": "2026-11-09"},
4399
4404
  "stop_drop": {"value": 3, "unit": "mm", "rule": "How far the carriage drops onto its stops when the foot lifts: the foot pushes it up this much standing, so the scale carries the leg", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
4400
4405
  "rod_x": {"value": 90, "unit": "mm", "rule": "Each rod's distance from the middle: a 130 mm scale fits between the feet", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
@@ -4405,7 +4410,7 @@ The stack of the same gearbox with the motor's face as zero, what the leg stands
4405
4410
  "body_half": {"value": 75, "unit": "mm", "rule": "Hip to hip along the body, halved: the side plate, 242 mm long, fits on a 256 mm bed, and the knees point outward so they stay apart", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
4406
4411
  "body_w": {"value": 50, "unit": "mm", "rule": "The body's half-width, to the hips' plates: two hip motors back to back fit inside", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
4407
4412
  "side_t": {"value": 6, "unit": "mm", "rule": "The side plate's thickness", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
4408
- "robot_mass": {"value": 3.8, "unit": "kg", "rule": "The quadruped as drawn: 3.37 kg of prints, motors and bearings from cad list, and about 0.4 kg for its drivers, an Uno and shield, a battery and the wires, an estimate until built", "kind": "estimate", "source": "cad list leg/quadruped and a guess at the electronics", "checked": "2026-11-09"},
4413
+ "robot_mass": {"value": 4.2, "unit": "kg", "rule": "The quadruped as drawn: 3.83 kg of prints, eight 17HS4401s, bearings and screws from cad list, and about 0.4 kg for its drivers, an Uno and shield, a battery and the wires, an estimate until built", "kind": "estimate", "source": "cad list leg/quadruped (3834 g, the knees 17HS4401s at 280 g each) and a guess at the electronics", "checked": "2026-11-23"},
4409
4414
  "foot_socket": {"value": 12, "unit": "mm", "rule": "How far each rod goes into a foot block", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"}
4410
4415
  }
4411
4416
  }
@@ -4872,7 +4877,7 @@ The thigh is the arm's upper arm, 100 mm long, without its home switch or bands.
4872
4877
 
4873
4878
  ```js projects/leg/objects/thigh.js
4874
4879
  // The thigh, drawn as it prints: its outer face on the bed, the knee's ring standing on it, the hub's socket opening
4875
- // upward. The knee's NEMA 14 bolts on the bed side, its shaft up through the plate, as the arm's elbow does.
4880
+ // upward. The knee's 17HS4401, the hip's motor, bolts on the bed side, its shaft up through the plate, as the arm's elbow does.
4876
4881
  // The screws' holes are v.fixings': an M3 clearance hole through the socket's floor for the screw into the spindle,
4877
4882
  // and an M3 pilot in each post for its clip.
4878
4883
  import jscad from '@jscad/modeling'
@@ -4883,7 +4888,7 @@ const { hull } = jscad.hulls
4883
4888
 
4884
4889
  export function main (v) {
4885
4890
  const screw = v.fixings.holeModel('M3').diameter, pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
4886
- const motor = v.motors.motorModel('nema14')
4891
+ const motor = v.motors.motorModel('17HS4401')
4887
4892
  const at = (r, a) => [v.long + r * Math.cos(a), r * Math.sin(a)]
4888
4893
  const posts = [v.p1, v.p2, v.p3].map((a) => a * v.rad)
4889
4894
  const round = (r, c) => translate([c, 0], circle({ radius: r, segments: v.segments }))
@@ -5214,7 +5219,7 @@ export function main (v) { return cuboid({ size: [v.side, v.side, v.high], cente
5214
5219
 
5215
5220
  ### The stand assembly
5216
5221
 
5217
- Standing, the foot is under the hip with the knee behind it. The gait is a single leg's: `"pattern": { "duty": 0.6, "phase": [0] }` says stance for 60% of the cycle, swing for the rest. The mass is the robot's share, 0.75 kg.
5222
+ Standing, the foot is under the hip with the knee behind it. The gait is a single leg's: `"pattern": { "duty": 0.6, "phase": [0] }` says stance for 60% of the cycle, swing for the rest. The mass is `leg.stand_load`, 1.01 kg: what rides the rods, more than the robot's 0.75 kg share. The motors, the drivers, the shield and the supply are marked `"have": true`, the parts on the builder's bench, so `cad list` puts them under "in hand" and the buy list is the bearings, the rods, the screws and the wire. The supply is the 12 V bench supply with its current limit set at 1.5 A: each motor's torque at speed is worked out at its 12 V.
5218
5223
 
5219
5224
  ```json projects/leg/assemblies/stand.json
5220
5225
  {
@@ -5228,7 +5233,7 @@ Standing, the foot is under the hip with the knee behind it. The gait is a singl
5228
5233
  { "id": "carriage", "object": "carriage", "rotate": [90, 0, 0] },
5229
5234
  { "id": "lm1", "bought": "lm8uu", "at": ["0 - leg.rod_x", "0 - leg.rod_y", "0 - carriage.boss_long / 2"] },
5230
5235
  { "id": "lm2", "bought": "lm8uu", "at": ["leg.rod_x", "0 - leg.rod_y", "0 - carriage.boss_long / 2"] },
5231
- { "id": "m1", "motor": { "model": "17HS4401", "drives": "hd", "speed": 200, "duty": 0.3, "driver": "d1", "current": 0.5, "microsteps": 8 } },
5236
+ { "id": "m1", "motor": { "model": "17HS4401", "drives": "hd", "speed": 200, "duty": 0.3, "driver": "d1", "current": 0.5, "microsteps": 8 }, "have": true },
5232
5237
  { "id": "housing", "object": "housing", "rotate": [-90, 0, 0] },
5233
5238
  { "id": "sun", "object": "sun" },
5234
5239
  { "id": "carrier", "object": "speck" },
@@ -5238,7 +5243,7 @@ Standing, the foot is under the hip with the knee behind it. The gait is a singl
5238
5243
  { "id": "bridge", "object": "bridge", "at": [0, "leg.bridge_low", 0], "rotate": [-90, 0, 0] },
5239
5244
  { "id": "b1", "bought": "bearing-6800", "at": [0, "leg.bridge_low + leg.bridge - leg.bearing_width", 0], "rotate": [-90, 0, 0] },
5240
5245
  { "id": "thigh", "object": "thigh" },
5241
- { "id": "m2", "motor": { "model": "nema14", "drives": "kd", "speed": 200, "duty": 0.3, "driver": "d2", "current": 0.5, "microsteps": 8 } },
5246
+ { "id": "m2", "motor": { "model": "17HS4401", "drives": "kd", "speed": 200, "duty": 0.3, "driver": "d2", "current": 0.5, "microsteps": 8 }, "have": true },
5242
5247
  { "id": "esun", "object": "sun", "set": { "tip": 11.7 } },
5243
5248
  { "id": "ecarrier", "object": "speck" }, { "id": "ering", "object": "speck" },
5244
5249
  { "id": "ep1", "object": "planet" }, { "id": "ep2", "object": "planet" }, { "id": "ep3", "object": "planet" },
@@ -5253,10 +5258,10 @@ Standing, the foot is under the hip with the knee behind it. The gait is a singl
5253
5258
  { "id": "collar1", "object": "collar", "rotate": [0, 0, 180], "at": ["0 - leg.rod_x", "0 - leg.rod_y", "0 - carriage.boss_long / 2 - leg.stop_drop - collar1.high"] },
5254
5259
  { "id": "collar2", "object": "collar", "at": ["leg.rod_x", "0 - leg.rod_y", "0 - carriage.boss_long / 2 - leg.stop_drop - collar2.high"] },
5255
5260
  { "id": "scale", "object": "scale", "at": [0, 5, "0 - leg.stance - leg.foot_r - leg.scale_h"] },
5256
- { "id": "d1", "bought": "drv8825", "at": [240, -30, -180] },
5257
- { "id": "d2", "bought": "drv8825", "at": [240, 0, -180] },
5258
- { "id": "shield", "bought": "cnc-shield-v3", "at": [240, 0, -190] },
5259
- { "id": "psu", "bought": "supply-24v", "variant": "LRS-50-24", "at": [300, 150, -190] }
5261
+ { "id": "d1", "bought": "drv8825", "at": [240, -30, -180], "have": true },
5262
+ { "id": "d2", "bought": "drv8825", "at": [240, 0, -180], "have": true },
5263
+ { "id": "shield", "bought": "cnc-shield-v3", "at": [240, 0, -190], "have": true },
5264
+ { "id": "psu", "bought": "supply-12v", "set": { "output_current": 1.5 }, "at": [300, 150, -190], "have": true }
5260
5265
  ],
5261
5266
  "joints": [
5262
5267
  { "id": "m1_on", "type": "fixed", "parent": "housing.motor", "child": "m1.face" },
@@ -5323,9 +5328,9 @@ Standing, the foot is under the hip with the knee behind it. The gait is a singl
5323
5328
  "wires": [
5324
5329
  { "id": "hip_wire", "from": "m1.connector", "to": "shield.X", "via": ["carriage.cable"], "gauge": "awg24", "colour": "black, red, green, blue", "connectors": ["JST-XH 4 pin", "screw terminal"] },
5325
5330
  { "id": "knee_wire", "from": "m2.connector", "to": "shield.Y", "via": ["thigh.cable", "carriage.cable"], "gauge": "awg24", "colour": "black, red, green, blue", "connectors": ["JST-XH 4 pin", "screw terminal"] },
5326
- { "id": "power", "from": "psu.terminals", "to": "shield.top", "gauge": "awg22", "colour": "red, black", "conductors": 2, "current": 2, "connectors": ["Ring terminal", "Screw terminal"], "note": "24 V into the shield's motor terminals" }
5331
+ { "id": "power", "from": "psu.terminals", "to": "shield.top", "gauge": "awg22", "colour": "red, black", "conductors": 2, "current": 2, "connectors": ["Ring terminal", "Screw terminal"], "note": "12 V from the bench supply, its current limit at 1.5 A, into the shield's motor terminals" }
5327
5332
  ],
5328
- "gait": { "legs": ["shin.tip"], "pattern": { "duty": 0.6, "phase": [0] }, "stride": "leg.stride", "lift": "leg.lift", "period": 2, "height": "leg.stance", "mass": "leg.share", "clearance": 12 },
5333
+ "gait": { "legs": ["shin.tip"], "pattern": { "duty": 0.6, "phase": [0] }, "stride": "leg.stride", "lift": "leg.lift", "period": 2, "height": "leg.stance", "mass": "leg.stand_load", "clearance": 12 },
5329
5334
  "poses": { "standing": { "hd": -5587.7, "kd": -2236 } }
5330
5335
  }
5331
5336
  ```
@@ -5339,12 +5344,13 @@ npx cad animate leg/stand
5339
5344
  The check runs with `--json` here because the stand's warnings, that its figures rest on estimates and that two of the shin's screws want a ball-end key, would otherwise stop the test: run it plain to read it. What it says:
5340
5345
 
5341
5346
  - `gait.clearance` passes: the swing foot lifts 15 mm clear of the scale (asked 12).
5342
- - `motor.torque` through the gait: the hip needs 0.147 N m at the worst of the cycle against 1.682 N m the 17HS4401 gives at 0.5 A through 38:1 at 47%, 11.4 times; the knee 0.451 N m against 1.419 N m, 3.1 times. Those figures are the foot's load only, not the leg's own weight in the swing, and the gearbox efficiency is an estimate.
5347
+ - `motor.torque` through the gait: the hip needs 0.198 N m at the worst of the cycle against 1.682 N m the 17HS4401 gives at 0.5 A through 38:1 at 47%, 8.5 times; the knee 0.608 N m against the same 1.682 N m, 2.8 times. By hand: the 17HS4401 holds 0.4 N m, and moving, 0.4 / √2 = 0.283 N m, flat up to its 12 V corner of 60 × 12 / (2 × 4.2 mH × 1.5 A × 200 steps) = 286 rpm, so all of it at 200 rpm; at 0.5 of its 1.5 A, 0.094 N m; through 38:1 at 47%, 1.682 N m. The supply's 12 V costs nothing here, since 200 rpm is under its corner: only the mass moves the margins. With the NEMA 14 the knee had 1.419 N m for 0.451 N m at 0.75 kg, 3.1 times, and the hip 11.4 times; the 17HS4401 gives the knee more torque, and the 90 g it adds, with the load now counted as what rides the rods, brings both margins down to these. Those figures are the foot's load only, not the leg's own weight in the swing, and the gearbox efficiency is an estimate.
5348
+ - The drivers and the supply: each DRV8825's trimmer at 0.25 V for 0.5 A a coil (on 0.1 ohm sense resistors: read yours first), and the machine draws 0.22 A at 12 V (2.6 W) from the bench supply's 1.5 A limit, 6.9 times over.
5343
5349
  - `gait.sweep` passes: the leg, moved through the cycle pose by pose, hits nothing, with every planet and the sun turning as they should (the gait moves the motor's shaft that leads each output, and the rest follows).
5344
5350
  - The gears' overlap is zero: the second ring is put in phase at the joint's own zero, wherever its range starts. (A range that left out zero once put the ring 30° out, and every planet into its teeth.)
5345
5351
  - `fasten` chooses every screw and passes each: the housing's three M3x8 caps into the carriage, the bridge's three M3x10, the spindle's four M3x8 countersunk, the thigh's M3x16 into the hexagon, the clips' three M3x8 and the shin's four M3x12. It warns that the shin's first and third screws are reached only by a ball-end key tilted up to 25°: in the standing pose rod1, and for one of them collar1, stands over the straight line. That is true on the bench, so the shin goes on the knee before the leg goes on the stand. The collar's clamp screw is not a `fasten` yet: its head and nut would sit on the collar's round outside, and the collar needs flats for them first.
5346
5352
  - `cad list` gives 471 g of printing and about 8.6 hours, and buys those screws with the motors' own (4 M3x6 and 4 M3x12 from their mounts): 24 g of fixings. Per part, printed and bought, the leg (without the stand) is the sum above; the heaviest prints are the thigh (98 g), the carriage (92 g), the tie (43 g) and the shin (43 g).
5347
- - Margin per part, by hand (`estimate`, PLA at 39 MPa, bending at the worst stance load): the thigh 80 times, the shin 45 times, the carriage's arms 130 times. The motors' margins above are the small ones.
5353
+ - Margin per part, by hand (`estimate`, PLA at 39 MPa, bending at the worst stance load): the thigh 59 times, the shin 33 times, the carriage's arms 97 times. These were 80, 45 and 130 times at the robot's 0.75 kg share; the stance load is now the 1.01 kg that rides the rods, and bending stress follows the load, so each is 0.75 / 1.01 of what it was. The motors' margins above are the small ones.
5348
5354
  - `cad animate leg/stand` writes `.preview/leg/stand-gait.svg`: the leg's sticks in side view, the foot's stance in blue and swing in orange. The model page plays the same cycle in the Motion panel of a link: `cad link leg/stand` carries it.
5349
5355
 
5350
5356
  To run the leg on the bench: tare the scale with the carriage resting on its stops and the foot just off it, command the stance, and read the scale, which reads the foot's push. A known mass hung on the carriage is the test of whether the leg holds and what the torque margin really is.
@@ -5471,7 +5477,7 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
5471
5477
  {"id": "fl_bridge", "object": "bridge"},
5472
5478
  {"id": "fl_b1", "bought": "bearing-6800"},
5473
5479
  {"id": "fl_thigh", "object": "thigh"},
5474
- {"id": "fl_m2", "motor": {"model": "nema14", "drives": "fl_kd", "speed": 200, "duty": 0.3, "current": 0.8, "microsteps": 8}},
5480
+ {"id": "fl_m2", "motor": {"model": "17HS4401", "drives": "fl_kd", "speed": 200, "duty": 0.3, "current": 1, "microsteps": 8}},
5475
5481
  {"id": "fl_esun", "object": "sun", "set": {"tip": 11.7}},
5476
5482
  {"id": "fl_ecarrier", "object": "speck"},
5477
5483
  {"id": "fl_ering", "object": "speck"},
@@ -5496,7 +5502,7 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
5496
5502
  {"id": "fr_bridge", "object": "bridge"},
5497
5503
  {"id": "fr_b1", "bought": "bearing-6800"},
5498
5504
  {"id": "fr_thigh", "object": "thigh"},
5499
- {"id": "fr_m2", "motor": {"model": "nema14", "drives": "fr_kd", "speed": 200, "duty": 0.3, "current": 0.8, "microsteps": 8}},
5505
+ {"id": "fr_m2", "motor": {"model": "17HS4401", "drives": "fr_kd", "speed": 200, "duty": 0.3, "current": 1, "microsteps": 8}},
5500
5506
  {"id": "fr_esun", "object": "sun", "set": {"tip": 11.7}},
5501
5507
  {"id": "fr_ecarrier", "object": "speck"},
5502
5508
  {"id": "fr_ering", "object": "speck"},
@@ -5521,7 +5527,7 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
5521
5527
  {"id": "bl_bridge", "object": "bridge"},
5522
5528
  {"id": "bl_b1", "bought": "bearing-6800"},
5523
5529
  {"id": "bl_thigh", "object": "thigh"},
5524
- {"id": "bl_m2", "motor": {"model": "nema14", "drives": "bl_kd", "speed": 200, "duty": 0.3, "current": 0.8, "microsteps": 8}},
5530
+ {"id": "bl_m2", "motor": {"model": "17HS4401", "drives": "bl_kd", "speed": 200, "duty": 0.3, "current": 1, "microsteps": 8}},
5525
5531
  {"id": "bl_esun", "object": "sun", "set": {"tip": 11.7}},
5526
5532
  {"id": "bl_ecarrier", "object": "speck"},
5527
5533
  {"id": "bl_ering", "object": "speck"},
@@ -5546,7 +5552,7 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
5546
5552
  {"id": "br_bridge", "object": "bridge"},
5547
5553
  {"id": "br_b1", "bought": "bearing-6800"},
5548
5554
  {"id": "br_thigh", "object": "thigh"},
5549
- {"id": "br_m2", "motor": {"model": "nema14", "drives": "br_kd", "speed": 200, "duty": 0.3, "current": 0.8, "microsteps": 8}},
5555
+ {"id": "br_m2", "motor": {"model": "17HS4401", "drives": "br_kd", "speed": 200, "duty": 0.3, "current": 1, "microsteps": 8}},
5550
5556
  {"id": "br_esun", "object": "sun", "set": {"tip": 11.7}},
5551
5557
  {"id": "br_ecarrier", "object": "speck"},
5552
5558
  {"id": "br_ering", "object": "speck"},
@@ -5777,7 +5783,7 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
5777
5783
  {"id": "fl_bridge", "object": "bridge"},
5778
5784
  {"id": "fl_b1", "bought": "bearing-6800"},
5779
5785
  {"id": "fl_thigh", "object": "thigh"},
5780
- {"id": "fl_m2", "motor": {"model": "nema14", "drives": "fl_kd", "speed": 200, "duty": 0.3, "current": 0.8, "microsteps": 8}},
5786
+ {"id": "fl_m2", "motor": {"model": "17HS4401", "drives": "fl_kd", "speed": 200, "duty": 0.3, "current": 1, "microsteps": 8}},
5781
5787
  {"id": "fl_esun", "object": "sun", "set": {"tip": 11.7}},
5782
5788
  {"id": "fl_ecarrier", "object": "speck"},
5783
5789
  {"id": "fl_ering", "object": "speck"},
@@ -5802,7 +5808,7 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
5802
5808
  {"id": "fr_bridge", "object": "bridge"},
5803
5809
  {"id": "fr_b1", "bought": "bearing-6800"},
5804
5810
  {"id": "fr_thigh", "object": "thigh"},
5805
- {"id": "fr_m2", "motor": {"model": "nema14", "drives": "fr_kd", "speed": 200, "duty": 0.3, "current": 0.8, "microsteps": 8}},
5811
+ {"id": "fr_m2", "motor": {"model": "17HS4401", "drives": "fr_kd", "speed": 200, "duty": 0.3, "current": 1, "microsteps": 8}},
5806
5812
  {"id": "fr_esun", "object": "sun", "set": {"tip": 11.7}},
5807
5813
  {"id": "fr_ecarrier", "object": "speck"},
5808
5814
  {"id": "fr_ering", "object": "speck"},
@@ -5827,7 +5833,7 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
5827
5833
  {"id": "bl_bridge", "object": "bridge"},
5828
5834
  {"id": "bl_b1", "bought": "bearing-6800"},
5829
5835
  {"id": "bl_thigh", "object": "thigh"},
5830
- {"id": "bl_m2", "motor": {"model": "nema14", "drives": "bl_kd", "speed": 200, "duty": 0.3, "current": 0.8, "microsteps": 8}},
5836
+ {"id": "bl_m2", "motor": {"model": "17HS4401", "drives": "bl_kd", "speed": 200, "duty": 0.3, "current": 1, "microsteps": 8}},
5831
5837
  {"id": "bl_esun", "object": "sun", "set": {"tip": 11.7}},
5832
5838
  {"id": "bl_ecarrier", "object": "speck"},
5833
5839
  {"id": "bl_ering", "object": "speck"},
@@ -5852,7 +5858,7 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
5852
5858
  {"id": "br_bridge", "object": "bridge"},
5853
5859
  {"id": "br_b1", "bought": "bearing-6800"},
5854
5860
  {"id": "br_thigh", "object": "thigh"},
5855
- {"id": "br_m2", "motor": {"model": "nema14", "drives": "br_kd", "speed": 200, "duty": 0.3, "current": 0.8, "microsteps": 8}},
5861
+ {"id": "br_m2", "motor": {"model": "17HS4401", "drives": "br_kd", "speed": 200, "duty": 0.3, "current": 1, "microsteps": 8}},
5856
5862
  {"id": "br_esun", "object": "sun", "set": {"tip": 11.7}},
5857
5863
  {"id": "br_ecarrier", "object": "speck"},
5858
5864
  {"id": "br_ering", "object": "speck"},
@@ -6064,17 +6070,17 @@ npx cad list leg/quadruped
6064
6070
  npx cad plates leg/quadruped
6065
6071
  ```
6066
6072
 
6067
- The weight first, plainly: the shopping list says 1470 g of printing, 1900 g of bought parts and 105 g of screws, 3474 g as a machine, before electronics. The 1.5 kg robot the leg was sized for does not exist: eight motors weigh 1880 g alone. So the robot is 3.8 kg (`leg.robot_mass`, with its electronics an `estimate` of about 0.4 kg, and the screws within that guess), and every number below is at that mass.
6073
+ The weight first, plainly: the shopping list says 1470 g of printing, 2260 g of bought parts and 105 g of screws, 3834 g as a machine, before electronics. The 1.5 kg robot the leg was sized for does not exist: eight 17HS4401s weigh 2240 g alone, 360 g more than with NEMA 14 knees. So the robot is 4.2 kg (`leg.robot_mass`, with its electronics an `estimate` of about 0.4 kg), and every number below is at that mass. The knees run at 1 A, as the hips do: a DRV8825 gives that without a heat sink, and the 17HS4401 is rated 1.5 A.
6068
6074
 
6069
6075
  The screws are the stand's four times over, each chosen by `fasten`, with each hip's housing on its side plate (three M3x8) and the beams held by two M3x12 at each end: 24 M3x8 cap, 16 M3x8 countersunk, 12 M3x10, 40 M3x12 with the knee motors' own and 4 M3x16, and the hip motors' 16 M3x6.
6070
6076
 
6071
6077
  Trot and crawl are run through their checks by `cad check leg/quadruped --json` and `cad check leg/crawl --json`: they take several minutes each, so the replay here leaves them out; run them yourself. What they said when this chapter was written (quasi-static, a design, nothing built):
6072
6078
 
6073
- - **Trot.** Two feet down at a time: `gait.stable` reports it is quasi-static, resting on two feet, so its balance depends on moving: this is a slow walk, not a run. The worst joint is 1.33 N m at the knee, 1.7 times over at the 0.8 A set on the knee's NEMA 14. `gait.sweep` found nothing colliding through the cycle.
6074
- - **Crawl.** One foot up at a time: statically stable, the least margin 4.3 mm of balance to spare, with the worst joint 1.17 N m. Slower, and safer: a crawl is what a quadruped with no balance control can do.
6079
+ - **Trot.** Two feet down at a time: `gait.stable` reports it is quasi-static, resting on two feet, so its balance depends on moving: this is a slow walk, not a run. The worst joint is 1.465 N m at a back knee, against 3.364 N m from its 17HS4401 at 1 A through 38:1 at 47%, 2.3 times over; the worst hip 0.477 N m, 7 times. (With NEMA 14 knees at 0.8 A and 3.8 kg it was 1.325 N m against 2.27 N m, 1.7 times, and the check warned.) The 17HS4401 is 42.3 mm square and 40 mm long, against the NEMA 14's 35 mm and 34 mm; the trot's poses at its start, a quarter, a half and three quarters of its cycle were swept with the larger knee motors, and nothing collided.
6080
+ - **Crawl.** One foot up at a time: statically stable, the least margin 4.3 mm of balance to spare, with the worst joint 1.288 N m at a knee, 2.6 times over (1.165 N m and 1.9 times before). Slower, and safer: a crawl is what a quadruped with no balance control can do.
6075
6081
  - `cad plates` lays the quadruped's prints on beds, and `cad list` lists it all, ready to buy. That part of the design was done from the assembly, unchanged.
6076
6082
 
6077
- The honest reading: at 3.8 kg the knees have 1.7 times the torque a trot asks of them, and the check warns, because anything under two is thin on a printed gearbox whose efficiency is a guess. That is the number to fix before printing this as a robot: a lighter body, a shorter leg, or a NEMA 17 at the knee and a recount.
6083
+ The honest reading: with a 17HS4401 at each knee at 1 A, the knees have 2.3 times the torque a trot asks of them at 4.2 kg, where NEMA 14s at 0.8 A had 1.7 times at 3.8 kg and the check warned. The bigger motor more than pays for its 90 g. Two times is still thin on a printed gearbox whose efficiency is a guess, and the 0.4 kg of electronics is an estimate: weigh the robot as built, set `leg.robot_mass` to that, and check again before printing it as a robot.
6078
6084
 
6079
6085
  ### What a walking robot needs that this does not do
6080
6086
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulecad/cad",
3
- "version": "0.7.66",
3
+ "version": "0.7.67",
4
4
  "description": "The cad command: JSCAD designs from traceable rules, checked for printing and fit, versioned by what fits, shared as links and exported as Bambu 3MF.",
5
5
  "type": "module",
6
6
  "bin": {