Sensors & Measurement · Study deck

Braitenberg Vehicles: Sensing to Action

Picture a two-sensor robot that turns toward a lamp with one wiring rule and away with another.

Physics Phoebe is your guide for this deck.

sensortypesbraitenberg
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain how Braitenberg vehicles map sensor inputs to actuator outputs using wiring topology and polarity
  • Design simple reactive systems using direct sensor-to-actuator connections
  • Predict emergent behaviors from different sensor-actuator coupling configurations
  • Evaluate when Braitenberg-style reactive control is sufficient versus when AI/ML is required
iotclass.org

Major section

Start With the Measurement Story

An actuator means a part that turns an electrical command into physical action.

  • Duty cycle means the share of time a repeating control signal stays active.
  • This runway does not prove intelligence or safe autonomy.
  • The deeper sections explain excitatory and inhibitory coupling, direct and crossed wiring, emergent paths, calibration, and behavior limits.
H-bridge motor control circuit with forward, reverse, brake, and coast switching states
H-bridge motor control circuit with forward, reverse, brake, and coast switching states
iotclass.org

Major section

Sensor Readings to Behavior

Valentino Braitenberg's thought experiments showed that a vehicle with only sensors and motors can appear to have fear, aggression, attraction, or exploration.

  • The trick is not a hidden mind; it is the mapping from each sensor to each motor.
  • The simplest, Vehicle 1, has a single sensor driving a single motor: more stimulus means more speed.
  • The calculator above uses a pure Braitenberg model for excitatory modes (motor = sensor gain, no base speed), matching the original theoretical formulation.
  • The worked example later in this chapter adds a base speed offset (motor = base_speed + sensor * gain) to overcome real motor friction.
Four Braitenberg two-sensor vehicle wiring patterns. Same-side excitatory wiring makes a vehicle turn away from light. Cross-wired excitatory wiring makes it turn toward a light source. Cross-wired inhibitory wiring supports exploratory obstacle avoidance. Same-side inhibitory wiring makes the vehicle approach and stay near a stimulus.
Braitenberg two-sensor vehicle wiring patterns: same-side or cross-wired, excitatory or inhibitory, creating avoidance, attack, approach, or exploration
iotclass.org

Major section

Start Simple, Then Prove You Need More

You have now seen the same rule in moving robots and everyday IoT devices.

  • Reactive control is not always enough, but it is often the correct first design.
  • The next question is how long a simple reflex can carry a product before memory, mapping, or pattern recognition becomes necessary.
  • The environment changes what the sensor sees after every actuator command.
Sensor-actuator feedback loop from sensor reading through controller decision, actuator action, environment response, and feedback verification
Sensor-actuator feedback loop from sensor reading through controller decision, actuator action, environment response, and feedback verification
iotclass.org

Major section

Build a Light-Following Plant Pot

Two LDRs sense light direction, two small DC motors rotate the base, and the controller should maximize sunlight without camera vision or cloud logic.

  • The left LDR drives the right motor, the right LDR drives the left motor, and stronger light means more motor speed.
  • If light is on the left, the right motor speeds up and the pot turns left.
  • When the pot is nearly centered, sensor noise can make it jitter.

Key terms

Sleep current
Sleep current is tiny by comparison: 10 uA for 23.92 hours is about 0.24 mAh/day, so motor energy still dominates.
Four Braitenberg two-sensor vehicle wiring patterns. Same-side excitatory wiring makes a vehicle turn away from light. Cross-wired excitatory wiring makes it turn toward a light source. Cross-wired inhibitory wiring supports exploratory obstacle avoidance. Same-side inhibitory wiring makes the vehicle approach and stay near a stimulus.
Braitenberg two-sensor vehicle wiring patterns: same-side or cross-wired, excitatory or inhibitory, creating avoidance, attack, approach, or exploration
iotclass.org

Major section

Build a Light-Following Plant Pot (continued)

Measured behavior should match the wiring: far-left light makes the right motor faster so the pot turns left; centered light gives equal motor speeds; far-right light makes the left motor faster.

  • Result: the pot rotates toward the brightest light source and stops when aligned.
  • Battery life depends on duty cycle.
  • Sleep current is tiny by comparison: 10 uA for 23.92 hours is about 0.24 mAh/day, so motor energy still dominates.
Light intensity versus LDR resistance curve, showing high resistance in darkness and low resistance in bright light
Light intensity versus LDR resistance curve, showing high resistance in darkness and low resistance in bright light
iotclass.org

Major section

Choose Reactive Control or AI/ML

The mistake: a team builds an "AI-powered smart fan" before testing whether temperature can directly drive fan speed.

  • For fail-safe or sub-100 ms behavior, keep the reactive path in control even when ML is added.
  • The simple baseline is a Braitenberg-style mapping.
  • This keeps deterministic safety while allowing later optimization.
iotclass.org

Major section

Choose Reactive Control or AI/ML (continued)

On an ESP32-class system, the reactive path usually has smaller code, shorter active windows, less training work, and more predictable failure modes.

  • The core rule is direct: below 22°C the fan is off, from 22°C to 26°C speed increases linearly, and above 26°C the fan runs at maximum.
  • That mapping is predictable, fast, and easy to test.
  • The Braitenberg rule has no hidden state, updates immediately, and remains easy to test.
iotclass.org

Major section

One-Button Behavior Switching

A one-button mode switch is a compact way to test whether you can predict behavior before watching the robot move.

  • The important learning point is the mapping, not the boilerplate pin setup.
  • After filling both gaps, trace the complementary final line—left_motor.duty(right)—to confirm that each sensor controls the opposite wheel.
  • The first blank must create a PWM output for the left motor; an ADC or input constructor would put that pin on the sensing side of the system.
iotclass.org

Deck summary

Key takeaways

An actuator means a part that turns an electrical command into physical action.

  • Valentino Braitenberg's thought experiments showed that a vehicle with only sensors and motors can appear to have fear, aggression, attraction, or exploration.
  • You have now seen the same rule in moving robots and everyday IoT devices.
  • Two LDRs sense light direction, two small DC motors rotate the base, and the controller should maximize sunlight without camera vision or cloud logic.
  • Measured behavior should match the wiring: far-left light makes the right motor faster so the pot turns left; centered light gives equal motor speeds; far-right light makes the left motor faster.
iotclass.org

Retrieval practice

Recall check 1 of 4

Physics Phoebe says: answer from memory, then check your reasoning.

Q1You want a robot to approach a heat source and stop near it (not crash into it). Which Braitenberg wiring?

ASame-side excitatory (fear -- runs away)
BCross-wired excitatory (aggression -- charges at full speed)
CCross-wired inhibitory (explorer -- wanders away)
DSame-side inhibitory (love -- approaches and stops)
Show answer

Answer: D Same-side inhibitory (Vehicle 3a: Love) creates approach + slowing behavior.

iotclass.org

Retrieval practice

Recall check 2 of 4

Physics Phoebe says: answer from memory, then check your reasoning.

Q2In a Braitenberg Vehicle 2b (cross-wired, excitatory), what behavior does the robot exhibit toward a light source?

AIt turns toward and charges at the source aggressively.
BIt turns away and flees from the source as a fear response.
CIt approaches and stops near the source as a love response.
DIt continues straight because the current heading is enough to track a moving source.
Show answer

Answer: A In Vehicle 2b (cross-wired excitatory), the left sensor drives the right motor and vice versa.

iotclass.org

Retrieval practice

Recall check 3 of 4

Physics Phoebe says: answer from memory, then check your reasoning.

Q3Which of the following real-world IoT systems is essentially a Braitenberg vehicle?

AA facial recognition security camera
BA thermostat controlling a heater
CA machine learning anomaly detector
DA natural language processing chatbot
Show answer

Answer: B A thermostat is essentially a Braitenberg vehicle: the temperature sensor (input) directly controls the heater (actuator) through a simple threshold relationship.

Q4What converts an external stimulus into signals that begin the behaviour chain?

ASensor-Motor Wiring
BCoupling Type (Excitatory/Inhibitory)
CEmergent Behaviour
DSensor Detection
Show answer

Answer: D Detection converts the external stimulus into the signals that begin the behaviour chain.

iotclass.org

Retrieval practice

Recall check 4 of 4

Physics Phoebe says: answer from memory, then check your reasoning.

Q5Complete the Braitenberg vehicle light-following behavior:

Aleft_motor = PWM(25)
Bleft_motor = ADC(25)
Cleft_motor = read(25)
Dleft_motor = input(25)
Show answer

Answer: A Braitenberg Vehicle 2b (attraction) cross-wires sensors to opposite motors.

iotclass.org

Print reference

Answers

Answer key.

  1. D · Same-side inhibitory (Vehicle 3a: Love) creates approach + slowing behavior.
  2. A · In Vehicle 2b (cross-wired excitatory), the left sensor drives the right motor and vice versa.
  3. B · A thermostat is essentially a Braitenberg vehicle: the temperature sensor (input) directly controls the heater (actuator) through a simple threshold relationship.
  4. D · Detection converts the external stimulus into the signals that begin the behaviour chain.
  5. A · Braitenberg Vehicle 2b (attraction) cross-wires sensors to opposite motors.
iotclass.org