Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use IR-sensor HW-201: Examples, Pinouts, and Specs

Image of IR-sensor HW-201
Cirkit Designer LogoDesign with IR-sensor HW-201 in Cirkit Designer

Introduction

The IR-Sensor HW-201, manufactured by Cina, is an infrared sensor module designed for detecting obstacles and measuring distances. It operates by emitting infrared light and analyzing the reflected signal to determine the proximity of objects. This module is widely used in robotics, automation, and other applications requiring object detection or distance measurement. Its compact design and ease of integration make it a popular choice for hobbyists and professionals alike.

Explore Projects Built with IR-sensor HW-201

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered Wi-Fi Controlled IR Sensor Array with ESP8266
Image of v3: A project utilizing IR-sensor HW-201 in a practical application
This circuit uses a WeMOS ESP8266 microcontroller to read data from two Sharp IR sensors through a 16-channel analog multiplexer. The system is powered by a 2x 18650 battery pack, and the multiplexer allows the microcontroller to select and read from multiple sensor inputs.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266-Based IR Sensor Array with Analog Multiplexing
Image of v2: A project utilizing IR-sensor HW-201 in a practical application
This circuit features two Sharp IR Sensors connected to a 16-channel analog multiplexer, which allows for multiple analog inputs to be read sequentially by a single analog pin on the WeMOS ESP8266 microcontroller. The ESP8266 controls the multiplexer selection via its digital pins (D0-D3) and reads the sensor outputs through its analog pin (A0). The 2x 18650 battery pack provides power to the entire circuit, with all components sharing a common ground and voltage supply.
Cirkit Designer LogoOpen Project in Cirkit Designer
IR Sensor-Based Toggle Circuit with Visual Feedback
Image of smart parking system: A project utilizing IR-sensor HW-201 in a practical application
This circuit is a hardware-based control system utilizing a 555 timer for pulse generation, a 74HC74 flip-flop for state changes, and a 74HC08 AND gate for logic processing. IR sensors provide input signals, and the state is indicated by red and green LEDs. The circuit operates without a microcontroller and is likely used for timing and logic-based applications, possibly for detecting and signaling events with the IR sensors.
Cirkit Designer LogoOpen Project in Cirkit Designer
Smart Weighing System with ESP8266 and HX711 - Battery Powered and Wi-Fi Enabled
Image of gggg: A project utilizing IR-sensor HW-201 in a practical application
This circuit is a multi-sensor data acquisition system powered by a 18650 battery and managed by an ESP8266 microcontroller. It includes a load sensor interfaced with an HX711 module for weight measurement, an IR sensor, an ADXL345 accelerometer, a VL53L0X distance sensor, and a Neo 6M GPS module for location tracking. The system is designed for wireless data transmission and is supported by a TP4056 module for battery charging.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with IR-sensor HW-201

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 v3: A project utilizing IR-sensor HW-201 in a practical application
Battery-Powered Wi-Fi Controlled IR Sensor Array with ESP8266
This circuit uses a WeMOS ESP8266 microcontroller to read data from two Sharp IR sensors through a 16-channel analog multiplexer. The system is powered by a 2x 18650 battery pack, and the multiplexer allows the microcontroller to select and read from multiple sensor inputs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of v2: A project utilizing IR-sensor HW-201 in a practical application
ESP8266-Based IR Sensor Array with Analog Multiplexing
This circuit features two Sharp IR Sensors connected to a 16-channel analog multiplexer, which allows for multiple analog inputs to be read sequentially by a single analog pin on the WeMOS ESP8266 microcontroller. The ESP8266 controls the multiplexer selection via its digital pins (D0-D3) and reads the sensor outputs through its analog pin (A0). The 2x 18650 battery pack provides power to the entire circuit, with all components sharing a common ground and voltage supply.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of smart parking system: A project utilizing IR-sensor HW-201 in a practical application
IR Sensor-Based Toggle Circuit with Visual Feedback
This circuit is a hardware-based control system utilizing a 555 timer for pulse generation, a 74HC74 flip-flop for state changes, and a 74HC08 AND gate for logic processing. IR sensors provide input signals, and the state is indicated by red and green LEDs. The circuit operates without a microcontroller and is likely used for timing and logic-based applications, possibly for detecting and signaling events with the IR sensors.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of gggg: A project utilizing IR-sensor HW-201 in a practical application
Smart Weighing System with ESP8266 and HX711 - Battery Powered and Wi-Fi Enabled
This circuit is a multi-sensor data acquisition system powered by a 18650 battery and managed by an ESP8266 microcontroller. It includes a load sensor interfaced with an HX711 module for weight measurement, an IR sensor, an ADXL345 accelerometer, a VL53L0X distance sensor, and a Neo 6M GPS module for location tracking. The system is designed for wireless data transmission and is supported by a TP4056 module for battery charging.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Obstacle detection in robotics
  • Line-following robots
  • Proximity sensing in automation systems
  • Object counting in conveyor systems
  • Security systems for motion detection

Technical Specifications

Below are the key technical details of the IR-Sensor HW-201:

Parameter Value
Operating Voltage 3.3V to 5V
Operating Current 20mA (typical)
Detection Range 2cm to 30cm
Output Type Digital (High/Low)
Adjustable Sensitivity Yes (via onboard potentiometer)
Dimensions 32mm x 14mm x 8mm
Operating Temperature -25°C to 85°C

Pin Configuration and Descriptions

The HW-201 module has three pins for interfacing:

Pin Name Description
1 VCC Power supply pin. Connect to 3.3V or 5V.
2 GND Ground pin. Connect to the ground of the circuit.
3 OUT Digital output pin. Outputs HIGH (1) when no obstacle is detected, LOW (0) when an obstacle is detected.

Usage Instructions

How to Use the IR-Sensor HW-201 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.
  2. Connect the Output: Connect the OUT pin to a digital input pin of your microcontroller or directly to an external circuit.
  3. Adjust Sensitivity: Use the onboard potentiometer to adjust the detection range. Turn clockwise to increase sensitivity and counterclockwise to decrease it.
  4. Test the Module: Place an object within the detection range and observe the OUT pin. It will output LOW (0) when an obstacle is detected and HIGH (1) otherwise.

Important Considerations and Best Practices

  • Power Supply: Ensure a stable power supply to avoid erratic behavior.
  • Ambient Light: The sensor may be affected by strong ambient infrared light sources (e.g., sunlight). Use it in controlled lighting conditions for optimal performance.
  • Mounting: Avoid placing reflective surfaces directly in front of the sensor, as this may cause false readings.
  • Wiring: Keep the wiring short and secure to minimize noise and interference.

Example: Connecting to an Arduino UNO

Below is an example of how to connect and use the HW-201 with an Arduino UNO:

Circuit Connections

  • Connect the VCC pin of the HW-201 to the 5V pin of the Arduino.
  • Connect the GND pin of the HW-201 to the GND pin of the Arduino.
  • Connect the OUT pin of the HW-201 to digital pin 2 of the Arduino.

Arduino Code

// IR-Sensor HW-201 Example Code
// This code reads the output of the IR sensor and prints the status to the Serial Monitor.

const int irSensorPin = 2; // Connect the OUT pin of HW-201 to digital pin 2
int sensorState = 0;       // Variable to store the sensor state

void setup() {
  pinMode(irSensorPin, INPUT); // Set the IR sensor pin as input
  Serial.begin(9600);          // Initialize serial communication at 9600 baud
}

void loop() {
  sensorState = digitalRead(irSensorPin); // Read the sensor output
  
  if (sensorState == LOW) {
    // If the sensor detects an obstacle, output is LOW
    Serial.println("Obstacle detected!");
  } else {
    // If no obstacle is detected, output is HIGH
    Serial.println("No obstacle detected.");
  }
  
  delay(500); // Wait for 500ms before reading again
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Sensor Not Detecting Obstacles

    • Cause: Incorrect wiring or insufficient power supply.
    • Solution: Double-check the wiring and ensure the power supply is stable and within the specified range.
  2. False Readings

    • Cause: Strong ambient infrared light or reflective surfaces.
    • Solution: Use the sensor in controlled lighting conditions and avoid reflective surfaces in the detection path.
  3. Output Always HIGH or LOW

    • Cause: Sensitivity not adjusted properly or sensor malfunction.
    • Solution: Adjust the potentiometer to set the desired detection range. If the issue persists, test the module with a different microcontroller or power source.

FAQs

Q1: Can the HW-201 detect transparent objects?
A1: No, the sensor may not reliably detect transparent objects as they do not reflect sufficient infrared light.

Q2: What is the maximum detection range of the HW-201?
A2: The maximum detection range is approximately 30cm, but this may vary depending on the object's material and surface.

Q3: Can I use the HW-201 with a 3.3V microcontroller?
A3: Yes, the HW-201 is compatible with both 3.3V and 5V systems.

Q4: How do I know if the sensor is working?
A4: The onboard LED will light up when an obstacle is detected, and the OUT pin will output LOW (0).