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
Physics Phoebe, the module guide, in a scene from this chapter.
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.
iotclass.org

Major section

In 60 Seconds

Same-side excitatory wiring creates avoidance ("fear"), cross-wired excitatory creates approach at speed ("aggression"), same-side inhibitory creates gentle approach and stop ("love"), and cross-wired inhibitory creates exploration.

  • Many real IoT systems -- thermostats, motion-activated lights, fan controllers -- are essentially Braitenberg vehicles.

Numbers to remember

0.1%At a 0.1% sampling duty cycle it instead adds only 0.00768 mAh/day.
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.
Braitenberg two-sensor vehicle wiring patterns: same-side or cross-wired, excitatory or inhibitory, creating avoidance, attack, approach, or exploration
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.
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.
  • Battery life depends on duty cycle.

Key terms

If light
If light is on the left, the right motor speeds up and the pot turns left.
When the pot
When the pot is nearly centered, sensor noise can make it jitter.
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

Build a Light-Following Plant Pot (continued)

If light is on the left, the right motor speeds up and the pot turns left.

  • 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.
  • When the pot is nearly centered, sensor noise can make it jitter.
  • Result: the pot rotates toward the brightest light source and stops when aligned.
iotclass.org

Major section

Choose Reactive Control or AI/ML

For fail-safe or sub-100 ms behavior, keep the reactive path in control even when ML is added.

  • On an ESP32-class system, the reactive path usually has smaller code, shorter active windows, less training work, and more predictable failure modes.
  • The simple baseline is a Braitenberg-style mapping.

Numbers to remember

22°CThe core rule is direct: below 22°C the fan is off
26°Cfrom 22°C to 26°C speed increases linearly
20°Cat 20°C it may false-activate
iotclass.org

Major section

Choose Reactive Control or AI/ML (continued)

That mapping is predictable, fast, and easy to test.

  • The mistake: a team builds an "AI-powered smart fan" before testing whether temperature can directly drive fan speed.
  • The Braitenberg rule has no hidden state, updates immediately, and remains easy to test.
  • This keeps deterministic safety while allowing later optimization.
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.
${cards} ${stimLabel} (L:${comp_left_light}% R:${comp_right_light}%) Same inputs → four completely different behaviors from wiring alone
One-Button Behavior Switching
iotclass.org

Deck summary

Key takeaways

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

  • Same-side excitatory wiring creates avoidance ("fear"), cross-wired excitatory creates approach at speed ("aggression"), same-side inhibitory creates gentle approach and stop ("love"), and cross-wired inhibitory creates exploration.
  • 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.
  • If light is on the left, the right motor speeds up and the pot turns left.
iotclass.org

Retrieval practice

Recall check 1 of 3

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)
BSame-side inhibitory (love -- approaches and stops)
CCross-wired excitatory (aggression -- charges at full speed)
DCross-wired inhibitory (explorer -- wanders away)
Show answer

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

iotclass.org

Retrieval practice

Recall check 2 of 3

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 runs away from the light (fear)
BIt turns toward and charges at the light (aggression)
CIt approaches and stops near the light (love)
DIt ignores the light entirely
Show answer

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

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

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

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

iotclass.org

Retrieval practice

Recall check 3 of 3

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

Q4Place each Braitenberg mechanism where it lives so you can predict motion from a wiring rule rather than treating behaviour as hidden software.

ASensor Detection
BSensor-Motor Wiring
CCoupling Type (Excitatory/Inhibitory)
DEmergent Behaviour
Show answer

Answer: A Place each Braitenberg mechanism where it lives so you can predict motion from a wiring rule rather than treating behaviour as hidden software.

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 1 of 2

Answer key.

  1. B · Same-side inhibitory (Vehicle 3a: Love) creates approach + slowing behavior.
  2. B · In Vehicle 2b (cross-wired excitatory), the left sensor drives the right motor and vice versa.
  3. D · A thermostat is essentially a Braitenberg vehicle: the temperature sensor (input) directly controls the heater (actuator) through a simple threshold relationship.
  4. A · Place each Braitenberg mechanism where it lives so you can predict motion from a wiring rule rather than treating behaviour as hidden software.
iotclass.org

Print reference

Answers 2 of 2

Answer key.

  1. A · Braitenberg Vehicle 2b (attraction) cross-wires sensors to opposite motors.
iotclass.org