Insightful Ink Walk
Friday, September 5, 2025
বাংলা
  • Home
  • Discover South Korea
    • All
    • Culture of Korea
    • Hiking in Korea
    • Korean Language
    • Study in South Korea

    Lost in the Autumn Hues of Gatbawi Mountain

    Witness South Korea’s Breathtaking Flower Spectacle: A Year-Round Guide

    Witness South Korea’s Breathtaking Flower Spectacle: A Year-Round Guide

    Hyundai’s Global Takeover: How a Korean Brand Became a Household Name in Cars

    Hyundai’s Global Takeover: How a Korean Brand Became a Household Name in Cars

    Explore Busan’s Architectural Identity: A Recap of the 2021 World Architecture Festival

    Explore Busan’s Architectural Identity: A Recap of the 2021 World Architecture Festival

    Millim cafe

    Unleash Your Inner Explorer at MILLIM Cafe: Award-Winning Design Meets Reptilian Charm in Daegu

    Beauty of Ulsan

    Discover the Beauty of Ulsan: A Seaside Paradise Awaits

    The South Korean Education System: A Model for the Knowledge-Based Society?

    The South Korean Education System: A Model for the Knowledge-Based Society?

  • Engineering
    • All
    • 3D Design & Simulation
    • Arduino Project
    • Control Engineering
    • DIY Electronics & Robotics
    • Micro-Controller Engineering
    Basic of Control-session 12

    Basic of Control Theory: Session 12 – Cutting the Cord – Wireless Control and the Road Ahead

    Basic of Control-session 11

    Basic of Control Theory: Session 11 – The Grand Finale – Orchestrating the Four-Wheel Symphony

    Basic of Control-session 10

    Basic of Control Theory: Session 10 – The Art of Tuning – Calibrating Your PID Controller

    Basic of Control-session 9

    Basic of Control Theory: Session 9 – Closing the Loop – Coding Your First PID Controller

    Basic of Control-session 8

    Basic of Control Theory: Session 8 – From Ticks to Speed – Calculating RPM

    Basic of Control-session 7

    Basic of Control Theory: Session 7 – Your First Robot Program

    Basic of Control-session 6

    Basic of Control Theory: Session 6 – From Parts to Robot – The Assembly Guide

    Basic of Control-session 5

    Basic of Control Theory: Session 5 – Assembling Your Robot’s Body

    Basic of Control-session 4

    Basic of Control Theory: Session 4 – The Robot’s Rulebook – An Introduction to Kinematics

  • Perspective of life
    • All
    • Global Topic
    • Islam
    • Perspective Brainstorming
    • Political Perspective
    many faces of Islam

    Many Faces of Islam: Unity in Diversity

    War that reshaped Middle East

    The War that Reshaped the Middle East Forever

    Trusting in Allah: Overcoming the Social Pressures of Having a Male Child

    Trusting in Allah: Overcoming the Social Pressures of Having a Male Child

    Social Media: A Journey from Word-of-Mouth to Global Networks

    Social Media: A Journey from Word-of-Mouth to Global Networks

    Metaverse Technology: A New Dimension of the Future

    Metaverse Technology: A New Dimension of the Future

    The Dark Side of Evolution Theory: Flaws that Enabled Atrocities

    The Dark Side of Evolution Theory: Flaws that Enabled Atrocities

    The Meaning of Luck in the Eye of Islam

    The Meaning of Luck in the Eye of Islam

    Does Islam Ensure the Rights of Non-Muslims? A Look at Religious Tolerance and Coexistence

    Does Islam Ensure the Rights of Non-Muslims? A Look at Religious Tolerance and Coexistence

    Remove Racism: Understanding and Addressing a Persistent Issue

    Remove Racism: Understanding and Addressing a Persistent Issue

  • Tours & Travel
    • All
    • Cafe Blog
    • Landscape and Sea
    • Life in South Korea

    Lost in the Autumn Hues of Gatbawi Mountain

    Explore Busan’s Architectural Identity: A Recap of the 2021 World Architecture Festival

    Explore Busan’s Architectural Identity: A Recap of the 2021 World Architecture Festival

    Millim cafe

    Unleash Your Inner Explorer at MILLIM Cafe: Award-Winning Design Meets Reptilian Charm in Daegu

    Rise of Islam in Bangladesh

    Unveiling the Rise of Islam in Bangladesh: A Historical Tapestry

    Beauty of Ulsan

    Discover the Beauty of Ulsan: A Seaside Paradise Awaits

  • About Me
  • Contact
No Result
View All Result
Insightful Ink Walk
  • Home
  • Discover South Korea
    • All
    • Culture of Korea
    • Hiking in Korea
    • Korean Language
    • Study in South Korea

    Lost in the Autumn Hues of Gatbawi Mountain

    Witness South Korea’s Breathtaking Flower Spectacle: A Year-Round Guide

    Witness South Korea’s Breathtaking Flower Spectacle: A Year-Round Guide

    Hyundai’s Global Takeover: How a Korean Brand Became a Household Name in Cars

    Hyundai’s Global Takeover: How a Korean Brand Became a Household Name in Cars

    Explore Busan’s Architectural Identity: A Recap of the 2021 World Architecture Festival

    Explore Busan’s Architectural Identity: A Recap of the 2021 World Architecture Festival

    Millim cafe

    Unleash Your Inner Explorer at MILLIM Cafe: Award-Winning Design Meets Reptilian Charm in Daegu

    Beauty of Ulsan

    Discover the Beauty of Ulsan: A Seaside Paradise Awaits

    The South Korean Education System: A Model for the Knowledge-Based Society?

    The South Korean Education System: A Model for the Knowledge-Based Society?

  • Engineering
    • All
    • 3D Design & Simulation
    • Arduino Project
    • Control Engineering
    • DIY Electronics & Robotics
    • Micro-Controller Engineering
    Basic of Control-session 12

    Basic of Control Theory: Session 12 – Cutting the Cord – Wireless Control and the Road Ahead

    Basic of Control-session 11

    Basic of Control Theory: Session 11 – The Grand Finale – Orchestrating the Four-Wheel Symphony

    Basic of Control-session 10

    Basic of Control Theory: Session 10 – The Art of Tuning – Calibrating Your PID Controller

    Basic of Control-session 9

    Basic of Control Theory: Session 9 – Closing the Loop – Coding Your First PID Controller

    Basic of Control-session 8

    Basic of Control Theory: Session 8 – From Ticks to Speed – Calculating RPM

    Basic of Control-session 7

    Basic of Control Theory: Session 7 – Your First Robot Program

    Basic of Control-session 6

    Basic of Control Theory: Session 6 – From Parts to Robot – The Assembly Guide

    Basic of Control-session 5

    Basic of Control Theory: Session 5 – Assembling Your Robot’s Body

    Basic of Control-session 4

    Basic of Control Theory: Session 4 – The Robot’s Rulebook – An Introduction to Kinematics

  • Perspective of life
    • All
    • Global Topic
    • Islam
    • Perspective Brainstorming
    • Political Perspective
    many faces of Islam

    Many Faces of Islam: Unity in Diversity

    War that reshaped Middle East

    The War that Reshaped the Middle East Forever

    Trusting in Allah: Overcoming the Social Pressures of Having a Male Child

    Trusting in Allah: Overcoming the Social Pressures of Having a Male Child

    Social Media: A Journey from Word-of-Mouth to Global Networks

    Social Media: A Journey from Word-of-Mouth to Global Networks

    Metaverse Technology: A New Dimension of the Future

    Metaverse Technology: A New Dimension of the Future

    The Dark Side of Evolution Theory: Flaws that Enabled Atrocities

    The Dark Side of Evolution Theory: Flaws that Enabled Atrocities

    The Meaning of Luck in the Eye of Islam

    The Meaning of Luck in the Eye of Islam

    Does Islam Ensure the Rights of Non-Muslims? A Look at Religious Tolerance and Coexistence

    Does Islam Ensure the Rights of Non-Muslims? A Look at Religious Tolerance and Coexistence

    Remove Racism: Understanding and Addressing a Persistent Issue

    Remove Racism: Understanding and Addressing a Persistent Issue

  • Tours & Travel
    • All
    • Cafe Blog
    • Landscape and Sea
    • Life in South Korea

    Lost in the Autumn Hues of Gatbawi Mountain

    Explore Busan’s Architectural Identity: A Recap of the 2021 World Architecture Festival

    Explore Busan’s Architectural Identity: A Recap of the 2021 World Architecture Festival

    Millim cafe

    Unleash Your Inner Explorer at MILLIM Cafe: Award-Winning Design Meets Reptilian Charm in Daegu

    Rise of Islam in Bangladesh

    Unveiling the Rise of Islam in Bangladesh: A Historical Tapestry

    Beauty of Ulsan

    Discover the Beauty of Ulsan: A Seaside Paradise Awaits

  • About Me
  • Contact
No Result
View All Result
Insightful Ink Walk
No Result
View All Result
Home Engineering Control Engineering

Basic of Control Theory: Session 12 – Cutting the Cord – Wireless Control and the Road Ahead

by ahmedneaz
August 3, 2025
in Control Engineering, DIY Electronics & Robotics
2
Basic of Control-session 12

Basic of Control-session 12

126
SHARES
1.4k
VIEWS

Hello and welcome, for one last time, to our series on the secret brains of everything. Over the past eleven sessions, we have embarked on an incredible journey. We started with a simple idea—balancing a broom—and built our way up, concept by concept, line by line, to a fully functional mecanum robot. It has a body, a brain, and a rulebook. It can execute pre-programmed commands with precision, thanks to the tireless work of four independent, finely-tuned PID controllers.

Our robot is smart. It’s capable. But it’s still tethered to the code we upload. The final step in our capstone project is to cut that last cord and give our creation the gift of real-time, interactive freedom.

Today, we are adding wireless remote control. We’ll explore the options, implement a simple and robust solution, and finally, take our robot for its first human-piloted test drive. Then, we’ll look to the future and all the amazing places you can go from here.

Choosing Your Communication Channel

To control our robot wirelessly, we need to establish a communication link between a controller and the robot’s Arduino brain. This is done using a communication protocol, a set of rules that allows two devices to understand each other.1 For robotics, there are several popular wireless options, each with its own strengths 2:

  • Wi-Fi: Offers high speed and good range by connecting to a local network. This is a great choice for more advanced projects, especially if you want to stream video from a camera on the robot. Microcontrollers like the ESP32 have Wi-Fi built-in, making them perfect for this.3
  • Dedicated Radio Control (RC): Modules like the NRF24L01 or classic hobbyist RC transmitters offer very low latency, making them ideal for high-speed, performance-oriented driving where every millisecond of delay matters.5
  • Bluetooth: This is the undisputed champion for beginner-friendly, short-range communication. It’s low-power, easy to set up, and allows you to control your robot directly from the device you already own: your smartphone.1

For our final project, we’ll focus on the most accessible and versatile option: Bluetooth.

Implementation: Smartphone Control with the HC-05

We will use the popular and inexpensive HC-05 Bluetooth module to create a serial data link between a smartphone app and our robot.6

Step 1: Wiring the HC-05 Module

First, disconnect the power from your robot. We need to add the HC-05 module to our existing circuit. It’s a simple four-wire connection to our Arduino Mega 7:

  • VCC on HC-05 → 5V on Arduino Mega
  • GND on HC-05 → GND on Arduino Mega
  • TXD on HC-05 → RX1 (Pin 19) on Arduino Mega
  • RXD on HC-05 → TX1 (Pin 18) on Arduino Mega

Why use pins 18 and 19? The Arduino Mega has multiple hardware serial ports. The main one (Serial, on pins 0 and 1) is used for uploading code and communicating with your computer via USB. By using a secondary port (Serial1), we can talk to the Bluetooth module without ever having to disconnect it when we upload a new sketch.8

Step 2: The Communication Protocol

Our robot needs to understand the commands our phone sends. We will use a simple but effective character-based protocol.9 The smartphone app will send a single character, and the robot will interpret it as a specific command.

  • 'F' = Move Forward
  • 'B' = Move Backward
  • 'L' = Strafe Left
  • 'R' = Strafe Right
  • 'Q' = Diagonal Forward-Left
  • 'E' = Diagonal Forward-Right
  • 'Z' = Diagonal Backward-Left
  • 'C' = Diagonal Backward-Right
  • '<' = Rotate Counter-Clockwise
  • '>' = Rotate Clockwise
  • 'S' = Stop All Motion

This approach is simple to program and very reliable for basic control.10

Step 3: Modifying the Master Code

We’ll now modify our master code from Session 11. Instead of hard-coding the target_v... variables, we will read the incoming character from the Bluetooth module and update them in real-time.

The key changes are:

  1. Initialize Serial1 in setup() to listen to the Bluetooth module.
  2. In the loop(), constantly check if there is new data available from Serial1.
  3. If there is, read the character and use a switch statement to update the target speeds.

Here is the relevant code to add/modify in your sketch from Session 11:

C++

// In the setup() function, add this line:
void setup() {
  //... (all your other setup code)
  Serial1.begin(9600); // Start communication with HC-05 (default baud rate is often 9600)
}

// In the loop() function, BEFORE the 20ms timer check, add this block:
void loop() {
  // Check for an incoming command from the Bluetooth module
  if (Serial1.available() > 0) {
    char command = Serial1.read();

    // Set a base speed. You can adjust this value.
    float base_speed = 100.0; 

    switch (command) {
      case 'F': // Forward
        target_vy = base_speed; target_vx = 0; target_wz = 0;
        break;
      case 'B': // Backward
        target_vy = -base_speed; target_vx = 0; target_wz = 0;
        break;
      case 'L': // Strafe Left
        target_vy = 0; target_vx = base_speed; target_wz = 0;
        break;
      case 'R': // Strafe Right
        target_vy = 0; target_vx = -base_speed; target_wz = 0;
        break;
      case '<': // Rotate CCW
        target_vy = 0; target_vx = 0; target_wz = base_speed;
        break;
      case '>': // Rotate CW
        target_vy = 0; target_vx = 0; target_wz = -base_speed;
        break;
      case 'Q': // Diagonal Forward-Left
        target_vy = base_speed; target_vx = base_speed; target_wz = 0;
        break;
      case 'E': // Diagonal Forward-Right
        target_vy = base_speed; target_vx = -base_speed; target_wz = 0;
        break;
      case 'Z': // Diagonal Backward-Left
        target_vy = -base_speed; target_vx = base_speed; target_wz = 0;
        break;
      case 'C': // Diagonal Backward-Right
        target_vy = -base_speed; target_vx = -base_speed; target_wz = 0;
        break;
      case 'S': // Stop
        target_vy = 0; target_vx = 0; target_wz = 0;
        break;
    }
  }

  //... (the rest of your loop() function with the 20ms timer and PID calculations)
}

Step 4: Connecting with a Smartphone App

You don’t need to be an app developer to control your robot. There are many free apps on the Google Play Store (and the Apple App Store) that act as generic Bluetooth controllers.

  1. Download an App: Search for an app like “Arduino Bluetooth RC Car” or “Bluetooth Serial Controller”.11
  2. Pair Your Phone: Power up your robot. Go to your phone’s Bluetooth settings and scan for devices. You should see “HC-05”. Pair with it using the default password, which is usually “1234” or “0000”.6
  3. Configure the App: Open your chosen controller app. Connect to the paired HC-05 module. Most apps will have a settings menu where you can assign a character to each button. Configure the buttons to send the characters our code is expecting (e.g., the ‘Up Arrow’ button should send ‘F’, the ‘Stop’ button should send ‘S’, and so on).

Once configured, you’re ready. Press the buttons on your phone, and watch your robot glide across the floor at your command.

The Journey’s End, and a New Beginning

Take a moment to appreciate what you have accomplished. You have built, from scratch, a complex electromechanical system. You have implemented advanced control theory to give it a brain that can sense, think, and act with precision. You have bridged the physical and digital worlds, creating a machine that you can command from the palm of your hand.

You have completed the entire control systems pipeline.

This robot is now your platform. The journey of this series is over, but your journey as a robotics engineer is just beginning. Where do you go from here?

  • Add More Senses: Integrate ultrasonic sensors for automatic obstacle avoidance. Add a line-following sensor and program the robot to autonomously navigate a track.
  • Achieve True Trajectory Following: Use the encoder data for odometry—calculating the robot’s position over time. With this, you can program it to follow complex paths, like a square or a circle, all on its own.
  • Upgrade the Brain: Swap the Arduino Mega for an ESP32 to give your robot Wi-Fi capabilities, allowing you to control it from any computer on your network or even host a web-based controller.13
  • Give it Vision: Add an ESP32-CAM to stream live video and open the door to the world of computer vision and AI-powered control.15

Thank you for joining me on this adventure. You started with a question, and you’ve ended with a creation. You’ve learned the theory not just by reading, but by building. Keep tinkering, keep learning, and keep making. The world is full of systems waiting to be controlled. Now you know how.

Tags: Basic of control theoryControl theory
Share50Tweet32SendShare9Send
Previous Post

Basic of Control Theory: Session 11 – The Grand Finale – Orchestrating the Four-Wheel Symphony

Comments 2

  1. Georgeagolo says:
    3 weeks ago

    Hola, quería saber tu precio..

    Reply
  2. Georgeagolo says:
    6 hours ago

    হাই, আমি আপনার মূল্য জানতে চেয়েছিলাম.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Basic of Control-session 12
Control Engineering

Basic of Control Theory: Session 12 – Cutting the Cord – Wireless Control and the Road Ahead

by ahmedneaz
August 3, 2025
2

Hello and welcome, for one last time, to our series on the secret brains of everything. Over the past eleven...

Read more
Basic of Control-session 11

Basic of Control Theory: Session 11 – The Grand Finale – Orchestrating the Four-Wheel Symphony

August 3, 2025
Basic of Control-session 10

Basic of Control Theory: Session 10 – The Art of Tuning – Calibrating Your PID Controller

August 3, 2025
Basic of Control-session 9

Basic of Control Theory: Session 9 – Closing the Loop – Coding Your First PID Controller

August 3, 2025
Basic of Control-session 8

Basic of Control Theory: Session 8 – From Ticks to Speed – Calculating RPM

August 3, 2025

Recent News

Basic of Control-session 12

Basic of Control Theory: Session 12 – Cutting the Cord – Wireless Control and the Road Ahead

August 3, 2025
Basic of Control-session 11

Basic of Control Theory: Session 11 – The Grand Finale – Orchestrating the Four-Wheel Symphony

August 3, 2025

Follow Us

Site

  • About
  • Privacy & Policy
  • Cookies Consent
  • Terms & Conditions
  • Contact

Motive

The beauty of ink lies not only in its permanence on paper but in its ability to capture fleeting thoughts and emotions, leaving a tangible record of our innermost selves.

  • About
  • Privacy & Policy
  • Cookies Consent
  • Terms & Conditions
  • Contact

© 2025 The Insightful Ink Walk by AHMED NEAZ.

No Result
View All Result
  • Home
  • Engineering
  • Perspective of life
  • Discover South Korea
  • Tours & Travel
  • About Me
  • Contact

© 2025 The Insightful Ink Walk by AHMED NEAZ.

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.