Intro to Robotics: Sensors and Motors
Learn how sensors and motors work together in a simple robot, with wiring diagrams, programming steps and a checklist for a school robotics project.
Quick Reference
| Sensor | What It Measures | Typical Task |
|---|---|---|
| Ultrasonic / ToF | Distance to obstacles | Wall following & collision avoidance |
| Line / IR Reflectance | Surface light vs. dark | Following taped track lines |
| Encoder | Wheel rotation ticks | Measuring exact travel distance |
| Gyro / IMU | Angular turn rate | Making accurate 90° turns |
Core Concepts
Sense – Think – Act Loop
Every autonomous robot continuously reads sensors, runs decision logic, and updates motor outputs.
Gear Ratios
Driving a large gear with a small gear increases torque (pulling power) while reducing top speed.
Proportional Control
Adjusting steering proportionally to line error produces much smoother tracking than sharp on/off turns.
Pre-Run Checklist
Check battery voltage, tight wheel hubs, secure sensor cables, and safe test-arena boundaries before powering on.
Self-Check Practice
1. A robot wheel has circumference 20 cm and turns 3.5 full rotations. How far did it travel?
Show worked answer
20 × 3.5 = 70 cm.
2. Why do encoders measure distance more reliably than timed motor runs?
Show worked answer
Battery voltage drops over time, slowing motors even when run for the exact same number of seconds.
Study Notes
- Change only one mechanical or code variable between test runs and log results in your engineering notebook.
- Label both ends of every sensor wire with small tape flags.