Robotics
Grade 7-12
Arduino & Raspberry Pi Reference Cheat Sheet
A printable reference covering Arduino pins, Raspberry Pi GPIO, sensors, motors, PWM, Ohm’s law, and safe circuit wiring for grades 7-12.
Related Worksheets
This cheat sheet covers the basic hardware, wiring rules, and code ideas students need when building robots with Arduino and Raspberry Pi boards. Arduino is often used for direct control of sensors, LEDs, servos, and motors, while Raspberry Pi is a small computer used for programs, cameras, networks, and higher-level control. A quick reference helps students check pin types, voltage limits, and common formulas before connecting parts. It is especially useful for classroom robotics projects where safe wiring and clear troubleshooting matter.
Key Facts
- Ohm’s law is V = I x R, where voltage V equals current I times resistance R.
- Electrical power is P = V x I, so a 5 V device using 0.2 A consumes 1 W of power.
- An Arduino Uno uses 5 V logic on most digital pins, while Raspberry Pi GPIO pins use 3.3 V logic and are not 5 V tolerant.
- A digital pin reads or outputs two states, HIGH and LOW, while an analog input reads a range of voltages using an analog-to-digital converter.
- PWM controls average output power by switching rapidly, and duty cycle = on time / total period x 100%.
- A typical hobby servo uses a control pulse about every 20 ms, with pulse widths near 1 ms, 1.5 ms, and 2 ms for different angles.
- Motors should be powered through a driver board or transistor circuit because microcontroller pins cannot safely supply motor current.
- All connected boards and external power supplies must share a common ground so signals have the same voltage reference.
Vocabulary
- Microcontroller
- A small programmable chip, such as the one on an Arduino, that reads inputs and controls outputs in a circuit.
- Single-board computer
- A complete small computer on one board, such as a Raspberry Pi, that can run an operating system and programs.
- GPIO
- General Purpose Input Output pins are programmable pins used to read sensors or control components.
- PWM
- Pulse Width Modulation is a method of controlling average power by rapidly switching a signal on and off.
- Sensor
- A sensor is a device that measures a physical quantity such as distance, light, temperature, or motion and sends a signal.
- Motor driver
- A motor driver is a circuit or board that lets a low-power controller safely switch and control a higher-current motor.
Common Mistakes to Avoid
- Connecting 5 V signals directly to Raspberry Pi GPIO is wrong because Pi GPIO pins use 3.3 V logic and can be permanently damaged by 5 V.
- Powering a motor directly from an Arduino or Raspberry Pi pin is wrong because GPIO pins supply only small currents and motors can draw much more, especially when starting.
- Forgetting a common ground is wrong because sensors, drivers, and controllers need the same reference voltage for signals to be understood correctly.
- Reversing LED polarity is wrong because an LED only lights when current flows from anode to cathode, and it can be damaged if used without a proper resistor.
- Mixing up analog input and digital input is wrong because an analog sensor may output a range of voltages, while a digital pin only detects HIGH or LOW states.
Practice Questions
- 1 An LED circuit uses a 5 V supply, a 2 V LED drop, and a desired current of 0.02 A. What resistor value is needed using R = (Vsupply - VLED) / I?
- 2 A robot motor uses 6 V and 0.5 A while running. What power does it use in watts?
- 3 A PWM signal is on for 3 ms during a 10 ms period. What is the duty cycle as a percent?
- 4 Why should a Raspberry Pi often be paired with a motor driver or Arduino in a robot instead of connecting motors directly to its GPIO pins?