Written Report 2

David Ladolcetta

RoBeDeS

EEL5666: Intelligent Machine Design Laboratory

Instructors: Dr. A. Antonio Arroyo

Dr. Eric M. Schwartz

TA: Kevin Claycomb

Adam Barnett


Table of Contents

3. Abstract 3

4. Executive Summary 3

5. Introduction 3

6. Integrated System 3

7. Mobile Platform 4

8. Actuation 6

9. Sensors 6

A. Pyro-Electric Infrared (PIR) Sensor 7

B. Sonar Range Sensor 8

C. Bump Sensor 8

D. CdS Photo Cells 9

10. Behaviors 9

11. Experimental Layout and Results 10

12. Conclusion 10

13. Documentation 11

14. Appendices 11

A. Program Code 11

LCD Code 11

Sonar Code 13

Bump Sensor Code 15

PIR Code 16

3. Abstract

The purpose of this report is to display the current progress of my robot design, RoBeDeS. RoBeDeS stands for Robotic Beverage Delivery System and does as named. After being loaded, it will traverse a room seeking the nearest human. Once it finds a person, it will roll to him/her, await beverage removal and then move on to the next person. The robot will use a pyro-electric sensor for person-seeking ability, sonar and bump sensors for object avoidance, and CdS photo cells for beverage recognition. The robot will also contain 2 wheels, castor, LCD screen, motor driver boards, daughterboard for easy cable arrangement and other various components.

4. Executive Summary

Not included at this time.

5. Introduction

Autonomous Robotics is the science of designing an electro-mechanical being that completely controls itself within the scope of its functionality. There are so many applications of this concept and it is a great way to learn a lot about computer, electrical, and mechanical engineering concepts. This is the purpose behind the IMDL class, and our Autonomous Robot Design project.

The robot that I have designed and will be creating is named RoBeDeS (Robotic Beverage Delivery Service) and will be a beverage delivery robot. It uses a multitude of sensors, motors, and other electronic components to fulfill its function as will be described in this report.

The semester is halfway over and my robot is about half way completed as well. So far I have implemented many aspects of the robot onto the MCU as small snippets of microcode. These aspects are bump sensing, sonar object avoidance, person-sensing via the PIR sensor and LCD display. Also I have fully designed the robots platform and body in Autodesk Inventor, cut and assembled the first stage of the platform, and began working on the motor control system.

6. Integrated System

The robot is based on an Atmel ATMega128 processor on the BDMicro MAVRIC IIB board. The board is interfaced to 2 sonar sensors, 4 push buttons, the motor driver boards, and an LCD via the digital ports. Also the PIR and soon 4 photo resistors and the motor driver temperature sensor will be interfaced to the board via the ADC port. For now the wires are all connected in a spaghetti bowl around the board, but one of the next steps for me is to design a daughter board for my MAVRIC board that will help to organize the clutter of wires into a much nicer design. The motor drivers will also plug into this board to again minimalize the wire trail.

7. Mobile Platform

The platform is almost entirely planned out, and was designed in Autodesk inventor. However since the robot design is a work in progress, dimensions and other specifics are likely to change.

The platform will consist of 3 levels, each made of model airplane wood, cut from the T-Tech machine in the lab. The three layers will be connected by ½” diameter dowels. The bottom and middle layers will be approximately 4” apart, or more depending on how the boards fit. The middle and top layers will be 3.25” apart in order to hold a soda can in place without falling off.

The first (bottom) level of the design is a 1-foot diameter circle with indentations on each side for the wheels. It will hold the majority of the electrical components. The motors are mounted on each side underneath the robot with the wheels lined up with the indentations. On the top of this the microcontroller board is mounted, as well as the sonar and bump sensors and the two battery packs. The daughterboard and motor drivers are attached on top of the MCU board.

The second level will be the base where the beverages will be placed. It will also be a 1’ diameter circle connected to the other layers with dowels. This layer must be protected in plastic in order to protect the electrical components below from any condensation or dripping of the drinks. Since the robot will be made to hold 4 drinks, there must be 4 small holes cut where each will be placed, and the CdS cells will be mounted underneath these holes, covered in clear plastic so that light can shine through, but moisture will not destroy the electronics. Finally, the pyro-electric sensor and servo will be mounted here at the front of the robot with enough room to stick out and sweep.

The final and top level of the robot will again be a 1’ diameter circle and will be used to keep the beverages from toppling over. Since the shortest beverage it is designed to hold is a 5” tall soda can, the third level will be mounted on dowels 3.25” from the second level. Also there must be holes cut in it wide enough to have a 3” diameter soda can fit in it. Also on this level, the LCD screen will be mounted for easy visibility.

8. Actuation

There will be 2 types of actuation included in RoBeDeS. The main actuation involves the movement of the robot. Since the weight of RoBeDeS is on the heavy side (4 cans of coke weigh 48 oz, plus the components and materials of the robot ends up being on the order of 4-5 pounds) hacked servo motors were ruled out. The motors needed to have enough torque to move the weight of the robot at approximately 1 f/s on 2.5” diameter wheels. The torque needed to run this is determined by the following formula:

τ = .5* r*m*g*μ

where r = wheel radius in meters, m = mass in kg, g = gravitational constant (9.8m/s2) and μ = constant of friction (estimated to be about 0.3). The RPM can be calculated by:

RPM = (60 * v)/(d*π)

Where v = velocity in in/s and d = diameter in inches. These calculations led me to know that I will need a motor that can handle 15.34 oz-in of torque and 91.67 RPM.

Based on these calculations I purchased 2 motors from LynxMotion that were rated for 120 RPM and 123 oz-in or torque.

The other actuation in RoBeDeS is the servo motor required to sweep the pyro-electric sensor 180 degrees for human sensing. This is a HiTEC standard servo motor which will be mounted onto the front of the robot with the PIR sensor mounted onto its wheel.

9. Sensors

The most important aspect of robotics is the idea of sensors so the robot can react to its surroundings. RoBeDeS incorporates multiple different sensors to fulfill its purpose as a beverage delivery robot.

A. Pyro-Electric Infrared (PIR) Sensor

The major functionality of RoBeDeS is the human-seeking behavior. The sensor that makes this possible is the pyro-electric infrared (PIR) sensor. It senses heat in the temperature range of human skin, however only when in motion. This is because it actually senses a change of heat. The sensor has a normal output of about 2.5V and with no movement stays at 2.5V. If motion is in the positive direction of the sensor, a voltage higher than 2.5 volts is output (depending on speed). When the motion is in the negative direction, obviously the output voltage goes below 2.5V.

The one problem with this PIR is that there has to be motion, but at a party people aren’t always moving. To handle this, I plan on mounting the PIR on a servo motor. The servo will sweep the room 180 degrees back and forth until the PIR picks up motion. When this happens, RoBeDeS will determine where the person is and walk toward them.

The actual PIR sensor is a hacked LED motion detector device from Wal-Mart that cost $6.50. The product is made by MLMeridian electric and the part number is PHMO01. Anywhere online, a PIR sensor costs more than $50 for just the PIR component. This motion detector device included the sensor mounted onto a controller board with several other components including an LED and a photo resistor. I removed the photo resistor so the sensor could be used in the light. Also I covered up the LED since it serves no purpose to me and was annoying. Also the output of the PIR sensor itself only has a range of about 1V peak to peak. This was of very little use to me because I would need a much more precise ADC. However I checked over the entire PCB of the motion detector and found one pin on one of the controller chips that was an amplified and much more useful signal. This one had the 0V-5V range that was useful to me, so I connected a wire to it and interfaced this to one of the ADC channels.

The method described above is the theoretical way that the PIR is supposed to work. In practice I discovered a slightly different output. When a person walks by from right to left, the voltage spikes to 5V for a short time, then spikes down to 0V for a short time, then slowly settles back to 2.5V after the person is gone. When a person walks from the left to right, it goes 0V then 5V. This is still useful as I can still see when a person is there and determine which way the person comes from. In the image below, the left spike is the right to left and the right waveform is left to right.

B. Sonar Range Sensor

For obstacle avoidance, one of the sensors that I am using is dual sonar range sensor, and more specifically the Devantech SRF05 Ultrasonic Ranger. This product is a sonar transmitter and receiver and microcontroller combined on an easy-to-use PCB. These two sensors will be mounted on the front of the robot on opposite sides and cross paths in front of the robot. When the SRF05 input receives a pulse, an ultra-sonic “ping” is sent from the transmitter. The device then waits for an echo and the distance from an object can be determined by measuring the time it takes to receive a response. The robot can be programmed to determine if an object is in its way, and then act accordingly. Two units are used because the sensor range is a bubble which can miss objects within certain blind spots. The detection “bubble” is shown below:

C. Bump Sensor

As a backup safety measure to the Sonar Range sensor, Bump sensors are also installed. These are simply 3 push buttons glued to the front of the robot’s platform. To make a bumper, I at first tried using a piece of a metal coat hanger. This was too stiff and would not press the buttons correctly. My next attempt was to use rubber weather molding but this was in fact too soft and bumping the bumper in between the buttons would not affect either button. Then I inserted the metal hanger into the rubber molding, and this gave the exact movement needed. It used the flexibility of the rubber, but the overall firmness of the coat hanger to push the button from anywhere.

D. CdS Photo Cells

CdS photo cells (Cadmium Sulfide) are used to detect the amount light. They actually are photo-sensitive resistors meaning that depending on the amount of light, the resistance changes. Depending on the resistance of the photo-resistor, the output voltage will change, and the amount of light can be determined. They will be installed underneath where the beverages will sit and depending on the ambient light it detects, it will know if a beverage is on the platform or not. Experiment pending, I may have to add an LED near the photo cells, but outside of the beverages if the light that comes into the 2nd level of the robot is not bright enough.

10. Behaviors

RoBeDeS is fully autonomous so it must have a set behavior to act on its own. It will start out in a waiting position until it is loaded with drinks, and the start button is pressed. Once started, it will traverse the room in a random pattern moving forward, turning left and turning right based on a randomized algorithm. When an object is encountered through either the sonar or bump sensors, it will stop moving, turn around, and turn randomly left or right.

All throughout this random movement, the servo motor will be turning and the PIR will be capturing data. When a person is detected by the PIR, RoBeDeS will turn itself towards the person, and walk toward them until the sonar determines that it is close enough. It will then wait for either one of it’s CdS cells to trigger or a to-be-determined time-out period to end, then turn around 180 degrees (to ensure that the same person is completely out of its sight) and continue its random walk around the room.