Docsity

Work-Oriented Mobile Autonomous Neat-Freak - Lab | EEL 5666, Lab Reports of Electrical and Electronics Engineering

Partial preview of the text

Download Work-Oriented Mobile Autonomous Neat-Freak - Lab | EEL 5666 and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

University of Florida

Department of Electrical and Computer Engineering

EEL 5666

Intelligent Machines Design Laboratory

WoMAN

(Work-Oriented Mobile Autonomous Neat- freak)

Name: Eric Donnelly

Date: 8/8/

TAs: Tae Choi

Uriel Rodriguez

Instructor: Dr. A. A Arroyo

Dr. Eric M. Schwartz

Table of Contents

  • Executive Summary
  • Abstract
  • Introduction
  • Integrated System
  • Mobile Platform
  • Actuation
  • Sensors
  • Behaviors
  • Conclusion
  • Documentation
  • Appendix

Abstract

WoMAN is an autonomous vehicle that randomly moves around a room vacuuming the

floor as it goes. WoMAN monitors its battery and returns to its recharging station when it

becomes low on power. WoMAN will demonstrate obstacle avoidance of walls as well as

objects in the room, including people.

Introduction

Nobody likes a dirty floor. However, the solution to this is a task that few enjoy. Having

to take the time and effort to sweep or vacuum a floor when you could be doing

something much more productive (like watching TV) is highly undesirable. Hiring a

maid to do this job for you can be very costly; therefore, another solution is needed.

WoMAN is the solution. WoMAN roams around a room sucking up any dust or dirt on

the floor. It avoids any obstructions in the room (walls, boxes, people), and when it gets

low on battery power, it shuts down its vacuum (to save power) and find s its way back to

a recharging station, where it recharge s its batteries and sets off on another cleaning

rampage. It can be left to do this all day long, or can be switched on at night to clean your

floors while you sleep, and stay out of your way.

Mobile Platform

The platform used for WoMAN is cylindrically shaped, in order to decrease the chances

of the robot getting stuck where it cannot escape. This shape allows WoMAN to spin in

place, enabling itself to easily escape from corners. The platform is 11” in diameter and

5” tall. The center of mass of the robot is near the rear of the platform, with the fan for

the vacuum and the two battery packs, one for the fan and the controller, respectively. A

nylon bulb is mounted under the rear of the platform to support WoMAN (along with the

2 wheels connected to the driving servos). CdS cells are mounted along with the IR

detectors at the front of the platform. The temperature sensors are mounted on the battery

packs, and adhered with heat-sink compound for good thermal conductivity. Around the

rim of the robot are the six bump switches. A 12-Gauge insulated copper wire is glued to

the switches and encircles the entire platform. This allows the robot to detect obstacles

from any direction. The front quadrant of this wire is stripped, exposing the copper. This

wire is also connected the entire system’s ground. This allows the bumper rim to act as

one of the conduction plates to be connected to the recharging station. The other

conduction plate is mounted flat on the front of the robot, under the IR detectors and CdS

cells. This plate is connected to the positive terminal of the controller’s battery pack. The

placement of the conduction plates was decided after a dimensional analysis of the robot.

Described in Cartesian coordinates; the robot moves in only two dimensions, along the

xy-plane. Therefore all points on the robot along the z-axis will remain constant.

Arbitrarily choosing any two points along this axis for placement of the conduction plates

allows for predictable points of contact to the recharging station. This method is superior

to any other DC conduction plate method placed in the xy-plane, such as the floor, which

is vulnerable to reversed polarity across the plates. However, an AC in solution the xy-

plane is acceptable, but requires a rectifier circuit onboard the robot.

Sensors

The four types of sensors used in this robot are: IR detectors, Bump sensors, CdS cells,

and temperature sensors. The CdS cells are used to detect a light beacon, in order for the

robot to find its recharging station.

Infrared

Two infrared detectors are used for this robot. These are mounted on the front of the

robot and angled 20 degrees inward and detect the presence of objects in front of it as

shown in Figure 3. These sensors are the Sharp GP2D12 IR detectors which output an

analog voltage relating to the amount of IR light bouncing back from an object. The

closer the object (to a point), the greater amount of IR.

Figure 3. IR positioning

Bump Sensors

Six bump sensors are mounted around the robot to detect if the robot runs into anything.

These are normally-open push-button switches with a solid 12-gauge copper wire

surrounding the perimeter of the platform as shown in Figure 4. Each switch is connected

to a specific pin on Port B of the Atmel microcontroller. The switches are all tied to

ground. Port B of the microcontroller has its internal pull- up resistors set. So in order to

detect if WoMAN hits something, the microcontroller looks at the logical values of the

Port B pins. If it sees a ‘1’, then nothing is hit. If a ‘0’ appears on one of the pins, then

that bump switch is currently triggered and the robot can steer away accordingly.

Figure 4. Bump Sensor Layout

CdS Cells

Cds cells are used to locate the recharging station. The recharging station has a 75-Watt

light bulb attached to it, low to the ground, for the CdS cells to detect. When WoMAN is

low on batteries, it begins to look for a light source. Since these cells are mounted inside

pen caps, their light-sensitivity becomes very directional. By using two CdS cells, the

direction of the light and therefore the recharging station can be determined.

Exposed copper

Temperature vs. Time during

Recharge

minutes

digital value

Controller

Battery

Fan Battery

Figure 5

Note: the starting voltages for the controller and fan batteries were 7.68V and 9.79V,

respectively. The final voltages were 11.14V and 11.31V respectively.

Behaviors

WoMAN demonstrates obstacle avoidance by using its infrared and bump sensors. When

an object is detected, it chooses a new random direction to follow by taking the Mod of

the Timer/Counter0 register. Note: the timer/counter used to create the random number

MUST be different from the timer/counter used for the sensor interrupt service routine if

a timer overflow interrupt is used. Otherwise, the random number will be determined at

the same timer value each time. Using random numbers ensures that the ROBOT won’t

take the exact same path every time it is activated, so it will most likely cover the entire

room to be cleaned using a very simple programming algorithm. When WoMAN’s

batteries get low, determined by a voltage divider connected to one of the A/D converter

pins, it shuts down its fan to conserve power, bridges the batteries together to give more

power to the servos, and searches for its recharging station. WoMAN uses a “dizzy

search” method to find the recharging station. It starts monitoring its light sensors,

looking for a high amount of light (determined by a threshold value). Every 10 seconds it

spins in place for one full rotation (2 seconds), checking the light sensors every 10 ms.

This gives the robot a resolution of 1.8 degrees. Once the light source is found, WoMAN

locks onto the light source and drives to it. The robot stops when a large voltage is

present across its batteries (meaning it has made contact with the recharging station).

While recharging, if WoMAN comes disconnected from the station, it drives forward and

even begins searching for light until it re-establishes contact with the recharging station.

WoMAN monitors the temperatures on the battery packs while recharging. If the fan’s

battery pack is finished recharging first (which should happen since the fan draws less

current than the controller), the relay bridging the batteries is shut off. Once the

controller’s battery pack is fully recharged (determined by its temperature), the robot

disconnects from the recharging station, turns its fan back on, via the relay, and continues

vacuuming the room.

Documentation

Special thanks to Dr. Eric M. Schwartz, Dr. Antonio Arroyo, Tae Choi, Uriel Rodriguez,

and Dr. David Bloomquist for their contributions to this project.

Atmel Corp., “Atmel AtMega163 Datasheet”,

http://www.atmel.com/atmel/acrobat/doc1142.pdf.

Progressive Resources, “MegaAVR Development Board”,

http://www.prllc.com/MegaAVR_Dev.pdf.

Appendix

Program Code

Project : WOMAN Version : 3. Date : 6/17/ Author : Eric Donnelly Company : Comments:Final Version Interrupt used to read IR and bump, new random generator using mods light sensing used, new interrupt routine based on priority sensors ***adding battery monitor, relays for battery bridge and fan *** could be last version *** heat monitors integrated also

Chip type : ATmega Program type : Application Clock frequency : 6.000000 MHz Memory model : Small Internal SRAM size : 1024 External SRAM size : 0 Data Stack size : 256


analog PORT definitions 0 right IR 1 left IR 2 left CdS 3 right CdS 4 bad? 5 uC temp sensor 6 fan temp sensor 7 voltage monitor --- .078V per tick, 8.5V = 108, 12V= 155

BUMP SENSORS

PORTB

0 rear 2 left side 3 left front 4 front 5 front right 6 right

SERVOS

PORTD.5 Left PORTD.4 Right

Relays PORTD.2 FAN Enable PORTD.6 Power Bridge Enable

Push-Button

if(sense == 1){ drive(speed_temp_l, speed_temp_r); if(!home_lock) delay_ms(200*(random(7)+2) );//do it for mx 1sec else delay_ms(200); sense = 0; PORTC = PORTC | 0b01110000; //turn senses LEDs off } count = 3; } }

unsigned char analog[LAST_ADC_INPUT-FIRST_ADC_INPUT+1]; #define ADC_VREF_TYPE 0xE0 //0x60 --external 5V, 0xE0-- internal 2.56V // ADC interrupt service routine // with auto input scanning #pragma savereg- interrupt [ADC_INT] void adc_isr(void) { #asm push r push r push r push r in r30,sreg push r #endasm register static unsigned char input_index=0; // Read the 8 most significant bits // of the AD conversion result analog[input_index]=ADCH; // Select next ADC input if (++input_index > (LAST_ADC_INPUT-FIRST_ADC_INPUT)) input_index=0; ADMUX=FIRST_ADC_INPUT|ADC_VREF_TYPE|input_index; // Start the AD conversion ADCSR|=0x40; #asm pop r out sreg,r pop r pop r pop r pop r #endasm } #pragma savereg+

void woman_init(void){ // Input/Output Ports initialization // Port A initialization // Func0=In Func1=In Func2=In Func3=In Func4=In Func5=In Func6=In Func7=In // State0=T State1=T State2=T State3=T State4=T State5=T State6=T State7=T PORTA=0x00;

DDRA=0x00;

// Port B initialization PORTB=0xFD; DDRB=0x00; //PORTB.1 is connected to LED // Port C initialization PORTC=0x7F; //leave right light on DDRC=0xFF; // Port D initialization

PORTD=0x00; DDRD=0x74;

//Timer 0 set to clock TCCR0=0x01; TCNT0=0x00; // Timer/Counter 1 initialization // Clock source: System Clock // Clock value: 23.438 kHz // Mode: Ph. correct PWM top=00FFh // OC1A output: Non-Inv. // OC1B output: Non-Inv. // Noise Canceler: Off // Input Capture on Falling Edge TCCR1A=0xA1; TCCR1B=0x04; TCNT1H=0x00; TCNT1L=0x00; OCR1AH=0x00; OCR1AL=18; OCR1BH=0x00; OCR1BL=18;

TCCR2=0x00; ASSR=0x00; TCNT2=0x00; OCR2=0x00;

GIMSK=0x00; MCUCR=0x00;

TIMSK=0x04;

UBRRHI=0x00;

ACSR=0x80; SFIOR=0x00;

// ADC initialization // ADC Clock frequency: 93.750 kHz // ADC Voltage Reference: Internal 2.56V // Only the 8 most significant bits of // the AD conversion result are used ADMUX=FIRST_ADC_INPUT|ADC_VREF_TYPE; ADCSR=0xCE;