Stufin
Home Quick Cart Profile

DIY D2-5 Intelligent Tracking Line Car Kit

Buy Now

Component Name

DIY D2-5 Intelligent Tracking Line Car Kit

Overview

The DIY D2-5 Intelligent Tracking Line Car Kit is a comprehensive robotics kit designed for hobbyists, students, and enthusiasts to build and program a line-tracking car. This kit provides a hands-on learning experience in robotics, programming, and electronics, equipping users with the skills to create an intelligent vehicle that can detect and follow a predefined track.

Functionality

  • Line Detection: The car is equipped with infrared sensors to detect the track, which can be any color or pattern.
  • Line Following: The car can follow the detected track, adjusting its speed and direction accordingly.
  • Obstacle Avoidance: The car can detect obstacles on the track and adjust its route to avoid them.
  • Programmability: The kit allows users to program the car's behavior using a microcontroller, enabling customization of its actions and responses.
The DIY D2-5 Intelligent Tracking Line Car Kit is a self-contained system that enables users to build a line-tracking car capable of

Hardware Components

  • Main Board: A compact, feature-rich PCB that integrates the microcontroller, motor drivers, and sensor interfaces.
  • Microcontroller: A programmable MCU (e.g., Arduino-compatible) that controls the car's behavior and interactions.
  • Motor Drivers: Dual H-bridge motor drivers for controlling the car's two DC motors.
  • Infrared Sensors: Five infrared sensors for detecting the track, including four edge sensors and one center sensor.
  • Buzzer: A built-in buzzer for providing audible feedback.
  • Power Supply: A rechargeable Li-ion battery and a USB charging interface.

Mechanical Components

  • Chassis: A sturdy, laser-cut acrylic chassis with a compact design.
  • Motor Mounts: Two motor mounts for attaching the DC motors.
  • Wheels: Four rubber wheels for smooth movement.
  • Track Sensors: Five track sensors with adjustable heights for accurate line detection.

Software Features

  • Programmable: The kit is compatible with popular programming languages, such as C, C++, and Python.
  • Open-Source Code: Sample code and libraries are provided for users to customize and extend the car's functionality.
  • Debugger: A built-in debugger for troubleshooting and refining the car's performance.

Additional Features

  • Expansion Headers: Accessible headers for connecting additional peripherals, such as Wi-Fi or Bluetooth modules.
  • Learning Resources: A comprehensive manual, tutorial videos, and online support resources are available for users to learn and improve their skills.

Operating Voltage

5V

Motor Voltage

3V-6V

Power Consumption

<100mA (idle), <500mA (active)

Dimensions

150mm x 100mm x 50mm (L x W x H)

Weight

Approximately 200g

The DIY D2-5 Intelligent Tracking Line Car Kit provides an engaging and educational experience for users to explore the world of robotics, programming, and electronics. With its comprehensive features and accessible design, this kit is an excellent choice for beginners, students, and hobbyists looking to develop their skills and create innovative projects.

Pin Configuration

  • DIY D2-5 Intelligent Tracking Line Car Kit Pinouts and Connection Guide
  • The DIY D2-5 Intelligent Tracking Line Car Kit is a popular IoT-based robotic kit that allows users to build and program an intelligent line-tracking car. The kit consists of various components, including sensors, motors, and a microcontroller. To help you get started with your project, this documentation provides a detailed explanation of the pins on the kit's main components and guides you through the connection process.
  • Microcontroller Pinouts:
  • The microcontroller used in this kit is typically a variant of the Arduino board. The pinouts are as follows:
  • Digital Pins:
  • + D0 (RX): Serial Communication Receive Pin
  • + D1 (TX): Serial Communication Transmit Pin
  • + D2: Motor Driver Enable Pin (Connected to Motor Driver IC)
  • + D3: Right Motor Forward Pin (Connected to Motor Driver IC)
  • + D4: Right Motor Backward Pin (Connected to Motor Driver IC)
  • + D5: Left Motor Forward Pin (Connected to Motor Driver IC)
  • + D6: Left Motor Backward Pin (Connected to Motor Driver IC)
  • + D7: IR Sensor VCC Pin (Connected to IR Sensors)
  • + D8: IR Sensor GND Pin (Connected to IR Sensors)
  • + D9: IR Sensor Signal Pin (Connected to IR Sensors)
  • + D10: Buzzer Pin (Connected to Buzzer Module)
  • + D11: LED Pin (Connected to LED Module)
  • + D12: Reserved Pin (Not Used in this Kit)
  • + D13: Reserved Pin (Not Used in this Kit)
  • Analog Pins:
  • + A0: Analog Input for Line Tracking Sensor (Connected to Line Tracking Sensor Module)
  • + A1: Analog Input for Battery Voltage Monitoring (Connected to Battery Voltage Monitoring Module)
  • + A2: Analog Input for Reserved Pin (Not Used in this Kit)
  • + A3: Analog Input for Reserved Pin (Not Used in this Kit)
  • + A4: SCL (I2C Clock) Pin (Not Used in this Kit)
  • + A5: SDA (I2C Data) Pin (Not Used in this Kit)
  • Motor Driver IC Pinouts:
  • The motor driver IC used in this kit is typically a variant of the L298N or DRV8833. The pinouts are as follows:
  • ENA (Enable Pin): Connected to D2 (Motor Driver Enable Pin) on the Microcontroller
  • IN1 (Right Motor Forward Pin): Connected to D3 (Right Motor Forward Pin) on the Microcontroller
  • IN2 (Right Motor Backward Pin): Connected to D4 (Right Motor Backward Pin) on the Microcontroller
  • IN3 (Left Motor Forward Pin): Connected to D5 (Left Motor Forward Pin) on the Microcontroller
  • IN4 (Left Motor Backward Pin): Connected to D6 (Left Motor Backward Pin) on the Microcontroller
  • VCC (Power Supply Pin): Connected to the Battery or Power Source
  • GND (Ground Pin): Connected to the Battery or Power Source Ground
  • IR Sensor Module Pinouts:
  • The IR sensor module used in this kit is typically a variant of the VL53L0X or GP2Y0A21. The pinouts are as follows:
  • VCC (Power Supply Pin): Connected to D7 (IR Sensor VCC Pin) on the Microcontroller
  • GND (Ground Pin): Connected to D8 (IR Sensor GND Pin) on the Microcontroller
  • OUT (Signal Pin): Connected to D9 (IR Sensor Signal Pin) on the Microcontroller
  • Line Tracking Sensor Module Pinouts:
  • The line tracking sensor module used in this kit is typically a variant of the TCRT5000 or OPB704. The pinouts are as follows:
  • VCC (Power Supply Pin): Connected to the Battery or Power Source
  • GND (Ground Pin): Connected to the Battery or Power Source Ground
  • OUT (Signal Pin): Connected to A0 (Analog Input for Line Tracking Sensor) on the Microcontroller
  • Buzzer Module Pinouts:
  • The buzzer module used in this kit is typically a simple passive buzzer. The pinouts are as follows:
  • VCC (Power Supply Pin): Connected to D10 (Buzzer Pin) on the Microcontroller
  • GND (Ground Pin): Connected to the Battery or Power Source Ground
  • LED Module Pinouts:
  • The LED module used in this kit is typically a simple LED with a built-in resistor. The pinouts are as follows:
  • VCC (Power Supply Pin): Connected to D11 (LED Pin) on the Microcontroller
  • GND (Ground Pin): Connected to the Battery or Power Source Ground
  • Connection Guide:
  • To connect the components, follow these steps:
  • 1. Connect the motor driver IC to the microcontroller:
  • ENA (Enable Pin) to D2 on the microcontroller
  • IN1 (Right Motor Forward Pin) to D3 on the microcontroller
  • IN2 (Right Motor Backward Pin) to D4 on the microcontroller
  • IN3 (Left Motor Forward Pin) to D5 on the microcontroller
  • IN4 (Left Motor Backward Pin) to D6 on the microcontroller
  • VCC (Power Supply Pin) to the battery or power source
  • GND (Ground Pin) to the battery or power source ground
  • 2. Connect the IR sensor module to the microcontroller:
  • VCC (Power Supply Pin) to D7 on the microcontroller
  • GND (Ground Pin) to D8 on the microcontroller
  • OUT (Signal Pin) to D9 on the microcontroller
  • 3. Connect the line tracking sensor module to the microcontroller:
  • VCC (Power Supply Pin) to the battery or power source
  • GND (Ground Pin) to the battery or power source ground
  • OUT (Signal Pin) to A0 on the microcontroller
  • 4. Connect the buzzer module to the microcontroller:
  • VCC (Power Supply Pin) to D10 on the microcontroller
  • GND (Ground Pin) to the battery or power source ground
  • 5. Connect the LED module to the microcontroller:
  • VCC (Power Supply Pin) to D11 on the microcontroller
  • GND (Ground Pin) to the battery or power source ground
  • Important Note:
  • Please ensure that you double-check the pinouts and connections before powering on your DIY D2-5 Intelligent Tracking Line Car Kit. Incorrect connections can damage the components or cause the kit to malfunction. Always refer to the official documentation and datasheets for the specific components used in your kit.

Code Examples

DIY D2-5 Intelligent Tracking Line Car Kit Documentation
Overview
The DIY D2-5 Intelligent Tracking Line Car Kit is an innovative IoT component designed for robotics and automation enthusiasts. This kit allows users to create an intelligent line-tracking car that can detect and follow a black line on a white background. The kit includes a microcontroller, infrared sensors, motors, and a chassis, making it an ideal project for students, hobbyists, and professionals.
Components
Microcontroller (Arduino-compatible)
 5x Infrared sensors
 2x DC motors
 Chassis
 Power supply
 Jumper wires
Technical Specifications
Microcontroller: 8-bit, 16 MHz
 Infrared sensors: 5x, with 3mm sensing range
 DC motors: 2x, 6V, 100RPM
 Chassis: Plastic, 15cm x 10cm
 Power supply: 4x AA batteries or USB cable
Code Examples
### Example 1: Basic Line Tracking
This example demonstrates how to use the DIY D2-5 Intelligent Tracking Line Car Kit to create a basic line-tracking car. The car will move forward when it detects a black line and stop when it loses the line.
```c
const int leftMotorForward = 2;
const int leftMotorBackward = 4;
const int rightMotorForward = 7;
const int rightMotorBackward = 8;
const int sensorPins[] = {A0, A1, A2, A3, A4};
void setup() {
  // Initialize motor pins as output
  pinMode(leftMotorForward, OUTPUT);
  pinMode(leftMotorBackward, OUTPUT);
  pinMode(rightMotorForward, OUTPUT);
  pinMode(rightMotorBackward, OUTPUT);
}
void loop() {
  // Read sensor values
  int sensorValues[5];
  for (int i = 0; i < 5; i++) {
    sensorValues[i] = digitalRead(sensorPins[i]);
  }
// Determine line position
  int linePosition = 0;
  for (int i = 0; i < 5; i++) {
    if (sensorValues[i] == 0) {
      linePosition += i;
    }
  }
// Move the car based on line position
  if (linePosition < 2) {
    // Turn left
    digitalWrite(leftMotorForward, HIGH);
    digitalWrite(rightMotorForward, LOW);
  } else if (linePosition > 2) {
    // Turn right
    digitalWrite(leftMotorForward, LOW);
    digitalWrite(rightMotorForward, HIGH);
  } else {
    // Move forward
    digitalWrite(leftMotorForward, HIGH);
    digitalWrite(rightMotorForward, HIGH);
  }
  delay(50);
}
```
### Example 2: Advanced Line Tracking with Speed Control
This example demonstrates how to use the DIY D2-5 Intelligent Tracking Line Car Kit to create an advanced line-tracking car with speed control. The car will adjust its speed based on the line position and curvature.
```c
const int leftMotorForward = 2;
const int leftMotorBackward = 4;
const int rightMotorForward = 7;
const int rightMotorBackward = 8;
const int sensorPins[] = {A0, A1, A2, A3, A4};
const int speedPins[] = {3, 5}; // PWM pins for motor speed control
void setup() {
  // Initialize motor pins as output
  pinMode(leftMotorForward, OUTPUT);
  pinMode(leftMotorBackward, OUTPUT);
  pinMode(rightMotorForward, OUTPUT);
  pinMode(rightMotorBackward, OUTPUT);
  pinMode(speedPins[0], OUTPUT);
  pinMode(speedPins[1], OUTPUT);
}
void loop() {
  // Read sensor values
  int sensorValues[5];
  for (int i = 0; i < 5; i++) {
    sensorValues[i] = digitalRead(sensorPins[i]);
  }
// Determine line position and curvature
  int linePosition = 0;
  int lineCurvature = 0;
  for (int i = 0; i < 5; i++) {
    if (sensorValues[i] == 0) {
      linePosition += i;
      lineCurvature += (i - 2)  (i - 2);
    }
  }
// Calculate motor speeds based on line position and curvature
  int leftSpeed = 128 + lineCurvature;
  int rightSpeed = 128 - lineCurvature;
// Limit speeds to 0-255 range
  leftSpeed = constrain(leftSpeed, 0, 255);
  rightSpeed = constrain(rightSpeed, 0, 255);
// Set motor speeds using PWM
  analogWrite(speedPins[0], leftSpeed);
  analogWrite(speedPins[1], rightSpeed);
// Move the car based on line position
  if (linePosition < 2) {
    // Turn left
    digitalWrite(leftMotorForward, HIGH);
    digitalWrite(rightMotorForward, LOW);
  } else if (linePosition > 2) {
    // Turn right
    digitalWrite(leftMotorForward, LOW);
    digitalWrite(rightMotorForward, HIGH);
  } else {
    // Move forward
    digitalWrite(leftMotorForward, HIGH);
    digitalWrite(rightMotorForward, HIGH);
  }
  delay(50);
}
```
Note: These examples are for illustrative purposes only and may require modifications to work with your specific project setup.