Layer-7.png
SHOP NOW

PRODUCTS

Gravity Digital Adjustable Infrared Proximity Sensor

Gravity Digital Adjustable Infrared Proximity Sensor

MODEL: SEN0019

SGD $ 15.30
59
In Bulk
(per piece)

Gravity: Analog Adjustable Infrared Proximity Sensor For ArduinoGravity: 80cm Arduino Infrared Proximity Sensor - DFRobot

This is an Arduino infrared distance sensor. It has an adjustable detection range, 3cm - 80cm.  It is small, easy to use, assemble, and inexpensive.

Useful for robotics, interactive media, industrial assembly line, etc. Infrared wave length is part of the Sun's natural light spectrum. While is a nice fit for indoor projects, outdoors with plenty of sun light and reflective surfaces on it's sight is not adviced. It's incredibly repurposable and can be used for a lot of different projects. The adjustable screw on it's back makes it very convenient for different purposes. After digital read shows on your Arduino pin and then you are ready to go. It is a great sensor choice for quick prototyping.

Use it on a robot for wall detection and wall follower, or as some of the projects listed below as a trigger system. It's round shape with the screwable holders make it a good choice for a home made assembled robot, with a hole of it's diameter and the holders you can place it aiming at different positions on a robot. Or even place it near your PC to turn on and off your monitor.

To ease the difficulty,  a Gravity Interface is adapted to allow plug&play.  The IO expansion shield is the best match for this sound senor connecting to your Arduino.

 

Specification

  • Power supply: 5V
  • Working Current: <100mA
  • Adjustable detection range: 3cm - 80cm
  • Pin description:
    • Brown - 5V
    • Blue - GND
    • Black- Signal
  • Digital output:
    • "0" - found barrier (~0V)
    • "1" - no barrier (~4V)
  • Dimension: 45x18mm

 

Connection Diagram

SEN0019_Sensor_Switch_Connection_Diagram_greenGND.png

Sample Code

const int InfraredSensorPin = 4;//Connect the signal pin to the digital pin 4
const int LedDisp = 13;

void setup()
{
  Serial.begin(57600);
  Serial.println("Start!");
  pinMode(InfraredSensorPin,INPUT);
  pinMode(LedDisp,OUTPUT);
  digitalWrite(LedDisp,LOW);
}

void loop()
{
  if(digitalRead(InfraredSensorPin) == LOW)  digitalWrite(LedDisp,HIGH);
  else  digitalWrite(LedDisp,LOW);
  Serial.print("Infrared Switch Status:");
  Serial.println(digitalRead(InfraredSensorPin),BIN);
  delay(50);
}