Rangoli bot

Build Rangoli-Bot: A DIY Servo-Powered Rangoli Making Machine | Kids Robotics Project
Robotics + art project for kids

Build Rangoli-Bot: a servo-powered arm that draws rangoli patterns all by itself

Rangoli-Bot is a DIY robotic arm built with three servo motors and an Arduino. Press start, and the arm sweeps out a beautiful flower-shaped path while a tiny gate opens to sprinkle colored rangoli powder along the way — turning math and motors into festive floor art!

2–3 hrsbuild time
Beginnerskill level
3 servos+ 1 Arduino
The big idea

How Rangoli-Bot thinks, in 4 simple steps

Rangoli-Bot moves in a "polar" way — like a clock hand that can also stretch in and out — to trace pretty curved patterns.

1. Pick a pattern

Press start to load a pre-programmed flower design made of angle and distance points.

2. Rotate & reach

The base servo spins the arm to the right angle, while the arm servo stretches to the right distance.

3. Sprinkle color

A tiny gate servo opens just enough to let colored powder trickle out as the arm moves.

4. Finish & reveal

Once every point is drawn, the gate closes, the arm parks, and your rangoli is ready!

Shopping list (for your robot!)

What you'll need

This is a gentle, low-voltage build — great for a first robotics-meets-art project.

PartWhat it doesQty
Arduino UnoThe "brain" that calculates and drives the pattern1
SG90 micro servo (base)Rotates the whole arm left and right (the angle)1
SG90 micro servo (arm)Extends the arm in and out (the distance)1
SG90 micro servo (gate)Opens/closes a tiny flap to release colored powder1
Small funnel or paper coneHolds the colored rangoli powder above the gate1
Push buttonStarts a drawing cycle1
LEDLights up while Rangoli-Bot is drawing1
BuzzerBeeps when the pattern is complete1
Cardboard or lightweight plastic arm linksThe two rotating arm segments2
Round wooden/cardboard base boardThe stage the arm rotates over1
Jumper wires + breadboardWiring everything together1 set
Food-safe colored rangoli powder (gulaal) non-toxicThe art supply your robot "paints" withas needed
5V USB power supplyPowers the Arduino and servos1
Wiring time

Circuit diagram

Three servos, one button, one LED, one buzzer — all connected to the Arduino's digital pins.

Arduino Uno Digital I/O pins Base Servo Signal on D9 Arm Servo Signal on D10 Powder Gate Servo Signal on D11 Start Button Signal on D2 LED + Buzzer D4, D5
Power (5V) Ground (GND) Signal (digital pin)

Power the servos carefully

Three servos moving together can draw more current than a single USB port comfortably supplies — if they twitch or reset, power them from a separate 5V supply and connect all grounds together.

Let's build!

Step-by-step build instructions

Take it one joint at a time — Rangoli-Bot is really just two rotating arms and a tiny trapdoor.

Build the base

Fix the base servo upright in the center of your round board. This servo will rotate the entire arm around, like the hour hand of a clock.

Attach arm link 1

Glue or screw the first arm segment onto the base servo horn, so it swings side to side as the servo turns.

Add the elbow and arm link 2

Mount the arm servo at the end of link 1, then attach the second, shorter arm segment to its horn — this is what changes how far the tip reaches.

Tip: keep both arm links light — cardboard or thin plastic strips work great.

Mount the powder funnel and gate

Attach a small paper cone or funnel at the very tip of the arm, with the gate servo's horn positioned to block or open a small hole at the bottom.

Wire everything to the Arduino

Follow the circuit diagram above to connect all three servos, the start button, the LED, and the buzzer to the Arduino.

Install the software

Open the Arduino IDE and make sure the built-in Servo library is available (it usually comes pre-installed).

Upload the code

Copy the sketch below into the Arduino IDE, select your board and port, and click Upload.

Fill, test, and draw!

Place your base board over a sheet of paper or a clean floor spot, add a small amount of colored powder to the funnel, and press the start button.

Tip: do a first test run with an empty funnel to check the arm's path before adding powder.
Now for the fun part

The code that brings Rangoli-Bot to life

This sketch uses a little bit of math (a "rose curve") to generate a flower-shaped path made of angle and distance points, then moves the arm through each one while the gate sprinkles color.

rangoli_bot.ino
// rangoli_bot.ino — Rangoli-Bot's brain 🌸🤖
#include <Servo.h>

Servo baseServo;   // pin 9  — rotates the arm (the angle)
Servo armServo;    // pin 10 — extends the arm (the distance)
Servo gateServo;   // pin 11 — powder dispenser gate

const int START_BUTTON_PIN = 2;
const int LED_PIN    = 4;
const int BUZZER_PIN = 5;

const int NUM_POINTS = 36;
int thetaPoints[NUM_POINTS];   // angle for each point (0–180°)
int radiusPoints[NUM_POINTS];  // distance for each point

void setup() {
  baseServo.attach(9);
  armServo.attach(10);
  gateServo.attach(11);

  pinMode(START_BUTTON_PIN, INPUT_PULLUP);
  pinMode(LED_PIN, OUTPUT);
  pinMode(BUZZER_PIN, OUTPUT);

  gateServo.write(0);     // gate closed — no powder yet
  baseServo.write(90);
  armServo.write(30);

  generateFlowerPattern();

  Serial.begin(9600);
  Serial.println("Rangoli-Bot ready! Press start to draw.");
}

// Uses a simple "rose curve" formula to make a flower-shaped path.
void generateFlowerPattern() {
  int petals = 6;
  for (int i = 0; i < NUM_POINTS; i++) {
    float angleDeg = map(i, 0, NUM_POINTS - 1, 0, 180);
    float angleRad = angleDeg * PI / 180.0;
    float r = 90 + 60 * sin(petals * angleRad);  // radius swings in and out

    thetaPoints[i]  = (int) angleDeg;
    radiusPoints[i] = (int) constrain(r, 20, 160);
  }
}

void drawPattern() {
  digitalWrite(LED_PIN, HIGH);
  gateServo.write(60);   // open the gate a little — let color trickle out

  for (int i = 0; i < NUM_POINTS; i++) {
    baseServo.write(thetaPoints[i]);
    armServo.write(map(radiusPoints[i], 20, 160, 10, 170));
    delay(150);   // slow, smooth movement = even powder trails
  }

  gateServo.write(0);    // close the gate
  digitalWrite(LED_PIN, LOW);
  tone(BUZZER_PIN, 1500, 400);
  Serial.println("Rangoli complete! ✨");
}

void loop() {
  if (digitalRead(START_BUTTON_PIN) == LOW) {
    drawPattern();
    delay(1000);   // small pause before it can be started again
  }
}

Level-up idea

Change the petals number in generateFlowerPattern() to 3, 5, or 8 to get totally different rangoli shapes, or add a second push button that switches between two saved patterns!

Almost there

Test it like a real artist

Run through this little checklist with a grown-up before your first colorful run.

  • Test with an empty funnel first, watching that the arm sweeps smoothly without hitting the base board.
  • Check the gate servo fully closes between drawing cycles so powder doesn't leak out early.
  • Add a small pinch of powder and run one cycle to see how much color comes out — adjust the gate's open angle in code if it's too much or too little.
  • Confirm the LED turns on during drawing and off when finished, and the buzzer beeps at the end.
  • Try changing the petals value and re-uploading to see a brand-new pattern.
Questions?

Frequently asked questions

Do I need to know how to code already?

No! You can build and run Rangoli-Bot without changing any code. Once it works, tweaking the petals number is a fun, safe way to start experimenting.

What is a "rose curve" and why does the code use one?

It's a simple math formula that turns an angle into a distance that swings in and out in a repeating way, which is exactly what makes flower-petal shapes appear. It's a gentle, hands-on introduction to trigonometry.

Can I use regular craft glitter or sand instead of rangoli powder?

Stick with a lightweight, food-safe rangoli powder (gulaal) or colored rice/sand made for craft use — they flow smoothly through a small gate and are safe for kids to handle with adult supervision.

Why three servos instead of two?

Two servos (base + arm) move the drawing tip to any point in its reach — that's the "polar" motion. The third servo is separate: it only controls the powder gate, so movement and coloring can be controlled independently.

Is this project safe for kids to build?

Yes, with adult help for wiring and gluing. It uses safe low-voltage (5V) power, similar to a USB charger, and there are no sharp or hot parts — just remember not to inhale or rub powder near your eyes.

Rangoli-Bot 🌸

A beginner-friendly Arduino robotics project that mixes servo motors, simple trigonometry, and traditional rangoli art into one colorful build.

Keep exploring

Try adding a second color gate, a pattern-select button, or mounting a pen instead of powder to draw rangoli designs on paper!

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