Skip to main content
Stretch Lab

30/60/90 Day Execution Plan

Shivam Bhardwaj, Lead Integration Engineer. Start date: Feb 16, 2026. Report line: Aaron Edsinger (CEO).

Execution Focus

Structured 90-day plan from orientation through firmware delivery and production integration.

Timeline

Days 1-30

Full system understanding and EMC lab readiness

Current

Week 1-2: System bring-up and orientation

  • Complete full Pimu V1 (Calder) bring-up sequence (slides 36-43)
  • Run s4_rdk_test_simple.py to validate all subsystems
  • Run stretch4_pimu_calder_bringup.py for power system validation
  • Document voltage rails and current draw by power state
  • Verify USB hub behavior (V1 ESD fix vs V0)
  • Map all hello-devices on USB bus and power cycle test each

Week 3-4: EMC pre-scan preparation

  • Write Python EMC test script (slide 11)
  • Run all actuators at normal speeds
  • Run all sensors: LiDARs, line sensors, cameras
  • Enable WiFi on both ESP32 and NUC
  • Keep ESP32 connected to Firebase and sending data
  • Keep NUC continuously pinging server
  • Keep all dev ports plugged in (USB, Ethernet, filtered HDMI)
  • Decide test mode strategy: combined vs separate charging/operational
  • Prepare common mode choke and custom charger cable
  • Schedule EMC lab time
  • Execute EMC pre-scan (Class A target first, then evaluate Class B)

Deliverables

  1. 1System bring-up validation report
  2. 2Automated EMC test script (Python)
  3. 3EMC pre-scan results and gap analysis

Timeline

Days 31-60

Critical firmware gaps closed

Upcoming

Warning: I2C bus refactoring (Priority 0 — BLOCKING)

  • CRITICAL: BNO085 IMU interrupt handler does full I2C reads inside ISR — Wire library is not reentrant
  • Adding ICM-42688-P + IIS2MDCTR + INA228 on same bus without refactoring will cause hard faults
  • Refactor I2C to non-blocking DMA or polled reads outside ISR context
  • Implement I2C bus arbitration for 4 devices sharing the bus
  • Validate bus timing at 1kHz control loop (800µs headroom per cycle on stepper)
  • This MUST be done before any new sensor driver work

IMU and magnetometer drivers (Priority 1)

  • Implement ICM-42688-P IMU driver (I2C 0x68)
  • Implement IIS2MDCTR magnetometer driver (I2C 0x1E)
  • Integrate both drivers into Pimu firmware control loop
  • Add calibration routines
  • Expose RPC interface for body server access

SOC correction algorithm (Priority 2)

  • Enable INA228 power monitor for energy tracking
  • Implement sleep-mode SOC correction via coulomb counting
  • Validate against known battery discharge curves
  • Handle edge cases: cell imbalance and low-voltage cutoff

ESP and SAMD communication rewrite (Priority 3)

  • Design master/slave UART protocol (SAMD as master)
  • Replace current bidirectional async approach
  • Implement packet framing and error detection
  • Stress test under full actuator and sensor load

Power button UX

  • Low SOC feedback via RGB LEDs on power press
  • Fuse blown notifications via status LEDs
  • Charger fault detection (barrel jack/adapter faults)

Deliverables

  1. 1IMU and magnetometer drivers merged to firmware repo
  2. 2SOC algorithm validated against test data
  3. 3ESP-SAMD protocol spec and implementation
  4. 4Power UX improvements delivered

Timeline

Days 61-90

Production-ready integration testing

Upcoming

RDK test expansion

  • Expand s4_rdk_test_simple.py into comprehensive suite
  • Add USB-C port enumeration test across hello-devices
  • Add motor actuation test per axis
  • Add sync and runstop pulse verification
  • Add LiDAR power cycle and Ethernet detection tests
  • Add Firebase comms test and credential wipe
  • Add brake engagement and disengagement test

Body server integration

  • Verify stretch_body_ii compatibility with new firmware
  • Update RPC interface for IMU and magnetometer sensors
  • Run full robot motion plus sensor streaming integration test

EMC full compliance

  • Address any EMC pre-scan failures
  • Implement conducted emissions filter on Pimu if needed
  • Run full compliance test (Class A or B per pre-scan)
  • Produce documentation package for FCC filing

Stretch 5 input

  • Document lessons learned from Stretch 4 integration
  • Propose eFuse replacement for short-circuit protection (slide 32)
  • Propose 3V3_AUX rail consolidation (slides 33-34)
  • Provide next-gen architecture recommendations

Deliverables

  1. 1Comprehensive RDK test suite
  2. 2Validated body server integration
  3. 3EMC compliance report
  4. 4Stretch 5 engineering recommendations document

Dependencies and Assumptions

  • Access to Stretch 4 hardware (Calder Pimu V1)
  • EMC lab availability with 1-2 week booking lead time
  • Atmel ICE JTAG flasher access
  • 36V 8A power adapter (wider model, not Basquiat adapter)
  • Configured and accessible test NUC
  • ESP32 firmware repo location (not found in stretch_firmware_ii — needs to be located or scoped as new work)

Risk Register

Execution risks, expected impact, and mitigation plans
RiskImpactMitigation
I2C bus corruption from ISR reentrancyHard faults, sensor data loss — blocks ALL new sensor workP0: Refactor I2C to non-blocking before adding any new I2C devices
EMC pre-scan fails Class AFCC timeline and shipping schedule delaysPrepare choke and filtering options in advance; budget for second lab visit
I2C contention at 1kHz control rateUnreliable IMU and magnetometer dataLower control rate if required and optimize ISR timing
BMS cell imbalance during chargingCharging FET disconnects early and reduces effective chargeMonitor alarm bits and add balancing notification path
ESP-SAMD rewrite breaks existing RPCPython body server communication failsMaintain backward compatibility and version protocol
Firebase wake-up bug (double request)Degraded user experienceTrack as lower priority and schedule targeted fix