Bluetooth Line Maker with Arduino UNO, Motors and Pump

Bluetooth Line Maker with Arduino UNO, Motors and Pump – Kids Robotics Project | MakeMindz
Arduino UNOAges 11–15About 3 hoursAdult helper needed

Bluetooth Line Maker with Dual Motors and Pump

Sports grounds need straight, bright lines for races and games. In this project you build a line marking robot. Two strong motors push it along, a pump sprays the line, and you steer it with push buttons or from your phone using Bluetooth. Try the pretend line maker below. Press and hold the buttons to drive, and switch the paint pump on to draw!

Hold Forward to drive. Pump OFF means no line.

How does it work?

📱

Command

You press a button or send a letter from your phone, like F for forward.

🧠

Decide

The Arduino reads the commands. A mode switch picks manual buttons or Bluetooth.

🔌

Switch

The relay module is a row of electric switches. It turns the motors and pump on and off.

🏁

Mark

Both motors on goes forward. One motor on makes a turn. Pump on sprays the line.

What you need

🔲

Arduino UNO ×1

The brain of the project.

📶

HC-05 Bluetooth ×1

Talks to your phone.

⚙️

12V DC motors ×2

250 W geared motors for the wheels.

💦

12V pump ×1

With tank, tube and spray nozzle for paint.

🔌

4-channel relay ×1

Heavy-duty, rated for motor current.

🔋

12V 7Ah battery ×1

Powers motors and pump.

🧯

Fuse and switch

A 30A fuse and a master power switch.

🎛️

Controls

3 push buttons, a pump button, a toggle switch for the mode.

🧰

Extras

Chassis frame, two wheels, a caster wheel, thick wires, 1 kΩ and 2 kΩ resistors, jumper wires.

Safety first: Two 250 W motors can draw a lot of current, so thin wires can get hot. An adult must help with the battery wiring, thick wire and the fuse. Always keep a master switch you can flip fast, keep hands away from the wheels, and test with the wheels lifted off the ground first.

Circuit diagram

This build has two separate worlds. The control side is the Arduino, Bluetooth, buttons and relay inputs. The power side is the battery, motors and pump.

Control side

PartConnects to ArduinoNotes
Relay IN1 (left motor)D7Relay VCC to 5V, GND to GND
Relay IN2 (right motor)D8
Relay IN3 (pump)D9
Relay IN4 (warning light)D12Optional beacon lamp
HC-05 TXD10Arduino reads here
HC-05 RXD11 via dividerD11 → 1 kΩ → HC-05 RX → 2 kΩ → GND
HC-05 VCC / GND5V / GND
Mode switchD2Other leg to GND. Closed = Bluetooth
Forward, Left, Right buttonsD3, D4, D5Other legs to GND
Pump buttonD6Other leg to GND

Power side

FromTo
Battery + (through fuse and master switch)Relay COM terminals 1, 2 and 3
Relay NO terminal 1 / 2 / 3Left motor + / Right motor + / Pump +
Left motor −, right motor −, pump −Battery −
Arduino VIN (or USB power bank)Battery + via a 12V to 5V converter or a power bank
Remember: Join the Arduino GND and the battery − so everyone shares the same ground. Ordinary relay modules often handle only 10 A, so use one rated for your motors or let it switch heavy automotive relays.
How turning works: Left motor only turns the robot right. Right motor only turns it left. Both on goes forward. This basic version has no reverse; see the upgrade ideas.

Step-by-step instructions

  1. Build the chassis

    Fix the two motors on the left and right of a strong frame with a wheel on each. Add a free-turning caster wheel at the front or back so the robot stays level.
  2. Mount the pump and nozzle

    Place the paint tank on the frame. Connect the pump to the tank and run a tube to a nozzle pointing at the ground between the wheels. Test with plain water first.
  3. Wire the control side

    Connect the Arduino to the relay inputs, HC-05, buttons and mode switch exactly as in the first table. Use the divider for the HC-05 RX pin.
  4. Wire the power side with a fuse

    Ask an adult to wire the battery through the fuse and master switch to the relay contacts, motors and pump using thick wire. Leave the master switch OFF.
  5. Upload the code

    Unplug the HC-05 TX wire during upload, then upload the sketch below and plug it back in.
  6. Pair your phone

    Turn on Bluetooth and pair with HC-05 using the code 1234 or 0000. Open a Bluetooth serial app and set buttons to send F, L, R, S, P and p.
  7. Test and paint

    With wheels off the ground, test each command and the manual buttons. Then test on a field with water, and finally add line-marking paint with an adult.

Arduino code

// Bluetooth Line Maker - MakeMindz
#include <SoftwareSerial.h>
SoftwareSerial bt(10, 11);          // RX = D10, TX = D11

const int modePin = 2;               // switch closed = Bluetooth
const int btnF = 3, btnL = 4, btnR = 5, btnPump = 6;
const int relayLeft = 7, relayRight = 8, relayPump = 9, relayLight = 12;

const int ON = LOW, OFF = HIGH;      // most relay modules switch on with LOW
const unsigned long TIMEOUT_MS = 1500;  // stop if phone goes silent

char cmd = 'S';                      // F, L, R or S
bool pumpOn = false;
unsigned long lastCmdTime = 0;

void setup() {
  bt.begin(9600);
  int inputs[] = {modePin, btnF, btnL, btnR, btnPump};
  for (int i = 0; i < 5; i++) pinMode(inputs[i], INPUT_PULLUP);
  int relays[] = {relayLeft, relayRight, relayPump, relayLight};
  for (int i = 0; i < 4; i++) { digitalWrite(relays[i], OFF); pinMode(relays[i], OUTPUT); }
}

void readManual() {
  cmd = 'S';
  if (digitalRead(btnF) == LOW) cmd = 'F';
  else if (digitalRead(btnL) == LOW) cmd = 'L';
  else if (digitalRead(btnR) == LOW) cmd = 'R';
  pumpOn = (digitalRead(btnPump) == LOW);   // pump runs while held
}

void readBluetooth() {
  while (bt.available()) {
    char c = bt.read();
    lastCmdTime = millis();
    if (c == 'F' || c == 'L' || c == 'R' || c == 'S') cmd = c;
    if (c == 'P') pumpOn = true;
    if (c == 'p') pumpOn = false;
  }
  if (millis() - lastCmdTime > TIMEOUT_MS) { cmd = 'S'; pumpOn = false; }  // safety stop
}

void loop() {
  if (digitalRead(modePin) == LOW) readBluetooth();   // closed = Bluetooth
  else readManual();

  bool left  = (cmd == 'F' || cmd == 'R');   // left motor drives forward and right turns
  bool right = (cmd == 'F' || cmd == 'L');
  digitalWrite(relayLeft,  left  ? ON : OFF);
  digitalWrite(relayRight, right ? ON : OFF);
  digitalWrite(relayPump,  pumpOn ? ON : OFF);
  digitalWrite(relayLight, (cmd != 'S' || pumpOn) ? ON : OFF);  // light while working
  delay(20);
}
Check your mode switch: The code treats a closed switch as Bluetooth. If your project behaves backwards, flip the switch or swap the two conditions in loop(). In Bluetooth mode, set your app buttons to repeat while held, or raise TIMEOUT_MS.

Fix it: troubleshooting

📵 Phone does not connect

Pair first in phone settings, then connect in the app. Check the TX and RX wires are not swapped.

🔁 Motor runs when it should be off

Your relay module may switch on with HIGH. Swap ON and OFF in the code.

🔥 Wires get warm

Switch off. Use thicker wire and check connections are tight. Ask an adult to inspect.

🤖 Arduino restarts

Motor spikes are upsetting the Arduino. Power it from a separate power bank and share only the ground.

Upgrade ideas

⬅️ Reverse gear

Swap the relays for two motor drivers so the robot can go backward.

🧭 Straight lines

Add a compass sensor to keep the heading steady.

📏 Distance marks

Add wheel encoders and make dashed lines of exact length.

🔋 Battery meter

Show the battery level with a voltage divider and LEDs.

Frequently asked questions

How does it switch between manual and Bluetooth?

A toggle switch on D2 selects the mode. In manual mode the Arduino reads the push buttons. In Bluetooth mode it reads letters from the phone.

Why use relays instead of connecting the motors directly?

Big motors need far more current than an Arduino pin can give. A relay is an electric switch that lets a tiny signal control a big current safely.

Can I use this with plain water for practice?

Yes, and you should. Test with water first, then ask an adult to help with line-marking paint.

What will I learn?

Relays, Bluetooth serial, modes, safety timeouts, differential steering and high-current wiring.

Made with 🧡 by MakeMindz – robotics and maker projects for kids.

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
★★★★★ Young inventors love it!
🖨️
3D Print
All parts
⚡
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 ₹300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
★★★★★ Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 ₹200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course