Monday, December 4, 2006

An overview of the Short-range Sensing System

In the short-range sensing system; there are eight infrared sensors 45 degrees apart. Each sensor has its own 12F683 microcontoller for making measurements and for communication with the host microcontoller. The sensors have a range from 0 to 30 cm and they discretize the range into eight levels (1 to 8). Each sensor makes continuous readings and sends the current result via serial port upon request of the host microcontroller. There is a blue LED near each sensor, which is clearly seen by the user to indicate that there is an object within the detection range of each sensor.

The host microcontroller, which is a PIC 16F877A, requests the current reading results from each sensor, and waits for the data to be sent and continues this process until all of the sensors sent their reading results (the result can be a number from 1 to 8 according to range or 0 for no object condition.). The first thing that the host microcontroller does is to lit the corresponding blue LED nearby each sensor if the sensor has detected an object within its operating range. The LED's are controlled by the host microcontroller instead of 12F863's. This is a necessity rather than a decision since 12F683 is an 8-pin microcontroller, all of its pins are used for power, operation of IR LED/detector and serial communication and no pin is left for the indicator LED. This necessity is also useful for debugging the operation of the sensors and the communication between sensors and the host microcontroller since the LED's can only be lit when sensor is operating correctly and serial communication is successful.

The host microcontroller, after turning on/off the blue LED's according to the reading results, sends readings of eight sensors via I2C to the main microcontroller, which is again a PIC 16F877A, upon its request.

No comments: