Skip to content

MSP432-based robot that detects sound direction using dual microphones and responds by turning, moving, or stopping.

License

Notifications You must be signed in to change notification settings

allenb24/Sound-Detecting-Robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sound Detecting Robot with Dual Microphones (MSP432)

This embedded systems project uses two microphones and an MSP432P401R microcontroller to control a robot based on the direction of detected sound. The robot can determine whether sound is stronger on the left or right and react by moving forward, turning, stopping, or rotating accordingly. The project included creating a circuit to embed with the microcontroller and program in C.

Developed as a final project for EEC 10: Introduction to Embedded Systems at UC Davis.


Features

  • Dual Microphone Sampling:

    • Captures analog signals via ADC14 on pins P6.0 and P6.1.
    • Real-time sampling and filtering of sound data.
  • Digital Filtering:

    • Implements a two-stage filter: high-pass followed by low-pass.
    • Reduces ambient noise and highlights sudden sound bursts.
  • Direction Detection Logic:

    • Divides sound input into chunks, extracts average maximums.
    • Compares left vs. right channel intensity to decide robot behavior.
  • Motor Control with PWM:

    • Uses Timer A0 to drive left/right wheels via PWM on P2.6/P2.7.
    • Supports multiple directional states: Forward, Left, Right, Stop, Rotate.
  • Timer Interrupt-Based Execution:

    • Timer A2 interrupt handles sound sampling and processing.
    • Uses SysTick timer for delay-based motor control.

Project Structure

  • src/: Source files, including robot control logic and system initialization
  • inc/: Header files for system utilities (e.g. Clock, SysTick)
  • ccs_project/: Code Composer Studio project files
  • media/: Images and videos of robot

Robot Design

robot

Demo

robot_demo_720p.mp4

What I Learned

This project taught me fundamental embedded systems concepts such as:

  • Real-time signal processing on microcontrollers
  • Motor control using timers and PWM
  • Interrupt-driven architecture
  • Data filtering and ADC processing
  • Debugging hardware interactions (noise, analog signals, GPIO control)
  • Circuit design

Educational Use & Acknowledgments

Some files (e.g. startup_msp432p401r_ccs.c, system_msp432p401r.c) are derived from TI DriverLib and/or provided by UC Davis instructors. These files retain their original license headers.

This repository is shared for educational and non-commercial use only.
Please do not reuse this work for academic credit without permission.

It also reinforced how important structured logic and noise filtering are when designing reactive systems. Timing and signal conditioning made a major difference in detecting actual sound events vs. background interference.


License

Educational Use Only – Mixed license due to inclusion of TI and UC Davis starter files. Do not redistribute for commercial or academic credit without proper attribution.

About

MSP432-based robot that detects sound direction using dual microphones and responds by turning, moving, or stopping.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages