Presentation is loading. Please wait.

Presentation is loading. Please wait.

Aether Burst. Our Team…  Blaise Arita Team Leader  Maran Osakoda Organizer  Shaunty Kleinschmidt Programmer  Matthew Menor Designer.

Similar presentations


Presentation on theme: "Aether Burst. Our Team…  Blaise Arita Team Leader  Maran Osakoda Organizer  Shaunty Kleinschmidt Programmer  Matthew Menor Designer."— Presentation transcript:

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  Material: 1/32 Aluminum  Problems: Very thin, Not rigid Wasted Space No support for other hardware components Initial Design:

6  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 Upgraded Design:

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 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) 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

12 Algorithm for Greedy Assigning Walls- N: cell[x][y] = 1EW: cell[x][y] = 9 E: cell[x][y] = 2SW: cell[x][y] = 10 S: cell[x][y] = 3NES: cell[x][y] = 11 W: cell[x][y] = 4NEW: cell[x][y] = 12 NE: cell[x][y] = 5NSW: cell[x][y] = 13 NS: cell[x][y] = 6ESW: cell[x][y] = 14 NW: cell[x][y] = 7 NESW: cell[x][y] = 15 ES: cell[x][y] = 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; k=0; while(k<distance) { PORTA0ON; PORTA7ON; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); k = initiate_track(k, distance, track); PORTA0OFF; PORTA7OFF; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); k = initiate_track(k, distance, track); PORTA0OFF; PORTA7OFF; PORTA1OFF; PORTA6OFF; PORTA2ON; PORTA5ON; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); k = initiate_track(k, distance, track); PORTA0OFF; PORTA7OFF; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3ON; PORTA4ON; for(i=0;i<pace;i++); k = initiate_track(k, distance, track); hault(); k++; } } void reverse(int pace, int distance) { int k; int i; k=0; while(k<distance) { PORTA0OFF; PORTA7OFF; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3ON; PORTA4ON; for(i=0;i<pace;i++); PORTA0OFF; PORTA7OFF; PORTA1OFF; PORTA6OFF; PORTA2ON; PORTA5ON; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0OFF; PORTA7OFF; PORTA1ON; PORTA6ON; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0ON; PORTA7ON; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); hault(); k++; } }

15 Right and Left Turn void right_90(int pace, int distance) { int k; int i; k=0; while(k<distance) { PORTA0OFF; PORTA7ON; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3ON; PORTA4OFF; for(i=0;i<pace;i++); PORTA0OFF; PORTA7OFF; PORTA1OFF; PORTA6ON; PORTA2ON; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0OFF; PORTA7OFF; PORTA1ON; PORTA6OFF; PORTA2OFF; PORTA5ON; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0ON; PORTA7OFF; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4ON; for(i=0;i<pace;i++); hault(); k++; } } void left_90(int pace, int distance) { int k; int i; k=0; while(k<distance) { PORTA0ON; PORTA7OFF; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4ON; for(i=0;i<pace;i++); PORTA0OFF; PORTA7OFF; PORTA1ON; PORTA6OFF; PORTA2OFF; PORTA5ON; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0OFF; PORTA7OFF; PORTA1OFF; PORTA6ON; PORTA2ON; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0OFF; PORTA7ON; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3ON; PORTA4OFF; for(i=0;i<pace;i++); hault(); k++; } }

16 Tracking void rightoutersensor_track(int pace, int distance) { int k; int i; k=0; while(k<distance) { PORTA0OFF; PORTA7ON; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0OFF; PORTA7OFF; PORTA1OFF; PORTA6ON; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0ON; PORTA7OFF; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5ON; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0OFF; PORTA7OFF; PORTA1ON; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4ON; for(i=0;i<pace;i++); hault(); k++; } } void leftoutersensor_track(int pace, int distance) { int k; int i; k=0; while(k<distance) { PORTA0ON; PORTA7OFF; PORTA1OFF; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0OFF; PORTA7OFF; PORTA1ON; PORTA6OFF; PORTA2OFF; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0OFF; PORTA7ON; PORTA1OFF; PORTA6OFF; PORTA2ON; PORTA5OFF; PORTA3OFF; PORTA4OFF; for(i=0;i<pace;i++); PORTA0OFF; PORTA7OFF; PORTA1OFF; PORTA6ON; PORTA2OFF; PORTA5OFF; PORTA3ON; PORTA4OFF; for(i=0;i<pace;i++); hault(); k++; } } float initiate_track(float steps, int distance, int track) { if(track) { if(steps > TRACKMIN && steps 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); 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 (dir==EAST || dir==WEST) return col; else if (dir==NORTH) return col+1; else if (dir==SOUTH) return y-1; } int forward_x(int row, int dir) { if (dir==NORTH || dir==SOUTH) return row; else if (dir==EAST) return row+1; else if (dir==WEST) return row-1; } int turn_left(int dir) { left_90(SPEED, LEFTTURN); move(SPEED,FORWARD,YES); if (dir==NORTH) return WEST; else if (dir==EAST) return NORTH; else if (dir==WEST) return SOUTH; else if (dir==SOUTH) return EAST; } int turn_right(int dir) { right_90(SPEED, RIGHTTURN); move(SPEED,FORWARD,YES); if (dir==NORTH) return EAST; else if (dir==EAST) return SOUTH; else if (dir==WEST) return NORTH; else if (dir==SOUTH) return WEST; } int turn_around(int dir) { right_90(SPEED, RIGHTTURN); right_90(SPEED, RIGHTTURN); move(SPEED,FORWARD,YES); if (dir==NORTH) return SOUTH; else if (dir==EAST) return WEST; else if (dir==WEST) return EAST; else if (dir==SOUTH) return NORTH; }

19 Greedy: Assigning Walls if(SENSOR6) { if (direction=NORTH) tempL=4; else if (direction=EAST) tempL=1; else if (direction=WEST) tempL=3; else if (direction=SOUTH) tempL=2; } if(SENSOR0) { if (direction=NORTH) tempF=1; else if (direction=EAST) tempF=2; else if (direction=WEST) tempF=4; else if (direction=SOUTH) tempF=3; } if(SENSOR2) { if (direction=NORTH) tempR=2; else if (direction=EAST) tempR=3; else if (direction=WEST) tempR=1; else if (direction=SOUTH) tempR=4; } if(cell[x][y] == 0) {// Assigning 1 wall if(tempL>0) { cell[x][y]=tempL; } if(tempF>0) { cell[x][y]=tempF; } if(tempR>0) { cell[x][y]=tempR; } // Assigning 2 walls NE if(tempL==1 && tempF==2) { cell[x][y]=5; } if(tempF==1 && tempR==2) { cell[x][y]=5; } //Assigning 2 walls NS if(tempL==1 && tempR==3) { cell[x][y]=6; } if(tempL==3 && tempR==1) { cell[x][y]=6; } // Assigning 2 walls NW if(tempL==4 && tempF==1) { cell[x][y]=7; } if(tempF==3 && tempR==1) { cell[x][y]=7; } // Assigning 2 walls SE if(tempF==2 && tempR==3) { cell[x][y]=8; } if(tempL==2 && tempF==3) { cell[x][y]=8; } // Assigning 2 walls WE if(tempL==4 && tempR==2) { cell[x][y]=9; } if(tempL==2 && tempR==4) { cell[x][y]=9; } // Assigning 2 walls WS if(tempL==3 && tempF==4) { cell[x][y]=10; } if(tempR==4 && tempF==3) { cell[x][y]=10; } // Assigning 3 walls NES if(tempL==1 && tempF==2 && tempR==3) { cell[x][y]=11; } // Assigning 3 walls NEW if(tempL==4 && tempF==1 && tempR==2) { cell[x][y]=12; } // Assigning 3 walls NWS if(tempL==3 && tempF==4 && tempR==1) { cell[x][y]=13; } // Assigning 3 walls ESW if(tempL==2 && tempF==3 && tempR==4) { cell[x][y]=14; } }

20 Greedy: Movement if (cell[x][y]==7 && direction==NORTH) { direction=turn_right(NORTH); x=forward_x(x,direction); } else if (cell[x][y]==7 && direction==WEST) { direction=turn_left(WEST); y=forward_y(y,direction); } else if (cell[x][y]==5 && direction==NORTH) { direction=turn_left(NORTH); x=forward_x(x,direction); } else if (cell[x][y]==5 && direction==EAST) { direction=turn_right(EAST); y=forward_y(y,direction); } else if (cell[x][y]==6 && direction==EAST) { x=forward_x(x,EAST); move(SPEED,FORWARD,YES); } else if (cell[x][y]==6 && direction==WEST) { x=forward_x(y,direction); move(SPEED,FORWARD,YES); } else if (cell[x][y]==8 && direction==EAST) { direction=turn_left(EAST); y=forward_y(y,direction); } else if (cell[x][y]==8 && direction==SOUTH) { direction=turn_right(SOUTH); x=forward_x(x,direction); } else if (cell[x][y]==9 && direction==NORTH) { y=forward_y(y,direction); move(SPEED,FORWARD,YES); } else if (cell[x][y]==9 && direction==SOUTH) { y=forward_y(y,direction); move(SPEED,FORWARD,YES); } else if (cell[x][y]==10 && direction==SOUTH) { direction=turn_left(SOUTH); x=forward_x(x,direction); } else if (cell[x][y]==10 && direction==WEST) { direction=turn_right(WEST); y=forward_y(y,direction); } else if (cell[x][y]==11 && direction==EAST) { direction=turn_around(EAST); x=forward_x(x,direction); } else if (cell[x][y]==12 && direction==NORTH) { direction=turn_around(NORTH); y=forward_y(y,direction); } else if (cell[x][y]==13 && direction==WEST) { direction=turn_around(WEST); x=forward_x(x,direction); } else if (cell[x][y]==14 && direction==SOUTH) { direction=turn_around(SOUTH); y=forward_y(y,direction); } else if(0<=x<=7 && 0<=y<=7) { if(cell[x][y]==1) { if (direction==NORTH) { direction=turn_right(NORTH); x=forward_x(x,direction); } else if (direction==EAST) { x=forward_x(x, direction); move(SPEED,FORWARD,YES); } else if (direction==WEST) { x=forward_x(x,direction); move(SPEED,FORWARD,YES); } } // can go straight or left else if(cell[x][y]==2) { if (direction==NORTH) { y=forward_y(y,direction); move(SPEED,FORWARD,YES); } else if (direction==EAST) { direction=turn_left(EAST); y=forward_y(y,direction); } else if (direction==SOUTH); { y=forward_y(y,direction); move(SPEED,FORWARD,YES); } } else if(cell[x][y]==3) { if (direction==EAST) { x=forward_x(x, direction); move(SPEED,FORWARD,YES); } else if (direction==WEST) { direction=turn_right(WEST); y=forward_y(y, direction); } else if (direction==SOUTH) { direction=turn_left(SOUTH); x=forward_x(x, direction); } } else if(cell[x][y]==4) { if (direction==NORTH) { // y=forward_y(y, direction); // move(SPEED,FORWARD,YES); direction=turn_right(NORTH); x=forward_x(x,direction); //could be random } else if (direction==WEST) { direction=turn_right(WEST); y=forward_y(y, direction); } else if (direction==SOUTH) { direction=turn_left(SOUTH); x=forward_x(x, direction); } } } else if(0<=x<=7 && 8<=y<=15) { if(cell[x][y]==1) { if (direction==NORTH) { direction=turn_right(NORTH); x=forward_x(x, direction); } else if (direction==EAST) { x=forward_x(x, direction); move(SPEED,FORWARD,YES); } // or direction=turn_right(E); else if (direction==WEST) { direction=turn_left(WEST); y=forward_y(y, direction); } } else if(cell[x][y]==2) { if (direction==NORTH) { direction=turn_left(NORTH); x=forward_x(x, direction); } // or go straight idk about this one else if (direction==EAST) { direction=turn_right(EAST); y=forward_y(y, direction); } else if (direction==SOUTH) { y=forward_y(y, direction); move(SPEED,FORWARD,YES); } } else if(cell[x][y]==3) { if (direction==EAST) { x=forward_x(x, direction); move(SPEED,FORWARD,YES); } else if (direction==WEST) { direction=turn_right(WEST); y=forward_y(y, direction); } // or x =forward_x(x,direction); else if (direction==SOUTH) { direction=turn_right(SOUTH); x=forward_x(x, direction); } } else if(cell[x][y]==4) { if (direction==NORTH) { direction=turn_right(NORTH); x=forward_x(x, direction); } else if (direction==WEST) { direction=turn_left(WEST); y=forward_y(y, direction); } else if (direction==SOUTH) { direction=turn_right(SOUTH); x=forward_x(x, direction); } // or y=forward_y(y,direction); } } else if(8<=x<=15 && 0<=y<=7) { if(cell[x][y]==1) { if (direction==NORTH) { direction=turn_left(NORTH); x=forward_x(x,direction); } else if (direction==EAST) { direction=turn_right(EAST); y=forward_y(y,direction); } else if (direction==WEST) { x=forward_x(x,direction); move(SPEED,FORWARD,YES); } } else if(cell[x][y]==2) { if (direction==NORTH) { direction=turn_left(NORTH); x=forward_x(x, direction); } // or y=forward_y(y,direction); else if (direction==EAST) { direction=turn_left(EAST); y=forward_y(y,direction); } else if (direction==SOUTH) { direction=turn_right(SOUTH); x=forward_x(x,direction); } } else if(cell[x][y]==3) { if (direction==EAST) { direction=turn_left(EAST); y=forward_y(y,direction); } else if (direction==WEST) { x=forward_x(x,direction); move(SPEED,FORWARD,YES); } // or direction=turn_right(W); // y=forward_y(y,direction); else if (direction==SOUTH) { direction=turn_right(SOUTH); x=forward_x(x,direction); } } else if(cell[x][y]==4) { if (direction==NORTH) { y=forward_y(y,direction); move(SPEED,FORWARD,YES); } else if (direction==WEST) { direction=turn_right(WEST); // or direction=turn_left(W); y=forward_y(y,direction); } else if (direction==SOUTH) { y=forward_y(y,direction); move(SPEED,FORWARD,YES); } } } else if(8<=x<=15 && 8<=y<=15) { if(cell[x][y]==1) { if (direction==NORTH) { direction=turn_left(NORTH); x=forward_x(x, direction); } else if (direction==EAST) { direction=turn_right(EAST); y=forward_y(y,direction); } else if (direction==WEST) { x=forward_x(x,direction); move(SPEED,FORWARD,YES); } // or direction=turn_left } else if(cell[x][y]==2) { if (direction==NORTH) { direction=turn_left(NORTH); x=forward_x(x, direction); } else if (direction==EAST) { direction=turn_right(EAST); y=forward_y(y,direction); } else if (direction==SOUTH) { direction=turn_right(SOUTH); x=forward_x(x,direction); } // or y=forward_y(y,direction); } else if(cell[x][y]==3) { if (direction==EAST) { direction=turn_left(EAST); y=forward_y(y,direction); } else if (direction==WEST) { x=forward_x(x,direction); move(SPEED,FORWARD,YES); } else if (direction==SOUTH) { direction=turn_right(SOUTH); // or direction=turn_left(S); x=forward_x(x,direction); } } else if(cell[x][y]==4) { if (direction==NORTH) { y=forward_y(y,direction); move(SPEED,FORWARD,YES); } else if (direction==WEST) { direction=turn_left(WEST); y=forward_y(y,direction); } else if (direction==SOUTH) { y=forward_y(y,direction); move(SPEED,FORWARD,YES); } }

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…


Download ppt "Aether Burst. Our Team…  Blaise Arita Team Leader  Maran Osakoda Organizer  Shaunty Kleinschmidt Programmer  Matthew Menor Designer."

Similar presentations


Ads by Google