I build robots

Joined February 2024
Agentic CAD: Simulate before you begin Train walking policies on a simple model built from your robot spec before you start detailed CAD. This finds problems early: if the planned link lengths or motor layout cannot produce a stable gait, you learn it before you design any parts. The simple model uses boxes and capsules, takes minutes to change, and helps you answer design questions by RL/simulation. I used this to choose stance knee angle, joint limits, and knee direction. At the end of this stage the geometry and joint limits are frozen in the spec, and the CAD is then built to meet those targets. After the CAD is finished, train again on the detailed model. This confirms the simple model was accurate enough. For Q2, the results were almost the same. Tips: 1. I use mjlab and @skypilot_org - it's one git clone and you can start training RL in the cloud from the comfort of your macbook terminal, no GPU needed 2. 300-500 iterations are enough to prove a simple walking gait, don't let your agent keep training designs that fail to walk
10
14
2
219
8,364
David Bar retweeted
Replying to @Carloss_CZ
Interesting, thank you. Both TI and NXP seem to recommend this approach so the evidence against must be strong
1
25
1,274
Agentic PCB tip #12: don't stitch vias by hand Have your agent write a stitch_vias script and add an automatic "stitching gaps" check, which runs after every change and flags relevant zones with room for more vias.
4
2
27
1,349
Agentic PCB tip #13: add a checker which automatically detects stranded vias
1
267
Q2: torso and head prototype
1
34
1,202
David Bar retweeted
Good bot 😂
1
197
Agentic PCB tip #11: add a checker looking for dead-end fingers
Replying to @VectorCrossProd
I run ERC and DRC after every change, plus several additional checks: 1. Schematic parity (DRC with --schematic-parity) 2. Export the netlist and compare it against the baseline 3. Match each board pad’s net, pin name, and pin type to its schematic pin 4. Validate isolation domains: no inadvertent crossing 5. Validate that power-path widths were not narrowed inadvertently 6. Verify copper changes (diff tracks, vias, and zones) 7. Stale zone finder: refill the board and compare pours 8. Footprint geometry: verify position, shapes, and sizes
1
2
62
2,585
To filter CAN bus noise above ~1 MHz, split the standard 120 Ω termination into two 60 Ω resistors and connect the midpoint to ground through a small capacitor.
11
31
3
414
18,546
David Bar retweeted
Replying to @VectorCrossProd
I run ERC and DRC after every change, plus several additional checks: 1. Schematic parity (DRC with --schematic-parity) 2. Export the netlist and compare it against the baseline 3. Match each board pad’s net, pin name, and pin type to its schematic pin 4. Validate isolation domains: no inadvertent crossing 5. Validate that power-path widths were not narrowed inadvertently 6. Verify copper changes (diff tracks, vias, and zones) 7. Stale zone finder: refill the board and compare pours 8. Footprint geometry: verify position, shapes, and sizes
2
1
1
14
2,937
Agentic PCB: enable the KiCad API so your agent could edit the board live. Using kicad-python it could then move footprints, change nets, and adjust copper directly in the running editor (and run ERC and DRC checks with kicad-cli). Agentic schematic work in KiCad is still limited - it seems there is no live schematic API, so symbol and connection changes require editing the .kicad_sch file or driving the GUI. “Update PCB from Schematic” also has to be triggered manually.
9
5
39
2,042
It's time to start PCBv2 for Q2. The highlights of PCBv1, which powered Q1, were: 1. Galvanic isolation between the battery/motor side and the Jetson side. An isolated DC-DC converter, isolated CAN and RS485 transceivers, an I2C isolator, and an isolated gate driver keep motor spikes, regen, and wiring faults off the Jetson. 2. One low-side N-FET switches all motor power. A Jetson GPIO controls it through the isolated gate driver, giving a software “motors off” without unplugging the battery. 3. Battery current measurement via 0.1 mΩ shunt. 4. Four XT30(2+2) connectors carry both 60 V power and CAN to each leg. All 12 motors share one CAN bus with onboard 120 Ω termination. 5. Battery input uses two Würth REDCUBE terminals with M5 bolts for high current and mechanical strength. 6. The board carries a BMI088 IMU, SPH0645 microphone, MAX98357 amplifier, and the Jetson’s CAN controller via an isolated transceiver. Problems and lessons: 1. Wrong resistor value (R21 specified as 53.6 Ω instead of 53.6 kΩ) 2. FET gate drive voltage was too low because the resistor divider ignored the gate driver’s current draw 3. Current-sense output sat at 2.5 V at zero current, required a hardware patch. Consider upgrading the amplifier to INA228 4. Bleeder resistor let CAN common-mode voltage drift, need to switch to high-side N-FET switching with an LTC7001 (also gives adjustable soft start). 5. Consider adding motor precharge circuit (RobStride recommends one). 6. Routing CAN through the per-leg connectors split the bus. Better to use a single dedicated CAN board connector 7. Audio amplifier produces a click at startup; enable it only after I2S clocks are running 8. Microphone placement was suboptimal 9. Jetson connection via barrel jack is awkward. Longer term, mount the Jetson module directly on the main board I designed in KiCad and ordered fully assembled from @PCBWayOfficial, which worked well.
2
2
28
1,379
David Bar retweeted
Replying to @aaedmusayt
This was one of the first major design decisions for Q2: I decided to put RL first and minimize the sim-to-real gap. That choice adds inertia, but I mitigated it by shortening the links. I also like that the result is mechanically simpler, cheaper to manufacture, generally lighter, and easier to assemble and maintain.
1
5
333
The new leg of Q2: quick print before manufacturing
3
64
1,702
My precious
5
30
983
David Bar retweeted
Agentic CAD Rule #12: Test coupons. Print a small coupon of each critical interface before you print or machine the full part. The coupon must have the same holes, bores and seats as the real part. Fit the real motors, dowels, pins and screws into the coupon
2
1
18
501
Tips for agentic CAD: tell your agent to add these checkers and run them after every model update (mine is written in Python using build123d). 1. Spec check: measure the important dimensions of the parts and make sure they reasonably agree with your spec (I maintain a YAML with all high level design/decisions). 2. Motion check: move each joint through its full range in hundreds of positions and make sure no moving part touches another part. Use simple shapes and skip pairs whose bounding boxes do not touch so the check stays fast. 3. Geometry check: find very thin faces, very small faces, very short edges, and walls that are too thin. Make sure a symmetric part is really symmetric. Measure wall thickness by casting rays through the part. 4. Edge check: make sure each edge has a radius. If an edge must stay sharp, write it in a list of permitted sharp edges. 5. Manufacturability check: for machining, make sure a cutting tool can reach all surfaces, find inside corners that are too sharp for the tool, and find walls that are too thin. For printing, measure the minimum wall thickness and the area that needs support. For powder printing, find closed spaces that trap powder. 6. Fastener check: use standard screws and inserts from a library (i use bd_warehouse, the parts library for build123d). Make sure each fastener goes through its hole with clearance, aligns with a threaded hole, and engages the thread to the correct depth. 7. Hole check: make sure each hole has a fastener in it. If a hole has no fastener, write the reason for the hole. 8. Picture check: make pictures and sections of the part after each change. Tell the agent to examine the pictures before it says the work is complete. 9. Accepted problems: give each accepted problem a name and a small area. A large area can hide new problems after the shape changes. 10. Test the checkers: give each checker a part with a known error. Use the checker only after it finds the error.
18
31
3
366
16,604
Agentic CAD Rule #12: Test coupons. Print a small coupon of each critical interface before you print or machine the full part. The coupon must have the same holes, bores and seats as the real part. Fit the real motors, dowels, pins and screws into the coupon
2
1
18
501
Agentic CAD Rule #11: Assembly checker. Tell your agent to verify, after every model update, that each part can move along its assembly path in small steps without touching other parts. This catches designs that fit perfectly in the final position but cannot actually be assembled.
1
1
212
Agentic CAD Rule #11: Assembly checker Tell your agent to verify, after every model update, that each part can move along its assembly path in small steps without touching other parts. This catches designs that fit perfectly in the final position but cannot actually be assembled.
Tips for agentic CAD: tell your agent to add these checkers and run them after every model update (mine is written in Python using build123d). 1. Spec check: measure the important dimensions of the parts and make sure they reasonably agree with your spec (I maintain a YAML with all high level design/decisions). 2. Motion check: move each joint through its full range in hundreds of positions and make sure no moving part touches another part. Use simple shapes and skip pairs whose bounding boxes do not touch so the check stays fast. 3. Geometry check: find very thin faces, very small faces, very short edges, and walls that are too thin. Make sure a symmetric part is really symmetric. Measure wall thickness by casting rays through the part. 4. Edge check: make sure each edge has a radius. If an edge must stay sharp, write it in a list of permitted sharp edges. 5. Manufacturability check: for machining, make sure a cutting tool can reach all surfaces, find inside corners that are too sharp for the tool, and find walls that are too thin. For printing, measure the minimum wall thickness and the area that needs support. For powder printing, find closed spaces that trap powder. 6. Fastener check: use standard screws and inserts from a library (i use bd_warehouse, the parts library for build123d). Make sure each fastener goes through its hole with clearance, aligns with a threaded hole, and engages the thread to the correct depth. 7. Hole check: make sure each hole has a fastener in it. If a hole has no fastener, write the reason for the hole. 8. Picture check: make pictures and sections of the part after each change. Tell the agent to examine the pictures before it says the work is complete. 9. Accepted problems: give each accepted problem a name and a small area. A large area can hide new problems after the shape changes. 10. Test the checkers: give each checker a part with a known error. Use the checker only after it finds the error.
5
5
1
80
4,072