[vc_row][vc_column width=”1/1″][vc_column_text]LinkSprite infrared roadblock sensor uses an integrated infrared transceiver. 74LS00 is used to construct a resonator. Adjust the potentiometer can adjust the frequency of the infrared light to be the center of receiver, i.e. 38kHz. Now the receiver is of highest sensitivity. Adjust the other potentimeter can adjust the transmit intensity to meet the requirement of sensing distance.
The ballback working distance is longer than 20cm.
There are four pins: enable, output signal, power, ground. Jumper can be used to always enable. When there is object/roadblock in front of the sensor, the LED will turn on, and the out signal will be HIGH.
[/vc_column_text][vc_tour][vc_tab title=”Parts List” tab_id=”1389159374-1-23″][vc_column_text]1 x Infrared Road Block Sensor Breakout
1 x pcDuino V2
Several Jump Wires[/vc_column_text][/vc_tab][vc_tab title=”Wire Diagram” tab_id=”1389159374-2-78″][vc_column_text]
+ of Infrared Road Block Sensor -> 5V of pcDuino
– of Infrared Road Block Sensor -> GND of pcDuino
S of Infrared Road Block Sensor -> GPIO 0 of pcDuino
EN of Infrared Road Block Sensor -> GPIO 1 of pcDuino
EN is the enable signal of the infrared road block sensor. It is actively low. When it receives a low level signal, it will start to detect block.[/vc_column_text][/vc_tab][vc_tab title=”Sample Code” tab_id=”1389159759803-2-1″][vc_column_text]We use the included Arduino IDE in pcDuino:
Code:
#include <core.h>
int PathPin = 0;
int EnablePin=1;
void setup(){
pinMode(PathPin, INPUT);
pinMode(EnablePin, OUTPUT);
digitalWrite(EnablePin, 0);
}
void loop(){
int sensorValue = digitalRead(PathPin);
printf(“Value of Pin pathpin:%d\n”, sensorValue);
delay(100);
}[/vc_column_text][/vc_tab][vc_tab title=”Results” tab_id=”1389159919489-3-8″][vc_column_text]Click the left-point arrow to run the code on pcDuino, when there is no object in front of the sensor, the sensors output will be 1.
When there is object in front of the sensor, the sensors output will be 0.
Leave a Reply
You must be logged in to post a comment.