Issuu on Google+

ZX-IrEYE : Multi-direction infrared detector documentation 1

ZX-IrEYE (Infrared Eye) Multi-direction infrared detector Features :  Used for infrared light detection  Supply voltage +5V  There are 2 outputs : Range and Direction  Output is DC voltage 0 to +5V.  Includes 2 of JST3AA-8 sensor cables.

Operation : Figure 1 shows the ZX-irEYE layout. It is used for infrared light detection. There are 2 outputs. 1. Range : It gives 0 to +5V forward the infrared light density detection. The output goes high level when this sensor is near infrared light source and decrease when sensor is far from infrared source. 2. Direction : It gives 0 to +5V direct variation the detected angle of infrared light 0 to 180 degree.

5 of Photo-transistor for infrared detector

Range : reports the distance from the infrared source such as IR ball. Direction : reports direction of the infrared source such as IR ball.

Figure 1 : The layout of ZX-irEYE Multi-direction infrared detector


2ZX-IrEYE : Multi-direction infrared detector documentation

 

 

 

 

 

 

 

 

Figure 2 : ZX-irEYE operation with infrared source such as an infrared ball The figure 2 shows ZX-irEYE in operation. User can interface this sensor with analog input of microcontroller. This sensor is suitable for detecting the infrared ball (in continuous mode) of the soccer robot games and Candle frame of Fire-fighting robot competdition.


ZX-IrEYE : Multi-direction infrared detector documentation 3

Example : This is simple air pressure monitoring with INEX’s Unicon board (Arduino Leonardo compatible board). The Unicon interfaces with ZX-IrEYE via Analog0 and 1 ports. Displays the result on GLCD-XT board.

Interface circuit :


4ZX-IrEYE : Multi-direction infrared detector documentation

Example code : This example code requires the unicon.h library. It is customized of the INEX’s Unicon board. Free download available from www.uniconboard.com or www.ineglobal.com. Also get more information of the Unicon board from our international website; www.inexglobal.com. The full example sketch is shown below. /************************************************************************** * TITLE : IR SCANNER * DESCRIPTION : Detect the infrared direction and distance by ZX-IrEYE. * Diretion port is connected to pin 18 (Analog 0) * Range port is connected to pin 19 (Analog 1) * ZX-IrLED (the infrared source) is connected to pin 6 * Analog values are shown on GLCD-XT display **************************************************************************/ #include <unicon.h> int pinRange = 18; // Assign pinRange is pin 18 int pinDirection = 19; // Assign pinDirection is pin 19 int pinIR = 6; // Assign pinIR is pin 18 void setup() { pinMode(pinRange, INPUT); pinMode(pinDirection, INPUT); pinMode(pinIR, OUTPUT); digitalWrite(pinIR, HIGH); setTextSize(2); setTextColor(GLCD_RED); glcd(0, 0, "Dir Raw"); setTextColor(GLCD_YELLOW); glcd(2, 0, "Dir Volt"); setTextColor(GLCD_GREEN); glcd(4, 0, "Range Raw"); setTextColor(GLCD_MAGENTA); glcd(6, 0, "Range Volt"); setTextColor(GLCD_WHITE);

// Set pinRange (pin 18) to input mode // Set pinDirection (pin 19) to input mode // Set pinIR (pin 6) to output mode // // // // // // // // // // //

Set pinIR to HIGH Set text size on GLCD to 2 Set text color on GLCD to red Write "Dir Raw" at line 0 column 0 Set text color on GLCD to yellow Write "Dir Volt" at line 2 column 0 Set text color on GLCD to green Write "Range Raw" at line 4 column 0 Set text color on GLCD to magenta Write "Range Volt" at line 6 column 0 Set text color on GLCD to white

} void loop() { glcd(1, 0, "%d ", analogRead(pinRange)); // Show raw data of Range glcd(3, 0, "%f ", analogRead(pinRange) / 204.6); // Show Range voltage glcd(5, 0, "%d ", analogRead(pinDirection)); // Show raw data of Direction glcd(7, 0, "%f ", analogRead(pinDirection) / 204.6); // Show Direction voltage }

www.inex.co.th www.inexglobal.com

(c) Innovative Experiment


ZX-IrEYE_e