Synthesizing Robot Sounds

Makes R2-D2-style robot sounds from a single GPIO pin by switching it on and off at different speeds, with no audio chip and no stored recordings.

Key part: XPT8871 amplifier board

Key part: XPT8871 amplifier board (kit photo still needed)

Key Features

  • Lab: Lab 1: Build the Sound Circuit
  • Lab: Lab 2: Sliding Pitches
  • Lab: Lab 3: Shaping the Volume
  • Lab: Lab 4: Sounds From Measurements
  • Lab: Lab 5: Add the Button
  • Lab: Lab 6: The Sound Jukebox

Key Benefits

  • Free, open lessons. The STEM Robots textbook has the kit page, wiring, and MicroPython code.
  • Ready-made curriculum. 6 additional lab pages walk students through the build step by step.
  • Budget. About $3 for a small 8 ohm speaker on eBay, added to a robot.

Parts

Part (price)Role
Raspberry Pi Pico ($4)Microcontroller
Cytron Maker Pi RP2040Microcontroller
10K PotentiometerInput knob
MAX98357A I2S Amplifier ($0.99)Audio amplifier
Momentary Push ButtonsInput button / switch
Piezo Buzzer / SpeakerSound output
830-Point Breadboard ($1.10)Breadboard
Micro-USB Data Cable ($2.50)Power and programming cable

Microcontroller listed first. Prices shown only where known; see the source book for quantities, wiring, and current prices.

About this kit: From the STEM Robots collection.
Source: STEM Robots