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.
1 x Infrared Road Block Sensor Breakout
1 x pcDuino V2
Several Jump Wires
+ 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.
We use the included Arduino IDE in pcDuino:
int PathPin = 0;
int sensorValue = digitalRead(PathPin);
printf(“Value of Pin pathpin:%d\n”, sensorValue);