ScaredBot using Microphone, IR Distance Sensor, and Hall Effect Sensors

Introduction

Stephen and I thought it would be interesting to build a robot. After seeing the many robot projects that had been done before, we looked at an interesting way to allow humans to interact with the bot. From these initial ideas came ScaredBot, a bot that listens to audio input from a person and reacts to loud sounds by "running away." In addition to a microphone, an infrared distance sensor was added for object detection, and Hall effect sensors for the motors were added for controlled movement of the robot.

Electronics

Mbed

Mbed is the embedded systems processor that does all the computation and controls for ScaredBot. The Mbed chip has many pins which are capable of analog and digital inputs in addition to digital, analog, and PWM outputs. Mbed can do real-time processing to accept I/O inputs and make decisions to change robot motion according to these inputs.

Microphone

The first component hooked up to the Mbed was the microphone. The microphone has a breakout board for a breadboard. We hooked up the three connections: voltage, ground, and signal.

The microphone is inexpensive, and the quality of the sensor shows because of it. The microphone senses the sounds very close to it that create vibrations. For example, blowing directly on the microphone registers louder "sounds" than most other noises. Likewise, the microphone sensed shouts most often when the shouts were very close to it.

1000

Infrared Distance Sensor

The IR distance sensor uses reflection of infrared waves to determine distance. Like the microphone, the IR sensor requires voltage and ground and outputs an analog signal. We mounted the IR distance sensor to the front of our bot, and its purpose was to detect objects directly in the line of path.

The distance sensor could easily detect objects in front of it, but unfortunately it also picked up a lot of noise. The noise (of reflected IR waves) would make the sensor detect objects when they weren't there. To account for noise, we employed a moving average in software such that the robot would stop for objects based on 10 readings over a half a second period.

1000

Motor Control with Hall Effect Sensors

The motors that move the robot are two-wire DC motors. They are driven by an H-bridge driver circuit and are powered by an external power supply (a +6V battery pack). The H-bridge only supplies the output voltages for the two wires of the DC motor without regard for the physical load. Therefore, motors under different loads would spin robot wheels at different rates with the same output voltages.

To account for the differences between applied motor voltages and expected motor rotation, a hall effect sensor was attached to each motor. The Hall effect sensors provided feedback to Mbed by showing how much each motor had rotated. Using the sensor data, the robot actively made corrections to straighten its forward movement.

1000

Connections

mbedExternal Power SupplyMicrophoneH-BridgeLeft MotorRight MotorIR SensorLeft Motor EncoderRight Motor Encoder
VINV+ (6V)VMOT
GNDGNDGNDGNDGNDGND
Vout (3.3V)VinVCC,STBY
p13Signal
p14Signal
p15Signal
p16AC
p21PWMB
p22BI1
p23BI2
p26PWMA
p24AI2
p25AI1
AO1Motor1+
AO2Motor1-
BO1Motor2+
BO1Motor2-

Images

1500

Bot Front View

1500

Bot Right View

1500

Bot Left View

Demo Video

Import program4180_Lab4_ScaredBot

4180 Lab 4 Project. by Oluwagbemiga Mabogunje and Stephen Wang. When implemented, a properly assembled robot should behave as follows. Reacts to loud sounds by moving rapidly Reacts to obstacles by turning away Uses Hall Effect motor encoder feedback to improve motion.

Possible Improvements

  • Changing the Infrared to an Ultrasound sensor will enable better 'vision'
  • Using a better microphone will allow for better range of hearing
  • More detailed encoder feedback algorithm will account for movement error


Please log in to post comments.