Sonar Proximity Audio Alert for Robot

Purpose

This project uses a sonar sensor attached to a robot controlled with a bluetooth module to check distance from the edge of the robot to an obstacle in its path and alerts the user with increasingly louder audio output as it gets closer to the obstacle.

Program

Import programlab4

Sonar Proximity Audio Alert for Robot

Connections

Connections for Pololu MOSFET H-Bridge Module:

H-BridgembedMotorsExternal Power Supply
PWMAp21
VMOT5V
AIN2p19
AIN1p20
STBYVout
BIN1p15
BIN2p14
PWMBp22
GNDGNDGND
VCCVout
AO1Left Wheel + Lead
AO2Left Wheel - Lead
BO2Right Wheel - Lead
BO1Right Wheel + Lead

Connections for the HC-SR04 Ultrasonic Sonar Sensor:

SonarmbedExternal Power Supply
VCC5V
TRIGp6
ECHOp7
GNDGNDGND

Connections for Adafruit Bluefruit LE UART Friend - Bluetooth Low Energy Module:

Adafruit BLEmbed
GNDGND
VINVU
RTSnc
CTSGND
TXOp27
RXIp28

Connections for Speaker with 2N3904 Amplifier

Speaker2N3904 NPN General Purpose Amplifiermbed
+Vout
-Collector
EmitterGND
Base220-1k Resistor in Series to p23

Video Demonstration


Please log in to post comments.