Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use IR Speed Grove: Examples, Pinouts, and Specs

Image of IR Speed GroveDesign with IR Speed Grove in Cirkit Designer

Introduction

The IR Speed Grove is an infrared sensor module designed to detect the speed of moving objects. It operates by emitting infrared light and measuring the time it takes for the light to reflect off an object and return to the sensor. This module is widely used in applications requiring speed measurement, such as motor speed monitoring, conveyor belt systems, and robotics. Its compact design and ease of integration make it a popular choice for both hobbyists and professionals.

Explore Projects Built with IR Speed Grove

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Controlled Dual Gearmotor System with IR Sensing: A project utilizing IR Speed Grove in a practical application
ESP32-Controlled Dual Gearmotor System with IR Sensing

This circuit features an ESP32 microcontroller interfaced with three TCRT 5000 IR sensors and two DC gearmotors controlled by an L298N motor driver. The ESP32 reads digital outputs from the IR sensors to likely make decisions based on line or obstacle detection, and it controls the gearmotors' directions and speeds, possibly for a robot or automated system. Power is supplied by a 6V battery connected to the motor driver, which also provides 5V to the ESP32 and the IR sensors.

Open Project in Cirkit Designer
Image of Raspberry Pi 4B-Based Environmental Monitoring System with Soil Moisture Sensing and GPS Tracking: A project utilizing IR Speed Grove in a practical application
Raspberry Pi 4B-Based Environmental Monitoring System with Soil Moisture Sensing and GPS Tracking

This circuit features a Raspberry Pi 4B as the central controller, interfaced with a SparkFun Soil Moisture Sensor, an IR sensor, a GPS NEO 6M module, and a Servomotor SG90. The Raspberry Pi reads soil moisture levels, receives IR signals, and communicates with the GPS module, while also controlling the servomotor. Power distribution is managed through the Raspberry Pi's 5V and 3V3 pins to the respective components, and all devices share a common ground.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

The following table outlines the key technical details of the IR Speed Grove module:

Parameter Value
Operating Voltage 3.3V to 5V
Operating Current ≤ 20mA
Detection Range 3mm to 80mm
Output Signal Digital (High/Low)
Response Time ≤ 2ms
Operating Temperature -25°C to 85°C
Dimensions 20mm x 20mm x 10mm

Pin Configuration

The IR Speed Grove module has a 4-pin interface. The pin descriptions are as follows:

Pin Name Description
1 VCC Power supply pin (3.3V to 5V)
2 GND Ground pin
3 OUT Digital output pin (High when object detected)
4 NC Not connected (reserved for future use)

Usage Instructions

How to Use the IR Speed Grove in a Circuit

  1. Power the Module: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground of your circuit.
  2. Connect the Output: Connect the OUT pin to a digital input pin on your microcontroller or other processing unit.
  3. Position the Sensor: Place the sensor facing the moving object you want to measure. Ensure the object is within the detection range (3mm to 80mm).
  4. Read the Output: The OUT pin will output a digital signal:
    • High (1): When an object is detected.
    • Low (0): When no object is detected.

Important Considerations

Example: Connecting to an Arduino UNO

Below is an example of how to use the IR Speed Grove with an Arduino UNO to measure the speed of a rotating object:

Circuit Connections

Arduino Code

// IR Speed Grove Example Code
// This code reads the digital output from the IR Speed Grove and calculates
// the speed of a rotating object based on the time between pulses.

const int sensorPin = 2; // Pin connected to the OUT pin of the IR Speed Grove
volatile unsigned long lastPulseTime = 0; // Time of the last detected pulse
volatile unsigned long pulseInterval = 0; // Time between two pulses

void setup() {
  pinMode(sensorPin, INPUT); // Set the sensor pin as input
  Serial.begin(9600); // Initialize serial communication
  attachInterrupt(digitalPinToInterrupt(sensorPin), measureSpeed, FALLING);
  // Attach an interrupt to detect falling edges on the sensor pin
}

void loop() {
  if (pulseInterval > 0) {
    // Calculate speed (e.g., in RPM) based on pulse interval
    float speed = 60000.0 / pulseInterval; // Speed in RPM
    Serial.print("Speed: ");
    Serial.print(speed);
    Serial.println(" RPM");
    delay(500); // Update every 500ms
  }
}

void measureSpeed() {
  unsigned long currentTime = millis(); // Get the current time
  pulseInterval = currentTime - lastPulseTime; // Calculate time between pulses
  lastPulseTime = currentTime; // Update the last pulse time
}

Notes on the Code

Troubleshooting and FAQs

Common Issues

  1. No Output Signal

    • Cause: Incorrect wiring or insufficient power supply.
    • Solution: Double-check the connections and ensure the power supply is within the specified range.
  2. Unstable Output

    • Cause: Electrical noise or improper grounding.
    • Solution: Add a pull-down resistor to the OUT pin and ensure proper grounding.
  3. Inaccurate Detection

    • Cause: Object is outside the detection range or has low reflectivity.
    • Solution: Adjust the sensor's position and ensure the object is within the specified range.
  4. Interference from Ambient Light

    • Cause: Strong ambient light affecting the sensor's performance.
    • Solution: Shield the sensor from direct sunlight or use it in a controlled lighting environment.

FAQs

  1. Can the IR Speed Grove detect transparent objects?

    • Transparent objects may not reflect enough infrared light for detection. Use opaque or reflective objects for best results.
  2. What is the maximum speed the sensor can measure?

    • The sensor's response time is ≤ 2ms, allowing it to detect speeds up to 500 pulses per second. The actual measurable speed depends on the object's size and distance.
  3. Can I use the IR Speed Grove with a 3.3V microcontroller?

    • Yes, the module operates within a voltage range of 3.3V to 5V, making it compatible with 3.3V systems.
  4. How do I clean the sensor?

    • Use a soft, dry cloth to clean the sensor lens. Avoid using liquids or abrasive materials.

By following this documentation, you can effectively integrate the IR Speed Grove into your projects and troubleshoot any issues that arise.