ROB-499 · Lesson 6 of 12 · 29 min

Prototyping and subsystem development

Between the critical design review and full integration lies the longest and busiest part of the term: building and testing each subsystem. The goal is not only to make each part work but to make each part work to its interface, so that integration in lesson 7 becomes assembly rather than redesign. This lesson covers prototyping strategy, mechanical, electrical and software development practices that suit a capstone, bench testing of subsystems against their requirements, and the practical business of buying parts: the bill of materials, lead times, currency, shipping, duties and spares.

A prototyping strategy

Prototypes answer questions. A useful habit is to state the question before building: "Will the gripper hold a crushed can when the arm swings at full speed?" or "Does the chassis clear a 5 cm ridge of sand?". Different questions need different fidelity. Low-fidelity prototypes, such as cardboard mock-ups, foam-core mounts or a gripper taped to a broom handle, answer questions about size, reach and basic function in hours. Medium-fidelity prototypes, such as 3D-printed parts and breadboarded electronics, answer questions about performance. High-fidelity prototypes use final materials and manufacturing methods and answer questions about durability and reliability.

Capstone teams often jump straight to high fidelity because it looks impressive, and then discover a basic problem after a week of machining. Iterating cheaply first is faster overall. Team Tern printed six gripper finger designs in two weeks, testing each on a tray of beach sand with real litter collected from the site. The final fingers, with a slight scoop shape and a silicone pad, came from the fourth iteration; the fifth and sixth were attempts at grasping wrappers that the team ultimately parked as a should-have.

Prototype fidelity and what each level is good for
FidelityTypical materials and methodsQuestions answeredTime per iteration
LowCardboard, foam, tape, hobby parts, scriptsSize, reach, layout, basic feasibilityHours
Medium3D printing, laser-cut acrylic or plywood, breadboards, simulationFunction, approximate performance, interfacesOne to three days
HighMachined aluminium, custom PCBs, sealed enclosures, deployed softwareDurability, reliability, environmental performanceOne to three weeks

Mechanical development

Mechanical work in a capstone usually involves CAD, rapid fabrication and a small amount of machining or outsourcing. Good practice starts with a master assembly model that includes every major component, even as simple envelopes, so that interferences and cable routes are visible. Designing for the fabrication methods actually available saves time: if the lab has a laser cutter and 3D printers, a chassis of laser-cut aluminium or plywood plates joined by printed brackets may be more practical than a welded frame. Tolerances matter for printed parts, which typically need clearance of 0.2 to 0.4 mm for sliding fits, and for bearings and shafts, which need proper fits from datasheets.

Robots that work outdoors need attention to the environment from the start. Tern's chassis keeps electronics in a sealed enclosure with cable glands, uses sealed bearings on the wheels, routes the lidar cable away from the wheels, and mounts the RGB-D camera behind a replaceable clear window that can be wiped of sand. Sand and salt are abrasive and corrosive; stainless fasteners and covered connectors cost little and prevent many field failures. Ingress protection ratings, such as IP54 for dust and splash protection, give a common language for enclosure requirements.

Strength and stiffness checks should be done before parts are made, using the hand calculations from earlier courses or a quick finite element analysis. The arm mount, for example, must resist the moment from the arm at full reach with a payload, plus dynamic loads when the robot drives over bumps. A quick check with a safety factor of at least two on yield is usually sufficient for a capstone prototype, but the assumptions and results should be written down for the CDR package.

Worked problem

Checking an arm mount bolt pattern

Tern's arm weighs 2.6 kg with its centre of mass 0.25 m from the mount at full reach, and carries a 0.2 kg can at 0.45 m. Allowing a dynamic factor of 2 for driving over bumps, what moment must the mount resist? The four M6 bolts sit on an 80 mm square; estimate the maximum bolt tension.

Show solution
  1. Static moment: \( 9.81 \times (2.6 \times 0.25 + 0.2 \times 0.45) = 9.81 \times 0.74 \approx 7.3 \) N\(\cdot\)m.
  2. With dynamic factor 2: about 14.5 N\(\cdot\)m.
  3. Two bolts on the tension side, 80 mm from the opposite edge: tension per bolt \( \approx 14.5 / (2 \times 0.080) \approx 91 \) N.
  4. An M6 class 8.8 bolt has a proof load of roughly 16 kN, so the bolts are far from their limit; the plate around them and the arm's own base are more likely to govern.

Answer: About 14.5 N\(\cdot\)m including dynamics and under 100 N per bolt; bolt strength is not a concern, so the check should move to plate bending and the printed bracket.

Electrical development

Electrical work in robotics capstones causes a disproportionate share of failures and hazards. Every robot should start with a power architecture drawing showing the battery, main fuse, emergency stop, distribution, converters and loads, with wire gauges and fuse ratings chosen for the expected currents. Lithium batteries require particular care: use a battery management system, charge with the correct charger in a designated area, store and transport them according to your institution's rules, and never leave them charging unattended. ROB-200 lesson 2 covered battery chemistry and protection; the capstone is where those rules are tested in practice.

The emergency stop deserves special attention. It must remove power from the actuators directly, through a contactor or a safety relay, rather than by sending a message to software. It should be a latching red mushroom-head button on a yellow background, reachable from outside the robot, and resetting it must not by itself restart motion. Tern has one emergency stop on the robot and a wireless emergency stop carried by the operator; the wireless unit uses a heartbeat, so loss of signal also stops the robot. ROB-450 lesson 3 explained how to think about the reliability of such safety functions.

A power architecture diagram. The 24 V battery with its battery management system feeds a main fuse, then an emergency stop circuit made of a safety relay controlled by the robot emergency stop button, the wireless emergency stop receiver and the safety lidar outputs. The safety relay switches power to the motor drivers and arm servos only. Separate DC-DC converters, fed directly after the main fuse, supply 12 V to the main computer and 5 V to the microcontroller and sensors, so logic stays powered when actuators are stopped.
Tern's power architecture: the emergency stop chain removes actuator power while computers stay on

Wiring quality is a major source of intermittent faults, which are among the hardest problems to diagnose. Use crimped connectors with the correct tool, strain relief, labelled wires, consistent colour coding and a wiring diagram kept up to date. Breadboards are fine for early tests but should not ride on a moving robot. Many teams move to a simple custom printed circuit board or a perfboard with screw terminals once the circuit is stable; small PCB orders are inexpensive, but allow for one to three weeks of fabrication and shipping, which makes them a long-lead item.

Software development

Software can and should progress before the hardware exists. ROB-360 lessons 5 and 6 covered simulation; in a capstone, a simulated version of the robot lets the navigation and perception leads develop and test their code from week 3. Team Tern built a simulated beach world with a sloping sand plane, a boardwalk, picnic tables and randomly placed litter models, and a simplified robot model with the same sensors and topics as the real robot. When the real chassis arrived in week 7, the navigation stack ran on it after two days of tuning rather than two weeks of debugging.

Each software component should have unit tests for its core logic and a simple integration test that launches it with recorded data. Recorded datasets, captured with ros2 bag during early field visits, are invaluable: Chloé recorded camera data on the beach in week 3 with a handheld rig and used it to train and evaluate the litter detector long before the robot could drive there. Keeping a held-out test set, recorded on a different day, gives an honest estimate of detector performance and prevents the overfitting that makes a detector look excellent in the lab and fail in the field.

Firmware on the microcontroller should be kept small and deterministic: read encoders, run wheel velocity loops, enforce speed limits, monitor the safety inputs and heartbeat, and communicate with the main computer. ROB-320 covered real-time design. A useful safety rule is that the microcontroller stops the motors if it does not receive a valid velocity command within a timeout, such as 200 ms, so that a crashed ROS 2 node or a disconnected cable cannot leave the robot driving.

Bench testing subsystems

Before integration, each subsystem should be tested against its own requirements and its interfaces, on the bench. A bench test plan lists the tests, the setup, the pass criteria and the requirement each test verifies. Results are recorded with the configuration used. Testing to the interface is crucial: the drive subsystem should be tested by sending velocity commands over the serial protocol exactly as defined in the ICD, at the defined rate, and checking that odometry comes back at the defined rate and in the defined units. If each side passes its interface test, integration is far less likely to fail.

Extract from Team Tern's subsystem bench test plan
SubsystemBench testPass criterionRequirement
MobilityCommand 0.5 m/s on a test stand; measure wheel speedWithin 5 % of command at steady stateR1 navigate route
MobilityStop sending commandsMotors stop within 200 msSafety (watchdog)
PowerRun all loads at maximum for 10 minNo converter over 70 degrees C; voltage within 5 %Power budget
ManipulationGrasp 20 cans from a sand trayAt least 15 successesR3 grasp cans 70 %
PerceptionRun detector on the held-out beach datasetRecall at least 80 % at 3 mR2 detect cans and caps
SafetyInsert test object into protective fieldMotors de-energized; latch until resetR5 protective stop

The bill of materials and purchasing

The bill of materials (BOM) lists every part with its quantity, supplier, part number, unit cost, lead time and status. It doubles as the cost budget and the purchasing tracker. Long-lead items, identified in lesson 5, are ordered first. Prices should include shipping, duties, taxes and currency conversion, which for international orders can add a third or more to the listed price. Teams should also budget for spares of parts likely to break or be lost, such as fuses, servo horns, gripper fingers and one spare motor driver, and for consumables such as filament, connectors and heat shrink.

Listed prices understate the real cost of parts
# Landed cost of Tern's bill of materials (illustrative prices and rates)
items = [  # name, qty, unit price, currency, origin, lead time (weeks)
    ("gearmotor with encoder", 4, 62.00, "USD", "overseas", 3),
    ("motor driver",           2, 45.00, "USD", "domestic", 1),
    ("arm kit with servos",    1, 690.0, "USD", "overseas", 4),
    ("RGB-D camera",           1, 420.0, "USD", "domestic", 1),
    ("safety lidar scanner",   1, 1450., "USD", "domestic", 2),
    ("RTK GNSS kit",           1, 380.0, "USD", "overseas", 2),
    ("embedded GPU computer",  1, 610.0, "USD", "domestic", 1),
    ("LiFePO4 battery + BMS",  1, 310.0, "USD", "overseas", 3),
    ("chassis stock, hardware",1, 260.0, "USD", "domestic", 1),
]
fx = 1.37               # local currency per USD (illustrative; use 1.0 if you pay in US dollars)
ship = {"overseas": 0.08, "domestic": 0.03}   # shipping as a share of price
duty = {"overseas": 0.10, "domestic": 0.0}    # illustrative duty on overseas items
tax = 0.13              # illustrative sales tax applied to price + shipping + duty
total = 0.0; longest = 0
for name, q, p, cur, origin, lt in items:
    base = q * p * fx
    landed = base * (1 + ship[origin]) * (1 + duty[origin]) * (1 + tax)
    total += landed; longest = max(longest, lt)
    print(f"{name:24s} {base:8.0f} -> {landed:8.0f}")
spares = 0.08 * total; contingency = 0.10 * (total + spares)
print(f"landed parts {total:,.0f}; spares {spares:,.0f}; contingency {contingency:,.0f}; "
      f"budget needed {total + spares + contingency:,.0f}; longest lead time {longest} weeks")
Output
gearmotor with encoder        340 ->      456
motor driver                  123 ->      144
arm kit with servos           945 ->     1269
RGB-D camera                  575 ->      670
safety lidar scanner         1987 ->     2312
RTK GNSS kit                  521 ->      699
embedded GPU computer         836 ->      973
LiFePO4 battery + BMS         425 ->      570
chassis stock, hardware       356 ->      415
landed parts 7,507; spares 601; contingency 811; budget needed 8,918; longest lead time 4 weeks

The landed cost is substantially higher than the listed prices, and with spares and contingency the budget needed is higher still. If the program provides a fixed budget, this calculation decides which parts can be bought new, which can be borrowed from the lab, and which must be descoped. Team Tern borrowed the safety lidar from the department's robotics lab, the single largest item, which brought the project within its budget. Purchasing usually goes through the department, which may have preferred suppliers, tax exemptions or rules about who can approve orders, so ask early how long approvals take.

Importing parts into Canada can trigger customs duties under the Customs Tariff, plus GST or HST and, in some provinces, PST, assessed by the Canada Border Services Agency. As of mid-2026, courier shipments from the United States or Mexico are free of duty and tax up to CAD 40 and free of duty up to CAD 150 under CUSMA commitments, while courier shipments from other countries and postal shipments are relieved only up to CAD 20. Goods qualifying as originating under CUSMA rules of origin are generally duty-free, but trade measures between Canada and the United States changed repeatedly in 2025 and 2026, so check current rules and ask your department's purchasing office before ordering.

Lab safety during development

Building robots involves hazards: power tools, soldering fumes, lithium batteries, moving mechanisms, lasers and sometimes chemicals such as epoxies and solvents. Capstone teams must complete their institution's lab safety training, follow equipment-specific rules, and keep a simple hazard log for their own robot. When testing moving robots, keep a clear test area, assign a person to the emergency stop, and limit speed and force until the safety functions are verified. Lesson 9 covers the formal hazard analysis; the practical rule during development is that no one tests alone and no one tests a moving robot without an emergency stop in hand.

Chemical products used in the lab, such as adhesives, solvents and cleaners, fall under the Workplace Hazardous Materials Information System (WHMIS 2015), so teams should read the safety data sheets and labels before use and follow their institution's WHMIS training.

Common mistakes

  • MistakeBuilding high-fidelity parts before testing the concept cheaply.

    InsteadState the question, then use the lowest-fidelity prototype that answers it, iterating quickly.

  • MistakeUsing software to implement the emergency stop.

    InsteadMake the emergency stop remove actuator power directly through a contactor or safety relay, with latching reset.

  • MistakeLeaving breadboards and loose jumper wires on a moving robot.

    InsteadMove to crimped, labelled, strain-relieved wiring or simple PCBs once circuits are stable.

  • MistakeWaiting for the hardware before writing navigation and perception code.

    InsteadDevelop and test in simulation and on recorded datasets from the first weeks.

  • MistakeTesting subsystems in ways that bypass their interfaces.

    InsteadBench-test each subsystem through its ICD-defined interface at the defined rates and units.

  • MistakeBudgeting from listed prices only.

    InsteadCompute landed cost including currency, shipping, duties and taxes, and add spares and contingency.

Summary and key terms

  • Prototypes answer stated questions; use the lowest fidelity that answers each question and iterate quickly.
  • Mechanical design should use a master assembly, available fabrication methods, proper tolerances, environmental protection and documented strength checks.
  • Electrical design needs a power architecture, correct fusing, safe lithium battery practice, a hardware emergency stop and quality wiring.
  • Software can progress early in simulation and on recorded datasets, with unit tests and a held-out test set.
  • Firmware should be small and deterministic, with a command timeout that stops the motors.
  • Bench tests verify each subsystem against its requirements through its defined interfaces.
  • The BOM tracks parts, lead times and landed cost including shipping, duties, taxes, spares and contingency.
Fidelity
How closely a prototype resembles the final product in materials, methods and performance.
Master assembly
A CAD model containing all major components, used to check fit, interference and routing.
Ingress protection rating
A code, such as IP54, describing an enclosure's protection against solids and liquids.
Emergency stop
A latching control that removes power from hazardous motion directly, independent of software.
Watchdog timeout
A rule that stops actuators if valid commands are not received within a set time.
Held-out test set
Data not used in training or tuning, kept to estimate real performance honestly.
Bench test
A test of a subsystem in a controlled setting before integration.
Bill of materials
A list of all parts with quantities, suppliers, costs, lead times and status.
Landed cost
The total cost of a part delivered, including shipping, duties, taxes and currency conversion.
Long-lead item
A part whose ordering or fabrication time is long enough to affect the schedule.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Write a prototype question and the lowest fidelity that could answer it for Tern's bin.

    Show answer

    For example: does a 30 L bag fit behind the arm without blocking the lidar? A cardboard mock-up on the chassis answers it in an hour.

  2. Why do 3D-printed sliding fits need extra clearance?

    Show answer

    Printing tolerances and surface roughness make parts slightly oversize, so 0.2 to 0.4 mm clearance is typically needed.

  3. Recompute the arm moment if the can is replaced by a 0.15 kg bottle at 0.45 m, dynamic factor 2.

    Show answer

    \( 2 \times 9.81 \times (0.65 + 0.0675) \approx 14.1 \) N\(\cdot\)m.

  4. Why must resetting the emergency stop not restart motion by itself?

    Show answer

    To prevent unexpected movement when the button is released; restart must be a separate deliberate action.

  5. What does a 200 ms command timeout in firmware protect against?

    Show answer

    A crashed node, frozen computer or disconnected cable leaving the robot driving at its last command.

  6. Why record a held-out beach dataset on a different day?

    Show answer

    To test the detector on conditions it was not tuned on, giving an honest estimate of field performance.

  7. What makes a bench test an interface test?

    Show answer

    It exercises the subsystem through the exact interface in the ICD, with the defined messages, rates and units.

  8. A part costs USD 100 from overseas. With an exchange rate of 1.37, 8 % shipping, 10 % duty and 13 % tax, what is its landed cost?

    Show answer

    \( 137 \times 1.08 \times 1.10 \times 1.13 \approx 184 \) in local currency.

  9. Name three spare parts worth buying for an outdoor mobile manipulator.

    Show answer

    For example: fuses, gripper fingers, servo horns, a motor driver, wheel bearings, connectors.

  10. What two rules apply when testing a moving robot during development?

    Show answer

    No one tests alone, and someone holds the emergency stop with speed and force limited until safety functions are verified.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz