Stages Stage 1 Balance upright using a potentiometer and ‘whisker’ to detect relative ground orientation. Stage 2 Balance using inertial measurement (gyroscope, accelerometer) - without any auxiliary ground contact. Stage 3 Navigate using high-level directives - ‘left’, ‘right’, ‘forward’, ‘backwards’, ‘stop’.
Basic Hardware Actuators –Differential drive 2 motors - left & right Full mobility Zero turning circle Sensors –Wheel encoders Used for dead reckoning Needed for balance –Pitch sensor Either ‘whisker’ or inertial measurement
System Diagram Batteries (4.8Ah 14.4V) 5V reg ulat or Low voltage warning Atmel 90S8535 GyroADXL Dual Motor Controller (PWM control) M Left M Right enc od er 0/1 Legend: 14.4V Power 5V Power Control signals Sensor inputs Motor Control (Ground lines not shown for clarity) Status LEDS Input/Output formats: Low voltage warning: Logic 1 when battery low. Gyroscope: ~50Hz pulse width modulation 1ms - 2ms duty cycle ADXL202JQC (Accelerometer) 2-channel analogue signal PWM can also be used Duty cycle corresponds to g's Wheel Encoders (Quadrature) Minimal processing done At each pulse, gives direction Status LEDs Indicate internal state of uC May be a 7-segment display Motor Controller 2-channel PWM control PWM amplitude x2 Direction signal x2
Motors –RS 550 S –14.4V –Sourced from a cheap cordless drill Controller –Dual H-bridge controller - L298N –PWM control –3A Capacity –Stackable
‘Whisker’ Low-friction potentiometer Attached to wire whisker Senses angle w.r.t. ground - NOT gravity.
Inverted Pendulum Limited range of movement Direct (physical) measurement of pitch angle and rate
+ wheels Unlimited range of movement Indirect (inertial) measurement of pitch angle and rate
Theory Balancing: –Open-loop control system –Speed and pitch angle are an indirect result of motor speeds Steering –Closed-loop control system –Heading is a direct result of relative motor speeds
De-coupling control systems Balancing –If an equal torque offset is applied to both wheels, the heading is unaffected Steering –If an equal but opposite torque offset is applied to the left and right wheels, pitch and speed are unaffected* Balance and Steering can be considered separately
Six State Space Variables x RM straight line position [m] v RM straight line speed [m/s] θ P pitch angle [rad] ω P pitch rate [rad/s] δyaw angle [rad] δ˙yaw rate [rad/s]