- Difficulty
- Intermediate
- Build time
- 75-115 min
- Estimated cost
- $0-$25
- Age range
- 11-17
- Workspace
- A clear table about 90 cm wide
The finish line
What you will build
The robot draws a closed shape at least 20 cm wide and returns within 5 cm of its starting point.
Learning goals
- Identify how timed left and right motor commands produces vehicle path recorded by a marker.
- Construct and explain a electrical motor rotation-to-planar drawing motion system.
- Measure how turn duration changes performance.
- Diagnose losses caused by wheel slip and motor mismatch.
Before you build
Materials, tools, and safety
Reuse-material cost: Usually under $5 with an existing kit. Supervision: Adult guidance recommended for wiring and cutting.
Tools
- Small screwdriver
- Wire stripper
- Multimeter
- Low-temperature glue gun or tape
Low-cost swaps
- Use alligator-clip leads for a no-solder version.
- Build and test the mechanism manually before adding electronics.
- Use two independent switches and hand timing for a no-code differential-drive study.
Wiring table
| From | To | Purpose |
|---|---|---|
| Motor battery | H-bridge VM and GND | Supply rated motor power |
| Controller pins | H-bridge direction and enable inputs | Command wheel direction and speed |
| Driver outputs | Left and right motors | Deliver protected motor current |
| All grounds | Common ground | Share signal reference |
Project-specific safety
- Use only the listed low-voltage battery supply; never use mains electricity.
- Disconnect power before changing wires and stop if a motor, wire, or battery becomes warm.
- Use washable markers and low voltage, test wheels raised, guard gears, and stop if motors, driver, battery, or marker holder warm or jam.
Orient the build
Place the build so timed left and right motor commands is on your left and vehicle path recorded by a marker is on your right. Call the side facing you the front, the far side the back, the tabletop the bottom, and the opposite face the top.
Build it
Step-by-step instructions
Step 1
Square the chassis
Align axles and match wheels.
Roll unpowered across paper.
Step 2
Build the marker holder
Guide a washable marker vertically with light spring pressure.
Place tip near wheel axle center.
Step 3
Wire the driver
Route each motor to its own H-bridge output channel, then join controller and driver grounds.
Leave the battery disconnected while moving leads.
Builder checkpoint: After wire the driver, the first subassembly should stay aligned when handled gently.
Step 4
Test wheels raised
Run each wheel forward and reverse for one second.
Correct direction constants.
Watch for: If this stage binds or drifts, inspect battery variation before adding more parts.
Step 5
Calibrate straight travel
Command equal speeds for one second and measure line length and curve.
Add a small left-right trim.
Step 6
Calibrate a quarter turn
Run wheels in opposite directions for a short interval.
Repeat and average the angle.
Builder checkpoint: After calibrate a quarter turn, operate the build slowly and confirm that vehicle path recorded by a marker begins without binding.
Step 7
Program a shape
Combine straight and turn commands for a square or triangle.
Predict final position.
Step 8
Run and tune
Tape paper flat, press start, and measure closure error.
Change one duration or trim at a time.
Builder checkpoint: At the final checkpoint, The robot draws a closed shape at least 20 cm wide and returns within 5 cm of its starting point.
See the engineering
Why it works
- Input
- timed left and right motor commands
- Output
- vehicle path recorded by a marker
- Motion
- electrical motor rotation-to-planar drawing motion
- Energy losses
- wheel slip, motor mismatch, marker drag, battery variation
Why this works
Differential-drive path control
Equal wheel speeds produce a straight path; different speeds create a curve; opposite directions pivot the robot. Open-loop timing assumes motion repeats without measuring the result.
Look for: Draw three one-second straight segments on fresh paper and compare their lengths and curvature.
Where the energy goes
Efficiency and losses
The ideal model leaves out wheel slip, motor mismatch, marker drag, battery variation. These effects turn some input energy into heat, sound, vibration, or unwanted motion, so measured performance will be lower than an ideal calculation.
Look for: Run the build slowly and locate the first place where wheel slip becomes visible or audible.
Math bite
Estimate pivot angle
Formula: angle = wheel travel difference / track width
- Difference = 0.18 m
- Track width = 0.12 m
Substitute: angle = 0.18 / 0.12 = 1.5 rad = 86°
Result: The command produces roughly a quarter turn.
A real turn differs because wheels slip and motors coast.
The model assumes perfect in-place rotation.drawbot_square.ino
A complete timed square path using a dual H-bridge; calibrate durations for your chassis.
const int leftA=5,leftB=6,rightA=9,rightB=10;
void drive(int left,int right,unsigned long duration){
analogWrite(leftA,left>0?left:0); analogWrite(leftB,left<0?-left:0);
analogWrite(rightA,right>0?right:0); analogWrite(rightB,right<0?-right:0);
delay(duration); analogWrite(leftA,0); analogWrite(leftB,0); analogWrite(rightA,0); analogWrite(rightB,0); delay(150);
}
void setup(){ pinMode(leftA,OUTPUT); pinMode(leftB,OUTPUT); pinMode(rightA,OUTPUT); pinMode(rightB,OUTPUT); delay(1500);
for(int side=0;side<4;side++){ drive(130,125,1100); drive(120,-120,430); }
}
void loop(){} 
Make it behave
Test, troubleshoot, and tune
Controlled test
Start here: Run one-second straight and pivot commands with the marker down before programming a shape.
Success looks like: The robot draws a closed shape at least 20 cm wide and ends within 5 cm of its start.
Measure: Side length, turn angle, closure error, line breaks, and battery voltage.
Change: turn duration
Keep constant: robot, speed, surface, marker pressure, battery, and program order
- short turn
- calculated turn
- slightly longer turn
| Symptom | Likely cause | Confirm it | Fix |
|---|---|---|---|
| Lines curve | Motors differ or marker drags off-center | Run with marker lifted, then lowered | Add trim and reduce marker pressure |
| Turns overshoot | Motor coast or duration is high | Mark wheel stop after command | Shorten pulse or add braking |
| The marker skips | Holder pressure is low or paper wrinkles | Move robot by hand | Flatten paper and add gentle spring force |
| Controller resets | Motor supply noise affects logic | Watch power light at starts | Use decoupling and rated separate supplies with common ground |
Choose your tradeoff
Calibrate straight travel before turns. Higher speed makes larger drawings faster but increases coast, slip, and closure error.
Keep experimenting
Try another version
Line and turn cards
Run one command at a time.
Smallest closure error
Repeat the same square five times.
Logo path
Create a reusable command array with calibrated distances and angles.
Build together
Classroom and access options
Classroom version
Teams can compare turn duration while keeping robot, speed, surface, marker pressure, battery, and program order. Assign builder, tester, recorder, and explainer roles; have each team predict the result before collecting three trials.
Access adaptations
- Color-code and label every wire at both ends.
- Use clip leads, larger controls, and pre-crimped connectors when fine motor work is difficult.
- Use a large start button and prewritten motion cards that teams arrange into a path sequence.
Reflect on the design
- How did turn duration change the measured result?
- Where did wheel slip affect the build most strongly?
- What evidence shows that differential-drive path control explains the motion?
- Which change would improve vehicle path recorded by a marker without creating a new problem?
Glossary
- Differential-drive path control
- Equal wheel speeds produce a straight path; different speeds create a curve; opposite directions pivot the robot.
- Input
- The action or energy supplied to a system; here it is timed left and right motor commands.
- Output
- The useful response produced by a system; here it is vehicle path recorded by a marker.
- Efficiency
- The fraction of input energy that becomes useful output instead of friction, sound, heat, or unwanted motion.
Build your dreams
One build can start the next.
Share what you learned, change one variable, and help another builder understand what worked.
Explore more guidesSources and build notes
A platform-agnostic low-voltage robotics or electronics project with original assembly guidance.
- Low-voltage design review: Battery voltage, polarity, component roles, current paths, and motor or LED protection were editorially checked.
Written and edited by BrickLabClips. Published 2026-07-22; updated 2026-07-22.
