As a matter of fact, most of the Micromouse use infrared sensor to keep distance with wall when running, and it’s very easy to be affected by environmental light(noise) consequently cause crash. This is obviously something you don’t want to see, and there are some ways to reduce the change from happening such as use pulse controlled IR LED to send a very high current to against ambient light. This is a very helpful way to get more stable sensor reading, however, something unpredicted are still happening when the maze is covered with sufficient sun light.
The window of my room is facing west, and the light come through directly to the maze in the afternoon. Usually I do test in the morning or evening to avoid the strong sun light. However, the actual light condition can be vary at any location and any time. I’ve seen lots of cases that mice got screwed by sun light during competitions. Actually what I’ve heard that lots of mice can’t finish the run at the Micromouse competition taken place at Southern Taiwan University of Science and Technology due to the sun light.
We know sun light contains plenty of infrared, and it will confuse the mouse when the out coming light reach certain level. I made several tests this afternoon at 4PM, where the light came through window directly to the maze at about 45 degree angle.
I basically made 2 kinds of tests, one is for speed run and the other is for search run
Let’s see the video for speed run
seems light everything is fine since the mouse don’t get too close to the wall most of the times. However, the mouse crashed when return to starting corner since the reading from it’s front sensor makes the mouse think it is still not yet at the distance to stop. Ideally the mouse is supposed to stop at the center of the cell when back to starting corner, unfortunately, since the sun light was streaming at the front wall of my mouse when it tried to stop, which gave a significantly lower sensor value(makes mouse think the wall is still far ahead) to the front sensor, the mouse can never stop. Then I use my hand to block the sun light to its front wall, the mouse was be able to stop and turn back. The reason the mouse didn’t crash at the destination cell when doing speed run at top right corner is because that cell was covered by shadow. My conclusion here is the sun light doesn’t affect that much on speed run.
Other than speed run, the mouse is more fragile in search run, since we need accurate sensor value to determine the wall information, and lots of times, the mouse needs to get really close to the front wall when the dead end is to the front(doesn’t have to be dead end, any kind of case that mouse need to turn back(180 degree)).
Here is a video for search run
You can see the mouse crashed almost immediately.
Before the mouse crashed, The incorrect sensor reading made the mouse think that there is no left wall and consequently made the mouse turn left instead of turn right and apparently there was a wall to the left.
I feel this kinda of problem can’t easily over come hardwarely. Instead, a software based adjust can be done to reduce the chance to read incorrect sensor value when need to update the wall. So far I didn’t use any, but I plan to try to use multiple sample for side sensor when need to update wall, also do some comparison with the sensor value couple milliseconds ago to see if there is any weird change. I hope this will prevent this from happening again.
PS. added on May-7th-2013
I made a test today to read the ADC value from receiver when emitter was off. turned out that the raw reading from receiver was pretty high. It went up to 1900 out of 4096 when directly pointed to the sun in the afternoon. After I take another sample when emitter was on, I subtract the reading when emitter was on to the value when emitter was off, which gave me the actual value that from the emitter without having any IR from the sun. However, the adjusted reading drops when there are more sun light on the wall. I think the reason is because the IR from both sunlight and the emitter made the receiver nearly saturated, that’s why the adjusted sensor value dropped when subtracted with DC offset value when emitter was off. Luckily, the drop was about 30 out of 4096. Even though this change will affect the performance of the mouse, but this is the best we can get.