Showing posts with label Arduino. Show all posts
Showing posts with label Arduino. Show all posts

Friday, July 17, 2026

DIY Cooling Box Using Arduino and TEC1-12706 Peltier Module

Looking for an interesting Arduino project? In this project, we built a DIY Cooling Box using an Arduino Uno and TEC1-12706 Peltier module. The system monitors the temperature inside the box and controls the cooling system while displaying the current temperature on a 16x2 LCD. During testing, the temperature dropped from approximately 34°C to 30°C within several minutes.

Building a DIY Arduino-Powered Cooling Box

How the Cooling Box Works

The main cooling component is the TEC1-12706 Peltier module. When powered, one side becomes cold while the other side becomes hot. The cold side faces inside the cooling box, while the hot side transfers heat to a heatsink and cooling fan.

The Arduino Uno acts as the main controller. A DHT11 sensor measures the temperature inside the box, while a 16x2 LCD with I2C displays the current temperature and cooling status. A 2-channel relay module is used to switch the cooling system.


Components Used

Components Required for the DIY Cooling Box

The components used for this project include an Arduino Uno R3, 2-channel relay module, TEC1-12706 Peltier module, 12V DC cooling fan with heatsink, 16x2 LCD I2C display, DHT11 sensor, breadboard, DC barrel jack adapter, jumper wires, 12V power supply, and thermal paste.

Wiring and Arduino Programming

Connecting the Components According to the Wiring Diagram

Before installing the components inside the box, we connected everything according to the wiring diagram. Carefully checking the wiring before applying power helps prevent incorrect connections and makes troubleshooting easier.

Uploading the Arduino Code

Next, the Arduino program was uploaded to the Arduino Uno. The program reads the temperature from the DHT11 sensor, displays the information on the LCD, and controls the cooling system. Click HERE to download.


Mock Testing

Testing the Circuit Before Final Installation

Before installing everything into the cooling box, we performed a mock test. We checked that the LCD displayed correctly and that the relay, cooling fan, Peltier module, and temperature sensor were operating properly.


Installing the Cooling Fan and Heatsink

Preparing the Box for the Cooling System

An opening was made in the cooling box to install the cooling fan and heatsink. Proper positioning of the heatsink and fan is important to effectively remove heat generated by the Peltier module.


Installing the Peltier Module

Installing the TEC1-12706 Peltier Module

A thin layer of thermal paste was applied between the TEC1-12706 Peltier module and the heatsink to improve heat transfer. The hot side faces the heatsink, while the cold side faces inside the cooling box.


Installing the LCD Display

Mounting the 16x2 LCD I2C Display

The 16x2 LCD I2C display was mounted on the outside of the cooling box using double-sided tape. This allows the temperature and cooling status to be monitored without opening the box.


Installing the DHT11 Sensor

Placing the DHT11 Sensor Inside the Cooling Box

The DHT11 temperature and humidity sensor was placed inside the box to monitor the internal temperature. Its readings are sent to the Arduino and displayed on the LCD.


Final Wiring

Reconnecting and Organizing All Components

After installing the components, everything was reconnected according to the wiring diagram. The wires were arranged neatly to keep the project organized and make future maintenance easier.


Testing the Cooling Box

Powering Up the Completed Cooling Box

After completing the assembly, the system was powered on. We checked that the LCD turned on, the cooling fan was running, and the cooling system was operating correctly.

Temperature Drops from 34°C to 30°C

During our cooling test, the LCD showed the temperature gradually decreasing from approximately 34°C to 30°C within several minutes. Actual performance may vary depending on the box insulation, ambient temperature, heatsink, airflow, and power supply.


Conclusion

This DIY cooling box is a great project for learning about Arduino programming, thermoelectric cooling, temperature monitoring, sensors, and relay control. The design can be further improved with better insulation, a larger heatsink, improved airflow, or a more accurate temperature sensor.

Project Contributor: Nasiruddin Bin Nadzrin
Intern, Universiti Teknikal Malaysia Melaka (UTeM)

Friday, June 5, 2026

TCRT5000 3 Channel Line Tracker Sensor Module with Arduino Uno

The TCRT5000 3 Channel Line Tracker Sensor Module is widely used in robotics and automation projects for detecting lines and distinguishing between black and white surfaces. It uses infrared (IR) reflective sensors to measure the amount of reflected light from a surface.

TCRT5000 3-channel line tracker sensor module used with Arduino Uno.

In this project, we will interface a TCRT5000 3-channel module with an Arduino Uno and observe how the sensor responds to black and white surfaces using the Arduino Serial Monitor.


What is the TCRT5000 Line Tracker Sensor?

The TCRT5000 is an infrared reflective sensor consisting of an IR LED transmitter and a phototransistor receiver. When infrared light is emitted, the amount of reflected light depends on the surface color.

  • White surfaces reflect more infrared light.
  • Black surfaces absorb more infrared light.
Line detection principle based on reflected infrared light.

This principle allows the sensor to detect lines and is commonly used in line-following robots.


Components Required

Components needed for the TCRT5000 Arduino project.
  • Arduino Uno
  • TCRT5000 3 Channel Line Tracker Module
  • Dupont Jumper Wires
  • USB Cable
  • Cardboard
  • Black Electrical Tape

Wiring Connections

Wiring diagram between the TCRT5000 module and Arduino Uno.
  • VCC → 5V
  • GND → GND
  • L → A0
  • C → A1
  • R → A2

Arduino Code

Arduino sketch for reading three TCRT5000 sensor channels.
Upload the following code to the Arduino Uno. You can download coding click HERE.
int L = A0;
int C = A1;
int R = A2;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int valL = analogRead(L);
  int valC = analogRead(C);
  int valR = analogRead(R);

  Serial.print("L: ");
  Serial.print(valL);

  Serial.print(" C: ");
  Serial.print(valC);

  Serial.print(" R: ");
  Serial.println(valR);

  delay(300);
}


How the Code Works

The program continuously reads the analog values from the three sensor channels.

  • Left sensor connected to A0
  • Center sensor connected to A1
  • Right sensor connected to A2

The sensor readings are displayed in the Arduino Serial Monitor every 300 milliseconds.


Sensor Testing

To test the module:

  1. Place the sensor above a white cardboard surface.
  2. Observe the indicator LEDs on the module.
  3. Move the sensor above the black tape line.
  4. Compare the readings shown on the Serial Monitor.

White Surface

Sensor positioned above a white reflective surface.

When the sensor is positioned above the white cardboard:
  • The infrared light is strongly reflected.
  • Indicator LEDs turn ON.
  • Higher sensor readings are observed.

Black Surface

Sensor positioned above a black non-reflective surface.

When the sensor is positioned above the black tape:

  • Less infrared light is reflected.
  • Indicator LEDs turn OFF.
  • Sensor readings change significantly.

This difference allows robots to detect and follow a black line on a white background.


Adjusting Sensor Sensitivity

Sensitivity adjustment using the onboard potentiometer.
The blue potentiometer on the module allows sensitivity adjustment.
  • Turn clockwise to increase sensitivity.
  • Turn counterclockwise to decrease sensitivity.

Adjust the potentiometer until the sensor can clearly distinguish between the black tape and white cardboard.


Applications

  • Line Following Robots
  • Automated Guided Vehicles (AGV)
  • Obstacle Detection Systems
  • Surface Color Detection
  • Industrial Automation Projects
  • Educational Robotics Projects


Conclusion


The TCRT5000 3 Channel Line Tracker Sensor Module is an inexpensive and effective sensor for line detection applications. By interfacing it with an Arduino Uno, we can easily monitor sensor readings and detect the difference between black and white surfaces.

This project demonstrates the basic operation of the sensor and provides a foundation for building line-following robots and automation systems.

Sunday, May 17, 2026

Beginner Guide to Using LCD 1602 I2C with Arduino UNO

LCD 1602 I2C is one of the most popular display modules used in Arduino projects. It is simple to use, requires only 4 wires, and can display text clearly for various electronics projects such as temperature monitors, counters, sensors, and automation systems.

Easy LCD Display Module for Arduino Projects.

In this tutorial, we will learn how to connect and use the LCD 1602 I2C display with Arduino UNO.


What is LCD 1602 I2C?

The LCD 1602 I2C is a 16x2 character display module with an I2C interface adapter attached at the back. Compared to a normal LCD 1602, the I2C version uses fewer Arduino pins, making wiring much easier and cleaner.

The display can show:

  • 16 characters per row
  • 2 rows of text
  • Letters, numbers, and symbols

It is suitable for beginners and advanced Arduino users.


LCD 1602 I2C Specifications

LCD 1602 I2C Technical Specifications.
Here are the basic specifications of the LCD module:
  • Display Type: Character LCD
  • Display Format: 16x2
  • Interface: I2C Communication
  • Operating Voltage: 5V DC
  • Adjustable Contrast
  • Only 4 Wires Required

The module usually comes in Blue or Yellow-Green backlight versions.


Components Required

Components Needed for This Project.
For this project, we need:
  • Arduino UNO R3
  • LCD 1602 I2C Module
  • Jumper Wires
  • Breadboard
  • USB Cable

Wiring Diagram

LCD 1602 I2C Wiring Connection.

Connect the LCD 1602 I2C to Arduino UNO using the following connections:

LCD I2C → Arduino UNO
VCC → 5V
GND → GND
SDA → A4
SCL → A5

The I2C interface allows communication using only SDA and SCL pins.


Actual Wiring Connection

Actual Hardware Wiring Setup.

After checking the wiring diagram, connect all components using jumper wires.

Make sure:

  • Wires are connected securely
  • VCC and GND are not reversed
  • SDA and SCL are connected correctly

Incorrect wiring may cause the LCD not to display any text.


Check LCD Address Using I2C Scanner

Check LCD I2C Address First.
Before uploading the LCD code, it is important to check the I2C address of the module.

Most LCD 1602 I2C modules use:

  • 0x27
  • 0x3F

Upload the I2C Scanner code to Arduino and open the Serial Monitor to detect the correct address.

If the address is different, change it inside the LCD code.


LCD 1602 I2C Arduino Code

Upload LCD Arduino Code.

After confirming the I2C address, upload the LCD display code using Arduino IDE. You can download HERE.

This example will display scrolling text:
“Welcome To MCE :)”

The code uses:

  • Wire.h library
  • LiquidCrystal_I2C library

The text will continuously move across the LCD display.


Adjust LCD Contrast

Adjust LCD Contrast Potentiometer.
If the display is blank or difficult to see, adjust the blue potentiometer at the back of the LCD module.

Rotate:

  • Clockwise
  • Counter clockwise

until the characters become visible clearly.


Final Result

Final LCD Display Output.

Once everything is connected correctly and the code is uploaded successfully, the LCD will display:

Welcome To MCE :)

You should now see the scrolling text running smoothly on the LCD display.


📦 Where to Buy

Shopee:
Lazada:
Aliexpress:


Conclusion


Using LCD 1602 I2C with Arduino UNO is simple and beginner-friendly. Since it only requires 4 wires, it helps reduce complicated wiring and saves Arduino pins for other sensors and modules. We hope this tutorial helps you start using LCD 1602 I2C in your own Arduino projects.

Friday, May 15, 2026

How to Use 0–25V Voltage Sensor Module with Arduino UNO

In this tutorial, we will learn how to use the 0–25V DC Voltage Sensor Module with Arduino UNO. This sensor module allows Arduino to measure higher DC voltages safely through the analog input pin. It is commonly used for battery monitoring, solar projects, power supply measurement, and other DIY electronics applications.

Learning how to measure DC voltage using the 0–25V Voltage Sensor Module with Arduino UNO.


What is a Voltage Sensor Module?

The 0–25V Voltage Sensor Module is a simple voltage divider circuit that reduces higher DC voltages into a safe analog voltage readable by Arduino.

Since Arduino UNO analog pins can only read up to 5V, this module scales down the input voltage before sending it to the microcontroller.

For example:

  • 25V input becomes approximately 5V output to Arduino analog pin.

Sensor Specifications

Technical specifications of the 0–25V DC Voltage Sensor Module.


Components Required

Components used in this Arduino voltage monitoring tutorial.

For this project, we need:

  • VS-25 Voltage Sensor Module
  • Arduino UNO
  • Breadboard
  • Jumper Wires
  • Adjustable DC Power Supply
  • USB Cable
  • Multimeter

Wiring Connection

Wiring connection between the Voltage Sensor Module and Arduino UNO.
  • Connect the S pin to A0
  • Connect the negative pin to GND
  • Connect the positive pin to the 5V pin on the Arduino UNO
  • Connect the adjustable power supply to the voltage input terminal of the sensor module

Arduino Code

Click HERE to download code. Upload the following code to Arduino UNO:

int sensorPin = A0;
float voltage = 0;

void setup() {
  Serial.begin(9600);
}

void loop() {

  int value = analogRead(sensorPin);

  // Formula calculate actual voltage
  voltage = value * (25.0 / 1023.0);

  Serial.print("Voltage: ");
  Serial.println(voltage);

  delay(1000);

}

Testing the Voltage Sensor

Testing the voltage sensor module using adjustable power supply and multimeter.

After uploading the code:
  1. Open the Arduino Serial Monitor.
  2. Turn on the adjustable power supply.
  3. Adjust the voltage to approximately 19.83V.
  4. Observe the reading on the Serial Monitor.

During testing, the Arduino reading may show a slightly different value compared to the multimeter reading.

Serial Monitor and multimeter voltage comparison during testing.

This small difference is normal because the voltage sensor module is not a high-precision measurement device. However, the result is still close enough and suitable for most hobby and DIY electronics projects.


Applications

This voltage sensor module can be used for:

  • Battery Voltage Monitoring
  • Solar Power Projects
  • DC Power Supply Monitoring
  • Automotive Voltage Detection
  • DIY Electronics Projects
  • IoT Voltage Monitoring Systems


Conclusion


The 0–25V Voltage Sensor Module is a simple and affordable way to measure DC voltage using Arduino UNO. It is beginner-friendly, easy to connect, and useful for many electronics projects. Although it is not highly accurate like professional measuring equipment, it performs well enough for learning and DIY applications. 

Thank you for reading this tutorial. Don’t forget to like, share, and subscribe for more Arduino and electronics projects.

Friday, May 1, 2026

SR04M-2 Ultrasonic Sensor with Arduino (Complete Beginner Tutorial)

Measuring distance using Arduino is one of the most useful beginner projects. In this tutorial, you’ll learn how to use the SR04M-2 ultrasonic sensor to measure distance accurately for real-world applications. The SR04M-2 is a waterproof ultrasonic sensor that measures distance by sending sound waves and receiving the echo.

A step-by-step guide to measure distance using a waterproof ultrasonic sensor and Arduino.

⚙️ Key Features

  • Waterproof probe
  • Range: 20cm to 400cm
  • Operating voltage: 5V
  • Stable and accurate readings

🔌 Wiring Diagram & Connections

How to connect the sensor to Arduino.

  • 5V → 5V
  • GND → GND
  • RX → Pin 3
  • TX → Pin 2


  • 💻 Arduino Code

    Program to read and display distance.

    Install the NewPing library before uploading the code. Click HERE to download code.


    📥 Library Installation

    1. Open Arduino IDE
    2. Go to Sketch → Include Library → Manage Libraries
    3. Search “NewPing”
    4. Click Install

    📜 Code

    #include <newping.h>
    
    #define TRIGGER_PIN  3 
    #define ECHO_PIN     2  
    #define MAX_DISTANCE 400 
    NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); 
    
    float tempval1;
    float tempval2 = 60;
    int finalval;
    unsigned long lastPingTime = 0;
    unsigned long pingInterval = 50;
    
    void setup() {
      Serial.begin(57600);
    }
    
    void loop() {
      unsigned long currentTime = millis();
      
      if ((currentTime - lastPingTime >= pingInterval)) {
        
        unsigned int distance = sonar.ping_cm();
        
        if (distance > 0) {
          tempval1 = distance;
          
          float diff = abs(tempval1 - tempval2);
          
          if (diff > 2) {
            
            if (diff > 30) {
              tempval2 = (tempval1 * 0.7) + (tempval2 * 0.3);
            } else {
              tempval2 = (tempval1 * 0.4) + (tempval2 * 0.6);
            }
            
            finalval = tempval2;
            
            Serial.print("Ping: ");
            Serial.print(finalval);
            Serial.println("cm");
          }
        }
        
        lastPingTime = currentTime;
      }
    }


    🧪 Testing the Sensor

    Checking real-time distance readings.
    1. Open Serial Monitor
    2. Set baud rate to 57600
    3. Move an object closer and farther

    ⚙️ How It Works

    The sensor sends ultrasonic waves and calculates distance based on the time taken for the echo to return. The code also smooths readings to reduce noise.


    🚀 Applications

    • Water level monitoring
    • Parking systems
    • Obstacle detection robots
    • Smart irrigation

    ✅ Conclusion


    You’ve learned how to connect, code, and test the SR04M-2 ultrasonic sensor with Arduino. This is a great starting point for many automation projects. If this helped you, please like 👍 and share 🔄 this tutorial.

    Monday, October 20, 2025

    How to Make a Bluetooth Controlled 2WD Smart Car Using Arduino

     Have you ever wanted to build your own robot car that you can control straight from your smartphone? 🚗💡In this tutorial, we’ll show you how to make a Bluetooth-controlled 2WD smart robot car using Arduino UNO, an HC-05 Bluetooth module, and an L298N motor driver. You’ll be able to move it forward, backward, left, right — and stop — all from your phone using the UBRcontrol app.

    Bluetooth Controlled 2WD Smart Car using Arduino UNO.


    ⚙️ What is a 2WD Smart Car?

    A 2WD (two-wheel drive) smart car is a small robotic platform powered by two DC motors and a caster wheel for balance. It’s widely used in Arduino robotics projects for learning motor control, Bluetooth communication, and basic automation.


    🧩 Components Required

    To build this project, you’ll need the following components:
    All the essential parts you need to build your Bluetooth-controlled 2WD smart car using Arduino.
    1. Arduino UNO × 1
    2. HC-05 Bluetooth Module × 1
    3. L298N Motor Driver × 1
    4. 2WD Smart Robot Car Chassis Kit × 1
    5. Breadboard & Jumper Wires × 1
    6. Batteries × 4/6


    🔧 Assembling the Car Chassis

    Step 1: Mount the DC Motors

    Attach the two DC motors to the chassis sides using the provided metal brackets and screws. Ensure both shafts face outward.

    Attach both DC motors to the chassis using metal brackets and screws.

    Step 2: Install the Wheels & Caster

    Fix the wheels onto the motor shafts.

    Attach the front caster wheel for support.

    Press the yellow wheels onto each motor shaft and fix the caster wheel at the front for support.

    Step 3: Mount the Battery Holder

    Secure the 4 or 6×AA battery holder on the top plate of the chassis.

    Fix the 6×AA battery holder at the top center of the chassis using screws or double-sided tape.

    Step 4: (Optional) Power Switch

    Install a small ON/OFF switch between the battery and motor driver if desired.

    You can install a small ON/OFF switch between the battery positive wire and the motor driver — but in this project, we connected the battery directly.


    🧠 Installing the Electronics

    Step 1: Mount the Modules

    Place the Arduino UNO, L298N motor driver, and a small breadboard on the chassis top plate.

    Place the Arduino UNO, L298N Motor Driver, and a small breadboard on the top plate of the chassis.


    Step 2: Connect Motors to L298N

    Wire the left and right DC motors to the L298N motor driver outputs (OUT1–OUT4).

    • Left motor → OUT1, OUT2

    • Right motor → OUT3, OUT4


    Step 3: Power Connections

    Connect the battery holder directly to the L298N power terminals (12V and GND) and share ground with the Arduino.
    • Battery + → 12V on L298N

    • Battery – → GND on L298N

    • L298N GND → Arduino GND (common ground)


    Step 4: L298N to Arduino

    Link the control pins IN1–IN4 from the L298N to Arduino pins 9, 8, 7, and 6.
    • IN1 → Pin 9

    • IN2 → Pin 8

    • IN3 → Pin 7

    • IN4 → Pin 6

    • ENA, ENB → 5V (full speed)


    Step 5: Connect HC-05 Bluetooth Module

    Use a small breadboard to mount the HC-05 and resistors, then connect it to Arduino pins 2 and 3.

    Use a small breadboard to attach the HC-05 and resistors:

    • VCC → 5V

    • GND → GND

    • TX → Pin 2

    • RX → Pin 3 (through 1 kΩ & 2 kΩ voltage divider)


    💻 Arduino Code

    You can download the code HERE.

    #include <softwareserial.h>
    SoftwareSerial BT(2,3); // RX=2, TX=3
    
    // Motor pins (L298N)
    const int ENA=10, IN1=9, IN2=8;    // Right motor
    const int ENB=11, IN3=7, IN4=6;    // Left motor
    int motorSpeed=200;
    
    byte buf[10]; // buffer for incoming bytes
    int bufIndex=0;
    
    void setup(){
      Serial.begin(9600);
      BT.begin(38400);
      Serial.println("🔹 2WD Car Ready - Waiting for commands");
    
      pinMode(ENA, OUTPUT); pinMode(ENB, OUTPUT);
      pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT);
      pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT);
    
      stopCar();
    }
    
    void loop(){
      while(BT.available()){
        byte b = BT.read();
        buf[bufIndex++] = b;
        if(bufIndex > 9) bufIndex = 0; // prevent overflow
    
        // -------- Left Control --------
        if(bufIndex >= 3){
          // Upward - Forward
          if(buf[bufIndex-3]==248 && buf[bufIndex-2]==0 && buf[bufIndex-1]==248){
            Serial.println("↑ Left Up - Forward");
            forward(500); bufIndex=0;
          }
          // Downward - Backward
          else if(buf[bufIndex-3]==0 && buf[bufIndex-2]==128 && buf[bufIndex-1]==248){
            Serial.println("↓ Left Down - Backward");
            backward(500); bufIndex=0;
          }
          // Left - Turn Left
          else if(buf[bufIndex-3]==120 && buf[bufIndex-2]==248 && buf[bufIndex-1]==120){
            Serial.println("← Left - Turn Left");
            left(500); bufIndex=0;
          }
          // Right - Turn Right
          else if(buf[bufIndex-3]==128 && buf[bufIndex-2]==0 && buf[bufIndex-1]==248){
            Serial.println("→ Left - Turn Right");
            right(500); bufIndex=0;
          }
          // Center - Stop
          else if(buf[bufIndex-3]==128 && buf[bufIndex-2]==128 && buf[bufIndex-1]==248){
            Serial.println("■ Left Center - Stop");
            stopCar(); bufIndex=0;
          }
        }
    
        // -------- Right Control --------
        if(bufIndex >= 3){
          // Upward - Forward
          if(buf[bufIndex-3]==248 && buf[bufIndex-2]==128 && buf[bufIndex-1]==248){
            Serial.println("↑ Right Up - Forward");
            forward(500); bufIndex=0;
          }
          // Downward - Backward
          else if(buf[bufIndex-3]==0 && buf[bufIndex-2]==248 && buf[bufIndex-1]==248){
            Serial.println("↓ Right Down - Backward");
            backward(500); bufIndex=0;
          }
          // Left - Turn Left
          else if(buf[bufIndex-3]==120 && buf[bufIndex-2]==128 && buf[bufIndex-1]==248){
            Serial.println("← Right Left - Turn Left");
            left(500); bufIndex=0;
          }
          // Right - Turn Right
          else if(buf[bufIndex-3]==128 && buf[bufIndex-2]==128 && buf[bufIndex-1]==248){
            Serial.println("→ Right Right - Turn Right");
            right(500); bufIndex=0;
          }
          // Center - Stop
          else if(buf[bufIndex-3]==0 && buf[bufIndex-2]==248 && buf[bufIndex-1]==248){
            Serial.println("■ Right Center - Stop");
            stopCar(); bufIndex=0;
          }
        }
      }
    }
    
    /* ----- Motor functions with duration ----- */
    void forward(int duration){
      digitalWrite(IN1,HIGH); digitalWrite(IN2,LOW);
      digitalWrite(IN3,HIGH); digitalWrite(IN4,LOW);
      analogWrite(ENA,motorSpeed); analogWrite(ENB,motorSpeed);
      delay(duration);
      stopCar();
    }
    
    void backward(int duration){
      digitalWrite(IN1,LOW); digitalWrite(IN2,HIGH);
      digitalWrite(IN3,LOW); digitalWrite(IN4,HIGH);
      analogWrite(ENA,motorSpeed); analogWrite(ENB,motorSpeed);
      delay(duration);
      stopCar();
    }
    
    void left(int duration){
      digitalWrite(IN1,LOW); digitalWrite(IN2,HIGH);
      digitalWrite(IN3,HIGH); digitalWrite(IN4,LOW);
      analogWrite(ENA,motorSpeed); analogWrite(ENB,motorSpeed);
      delay(duration);
      stopCar();
    }
    
    void right(int duration){
      digitalWrite(IN1,HIGH); digitalWrite(IN2,LOW);
      digitalWrite(IN3,LOW); digitalWrite(IN4,HIGH);
      analogWrite(ENA,motorSpeed); analogWrite(ENB,motorSpeed);
      delay(duration);
      stopCar();
    }
    
    void stopCar(){
      digitalWrite(IN1,LOW); digitalWrite(IN2,LOW);
      digitalWrite(IN3,LOW); digitalWrite(IN4,LOW);
      analogWrite(ENA,0); analogWrite(ENB,0);
    }
    

    📱 Pairing and App Setup (UBRcontrol App)

    1. Turn on the car and open UBRcontrol on your phone.

      Insert the batteries and turn on your smart car the HC-05 Bluetooth module’s LED should start blinking.

      Launch the UBRcontrol app on your smartphone to begin pairing.

    2. Pair with HC-05.

      Connect to the HC-05 Bluetooth module.

    3. Go to Settings → Control Settings → Left Controls.

    4. Assign buttons:

      • c: Forward

      • d: Backward

      • a: Left

      • b: Right

      • r: Stop


    🚗 Final Test

    Insert the batteries and power up your car. Once the Bluetooth module lights up, connect via UBRcontrol.

    • Press Forward (c) → Car moves forward

    • Press Backward (d) → Moves backward

    • Press Left (a) / Right (b) → Turns direction

    • Press Center (r) → Stops the car


    Your Bluetooth-controlled Arduino robot car is ready — have fun driving it!

    Enjoy your fully functional Bluetooth-controlled 2WD robot car!


    📦 Where to Buy

    Shopee:
    Lazada:
    Aliexpress:


    📸 Conclusion


    You’ve just built your own Arduino Bluetooth Smart Car! This project teaches basic motor control, serial communication, and smartphone interfacing — a great foundation for future robotics projects like line following or obstacle avoidance.

    💬 Don’t forget to Like, Share, and Subscribe for more Arduino and DIY electronics projects! 🚗💡