Stufin
Home Quick Cart Profile

DIY 2WD Mini Round Robot Car

Buy Now

Component Name

DIY 2WD Mini Round Robot Car

Overview

The DIY 2WD Mini Round Robot Car is a compact and versatile robot platform designed for hobbyists, students, and developers to explore the world of robotics and IoT. This miniature robot car is a cost-effective and easy-to-assemble kit that provides a comprehensive introduction to robotics, programming, and IoT integration.

Functionality

  • Obstacle Avoidance: Equipped with infrared sensors, the robot can detect and navigate around obstacles in its path.
  • Line Following: Using a built-in line tracking module, the robot can follow a predetermined path or line.
  • Remote Control: Operate the robot using a remote control or a mobile app via Bluetooth connectivity.
  • Sensor Integration: Integrate various sensors, such as ultrasonic, infrared, and photodiode, to enhance the robot's functionality and autonomy.
The DIY 2WD Mini Round Robot Car is a remotely controlled robot that can be programmed to perform various tasks, such as

Key Features

  • Compact Design: The robot's small size ( diameter: 9.5 cm, height: 5.5 cm) allows it to navigate through narrow spaces and make sharp turns.
  • 2-Wheel Drive (2WD): The robot features two independent DC motors, enabling it to move forward, backward, and turn with precision.
  • Microcontroller Compatibility: Supports a range of microcontrollers, including Arduino, Raspberry Pi, and ESP32/ESP8266.
  • Modular Design: The robot's modular design allows users to easily add or remove components, such as sensors, motors, and batteries, for customization and experimentation.
  • Battery Life: Rechargeable 3.7V 500mAh lithium-ion battery provides approximately 2-3 hours of continuous operation.
  • Communication: Supports Bluetooth 4.0 and Wi-Fi connectivity for wireless communication and control.
  • Open-Source: The robot's hardware and software are based on open-source platforms, encouraging users to modify, contribute, and share their projects.
  • Extensive Documentation: Comprehensive documentation and tutorials are provided to help users get started with assembly, programming, and customization.

Technical Specifications

| Component | Specification |

| --- | --- |

| Microcontroller | Arduino, Raspberry Pi, ESP32/ESP8266 compatible |

| Motor | 2x DC Motors (6V, 100RPM) |

| Sensors | Infrared sensors (obstacle avoidance), line tracking module |

| Communication | Bluetooth 4.0, Wi-Fi |

| Power Supply | Rechargeable 3.7V 500mAh lithium-ion battery |

| Dimensions | Diameter9.5 cm, Height: 5.5 cm |

| Weight | Approximately 250g |

| Material | Acrylic, ABS plastic |

Target Audience

  • Hobbyists: Explore robotics and IoT without breaking the bank.
  • Students: Learn programming, electronics, and robotics concepts in a hands-on environment.
  • Developers: Prototype and test IoT projects with a cost-effective and versatile platform.
  • Educators: Teach robotics, programming, and STEM concepts using a engaging and interactive tool.
The DIY 2WD Mini Round Robot Car is ideal for

Pin Configuration

  • DIY 2WD Mini Round Robot Car Component Documentation
  • Pin Description
  • The DIY 2WD Mini Round Robot Car is a versatile and compact IoT component designed for robotics and automation projects. It features a range of pins that enable users to connect various sensors, actuators, and other devices to create complex robot systems. Below is a comprehensive description of each pin on the robot car:
  • Motor Driver Pins
  • 1. M1+ (Motor 1 Positive): Connects to the positive terminal of the left motor.
  • Pin Function: Supplies power to the left motor.
  • Pin Type: Output
  • 2. M1- (Motor 1 Negative): Connects to the negative terminal of the left motor.
  • Pin Function: Supplies ground to the left motor.
  • Pin Type: Output
  • 3. M2+ (Motor 2 Positive): Connects to the positive terminal of the right motor.
  • Pin Function: Supplies power to the right motor.
  • Pin Type: Output
  • 4. M2- (Motor 2 Negative): Connects to the negative terminal of the right motor.
  • Pin Function: Supplies ground to the right motor.
  • Pin Type: Output
  • Microcontroller Pins
  • 1. VCC (Power): Supplies power to the microcontroller.
  • Pin Function: Power input for the microcontroller.
  • Pin Type: Input
  • 2. GND (Ground): Provides a ground reference for the microcontroller.
  • Pin Function: Ground reference for the microcontroller.
  • Pin Type: Input
  • 3. TX (Transmit): Serial communication transmit pin.
  • Pin Function: Sends serial data from the microcontroller.
  • Pin Type: Output
  • 4. RX (Receive): Serial communication receive pin.
  • Pin Function: Receives serial data into the microcontroller.
  • Pin Type: Input
  • 5. SCL (Serial Clock): I2C clock pin for the microcontroller.
  • Pin Function: Provides the clock signal for I2C communication.
  • Pin Type: Output
  • 6. SDA (Serial Data): I2C data pin for the microcontroller.
  • Pin Function: Transfers data for I2C communication.
  • Pin Type: Bi-Directional
  • Sensor and Peripheral Pins
  • 1. TRIG (Ultrasonic Trigger): Trigger pin for the ultrasonic sensor.
  • Pin Function: Triggers the ultrasonic sensor to send a pulse.
  • Pin Type: Output
  • 2. ECHO (Ultrasonic Echo): Echo pin for the ultrasonic sensor.
  • Pin Function: Receives the echo signal from the ultrasonic sensor.
  • Pin Type: Input
  • 3. V1-V5 (Analog Input): Analog input pins for connecting various sensors (e.g., line followers, infrared sensors).
  • Pin Function: Reads analog values from connected sensors.
  • Pin Type: Input
  • 4. D1-D5 (Digital Input/Output): Digital input/output pins for connecting various devices (e.g., LEDs, buttons).
  • Pin Function: Can be used as either digital inputs or outputs.
  • Pin Type: Bi-Directional
  • Power Pins
  • 1. VIN (Vin): External power input pin for the robot car.
  • Pin Function: Supplies power to the robot car.
  • Pin Type: Input
  • 2. 3V3 (3.3V): Regulated 3.3V power output pin.
  • Pin Function: Provides a stable 3.3V power source for external devices.
  • Pin Type: Output
  • 3. 5V (5V): Regulated 5V power output pin.
  • Pin Function: Provides a stable 5V power source for external devices.
  • Pin Type: Output
  • Additional Pins
  • 1. BAT (Battery): Connects to the battery for powering the robot car.
  • Pin Function: Supplies power to the robot car.
  • Pin Type: Input
  • 2. CHG (Charging): Connects to an external battery charger.
  • Pin Function: Enables charging of the battery.
  • Pin Type: Input
  • Pin Connection Structure
  • When connecting pins, follow these guidelines:
  • 1. Use jumper wires or breadboard-friendly connectors to connect pins to external devices, sensors, or peripherals.
  • 2. Ensure correct polarity when connecting power sources, motors, and other devices.
  • 3. Use the microcontroller's pinout diagram to identify the correct pin assignments for serial communication, I2C communication, and other interfaces.
  • 4. Consult the datasheet or documentation for each connected device to ensure correct pin connections and voltage levels.
  • 5. Avoid connecting pins with conflicting functions (e.g., do not connect a digital output pin to an analog input pin).
  • By following these guidelines and understanding the pin functions and types, you can successfully integrate the DIY 2WD Mini Round Robot Car into your IoT projects and applications.

Code Examples

DIY 2WD Mini Round Robot Car Component Documentation
Overview
The DIY 2WD Mini Round Robot Car is a compact and versatile IoT component designed for robotics enthusiasts and developers. This robot car features two-wheel drive, enabling it to move in various directions with ease. The component is equipped with an Arduino-compatible microcontroller, making it compatible with a wide range of programming languages and libraries.
Technical Specifications
Microcontroller: Arduino-compatible
 Motor Type: 2 x DC Motors
 Motor Speed: 60-120 RPM
 Power Supply: 4 x AA Batteries (not included)
 Communication Protocol: Serial (UART)
 Dimensions: 12 cm x 10 cm x 5 cm
Hardware Components
2 x DC Motors
 1 x Arduino-compatible microcontroller
 1 x Motor Driver (L298N)
 1 x Power Supply (4 x AA Battery Holder)
 1 x Chassis (Acrylic or ABS)
Software Support
The DIY 2WD Mini Round Robot Car is compatible with various programming languages, including C, C++, Python, and Java. The component is also compatible with popular robotics libraries and frameworks, such as Arduino IDE and Robot Operating System (ROS).
Code Examples
### Example 1: Basic Motor Control using Arduino IDE
In this example, we will demonstrate how to control the motor speeds using the Arduino IDE.
```c
const int leftMotorForward = 2;  // Pin 2: Left Motor Forward
const int leftMotorBackward = 3;  // Pin 3: Left Motor Backward
const int rightMotorForward = 4;  // Pin 4: Right Motor Forward
const int rightMotorBackward = 5;  // Pin 5: Right Motor Backward
void setup() {
  pinMode(leftMotorForward, OUTPUT);
  pinMode(leftMotorBackward, OUTPUT);
  pinMode(rightMotorForward, OUTPUT);
  pinMode(rightMotorBackward, OUTPUT);
}
void loop() {
  // Move forward
  digitalWrite(leftMotorForward, HIGH);
  digitalWrite(rightMotorForward, HIGH);
  delay(1000);
  
  // Move backward
  digitalWrite(leftMotorBackward, HIGH);
  digitalWrite(rightMotorBackward, HIGH);
  delay(1000);
  
  // Stop
  digitalWrite(leftMotorForward, LOW);
  digitalWrite(rightMotorForward, LOW);
  digitalWrite(leftMotorBackward, LOW);
  digitalWrite(rightMotorBackward, LOW);
  delay(1000);
}
```
### Example 2: Line Follower using Python and OpenCV
In this example, we will demonstrate how to use the DIY 2WD Mini Round Robot Car as a line follower using Python and OpenCV.
```python
import cv2
import serial
# Initialize the serial connection
ser = serial.Serial('COM3', 9600)  # Replace 'COM3' with your serial port
# Initialize the OpenCV camera
cap = cv2.VideoCapture(0)
while True:
    ret, frame = cap.read()
    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
    _, thresh = cv2.threshold(gray, 50, 255, cv2.THRESH_BINARY)
    contours, _ = cv2.findContours(thresh, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
    
    for contour in contours:
        area = cv2.contourArea(contour)
        x, y, w, h = cv2.boundingRect(contour)
        
        # Calculate the center of the contour
        M = cv2.moments(contour)
        cx = int(M['m10'] / M['m00'])
        cy = int(M['m01'] / M['m00'])
        
        # Send motor control signals based on the contour position
        if cx < 320:
            ser.write(b'left
')  # Turn left
        elif cx > 320:
            ser.write(b'right
')  # Turn right
        else:
            ser.write(b'forward
')  # Move forward
    
    cv2.imshow('Frame', frame)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
cap.release()
cv2.destroyAllWindows()
ser.close()
```
These code examples demonstrate the versatility of the DIY 2WD Mini Round Robot Car component and its potential applications in robotics and IoT projects.