3D Printing for Robotics
| 3D Printing for Robotics | |
|---|---|
| Competency | 3D Printing |
| Difficulty | Intermediate |
| Time Required | 6-8 hours (plus iterative design time) |
| Prerequisites | 3D Printing Basics, basic CAD Design knowledge |
| Materials Needed | FDM printer, PLA/PETG filament, calipers, test hardware (screws, nuts, bearings, motor shafts) |
| Next Steps | CAD Design, design custom robot chassis, document implementation pages |
3D Printing for Robotics teaches you how to design and print functional mechanical parts that work reliably in robots. This is not about making pretty objects - it's about creating parts that hold motors, position sensors, transfer forces, and survive repeated use.
You'll learn the engineering principles specific to FDM printing: layer orientation for strength, designing tolerances for fit, minimizing supports, embedding hardware, and iterating quickly.
By the end of this tutorial, you'll be able to:
- Design parts that print successfully on the first try
- Choose print orientation for maximum strength
- Design holes, slots, and assemblies with correct tolerances
- Eliminate or minimize support material
- Embed hardware like nuts, bearings, and heat-set inserts
- Iterate designs efficiently based on test fits
- Design complete robot chassis from scratch
This tutorial assumes you've successfully printed parts designed by others (see 3D Printing Basics) and have basic CAD modeling skills.
Part 1: Design Principles for FDM
FDM printing has constraints that machined or molded parts don't have. Ignore these and your parts will fail.
Layer Orientation Determines Strength
FDM parts are anisotropic - strength varies dramatically with orientation:
- Layers parallel to force - Very strong (plastic material strength)
- Layers perpendicular to force - Weak (layers peel apart)
Example: Motor mount bracket
- Bad orientation - Mount hole on side, forces pull perpendicular to layers → bracket snaps
- Good orientation - Mount hole on top/bottom, forces compress layers together → strong
Rule of thumb: Orient parts so primary forces push along layers, not between layers.
The 45-Degree Rule
FDM cannot print in mid-air. Overhangs are limited:
- 0-45° overhang - Prints fine, no support needed
- 45-60° overhang - May print, depends on geometry and cooling
- >60° overhang - Requires support material
Horizontal holes are problematic:
- Top of hole is >45° overhang
- Solution: Orient part vertically, or accept support inside hole
Tear-drop holes - Flatten top of circular hole to avoid overhang
- Instead of perfect circle, use circle with flat top above centerline
- Maintains most of the circular opening without support
Minimum Feature Sizes
FDM has resolution limits:
- Minimum wall thickness - 2× nozzle diameter (0.8mm for 0.4mm nozzle)
- Thinner walls may not print reliably
- Minimum hole diameter - 1mm (smaller may close up or need drilling)
- Minimum gap - 0.4mm (0.2mm may fuse together)
- Minimum text height - 3mm for raised text, 1mm for engraved
- Finest detail - Limited by layer height and nozzle diameter
Bridging Capability
FDM can print horizontal spans between two support points:
- Short bridges (<20mm) - Usually successful
- Medium bridges (20-40mm) - May sag in middle
- Long bridges (>40mm) - Will fail without support
Design strategy: Add intermediate support pillars for long bridges.
Part 2: Tolerances and Fit
Printed parts have dimensional variation. You must design for clearance.
Understanding Tolerance
Tolerance is the allowable variation from nominal dimension:
- FDM accuracy - Typically ±0.1-0.2mm (but varies by printer, material, settings)
- Holes print undersized - 0.1-0.2mm smaller than designed
- Shafts print oversized - 0.1-0.2mm larger than designed
Why? First layer squish, elephant's foot, material shrinkage, thermal expansion.
Design Clearances for Assemblies
When parts must fit together, add clearance:
| Fit Type | Clearance | Description | Robotics Use |
|---|---|---|---|
| Interference fit | -0.1mm | Parts pressed together, stay tight | Bearing press-fits |
| Press fit | 0.0mm | Tight fit, may need mallet | Wheel hubs on shafts |
| Slip fit | +0.2mm | Parts slide together with friction | Hinges, sliding joints |
| Free fit | +0.5mm | Parts move freely, slight wobble | Rotating shafts in bearings |
| Loose fit | +0.8mm | Easy assembly, significant play | Clearance holes for screws |
Example: M3 screw (3.0mm nominal diameter)
- Threaded hole - Design 2.5mm, print will be ~2.6-2.7mm, tap with M3 tap
- Tight clearance - Design 3.2mm, allows screw to pass with minimal wobble
- Standard clearance - Design 3.5mm, easy assembly (most common)
- Loose clearance - Design 4.0mm, allows adjustment during assembly
Testing and Iterating Tolerances
Every printer is different. You must calibrate:
- Print a tolerance test piece
- Design: Rectangular block with holes of different sizes (3.0mm, 3.2mm, 3.5mm, 4.0mm)
- Test with M3 screw - which hole gives best fit?
- Print a shaft test piece
- Design: Cylinders of different diameters (3.0mm, 3.2mm, 3.5mm, 4.0mm)
- Test fit in holes - which combination gives desired fit?
- Document your printer's behavior
- "My printer needs +0.3mm for M3 clearance holes"
- "My printer needs -0.2mm for press-fit shafts"
- Apply corrections to future designs
Tip: Print a "hardware calibration kit" with holes for all common screws (M2, M2.5, M3, M4) and slots for nuts. Test once, use forever.
Designing Holes for Hardware
Screw clearance holes:
- M2 (2.0mm) → Design 2.3-2.5mm
- M2.5 (2.5mm) → Design 2.8-3.0mm
- M3 (3.0mm) → Design 3.3-3.5mm
- M4 (4.0mm) → Design 4.3-4.5mm
Hex nut pockets:
- M3 hex nut (5.5mm across flats) → Design 5.7-5.8mm hexagon
- M3 hex nut (2.4mm thick) → Design 2.5-2.6mm deep pocket
Bearing press-fits:
- 608 bearing (22mm OD) → Design 21.8-21.9mm hole
- Test fit and adjust by 0.1mm increments
Part 3: Support Strategies
Supports waste time and material. Minimize them through smart design.
Designing to Avoid Supports
Strategy 1: Orient for Printability
- Rotate part so overhangs are <45°
- Sometimes compromises strength - weigh trade-offs
Strategy 2: Split Parts
- Design in two pieces that print flat
- Assemble with screws or glue after printing
- Example: Sensor bracket with 90° angle → print as two flat pieces, bolt together
Strategy 3: Add Chamfers
- Chamfer bottom edges of holes to reduce overhang angle
- 45° chamfer = no support needed
Strategy 4: Use Tear-Drop Holes
- Horizontal holes with flattened tops
- Maintains circular opening at bottom (where precision matters)
Strategy 5: Add Self-Supporting Features
- Design deliberate material under overhangs
- Example: Ribs, gussets, or small supports that become part of the design
When Supports Are Necessary
Some geometries require supports. Optimize them:
- Use tree supports (PrusaSlicer, Cura) - Less material, easier removal
- Support enforcers - Add supports only where critical
- Support blockers - Remove supports where they're not needed
- Support interface layers - Dense layer between support and part (better surface finish)
- Support Z-distance - 0.2mm gap allows easier removal
Design tip: Add small tabs or nubs on support surfaces - gives supports better attachment point and easier removal.
Part 4: Embedding Hardware
Robots need metal hardware (screws, nuts, bearings) integrated into plastic parts.
Heat-Set Inserts
Heat-set inserts are brass threaded inserts melted into plastic:
- Advantages: Strong, reusable threads (screws won't strip plastic)
- Installation: Use soldering iron with special tip, heat insert, press into plastic
- Design:
- Hole diameter: Insert OD + 0.1-0.2mm (e.g., M3 insert needs ~4.0-4.2mm hole)
- Hole depth: Insert length + 0.5mm (allows insert to sit flush or slightly recessed)
- Boss diameter: At least insert OD + 3mm (provides material for insert to grip)
Common sizes for robotics:
- M2.5 × 4mm length (small brackets, PCB standoffs)
- M3 × 5mm length (general purpose, most common)
- M4 × 6mm length (motor mounts, high-stress points)
Captive Nuts
Captive nuts are trapped in hexagonal pockets during printing:
- Design:
- Hexagonal pocket: Nut size + 0.2mm across flats
- Pocket depth: Nut thickness + 0.1mm
- Pocket height above surface: At least 2 layer heights (0.4mm for 0.2mm layers)
- Installation: Drop nut into pocket during print (pause print) or slide in from side
- Retention: Hex shape prevents rotation, pocket prevents pull-out
Pause method:
- Slice model, note layer number where pocket roof starts
- Add pause command at that layer (G-code: M0 or M600)
- During print, insert nuts when printer pauses
- Resume print, plastic grows over nuts
Slide-in method:
- Design pocket open on one side
- Print complete
- Slide nut into pocket from side
- Optional: Add small plastic tab to block side opening after insertion
Press-Fit Bearings
Ball bearings provide smooth rotation for wheels and joints:
- Common types:
- 608 bearing (skateboard bearing): 8mm ID, 22mm OD, 7mm thick
- 688 bearing (miniature): 8mm ID, 16mm OD, 5mm thick
- MR105 bearing: 5mm ID, 10mm OD, 4mm thick
- Design for press-fit:
- Hole diameter: Bearing OD - 0.1 to -0.2mm (tight press fit)
- Hole depth: Bearing thickness + 0.5mm (bearing sits fully in)
- Chamfer entrance: 45° chamfer makes bearing easier to press in
- Installation:
- Press bearing in by hand (may need light mallet)
- Use vise or arbor press for very tight fits
- Heat plastic slightly with hot air gun (easier press)
Design tip: Add a flange or stop surface so bearing doesn't press through.
Shaft Collars and Set Screws
Hold shafts in place without glue:
- Design:
- Shaft hole: Shaft diameter + 0.1-0.2mm (slip fit)
- Perpendicular M3 threaded hole intersecting shaft hole
- Tighten M3 screw to pinch shaft
- Alternative: Split collar
- C-shaped collar wraps around shaft
- Bolt squeezes collar closed to grip shaft
- Allows shaft removal without loosening set screw
Part 5: Designing Assemblies
Multi-part assemblies require careful planning.
Snap-Fit Joints
Snap-fits allow parts to click together without fasteners:
- Cantilever snap
- Flexible beam with hook at end
- Hook catches on mating part
- Requires TPU or thin PLA/PETG that flexes
- Design: Beam thickness 0.8-1.2mm, deflection ~10-20% of beam length
- Annular snap
- Ring of material compresses to fit through opening
- Expands back to original size inside
- Example: Bottle cap mechanism
Limitations: PLA is brittle - snap-fits can break after few cycles. PETG is better.
Living Hinges
Living hinges are flexible joints printed in one piece:
- Material: PETG or TPU (PLA breaks after few flexes)
- Design:
- Hinge thickness: 0.4-0.6mm (thin enough to flex)
- Hinge width: 5-10mm (distributes stress)
- Layer orientation: Layers perpendicular to hinge axis (allows flexing between layers)
- Print settings:
- 100% infill in hinge area
- Slow print speed (better layer adhesion)
Robotics use: Gripper jaws, sensor covers, cable management clips
Bolted Assemblies
Most reliable for robotics:
- Through-bolts - Screw passes through both parts, nut on other side
- Advantage: Very strong, easy to assemble/disassemble
- Design: Clearance hole in both parts, hex nut pocket in one part
- Standoffs - Threaded spacers between parallel plates
- Common: M3 brass standoffs, various lengths
- Design: M3 clearance holes in both plates
- Threaded inserts (see above) - One part has insert, other has clearance hole
- Advantage: Reusable threads, no loose nuts
Part 6: Strength and Structural Design
Understanding Anisotropic Strength
Test data (varies by material and settings):
- Tensile strength along layers - 40-60 MPa (very strong)
- Tensile strength between layers - 10-20 MPa (weak)
- Shear strength - 15-25 MPa (moderate)
Design implication: A part can be 3-5× stronger in one orientation than another.
Optimizing for Strength
Strategy 1: Perimeters Over Infill
- Weak: 2 perimeters, 50% infill
- Strong: 4 perimeters, 20% infill
- Outer walls carry most load; infill just prevents wall collapse
Strategy 2: Reinforce Stress Points
- Add fillets (rounded corners) to reduce stress concentration
- Typical fillet radius: 2-5mm
- Sharp corners crack under load
Strategy 3: Increase Wall Thickness
- Minimum 2.4mm (6 perimeters with 0.4mm nozzle) for structural parts
- Thicker = stronger, but diminishing returns above 4-5mm
Strategy 4: Add Ribs and Gussets
- Vertical ribs increase bending stiffness without much added weight
- 45° gussets strengthen right-angle joints
- Rib thickness: 1.2-2.0mm (3-5 perimeters)
Motor Mount Design Case Study
Requirements for SimpleBot motor mount:
- Hold DC motor securely
- Withstand motor vibration
- Resist torque from wheel contact
- Easy to print without supports
Design decisions:
- Layer orientation - Mount flat on bed, motor axis parallel to bed
- Forces compress layers together (strong direction)
- Motor pocket - Snug fit around motor body
- Designed diameter: Motor OD + 0.2mm (slip fit)
- Mounting holes - M3 clearance holes for bolting to chassis
- Through-bolts with nuts on other side (strong, removable)
- Reinforcement - Ribs connecting motor pocket to mounting points
- Distributes motor vibration, prevents cracking
- Avoiding supports - All angles <45° from vertical
- Motor pocket has flat bottom (prints on bed, no support needed)
Testing:
- Print first prototype
- Test fit motor - too tight? Increase pocket 0.2mm
- Bolt to chassis, run motor at full speed
- Inspect for cracks or flexing
- Iterate design if needed
Part 7: Print Settings for Mechanical Parts
Layer Height Selection
- 0.1mm - High detail, smooth surface (decorative parts)
- Slow, not necessary for most robotics parts
- 0.2mm - Standard, good balance (most common)
- Use for general purpose parts
- 0.3mm - Fast draft, rougher finish
- Use for large chassis parts, non-visible internals
Infill Strategy
- 10-15% - Light parts, minimal load (sensor brackets, covers)
- 20-30% - Standard structural parts (chassis, mounts)
- 40-50% - High-stress parts (motor mounts, wheel hubs)
- 100% - Small parts where mass doesn't matter (tiny gears, pins)
Infill pattern:
- Grid - Fast, simple
- Gyroid - Strong in all directions, recommended for structural parts
- Honeycomb - Strong, but slower to slice and print
Perimeter Count
- 2 perimeters - Minimum for functional parts
- 3 perimeters - Standard for robotics parts
- 4+ perimeters - High-stress parts, thin walls
Rule: Wall thickness = perimeter count × line width (e.g., 3 perimeters × 0.4mm = 1.2mm wall)
Material Selection
- PLA - Easy printing, rigid, brittle
- Good for: Chassis, brackets, low-stress parts
- Bad for: High-impact parts, outdoor use, hot environments
- PETG - Moderate difficulty, strong, flexible
- Good for: Motor mounts, wheels, stressed parts, outdoor robots
- Bad for: Fine details (strings more than PLA)
- TPU - Difficult printing, rubber-like
- Good for: Tires, grippers, shock absorption
- Bad for: Structural parts (too flexible)
Support Interface Layers
When supports are unavoidable:
- Enable support interface layers (dense layer between support and part)
- Set interface layer count to 2-3
- Results in better surface finish where supports touch part
Part 8: Iterative Design Process
Professional designers rarely get parts perfect on first try. Embrace iteration.
Rapid Prototyping Workflow
- Design initial version in CAD
- Use nominal dimensions, best-guess clearances
- Print at 150% speed, 0.3mm layers (fast draft mode)
- Quality doesn't matter for first test
- Test fit with actual hardware
- Measure with calipers, identify problems
- Adjust design based on measurements
- Holes too small? Increase 0.2mm. Too large? Decrease 0.1mm
- Print second version at normal settings
- Should be close to perfect
- Final tweaks if needed
- Usually just minor adjustments
- Print final version for documentation
- Take photos, measure, document design decisions
Time saved: Fast draft print in 1 hour vs. high-quality print in 3 hours. Get feedback 3× faster.
Design Validation Checklist
Before printing final version:
- ☐ All mounting holes have clearance (+0.3mm for M3)
- ☐ Hex nut pockets correct size (measure actual nut with calipers)
- ☐ Bearing press-fit dimensions calculated (bearing OD - 0.2mm)
- ☐ No overhangs >45° (or supports enabled)
- ☐ Minimum wall thickness 0.8mm (2 perimeters)
- ☐ Fillets on stress concentration points
- ☐ Layer orientation optimized for primary forces
- ☐ Parts split or oriented to avoid supports if possible
Documentation
When design is finalized:
- Export STL files for distribution
- Document design decisions (why you chose dimensions, orientations, materials)
- Create assembly guide if multi-part
- Share on SimpleBot wiki or create implementation page
Part 9: Example Project - Custom Sensor Bracket
Let's design a bracket to mount an ultrasonic distance sensor (Capability:Ultrasonic Sensing) on SimpleBot.
Requirements Analysis
- Sensor: HC-SR04 ultrasonic sensor
- Dimensions: 45mm × 20mm × 15mm
- Mounting: 2× holes on either side (40mm spacing)
- Mounting position: Front of SimpleBot chassis
- Must clear existing line sensors
- Point forward for obstacle detection
- Constraints:
- Print without supports if possible
- Use M3 hardware (consistent with SimpleBot)
- Minimize material use
Design Process
Step 1: Sketch concept
- L-shaped bracket: Vertical face for sensor, horizontal face for mounting to chassis
- Sensor held with M3 screws through side holes
- Bracket mounts to chassis with 2× M3 screws
Step 2: CAD model
- Vertical face: 50mm × 25mm × 2mm thick
- 2× M3 clearance holes (3.5mm diameter, 40mm apart) for sensor mounting
- Center holes vertically on face
- Horizontal face: 50mm × 15mm × 2mm thick
- 2× M3 clearance holes (3.5mm diameter, 40mm apart) for chassis mounting
- Position 5mm from edge
- Connection: Vertical face perpendicular to horizontal face
- Add 5mm fillet for strength
- No overhang issues (prints flat on bed)
Step 3: Print orientation
- Lay horizontal face on bed (L-shape standing up)
- Vertical face prints without support (perpendicular = vertical walls)
Step 4: First print (fast draft)
- 0.3mm layer height, 150% speed
- Print time: 45 minutes
- Test fit sensor - holes align correctly
- Test fit to chassis - mounting holes correct
Step 5: Refinements
- Add 2mm clearance between sensor and vertical face (prevents pressure on sensor PCB)
- Increase horizontal face width to 20mm (more contact with chassis)
- Add small chamfer to mounting holes (easier screw insertion)
Step 6: Final print
- 0.2mm layer height, 3 perimeters, 20% infill
- PETG material (more durable than PLA)
- Print time: 1 hour 15 minutes
Step 7: Assembly
- Mount sensor to bracket with M3×10mm screws and nuts
- Mount bracket to chassis with M3×8mm screws
- Connect sensor wiring to microcontroller
Step 8: Documentation
- Take photos of assembled bracket
- Export STL file
- Create wiki page: SimpleBot:Ultrasonic Sensor Bracket
- Document design decisions and dimensions
Part 10: Advanced Techniques Preview
Once you've mastered intermediate skills, explore:
Parametric Design
- Use variables in CAD instead of fixed dimensions
- Adjust one parameter (wheel diameter), entire assembly updates
- Example: Parametric chassis that scales to different motor sizes
Multi-Material Printing
- Dual-extruder printers can print rigid and flexible materials
- Example: Rigid wheel hub with TPU tire in one print
Topology Optimization
- Software removes material from non-stressed areas
- Creates organic-looking structures with minimal weight
- Requires advanced CAD software (Fusion 360 Generative Design)
Functional Gears and Mechanisms
- Print gears with proper involute tooth profiles
- Calculate gear ratios for speed reduction
- Design escapements, ratchets, and complex mechanisms
Composite Structures
- Embed carbon fiber rods or metal inserts during printing
- Creates parts stronger than solid plastic
- Requires printer pause and careful alignment
Common Design Mistakes
- Ignoring layer orientation - Part snaps because forces pull layers apart
- Designing like metal parts - Sharp corners, thin walls, complex geometry that needs support
- Forgetting shrinkage - Holes too small, shafts too big
- Over-constraining assemblies - Parts can't fit together due to tolerance stack-up
- Skipping test prints - Wasting 6 hours on full-quality print that doesn't fit
- Using 100% infill - Wastes time and material, adds minimal strength
- Not adding fillets - Stress concentrations cause cracking
- Ignoring print direction visibility - Layer lines ugly on visible faces
Design Patterns for Common Robotics Parts
Motor Mount
- Cylindrical pocket for motor body (motor OD + 0.2mm)
- Flat bottom of pocket (no support needed)
- M3 clearance holes aligned with motor mounting holes
- Ribs connecting motor to mounting points
- Layer orientation: Motor axis parallel to build plate
Wheel Hub
- Press-fit hole for motor shaft (shaft diameter - 0.1mm)
- Perpendicular M3 set screw to lock shaft
- Outer rim for tire attachment
- Spokes to reduce weight
- Print flat on bed (strongest direction for torque)
Sensor Bracket
- Flat mounting face perpendicular to sensor
- M3 clearance holes for sensor screws
- 45° angle support to chassis
- Thin walls (save material, print faster)
Cable Management Clip
- C-shaped clip with slight interference fit
- PETG material (flexes without breaking)
- Mounting hole or adhesive pad for attachment
- Layer orientation: Flex perpendicular to layers
Battery Holder
- Cavity for battery with 1-2mm clearance (easy insertion)
- Contact points for terminals
- Strap or clip to retain battery
- Ventilation holes (safety)
Next Steps
Apply Your Skills
- Design custom parts for SimpleBot
- New sensor brackets for additional capabilities
- Modified chassis for different battery configurations
- Custom wheel designs for different terrains
- Document your designs as implementation pages
- Share STL files with the BRS community
Continue Learning
- CAD Design - Master parametric modeling
- Mechanics - Understand forces and structural analysis
- 3D Printing - Explore advanced competency overview
- Advanced FDM Techniques (future tutorial) - Multi-material, optimization, complex mechanisms
Join the Community
- Share your designs on Printables, Thingiverse
- Get feedback on r/3Dprinting or r/functionalprint
- Contribute STL files to BRS robot repositories
- Create tutorials for techniques you discover
Resources
Online Tools
- Fusion 360 (free for hobbyists) - Parametric CAD with simulation
- FreeCAD (free, open-source) - Full-featured parametric CAD
- Onshape (free for public projects) - Cloud-based CAD
- Blender (free) - Organic modeling (less suitable for mechanical parts)
Reference Materials
- Prusa Print Quality Guide
- CNC Kitchen - Engineering tests of printed parts
- Maker's Muse - 3D printing techniques
- Design Prototype Test - Functional design
Community
- Reddit r/functionalprint - Share functional designs
- Printables / Thingiverse - Download and share STL files
- BRS Discord (future) - Real-time help with designs
See Also
- 3D Printing - Full competency overview
- 3D Printing Basics - Foundation tutorial
- CAD Design - Create models to print
- SimpleBot - Apply your skills to build robots
- Capabilities - Mechanical parts enable capabilities