Robotics/electronics

Drawbot

Build a two-motor differential robot that carries a marker and draws paths from timed wheel commands.

A drawbot turns motion into evidence. Every wheel mismatch, turn duration, and slip leaves a visible line, making debugging unusually honest.

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

FromToPurpose
Motor batteryH-bridge VM and GNDSupply rated motor power
Controller pinsH-bridge direction and enable inputsCommand wheel direction and speed
Driver outputsLeft and right motorsDeliver protected motor current
All groundsCommon groundShare 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

  1. Step 1

    Square the chassis

    Align axles and match wheels.

    Roll unpowered across paper.

  2. Step 2

    Build the marker holder

    Guide a washable marker vertically with light spring pressure.

    Place tip near wheel axle center.

  3. 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.

  4. 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.

  5. Step 5

    Calibrate straight travel

    Command equal speeds for one second and measure line length and curve.

    Add a small left-right trim.

  6. 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.

  7. Step 7

    Program a shape

    Combine straight and turn commands for a square or triangle.

    Predict final position.

  8. 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
Drawbot concept diagram with labeled input, output, and motion arrows.
The electrical motor rotation-to-planar drawing motion motion path, with the main efficiency losses called out.

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(){} 
Brick-building meme reading: Chuck Norris does not build LEGO; he roundhouses the bricks into sculptures.
The robot drew a square with three right angles and one creative negotiation.Image supplied by the site owner.

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

  1. short turn
  2. calculated turn
  3. slightly longer turn
Troubleshooting guide
SymptomLikely causeConfirm itFix
Lines curveMotors differ or marker drags off-centerRun with marker lifted, then loweredAdd trim and reduce marker pressure
Turns overshootMotor coast or duration is highMark wheel stop after commandShorten pulse or add braking
The marker skipsHolder pressure is low or paper wrinklesMove robot by handFlatten paper and add gentle spring force
Controller resetsMotor supply noise affects logicWatch power light at startsUse 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

Easier

Line and turn cards

Run one command at a time.

Performance

Smallest closure error

Repeat the same square five times.

Advanced

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

  1. How did turn duration change the measured result?
  2. Where did wheel slip affect the build most strongly?
  3. What evidence shows that differential-drive path control explains the motion?
  4. 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 guides

Sources 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.

Next builds

Related guides