Micromouse Online


Home arrow Primus arrow Feeling our way with sensors
Tuesday, 06 January 2009
Main Menu
Home
Blog
News
Forum
Articles
Gallery
FAQs
Links
Search

Feeling our way with sensors PDF Print
User Rating: / 0
PoorBest 
Written by Pete Harrison   
Wednesday, 19 September 2007
The sensors are a critical part of a micromouse. Primus uses six infra-red reflective sensors. Here is code to test that they are working.

Now that we have a nice display to show what the sensor reading are, we can get that module tested. Since the hardware is very simple, there is not a lot to go wrong. Yet somehow I had a dead sensor when I first tested the Primus prototype. It was a simple dry joint that would have been detected by more careful inspection of the board.

This program just sets up the sensor hardware and activates each channel in turn. All six channels are then displayed on the screen as raw ADC values. there is no real need to scale these numbers. If it is working correctly, each channel should show values between nearly zero and about 700 or so.

For best performance the sensors will need careful alignment. For now, just check that they are working. They should easily detect the presence of a wall at distances of 150mm and should not saturate until the wall is only about 35-40mm away.

The reason the maximum value is only about 700 is that the TSL262 can only reach a maximum output value of around 3.5V. You should find that the sensors are relatively immune to ambient light levels although they will become less sensitive under very bright conditions. A black paper or card shield is needed over the TSL262s to reduce the effect of ambient light.

The sensor module is also responsible for measuring battery voltage via a potential divider on the battery input. While not essential for use with NiMh or NiCd cells, it is particularly important that LiPo cells do not become discharged to too low a level. You program can monitor the battery voltage and sound an alarm or shut the mouse down if the battery voltage gets too low. The processor will carry on as long as the voltage into the regulator does not drop below about 7V so you should have plenty of time to avoid trouble.

The project files can be downloaded here:

primus4.zip

If you have questions or feedback please visit the micromouse forum at:

http://www.micromouseonline.com/forum/  

there is a forum section dedicated to Primus 

Last Updated ( Wednesday, 19 September 2007 )
 
Builder's Blog
Forthcoming Events
There are no upcoming events currently scheduled.
Events Calendar
December 2008 January 2009 February 2009
Su Mo Tu We Th Fr Sa
Week 1 1 2 3
Week 2 4 5 6 7 8 9 10
Week 3 11 12 13 14 15 16 17
Week 4 18 19 20 21 22 23 24
Week 5 25 26 27 28 29 30 31
Adapted from a design by Joomlateam.com