While your micromouse is exploring the maze, it is important to make sure that it stays well aligned as much as possible. This is probably more difficult in some ways than during a speed run. A particular difficulty can be an accurate and repeatable 90 degree turn…

Unlike a speed run turn, this one has to be performed entirely inside a single cell. It must finish with some straight distance left to go so that the mouse can sample the walls in the cell ahead and decide what to do when it gets there. If a turn is required, it may be after a series of straights, in which case, there will have been a reliable edge that allows the mouse to correct any forward errors. However, in a staircase, the mouse never gets to see an edge in a way that allows that forward error correction.

Generally though, there will be a wall in front of the mouse as it enters the cell where it must turn. So, to get the turn started in the correct place, and so avoid any lateral errors on the exit, it should be possible to use the forward looking sensors to trigger the turn. The mouse will be keeping track of distance as well because there may not be a wall ahead but, as long as there is, and you can rely on the sensors, just wait until the sensors tell you that you are close enough to the wall and then start the turn. As a bonus, a pair of sensors could tell you if you have any angular errors which need to be added to or subtracted from the turn angle.

What if the wall ahead is a bit dark or a bit light? If your sensors are not compensating then you are going to turn a bit early or a bit late. However, with a decent sensor setup, that variation should not be more than about +/- 5mm and, more importantly, it will not accumulate. That is, you should not get closer and closer to the wall ahead on each turn.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.