Aether Burst - PowerPoint PPT Presentation

About This Presentation
Title:

Aether Burst

Description:

else if (dir==EAST) return SOUTH; else if (dir==WEST) return NORTH; ... else if (direction=WEST) tempL=3; else if (direction=SOUTH) tempL=2; if(SENSOR0) ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 25
Provided by: Mar719
Category:

less

Transcript and Presenter's Notes

Title: Aether Burst


1
Aether Burst
2
Our Team
  • Blaise Arita Team Leader
  • Maran Osakoda Organizer
  • Shaunty Kleinschmidt Programmer
  • Matthew Menor Designer

3
A Brief Overview
  • This semester we have designed, fabricated, and
    programmed a small robotic mouse to make its way
    to the center of a difficult 16X16 maze.

4
Our Initial Goals
  • Simplicity
  • Have a moving, reliable mouse that can move
    forward with some sort of
    direction
  • Have our mouse find the center of the maze
    under 10 minutes
  • If time allows, have our mouse be able to
    do more advanced movements
  • Turn 45, 90, and 180 degrees
  • Be able to move backwards
  • Change speeds

5
A Look at Hardware
Initial Design
  • Material 1/32 Aluminum
  • Problems
  • Very thin, Not rigid
  • Wasted Space
  • No support for other
  • hardware components

6
Upgraded Design
  • Material 1/16 Angled Aluminum
  • 8 Shortened M3 Screw
  • Motors very close together
  • Use 8 AA batteries
  • Use Velcro to secure battery holders
  • Use mini furniture sliders to keep the mouse
    balanced
  • Use top 2 Aluminum plates to mount circuit
    boards
  • Used the small wheels given with the kit
  • Started with 8 sensors

7
Some Issues
  • Going through too many batteries
  • Switched to rechargeable batteries
  • Takes a very long time to charge
  • Mouse very noisy
  • Small wheels getting stuck in maze cracks
  • Changed to larger wheels
  • Mouse was very tipsy
  • Front sensors too close to maze while back
    sensors too far away
  • Back to smaller wheels
  • Took off back slider
  • Heat sync for 5 volt regulator sometimes gets
    very hot
  • Sensor placement and layout

8
Initial Sensor Layout
  • Back sensors taking too long to sense and
    correct
  • Stopped using 2 inner back sensors
  • Added two inner front sensors
  • Trouble tracking after a turn if there was no
    wall
  • Added sensor 7 to help with our reverse
    function
  • Added sensor 10 and 11 to help with the
    tracking

9
Final Design
  • Battery Holders
  • 10 AA rechargeable batteries instead of 8 AA
    regular batteries
  • Made the conversion wire to go from regular to
    rechargeable batteries
  • Added two switches
  • One to turn on the sensors
  • One to turn on the motors
  • Sensor count and placement
  • 12 sensors
  • Layered design
  • Chassis
  • Sensor boards
  • Motor drive
  • Rabbit holder
  • All wires lead up to the rabbit on top
  • Heat sync for 5 volt regulator

10
Final Sensor Layout
11
A Look at the Software Sensors
  • Greedy and Right Wall Hugger
  • Sensor 0- Detects Front Wall
  • Sensor 2- Detects Right Wall
  • Sensor 6- Detects Left Wall
  • Mapping
  • Sensors 1 4- Resets Counter
  • Tracking
  • Sensors 10 11- if mouse goes off course,
    tracks first
  • Sensors 8 9- if mouse goes off course
  • Sensor 7 reverse (if too close to front wall)

12
Algorithm for Greedy
Assigning Walls- N cellxy 1 EW cellxy
9 E cellxy 2 SW cellxy 10 S
cellxy 3 NES cellxy 11 W cellxy
4 NEW cellxy 12 NE cellxy 5 NSW
cellxy 13 NS cellxy 6 ESW
cellxy 14 NW cellxy 7 NESW
cellxy 15 ES cellxy 8
13
Some Issues
  • Mapping
  • Reset Counter
  • Still Hits Front Wall
  • Tracking
  • Time Consuming
  • Batteries Affected Results
  • Added two outer sensors to help our mouse track
    better

14
Movement
void move(int pace, int distance, int
track) float k  int i k0  while(kltdistance
)           PORTA0ON    PORTA7ON          
                      PORTA1OFF  
PORTA6OFF         PORTA2OFF  
PORTA5OFF         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
k initiate_track(k, distance, track)        
PORTA0OFF   PORTA7OFF                      
         PORTA2OFF   PORTA5OFF        
PORTA3OFF   PORTA4OFF        
for(i0iltpacei)         k
initiate_track(k, distance, track)        
PORTA0OFF   PORTA7OFF                      
         PORTA1OFF   PORTA6OFF        
PORTA2ON    PORTA5ON         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
k initiate_track(k, distance, track)        
PORTA0OFF   PORTA7OFF                          
     PORTA1OFF   PORTA6OFF        
PORTA2OFF   PORTA5OFF         PORTA3ON   
PORTA4ON         for(i0iltpacei)        
k initiate_track(k, distance, track)        
hault()         k  
void reverse(int pace, int distance) int k 
int i    k0     while(kltdistance)       
  PORTA0OFF   PORTA7OFF                    
         PORTA1OFF   PORTA6OFF        
PORTA2OFF   PORTA5OFF         PORTA3ON   
PORTA4ON         for(i0iltpacei)         
PORTA0OFF   PORTA7OFF                         
     PORTA1OFF   PORTA6OFF        
PORTA2ON    PORTA5ON         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
  PORTA0OFF   PORTA7OFF                     
PORTA1ON    PORTA6ON         PORTA2OFF  
PORTA5OFF         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
  PORTA0ON    PORTA7ON                         
  PORTA1OFF   PORTA6OFF         PORTA2OFF  
PORTA5OFF         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
hault()         k   
15
Right and Left Turn
void right_90(int pace, int distance) int k 
int i    k0     while(kltdistance)       
  PORTA0OFF   PORTA7ON                         
    PORTA1OFF   PORTA6OFF         PORTA2OFF  
PORTA5OFF         PORTA3ON   
PORTA4OFF         for(i0iltpacei)        
PORTA0OFF   PORTA7OFF                      
         PORTA1OFF   PORTA6ON        
PORTA2ON    PORTA5OFF         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
PORTA0OFF   PORTA7OFF                      
         PORTA1ON    PORTA6OFF        
PORTA2OFF   PORTA5ON         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
PORTA0ON    PORTA7OFF                          
     PORTA1OFF   PORTA6OFF        
PORTA2OFF   PORTA5OFF         PORTA3OFF  
PORTA4ON         for(i0iltpacei)       
hault()          k  
void left_90(int pace, int distance) int k 
int i    k0     while(kltdistance)       
 PORTA0ON    PORTA7OFF                      
         PORTA1OFF   PORTA6OFF        
PORTA2OFF   PORTA5OFF         PORTA3OFF  
PORTA4ON         for(i0iltpacei)        
PORTA0OFF   PORTA7OFF                        
PORTA1ON    PORTA6OFF         PORTA2OFF  
PORTA5ON         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
PORTA0OFF   PORTA7OFF                        
PORTA1OFF   PORTA6ON         PORTA2ON   
PORTA5OFF         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
PORTA0OFF   PORTA7ON                          
PORTA1OFF   PORTA6OFF         PORTA2OFF  
PORTA5OFF         PORTA3ON   
PORTA4OFF         for(i0iltpacei)        
hault()           k  
16
Tracking
void rightoutersensor_track(int pace, int
distance)     int k  int i    k0    
while(kltdistance)         PORTA0OFF   
PORTA7ON                               
PORTA1OFF   PORTA6OFF         PORTA2OFF  
PORTA5OFF         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
  PORTA0OFF   PORTA7OFF                        
    PORTA1OFF    PORTA6ON         PORTA2OFF  
PORTA5OFF          PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
  PORTA0ON    PORTA7OFF                        
    PORTA1OFF    PORTA6OFF        
PORTA2OFF    PORTA5ON         PORTA3OFF   
PORTA4OFF         for(i0iltpacei)        
  PORTA0OFF   PORTA7OFF                        
     PORTA1ON   PORTA6OFF         PORTA2OFF  
PORTA5OFF         PORTA3OFF   
PORTA4ON         for(i0iltpacei)        
hault()         k  
void leftoutersensor_track(int pace, int
distance)     int k  int i    k0    
while(kltdistance)             PORTA0ON   
PORTA7OFF                          
PORTA1OFF   PORTA6OFF         PORTA2OFF  
PORTA5OFF         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
  PORTA0OFF   PORTA7OFF                       
PORTA1ON    PORTA6OFF         PORTA2OFF  
PORTA5OFF         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
  PORTA0OFF   PORTA7ON                     
PORTA1OFF   PORTA6OFF         PORTA2ON   
PORTA5OFF         PORTA3OFF  
PORTA4OFF         for(i0iltpacei)        
  PORTA0OFF   PORTA7OFF                    
PORTA1OFF   PORTA6ON         PORTA2OFF  
PORTA5OFF         PORTA3ON   
PORTA4OFF         for(i0iltpacei)        
hault()         k  
float initiate_track(float steps, int distance,
int track)     if(track)           
if(steps gt TRACKMIN  steps lt TRACKMAX)      
          if(SENSOR10 1)           
rightoutersensor_track(SPEED,TRACKMOVE)         
if(SENSOR11 1)            leftoutersensor_tra
ck(SPEED,TRACKMOVE)          if(SENSOR8
1)            track_rightside()         
if(SENSOR9 1)           track_leftside()   
            if(steps gt FORWARDMIN) 
     if(SENSOR2 0 SENSOR1 1)    
steps distance      else if(SENSOR6
0 SENSOR4 1)       steps
distance     if(SENSOR7 1)    
steps distance        
reverse(SPEED,BACK)         return
steps
17
Right Wall Hugger
main()   WrPortI(SPCR,SPCRShadow,0x84)
//Declares all A Ports as output ports 
while(1)   if(SENSOR2 0)
right_90(SPEED,RIGHTTURN)

move(SPEED,FORWARD,YES)   
else if(SENSOR2 1 SENSOR0 0)
move(SPEED,FORWARD,YES) 
  else if(SENSOR2
1 SENSOR6 0 SENSOR0 1)
left_90(SPEED,LEFTTURN)
move(SPEED,FORWARD,YES)
    else if(SENSOR0 1
SENSOR2 1 SENSOR6 1)
right_90(SPEED,RIGHTTURN)
right_90(SPEED,RIGHTTURN)
move(SPEED,FORWARD,YES)
else if(SENSOR0 0 SENSOR1 0
SENSOR4 0)
reverse(SPEED,BACK)
if(SENSOR0 0 SENSOR7 1)

reverse(SPEED,BACK)    
18
Greedy Functions
int forward_y(int col, int dir) if
(dirEAST dirWEST) return col
else if (dirNORTH) return col1
else if (dirSOUTH) return y-1

int turn_right(int dir) right_90(SPEED,
RIGHTTURN) move(SPEED,FORWARD,YES)
if (dirNORTH) return EAST else
if (dirEAST) return SOUTH else if
(dirWEST) return NORTH else if
(dirSOUTH) return WEST
int turn_left(int dir) left_90(SPEED,
LEFTTURN) move(SPEED,FORWARD,YE
S) if (dirNORTH) return WEST
else if (dirEAST) return NORTH else
if (dirWEST) return SOUTH else if
(dirSOUTH) return EAST
int turn_around(int dir)
right_90(SPEED, RIGHTTURN)
right_90(SPEED, RIGHTTURN)
move(SPEED,FORWARD,YES) if (dirNORTH)
return SOUTH else if (dirEAST)
return WEST else if (dirWEST) return
EAST else if (dirSOUTH) return NORTH

int forward_x(int row, int dir) if
(dirNORTH dirSOUTH) return row
else if (dirEAST) return row1
else if (dirWEST) return row-1
19
Greedy Assigning Walls
if(SENSOR6) if (directionNORTH) tempL4
else if (directionEAST) tempL1 else if
(directionWEST) tempL3 else if
(directionSOUTH) tempL2 if(SENSOR0) if
(directionNORTH) tempF1 else if
(directionEAST) tempF2 else if
(directionWEST) tempF4 else if
(directionSOUTH) tempF3 if(SENSOR2) if
(directionNORTH) tempR2 else if
(directionEAST) tempR3 else if
(directionWEST) tempR1 else if
(directionSOUTH) tempR4
if(cellxy 0) // Assigning 1 wall
if(tempLgt0) cellxytempL if(tempFgt0)
cellxytempF if(tempRgt0)
cellxytempR // Assigning 2 walls NE
if(tempL1 tempF2) cellxy5
if(tempF1 tempR2) cellxy5
//Assigning 2 walls NS if(tempL1 tempR3)
cellxy6 if(tempL3 tempR1)
cellxy6 // Assigning 2 walls NW
if(tempL4 tempF1) cellxy7
if(tempF3 tempR1) cellxy7 //
Assigning 2 walls SE if(tempF2 tempR3)
cellxy8 if(tempL2 tempF3)
cellxy8 // Assigning 2 walls WE
if(tempL4 tempR2) cellxy9
if(tempL2 tempR4) cellxy9
// Assigning 2 walls WS if(tempL3
tempF4) cellxy10 if(tempR4
tempF3) cellxy10 // Assigning 3
walls NES if(tempL1 tempF2 tempR3)
cellxy11 // Assigning 3 walls NEW
if(tempL4 tempF1 tempR2)
cellxy12 // Assigning 3 walls NWS
if(tempL3 tempF4 tempR1)
cellxy13 // Assigning 3 walls ESW
if(tempL2 tempF3 tempR4)
cellxy14
20
Greedy Movement
else if(0ltxlt7 0ltylt7) if(cellxy1)
if (directionNORTH) directionturn_right(NORTH
) xforward_x(x,direction) else if
(directionEAST) xforward_x(x, direction)
move(SPEED,FORWARD,YES) else if
(directionWEST) xforward_x(x,direction)
move(SPEED,FORWARD,YES) // can go straight
or left else if(cellxy2) if
(directionNORTH) yforward_y(y,direction)
move(SPEED,FORWARD,YES) else if
(directionEAST) directionturn_left(EAST)
yforward_y(y,direction) else if
(directionSOUTH) yforward_y(y,direction)
move(SPEED,FORWARD,YES) else
if(cellxy3) if (directionEAST)
xforward_x(x, direction) move(SPEED,FORWARD,YES)
else if (directionWEST)
directionturn_right(WEST) yforward_y(y,
direction) else if (directionSOUTH)
directionturn_left(SOUTH) xforward_x(x,
direction) else if(cellxy4) if
(directionNORTH) // yforward_y(y,
direction) // move(SPEED,FORWARD,YES)
directionturn_right(NORTH) xforward_x(x,directi
on) //could be random else if
(directionWEST) directionturn_right(WEST)
yforward_y(y, direction) else if
(directionSOUTH) directionturn_left(SOUTH)
xforward_x(x, direction) else if(0ltxlt7
8ltylt15) if(cellxy1) if
(directionNORTH) directionturn_right(NORTH)
xforward_x(x, direction) else if
(directionEAST) xforward_x(x, direction)
move(SPEED,FORWARD,YES) // or
directionturn_right(E) else if
(directionWEST) directionturn_left(WEST)
yforward_y(y, direction) else
if(cellxy2) if (directionNORTH)
directionturn_left(NORTH) xforward_x(x,
direction) // or go straight idk about this
one else if (directionEAST)
directionturn_right(EAST) yforward_y(y,
direction) else if (directionSOUTH)
yforward_y(y, direction) move(SPEED,FORWARD,YES)
else if(cellxy3) if
(directionEAST) xforward_x(x, direction)
move(SPEED,FORWARD,YES) else if
(directionWEST) directionturn_right(WEST)
yforward_y(y, direction) // or x
forward_x(x,direction) else if
(directionSOUTH) directionturn_right(SOUTH)
xforward_x(x, direction) else
if(cellxy4) if (directionNORTH)
directionturn_right(NORTH) xforward_x(x,
direction) else if (directionWEST)
directionturn_left(WEST) yforward_y(y,
direction) else if (directionSOUTH)
directionturn_right(SOUTH) xforward_x(x,
direction) // or yforward_y(y,direction)
else if(8ltxlt15 0ltylt7) if(cellxy1)
if (directionNORTH) directionturn_left(NORT
H) xforward_x(x,direction) else if
(directionEAST) directionturn_right(EAST)
yforward_y(y,direction) else if
(directionWEST) xforward_x(x,direction)
move(SPEED,FORWARD,YES) else
if(cellxy2) if (directionNORTH)
directionturn_left(NORTH) xforward_x(x,
direction) // or yforward_y(y,direction)
else if (directionEAST) directionturn_left(EA
ST) yforward_y(y,direction) else if
(directionSOUTH) directionturn_right(SOUTH)
xforward_x(x,direction) else
if(cellxy3) if (directionEAST)
directionturn_left(EAST) yforward_y(y,direction
) else if (directionWEST)
xforward_x(x,direction) move(SPEED,FORWARD,YES)
// or directionturn_right(W) //
yforward_y(y,direction) else if
(directionSOUTH) directionturn_right(SOUTH)
xforward_x(x,direction) else
if(cellxy4) if (directionNORTH)
yforward_y(y,direction) move(SPEED,FORWARD,YES)
else if (directionWEST) directionturn_righ
t(WEST) // or directionturn_left(W)
yforward_y(y,direction) else if
(directionSOUTH) yforward_y(y,direction)
move(SPEED,FORWARD,YES) else if(8ltxlt15
8ltylt15) if(cellxy1) if
(directionNORTH) directionturn_left(NORTH)
xforward_x(x, direction) else if
(directionEAST) directionturn_right(EAST)
yforward_y(y,direction) else if
(directionWEST) xforward_x(x,direction)
move(SPEED,FORWARD,YES) // or
directionturn_left else if(cellxy2) if
(directionNORTH) directionturn_left(NORTH)
xforward_x(x, direction) else if
(directionEAST) directionturn_right(EAST)
yforward_y(y,direction) else if
(directionSOUTH) directionturn_right(SOUTH)
xforward_x(x,direction) // or
yforward_y(y,direction) else
if(cellxy3) if (directionEAST)
directionturn_left(EAST) yforward_y(y,direction
) else if (directionWEST)
xforward_x(x,direction) move(SPEED,FORWARD,YES)
else if (directionSOUTH)
directionturn_right(SOUTH) // or
directionturn_left(S) xforward_x(x,direction)
else if(cellxy4) if
(directionNORTH) yforward_y(y,direction)
move(SPEED,FORWARD,YES) else if
(directionWEST) directionturn_left(WEST)
yforward_y(y,direction) else if
(directionSOUTH) yforward_y(y,direction)
move(SPEED,FORWARD,YES)
if (cellxy7 directionNORTH)
directionturn_right(NORTH) xforward_x(x,directi
on) else if (cellxy7 directionWEST)
directionturn_left(WEST) yforward_y(y,directi
on) else if (cellxy5
directionNORTH) directionturn_left(NORTH)
xforward_x(x,direction) else if
(cellxy5 directionEAST)
directionturn_right(EAST) yforward_y(y,directio
n) else if (cellxy6 directionEAST)
xforward_x(x,EAST) move(SPEED,FORWARD,YES)
else if (cellxy6 directionWEST)
xforward_x(y,direction) move(SPEED,FORWARD,YES)
else if (cellxy8 directionEAST)
directionturn_left(EAST) yforward_y(y,direction
) else if (cellxy8 directionSOUTH)
directionturn_right(SOUTH) xforward_x(x,direc
tion) else if (cellxy9
directionNORTH) yforward_y(y,direction)
move(SPEED,FORWARD,YES) else if (cellxy9
directionSOUTH) yforward_y(y,direction)
move(SPEED,FORWARD,YES) else if
(cellxy10 directionSOUTH)
directionturn_left(SOUTH) xforward_x(x,directio
n) else if (cellxy10 directionWEST)
directionturn_right(WEST) yforward_y(y,direct
ion) else if (cellxy11
directionEAST) directionturn_around(EAST)
xforward_x(x,direction) else if
(cellxy12 directionNORTH)
directionturn_around(NORTH) yforward_y(y,direct
ion) else if (cellxy13
directionWEST) directionturn_around(WEST)
xforward_x(x,direction) else if
(cellxy14 directionSOUTH)
directionturn_around(SOUTH) yforward_y(y,direct
ion)
21
Idea Behind Greedy
22
Our Final Mouse
23
Our Goals Accomplished
  • Simplicity
  • Have a moving, reliable mouse that can move
    with some sort of direction
  • Majority of the time, our mouse can find the
    center of the maze
  • Our mouse can make 90 and 180 degree turns
  • Correct itself and reverse

24
Time For A Short Demo
Write a Comment
User Comments (0)
About PowerShow.com