1 / 67

MicroMouse Basics Part 1: Hardware

Robot Kits. Approx. $100 - $200Contains the chassis, motors, wheels and a microcontroller (Basic Stamp). Lego Robotics Kits. Easy to prototypeProgramming Languages:LogoNot Quite CInteractive C. Custom Made Mouse. Can choose the individual componentsCan achieve better performance over kitsMuch

jenn
Download Presentation

MicroMouse Basics Part 1: Hardware

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. MicroMouse Basics Part 1: Hardware

    2. Robot Kits Approx. $100 - $200 Contains the chassis, motors, wheels and a microcontroller (Basic Stamp) Pre-built robots are the easiest and quickest way to start experimenting with the micromouse. The drive-train has already been designed to reliably propel the robot. A Basic Stamp microcontroller is included along with all of the necessary cables and example programs. To turn these robots into micromice, wall sensors would have to be added. By doing so, the hardware for a wall-following mouse can be completed in only a few days. One can then concentrate on developing the basic movement routines required to move about the maze. To develop a true maze-solving micromouse, the microprocessor will have to be upgraded. All in all, a great way to get started in the micromouse competition, especially if the designers are intimidated by designing their own hardware.Pre-built robots are the easiest and quickest way to start experimenting with the micromouse. The drive-train has already been designed to reliably propel the robot. A Basic Stamp microcontroller is included along with all of the necessary cables and example programs. To turn these robots into micromice, wall sensors would have to be added. By doing so, the hardware for a wall-following mouse can be completed in only a few days. One can then concentrate on developing the basic movement routines required to move about the maze. To develop a true maze-solving micromouse, the microprocessor will have to be upgraded. All in all, a great way to get started in the micromouse competition, especially if the designers are intimidated by designing their own hardware.

    3. Lego Robotics Kits Easy to prototype Programming Languages: Logo Not Quite C Interactive C The lego mindstorms kits offer a quick way of prototyping a chassis. For about $200, these kits offer a microcontroller brick, motors, wheels, gears and plenty of lego bricks. If something doesnt work, its a simple matter of rearranging the bricks. This system has several drawbacks, however. The kit comes with sensors which detect visible light, so the mouse would be confused by the room lights. Infrared sensors would have to be created in order to reliably detect the walls. Information on creating sensors is available on the internet.. The microcontroller is programmed using a version of logo that leaves a lot to be desired. Another language called Not Quite C is freely available on the internet and allows the brick to be programmed in a more sophisticated language. Finally, programs are limited to only 32 variables. This is true whether one is using legos logo language or NQC. This would make developing a true maze-solving micromouse difficult and might limit the mouse to being a wall-follower. The lego mindstorms kits offer a quick way of prototyping a chassis. For about $200, these kits offer a microcontroller brick, motors, wheels, gears and plenty of lego bricks. If something doesnt work, its a simple matter of rearranging the bricks. This system has several drawbacks, however. The kit comes with sensors which detect visible light, so the mouse would be confused by the room lights. Infrared sensors would have to be created in order to reliably detect the walls. Information on creating sensors is available on the internet.. The microcontroller is programmed using a version of logo that leaves a lot to be desired. Another language called Not Quite C is freely available on the internet and allows the brick to be programmed in a more sophisticated language. Finally, programs are limited to only 32 variables. This is true whether one is using legos logo language or NQC. This would make developing a true maze-solving micromouse difficult and might limit the mouse to being a wall-follower.

    4. Custom Made Mouse Can choose the individual components Can achieve better performance over kits Much more satisfying and fun Creating a custom-built micromouse is not difficult and can provide greater performance over the pre-built kits. One is free to choose the microcontroller, the programming language, and to custom design the mechanics for maximum performance.Creating a custom-built micromouse is not difficult and can provide greater performance over the pre-built kits. One is free to choose the microcontroller, the programming language, and to custom design the mechanics for maximum performance.

    5. Custom Made Mouse Main components: Microcontroller board Motors Wall sensors Batteries Chassis Most mice contain the same key components. The mouse needs some kind of intelligence and there are many microcontrollers and microcontroller boards to choose from. My suggestion is that if youve had experience with a particular microcontroller or programming language in the past, stick to it. Developing micromouse software is difficult enough without having to learn a new system as well. The mouse will also need some way of detecting the walls in the maze, and it will need to some kind of locomotion.Most mice contain the same key components. The mouse needs some kind of intelligence and there are many microcontrollers and microcontroller boards to choose from. My suggestion is that if youve had experience with a particular microcontroller or programming language in the past, stick to it. Developing micromouse software is difficult enough without having to learn a new system as well. The mouse will also need some way of detecting the walls in the maze, and it will need to some kind of locomotion.

    6. Microcontrollers Basic Stamp Basic Programming Language Full documentation and examples online Basic Stamp 2e has more programming space The Basic Stamp line, manufactured by Parallax Inc., is another popular microcontroller. The company offers excellent on-line support including full documentation, circuit and programming examples. Those wishing to use the Basic Stamp should spend the extra money and buy the Basic Stamp IIe as it provides the most code and data space. The Basic Stamp line, manufactured by Parallax Inc., is another popular microcontroller. The company offers excellent on-line support including full documentation, circuit and programming examples. Those wishing to use the Basic Stamp should spend the extra money and buy the Basic Stamp IIe as it provides the most code and data space.

    7. Microcontrollers OOPic Object oriented (VisualBasic) Full documentation and examples online The OOPic, manufactured by Savage Innovations, is another microcontroller with excellent on-line support. Those who are familiar with Visual Basic should have no trouble programming the board since its very similar to the OOPics Basic language.The OOPic, manufactured by Savage Innovations, is another microcontroller with excellent on-line support. Those who are familiar with Visual Basic should have no trouble programming the board since its very similar to the OOPics Basic language.

    8. Microcontrollers Motorola 68HC11 based boards: Handy Board FingerBoard BotBoard MiniBoard Motorolas 68HC11 is very popular for several reasons: Universities use it in their microcontroller courses so students are familiar with it There is plenty of information available on the internet It can be programmed in assembly, C, Basic, Forth and other more obscure languages. There are several boards based on the 68HC11 which are being manufactured by various companies. They offer different memory configurations and expansion capabilities and all are available on-line. For those wishing to create their own boards, these same companies provide the schematics on their websites. Motorolas 68HC11 is very popular for several reasons: Universities use it in their microcontroller courses so students are familiar with it There is plenty of information available on the internet It can be programmed in assembly, C, Basic, Forth and other more obscure languages. There are several boards based on the 68HC11 which are being manufactured by various companies. They offer different memory configurations and expansion capabilities and all are available on-line. For those wishing to create their own boards, these same companies provide the schematics on their websites.

    9. Microcontrollers Handy Board Perfect for small robots Easy to develop software The best known of the 68HC11 boards is the handy board. It offers plenty of flexibility and unique features of interest to the robot builder: Built-in motor controller chips User input buttons An LCD screen The Interactive C language, developed by the makers of the Handy Board, contains many robot routines such as reading shaft encoders, speed control of motors, etc. The best known of the 68HC11 boards is the handy board. It offers plenty of flexibility and unique features of interest to the robot builder: Built-in motor controller chips User input buttons An LCD screen The Interactive C language, developed by the makers of the Handy Board, contains many robot routines such as reading shaft encoders, speed control of motors, etc.

    10. Propulsion DC Motors Servos Stepper Motors The three most popular ways of propelling a mouse are DC motors, servos and stepper motors. Each has advantages and disadvantages.The three most popular ways of propelling a mouse are DC motors, servos and stepper motors. Each has advantages and disadvantages.

    11. Propulsion DC Motors Cheap, small Need gearbox Need shaft encoders H-Bridge Discrete SGS Thompson L293D Can drive two motors 600mA per motor Most small DC motors spin at high speeds and exhibit low torque, both of which can be corrected using some kind of gear system. It would probably be easiest to purchase DC motors with well designed gear boxes already attached. DC motors also do not have built-in speed control so shaft encoders need to be attached to the axles. The microcontroller can then use the data from the encoders to control both speed and distance traveled. A common way of controlling DC motors is through an H-Bridge. These can be made out of discrete components or can be bought in the form of an IC. The L293 is a popular choice and can provide up to 600mA per motor which should be sufficient to drive a micromouse.Most small DC motors spin at high speeds and exhibit low torque, both of which can be corrected using some kind of gear system. It would probably be easiest to purchase DC motors with well designed gear boxes already attached. DC motors also do not have built-in speed control so shaft encoders need to be attached to the axles. The microcontroller can then use the data from the encoders to control both speed and distance traveled. A common way of controlling DC motors is through an H-Bridge. These can be made out of discrete components or can be bought in the form of an IC. The L293 is a popular choice and can provide up to 600mA per motor which should be sufficient to drive a micromouse.

    12. Propulsion Servos Need to modify for continuous rotation Need shaft encoders Can be driven without H-Bridge Come with attachments Perfect for Basic Stamp Servos, designed to be used in remote-controlled toys, are used in the micromouse kits shown in the beginning of this presentation. Servos are essentially DC motors with small gear boxes and a built-in control board for position control. Servos have limit stops which must be removed for continuous rotation and there are plenty of web sites which explain how to do this. Because of the built-in controller board, these motors can be controlled without an H-Bridge. Another advantage is that servos usually come with several attachments which makes it easy to connect a wheel.Servos, designed to be used in remote-controlled toys, are used in the micromouse kits shown in the beginning of this presentation. Servos are essentially DC motors with small gear boxes and a built-in control board for position control. Servos have limit stops which must be removed for continuous rotation and there are plenty of web sites which explain how to do this. Because of the built-in controller board, these motors can be controlled without an H-Bridge. Another advantage is that servos usually come with several attachments which makes it easy to connect a wheel.

    13. Propulsion Stepper Motors Less torque than DC motors for a given size and weight Do not need shaft encoders, gearbox LSI chips can handle logic and power Allegro UCN5804LB 1.25 A 35 V Stepper motors are the easiest way to propel a micromouse. Every pulse to a stepper motor results in the shaft rotating by a fixed amount so it is easy to control the speed and displacement of the motor. This eliminates the need for shaft encoders. ICs are available which can handle both the logic and power required to control the stepper motors. These chips simplify the programming and are very inexpensive.Stepper motors are the easiest way to propel a micromouse. Every pulse to a stepper motor results in the shaft rotating by a fixed amount so it is easy to control the speed and displacement of the motor. This eliminates the need for shaft encoders. ICs are available which can handle both the logic and power required to control the stepper motors. These chips simplify the programming and are very inexpensive.

    14. Propulsion Acceleration / Deceleration Want to ramp up and ramp down

    15. Sensors Wall Feelers IR Sensors The two most common ways of detecting the walls within the maze are infrared sensors and wall feelers.The two most common ways of detecting the walls within the maze are infrared sensors and wall feelers.

    16. Sensors Wall Feelers Simple to make and adjust Tend to get hung up at wall openings One of the first micromouse robots to win the national competition used feelers to detect the presence of walls. This is one of the simplest ways of detecting walls but because it actually makes contact with the walls, the mouse has the possibility of getting hung up.One of the first micromouse robots to win the national competition used feelers to detect the presence of walls. This is one of the simplest ways of detecting walls but because it actually makes contact with the walls, the mouse has the possibility of getting hung up.

    17. Sensors IR Sensors Proximity Easiest to implement Distance The most common way of detecting walls involves multiple proximity sensors that face downward over the tops of the walls. These sensors return true/false readings indicating the presence or absence of walls. The advantage of using this method is that the robot is able to see over the wall and map any adjacent walls. A few mice incorporate distance sensors. These sensors bounce a signal off of the sides of the walls and the mice are not only able to tell if there is a wall present, but also how far away it is from the wall. The most common way of detecting walls involves multiple proximity sensors that face downward over the tops of the walls. These sensors return true/false readings indicating the presence or absence of walls. The advantage of using this method is that the robot is able to see over the wall and map any adjacent walls. A few mice incorporate distance sensors. These sensors bounce a signal off of the sides of the walls and the mice are not only able to tell if there is a wall present, but also how far away it is from the wall.

    18. Sensors IR Sensors Guide the mouse Map the walls

    19. Sensors IR Sensors Detect navigation errors

    20. Sensors IR Sensors Can sense adjacent walls

    21. Sensors IR Sensors Pivot turn

    22. Sensors IR Sensors Arc turn

    23. Batteries

    24. Power 10 prismatic NiMH or 8 AAA alkaline An external power supply was used to power the mouse during testing

    25. Chassis Must hold all of the parts securely Must be small enough to maneuver within the walls The chassis is an important part of the design. It must hold all of the components together securely, parts shouldnt fall off everytime the mouse accidentally runs into a wall. At the same time it must be small enough to maneuver within the maze. It must be able to rotate 180deg. to get out of dead-ends and it must have room to either side to allow for errors in navigation. Its desirable to keep the heaviest components, the motors and the batteries, as low and to the center of the mouse as possible.The chassis is an important part of the design. It must hold all of the components together securely, parts shouldnt fall off everytime the mouse accidentally runs into a wall. At the same time it must be small enough to maneuver within the maze. It must be able to rotate 180deg. to get out of dead-ends and it must have room to either side to allow for errors in navigation. Its desirable to keep the heaviest components, the motors and the batteries, as low and to the center of the mouse as possible.

    26. MicroMouse Basics Part 2: Software

    27. Movement Routines Basics Go forward using the wall-following method Travel a specific number of cells Make consistent turns

    28. Maze Solving Algorithms Wall Following Method Good start Will not find the destination Depth First Search Explores every cell Will find destination eventually Flood-Fill Search Finds shortest path to destination There are several popular ways to solve the maze in the micromouse contest. The easiest of these algorithms is the wall follower method. By following either the left or right walls, the mouse will be led about the maze. This method does not guarantee that the robot will find the destination, but it is a good starting point since the technique can then be used within a more sophisticated maze solving algorithm. Unlike the wall-following method, the depth first algorithm will find the destination cells because it forces the mouse to explore every cell within the maze. You can find information on this method on the internet. The technique we used in our micromouse is the flood-fill method. It finds the shortest path to the destination cells without exploring the entire maze.There are several popular ways to solve the maze in the micromouse contest. The easiest of these algorithms is the wall follower method. By following either the left or right walls, the mouse will be led about the maze. This method does not guarantee that the robot will find the destination, but it is a good starting point since the technique can then be used within a more sophisticated maze solving algorithm. Unlike the wall-following method, the depth first algorithm will find the destination cells because it forces the mouse to explore every cell within the maze. You can find information on this method on the internet. The technique we used in our micromouse is the flood-fill method. It finds the shortest path to the destination cells without exploring the entire maze.

    29. Flood-Fill Full Flood-Fill Cells are assigned distance values indicating how far they are from the destination Destination cells are assigned a value of zero In the flood-fill technique, each cell is labeled with a distance value representing the distance to the destination cells. The destination, therefore, is labeled with a distance value of 0. Cells adjacent to the destination cells have a value of 1 and so on.In the flood-fill technique, each cell is labeled with a distance value representing the distance to the destination cells. The destination, therefore, is labeled with a distance value of 0. Cells adjacent to the destination cells have a value of 1 and so on.

    30. Flood-Fill

    31. Flood-Fill

    32. Flood-Fill

    33. Flood-Fill

    34. Flood-Fill

    35. Flood-Fill

    36. Flood-Fill

    37. Flood-Fill Full Flood-Fill Make a move Record any walls Flood the maze Repeat In the flood-fill technique, each cell is labeled with a distance value representing the distance to the destination cells. The destination, therefore, is labeled with a distance value of 0. Cells adjacent to the destination cells have a value of 1 and so on.In the flood-fill technique, each cell is labeled with a distance value representing the distance to the destination cells. The destination, therefore, is labeled with a distance value of 0. Cells adjacent to the destination cells have a value of 1 and so on.

    38. Flood-Fill Make a move

    39. Flood-Fill Map any walls

    40. Flood-Fill Flood the maze

    41. Flood-Fill Move to the open neighboring cell with the lowest distance value

    42. Flood-Fill Map any walls

    43. Flood-Fill Flood the maze

    44. Flood-Fill Move to the open neighboring cell with the lowest distance value

    45. Flood-Fill Map any walls

    46. Flood-Fill Flood the maze

    47. Flood-Fill

    48. Flood-Fill Move to the open neighboring cell with the lowest distance value

    49. Flood-Fill

    50. Flood-Fill Full Flood-Fill Make a move Record any walls Flood the maze Repeat

    51. Flood-Fill Modified Flood-Fill Change distance values as you explore the maze

    52. Flood-Fill This figure shows the initial values at the start of the run. As walls are discovered, the distance values are updated.This figure shows the initial values at the start of the run. As walls are discovered, the distance values are updated.

    53. Flood-Fill An example 3x3 maze Starting state: As an example, we will solve a 3 X 3 maze. The mouse is positioned in the start cell and the destination cell is located in the top right corner. The inner walls are gray because they are unknown to the mouse.As an example, we will solve a 3 X 3 maze. The mouse is positioned in the start cell and the destination cell is located in the top right corner. The inner walls are gray because they are unknown to the mouse.

    54. Flood-Fill Move to the open neighboring cell with the lowest distance value The first rule in the flood-fill algorithm is to move to the open neighboring cell with the lowest distance value. In this maze, the cells to the north and to the east are open. Since they both have a distance value of 3 we will move forward since turning takes time.The first rule in the flood-fill algorithm is to move to the open neighboring cell with the lowest distance value. In this maze, the cells to the north and to the east are open. Since they both have a distance value of 3 we will move forward since turning takes time.

    55. Flood-Fill Walls are found and mapped during exploration As it travels forward, the mouse discovers two of the inner walls. The mouse must now apply the movement rule again. Since the cell to the east is blocked by a wall, it will not be considered. The only two open cells are to the north and to the south. The cell to the north has the lowest distance value so we will move there.As it travels forward, the mouse discovers two of the inner walls. The mouse must now apply the movement rule again. Since the cell to the east is blocked by a wall, it will not be considered. The only two open cells are to the north and to the south. The cell to the north has the lowest distance value so we will move there.

    56. Flood-Fill Following distance values Here, the cell to the east has the lowest distance value so we will move there. Here, the cell to the east has the lowest distance value so we will move there.

    57. Flood-Fill Another wall The mouse has found that it cannot reach the destination cell because of another wall it has discovered. It also has another problem: The open cells to the south and the west both have distance values which are greater than the distance value of the cell we are occupying. The distance values, therefore, need updating.The mouse has found that it cannot reach the destination cell because of another wall it has discovered. It also has another problem: The open cells to the south and the west both have distance values which are greater than the distance value of the cell we are occupying. The distance values, therefore, need updating.

    58. Flood-Fill If a cell is not the destination, its value should be one plus the minimum value of its open neighbors Which brings us to the second rule: If a cell is not the destination cell, its value should be one plus the minimum value of its open neighbors.Which brings us to the second rule: If a cell is not the destination cell, its value should be one plus the minimum value of its open neighbors.

    59. Flood-Fill Need to update numbers In this case, both open neighbors have a distance value of 2. We will update the current cell to 2 + 1 or 3.In this case, both open neighbors have a distance value of 2. We will update the current cell to 2 + 1 or 3.

    60. Flood-Fill Other cells now need to be updated But this causes the the cell to the west to be incorrect. Its value needs to be updated as well. Its new value will be 3 + 1 or 4.But this causes the the cell to the west to be incorrect. Its value needs to be updated as well. Its new value will be 3 + 1 or 4.

    61. Flood-Fill More updating This latest update causes another cell to be incorrect. Its value will be updated to 4 + 1 or 5.This latest update causes another cell to be incorrect. Its value will be updated to 4 + 1 or 5.

    62. Flood-Fill More updating This latest update causes another cell to be incorrect. Its value will be updated to 4 + 1 or 5.This latest update causes another cell to be incorrect. Its value will be updated to 4 + 1 or 5.

    63. Flood-Fill Done updating Can now find destination cell The mouse has now finished updating the distance values and can once again determine which way to move. Since the cell to the south has the lowest distance value, it will move there. The mouse can then proceed, following decreasing distance values, until it reaches the destination cell. You can see that if the mouse is placed back in the start square, it will now follow the shorter of the two paths to the destination. The mouse has now finished updating the distance values and can once again determine which way to move. Since the cell to the south has the lowest distance value, it will move there. The mouse can then proceed, following decreasing distance values, until it reaches the destination cell. You can see that if the mouse is placed back in the start square, it will now follow the shorter of the two paths to the destination.

    64. Flood-Fill Use same technique to get back to start By having a second array of numbers and using the same flood-fill technique, the mouse can find its own way back to the start cell. Its just a matter of labeling the start cell with the zero. By having a second array of numbers and using the same flood-fill technique, the mouse can find its own way back to the start cell. Its just a matter of labeling the start cell with the zero.

    65. Flood-Fill Modified Flood-Fill Move to the open neighboring cell with the lowest distance value Record any walls Update distance values if necessary Repeat

    66. Flood-Fill Modified Flood-Fill Updating distance values

    67. Contact Information http://www.micromouseinfo.com steve@micromouseinfo.com

More Related