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!
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!
What you'll need
This is a gentle, low-voltage build — great for a first robotics-meets-art project.
| Part | What it does | Qty |
|---|---|---|
| Arduino Uno | The "brain" that calculates and drives the pattern | 1 |
| 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 powder | 1 |
| Small funnel or paper cone | Holds the colored rangoli powder above the gate | 1 |
| Push button | Starts a drawing cycle | 1 |
| LED | Lights up while Rangoli-Bot is drawing | 1 |
| Buzzer | Beeps when the pattern is complete | 1 |
| Cardboard or lightweight plastic arm links | The two rotating arm segments | 2 |
| Round wooden/cardboard base board | The stage the arm rotates over | 1 |
| Jumper wires + breadboard | Wiring everything together | 1 set |
| Food-safe colored rangoli powder (gulaal) non-toxic | The art supply your robot "paints" with | as needed |
| 5V USB power supply | Powers the Arduino and servos | 1 |
Circuit diagram
Three servos, one button, one LED, one buzzer — all connected to the Arduino's digital pins.
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.
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.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'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!
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
petalsvalue and re-uploading to see a brand-new pattern.
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.

Comments
Post a Comment