Home
Species

Complete Code Changelog

August 25, 2025

Hysteresis Project - Complete Code Changelog

Movement Algorithm Stream (Searching Series)

SearchingV31.ino - August 4, 2025

Pull-pullback gravity dynamics with territorial exploration

  • v31: Prolonged dramatic struggle against darkness - slower energy drain, stronger resistance, tighter centre threshold
  • v30: Gravity-influenced territorial exploration, multi-vector movement system
  • v29: Spatial weighting for systematic coverage, organic perimeter search
  • v28: Grid memory for systematic exploration, balanced search speeds, no randomness

SearchingV27.ino - August 3, 2025

Fixed SEARCH to explore at perimeter with irregular patterns

  • v27: SEARCH now stays at perimeter with irregular, elongated circles
  • v26: Four-state system (Rest/Seek/Search/Return) with clear transitions
  • v25: Energy/gravity model - rest position has gravitational pull
  • v24: Two-tier search with major/minor circles, dual memory systems
  • v23: Implemented hysteresis-based dwelling for lonely search behavior
  • v22: Added epicycloid pattern generation for circles within circles
  • v21: Multi-frequency sine wave exploration with organic movement
  • v20: Added Perlin-like noise generation for natural variations
  • v19: Improved smoothing algorithms for servo response
  • v18: Enhanced boundary constraints and limit handling
  • v17: Optimized timing intervals for consistent updates
  • v16: Refactored movement calculation pipeline
  • v15: Added debug output for position tracking
  • v14: Fixed servo pin assignments (X=3, Y=5)
  • v13: Renamed base/axial to X/Y for clarity

SearchingV12.ino - July 27, 2025

Basic smooth searching with manual override

  • v12: Implemented smooth searching motion from startup
  • v11: Added manual override via serial terminal
  • v10: Basic random walk implementation

LED Communication Stream (Hysteresis_I_MMLC Series)

Hysteresis_I_MMLC_0.16.ino - July 30, 2025

LED Hysteresis Lighting System

  • v0.16: Adjusted fade ranges to reduce pastel tones
  • v0.14 and earlier: Developed hysteresis-controlled RGB transitions

Note: Significant version gap suggests concentrated development period between v0.10-v0.14 not captured in available files


Development Timeline Summary

DateMovement StreamLED StreamKey Innovation
July 27, 2025SearchingV12.ino-Manual override, smooth motion
July 30, 2025-Hysteresis_I_MMLC_0.16.inoColor fade refinement
August 3, 2025SearchingV27.ino-Four-state behavioral system
August 4, 2025SearchingV31.ino-Prolonged struggle dynamics
August 31, 2025SimpleFOC_TestUtility.ino-BLDC motor compatibility testing
August 31, 2025Open-Loop BLDC Analysis-Critical design discovery: encoder required
August 31, 2025BLDC Testing Session-Motor compatibility validation
September 5, 2025AS5600 Testbench-Completed encoder testbench for 2204 motor
September 6, 2025SimpleFOC Integration Issues-Hardware validated, library integration problems identified

BLDC Hardware Stream (Motor Control System)

SimpleFOC_TestUtility.ino - August 31, 2025

Live-tunable BLDC motor testing framework

Purpose: Universal testing utility for BLDC motor compatibility with SimpleFOCMini Location: /code/Arduino/utilities/SimpleFOC_TestUtility.ino

Features:

  • Live voltage adjustment via serial (v1.2)
  • Live speed adjustment via serial (s0.8)
  • Systematic pole pairs testing through code changes
  • RP2040-Zero pin configuration (GP0,1,2,3)
  • Thermal monitoring and safety limits

Hardware Validated:

  • RP2040-Zero + SimpleFOCMini v1.1 integration
  • 9V supply with 2200µF capacitor
  • Motor resistance compatibility testing

BLDC Testing Session - August 31, 2025

Hardware validation and motor compatibility research

Hardware Configuration:

  • RP2040-Zero microcontroller (GP0,1,2,3 for motor control)
  • SimpleFOCMini v1.1 BLDC driver
  • 9V 2A supply with 2200µF capacitor
  • Various motor testing (1503, A2212, 2204 gimbal)

Key Discoveries:

  • Motor resistance critical: SimpleFOCMini requires >10Ω gimbal motors
  • Drone motors incompatible: 1503 (1Ω) and A2212 (low resistance) cause driver overheating
  • Live tuning interface: Serial commands for voltage/speed adjustment
  • Component mismatch: All tested drone motors below SimpleFOCMini specifications

Test Code Features:

// SimpleFOC_TestUtility.ino - Live tunable parameters via serial
float voltageLimit = 0.5;    // Command: v1.2  
float targetSpeed = 1.0;     // Command: s0.8
BLDCMotor motor = BLDCMotor(5); // Pole pairs testing

Outcome: 2204-260KV gimbal motor identified as proper solution, delivery pending

Open-Loop BLDC Control Analysis - August 31, 2025

Critical design discovery: Encoder integration mandatory

Problem: All BLDC motors exhibited overheating in open-loop mode regardless of type:

  • 1503 micro motors (1Ω resistance)
  • A2212 drone motors (low resistance)
  • 2204-260KV gimbal motors (9.8Ω resistance)

Root Cause Discovery:

  • Open-loop BLDC inherently inefficient - cannot synchronize electrical timing with rotor position
  • Creates internal “fighting” between electrical field and rotor position
  • Energy converts to heat instead of useful torque
  • Resistance compatibility secondary issue to fundamental control method problem

Failed Mitigation Attempts:

  • Current limiting (motor.current_limit = 1.1)
  • PWM frequency adjustment (20kHz)
  • Phase sequence optimization
  • Voltage reduction strategies

Solution Required: AS5600 encoder integration for closed-loop FOC control

  • Enables electrical field synchronization with actual rotor position
  • Eliminates timing mismatch heating
  • Mandatory for reliable BLDC operation


BLDC Hardware Stream (Motor Control System)

BLDC Testing Session - August 31, 2025

Hardware validation and motor compatibility research

Hardware Configuration:

  • RP2040-Zero microcontroller (GP0,1,2,3 for motor control)
  • SimpleFOCMini v1.1 BLDC driver
  • 9V 2A supply with 2200µF capacitor
  • Various motor testing (1503, A2212, 2204 gimbal)

Key Discoveries:

  • Motor resistance critical: SimpleFOCMini requires >10Ω gimbal motors
  • Drone motors incompatible: 1503 (1Ω) and A2212 (low resistance) cause driver overheating
  • Live tuning interface: Serial commands for voltage/speed adjustment
  • Component mismatch: All tested drone motors below SimpleFOCMini specifications

Test Code Features:

// Live tunable parameters via serial
float voltageLimit = 0.5;    // Command: v1.2  
float targetSpeed = 1.0;     // Command: s0.8
BLDCMotor motor = BLDCMotor(5); // Pole pairs testing

Outcome: 2204-260KV gimbal motor identified as proper solution, delivery pending


Key Architectural Evolution

Movement System Progression:

  1. v10-v12: Basic random walk → smooth motion
  2. v13-v17: Infrastructure improvements (naming, timing, boundaries)
  3. v18-v22: Advanced patterns (epicycloids, noise generation)
  4. v23-v26: Behavioral psychology (dwelling, four-state system)
  5. v27-v29: Perimeter specialization and spatial memory
  6. v30-v31: Gravity dynamics and dramatic struggle

Communication System Development:

  • Early Phase (≤v0.14): Core hysteresis RGB transitions
  • Refinement (v0.16): Color palette optimization

Development Intensity Patterns

Movement Algorithms: Continuous iteration with 21+ documented versions over 8 days

  • Primary development focus with detailed behavioral evolution
  • Clear progression from mechanical motion to psychological dynamics

LED Communication: Concentrated development with fewer documented versions

  • Parallel development stream with less frequent major revisions
  • Focus on aesthetic refinement rather than behavioral complexity

Missing Documentation

  • SearchingV13-V26: Individual version details not captured in available files
  • Hysteresis_I_MMLC v0.01-v0.15: Early development phases undocumented
  • Integration versions: Combined movement + LED coordination not evident

Hxyxy Tuning Interface Stream (OpenFrameworks)

HIxyxy_Tuning_OF.ino + ofApp - September 2, 2025

Servo control debugging and interface enhancement

Critical Bug Fixes:

  • Servo Direction Fix: TipX servo direction inverted in updateServos() - servoTipX.write((int)(180 - tipX));
  • Range Validation Bug: Updated Arduino validation from 5-175° to full 0-180° servo range
  • System Freeze Fix: Mismatched range validation between OF GUI (0-180°) and Arduino (5-175°) caused complete lockup

Interface Enhancements:

  • Mouse Grid Control: Added direct click/drag manipulation of servo position grids
  • Real-time Visual Feedback: Improved coordinate mapping with proper Y-axis inversion
  • Interactive Tuning: Enhanced user experience with intuitive direct servo control

Visualization Analysis:

  • Critical Issue Identified: Current “Tentacle Profile” uses rigid segments with linear interpolation
  • Reality Mismatch: Physical tentacle is continuous flexible structure with complex cable deformation
  • Path Forward: Empirical curve fitting based on actual hardware measurements needed

Technical Debt Documented:

  • Tentacle curve physics depend on spine material, knuckle geometry, thread routing
  • Current visualization actively misleading about system behavior
  • Proper spatial modeling essential for advanced control algorithm development

Last Updated: September 2, 2025
Sources: SearchingV12.ino, SearchingV27.ino, SearchingV31.ino, Hysteresis_I_MMLC_0.16.ino, HIxyxy_Tuning_OF.ino

Classification

development technical timeline