Build a drift car, from zero
Start with one headlight. Finish with the whole board.
Seven things to understand
Tap a part. Finish its chapters and it turns green.
Seven levels of a game. Clear a level and its part of the car lights up.
What a PCB is
Parts, held and wired by flat copper.
A tiny city. The parts are buildings. The copper lines are the roads between them. PCB means printed circuit board.
Every part, three ways
The thing. Its symbol. Its footprint.
A person, a stick-figure drawing of them, and their footprints in sand. One part, three views.
Symbol key
Twelve symbols cover most drawings.
The symbols on a map: a small drawing that stands for a real thing.
Find the symbol
Now without the names.
A flash-card round. No names this time.
Two families
Legs through the board, or flat on top.
One kind goes through the board like a nail through wood. The other sits on top like a sticker.
How small?
Four standard sizes, drawn to scale.
The names work like shoe sizes: a smaller number is a smaller part.
The datasheet
Read three things first.
The instruction leaflet that comes with a part. It says how much the part can take before it breaks.
Red LED, 1206. Illustrative values, not a real datasheet.
Current needs a loop
Out on VCC, back on GND.
A racetrack. Cars keep moving only if the track joins back to the start. VCC is the road out of the battery, GND is the road home.
Push, flow, squeeze
Voltage pushes. Resistance squeezes. Current is what gets through.
Water in a hose. Voltage is how hard the tap pushes. Resistance is a pinch in the hose. Current is the water that gets through.
Why the LED needs a resistor
The resistor sets the LED's current.
The resistor is a speed bump. Without it the current rushes through and the LED burns out.
- Current
- Across R1
- R1 heat
Draw the schematic
A schematic says one thing: which pin joins which.
A metro map. It shows which stations connect, not where they really are.
Nets
Each wire you drew is a net. Same net, same copper.
A net is like a group chat: every pin in it gets the same signal.
Labels connect without lines
Same name, same net. Even across pages.
A label is a teleport. Two wires with the same name are joined, with no line drawn between them.
ERC: the spell-check
It catches some mistakes. Not all.
ERC means electrical rules check. A spell-checker spots a misspelt word, but not a wrong fact. This is the same.
The board is a sandwich
Cut it in half: six layers.
A layer cake. The copper layers carry the electricity. The others hold, protect and label it.
What is on it
Eight kinds of shape.
Tracks are roads. Pads are parking spots for part legs. Vias are lifts between floors.
Millimetres and mils
A mil is a thousandth of an inch.
Two rulers for one length, like kilometres and miles. A mil is tiny: about 0.025 mm.
Start with the outline
Shape and screw holes come first.
Cut the pizza base before adding toppings. The board has to fit inside the car first.
How wide for how much current?
Decide this before you route.
A wider road carries more traffic. A wider track carries more current without getting hot.
Place the parts
Drag them. Short, uncrossed lines make routing easy.
Seat friends who talk a lot next to each other. Parts that connect should sit close.
Route it
Tap a white line. It becomes copper.
Drawing roads between houses. Two roads cannot cross on the same floor.
A capacitor at every chip
As close to the power pin as it will go.
A water bottle on the chip's desk. When it needs a quick gulp of power, it does not wait for the far-away battery.
Flood the spare space with ground
Every current comes home through it. Then hunt for islands.
Pave the whole empty field instead of building small roads home. An island is a paved patch with no bridge to the rest.
Labels you can still read
After the parts are soldered on.
Name tags. They help whoever solders the board, and whoever repairs it later.
Review before you move on
Five checks.
A pilot's checklist before take-off.
Too thin, too close
The DRC flags what the factory cannot make.
DRC means design rules check. The factory draws with a pen of a fixed thickness. Thinner lines, or lines closer together than that, cannot be made.
What the rules measure
Six distances.
The smallest gaps allowed between cars in a car park.
One file per layer
The factory gets Gerber files, plus a drill file.
A stack of stencils: one sheet for copper, one for the green coat, one for labels, one for holes.
Inside a Gerber
Plain text: pick a pen, move, draw.
Orders for a drawing robot: pick a pen, go to a point, draw to the next point.
Parts list and positions
BOM: what to buy. Position file: where it goes.
A shopping list and a seating plan. BOM means bill of materials.
Before you send
Four checks.
Check your homework before handing it in. A wrong board costs days of waiting.
How the factory makes it
A slice through the board.
Wax on an egg before dyeing it: the copper that is covered stays, the rest is washed away.
How the parts go on
Paste, place, heat.
Baking biscuits: dots of paste, toppings on, then into the oven. The paste melts into solder.
First power-up
Never start with the battery.
A lab power supply is a tap you open slowly. A battery is a burst pipe: one mistake gets full power at once.
Inside your drift car
L.O.T Cars Nitro, 1:64 scale, 7.5 cm long.
Five jobs in one tiny car. Each job has its own part.
Why it drifts: grip runs out
A tyre has a grip budget. Ask for more and it slides.
Grip is pocket money. Spend it on speed, on turning, or split it. Try to spend more than you have and the tyre lets go.
Why it drifts: the back goes wide
A drift is a slide you steer.
Sliding across a smooth floor in socks, and steering while you slide.
Why it drifts: four wheels pulling
Your car drives all four wheels. That changes the slide.
Rear-wheel drive is pushing a shopping trolley from behind. Four-wheel drive also pulls it from the front.
From thumb to wheel
Follow one command through the car.
A relay race. Each part passes the message on to the next.
A real board you can open
The open-source Micro RC Receiver, made for tiny cars.
Your car's board is a secret. This one is an open book, built for the same job.
Battery: one small cell
Everything runs from it. It must never go flat.
A water tank that gets damaged if it is drained empty. So the brain keeps watching the level.
Power: two voltages, one cell
Chips want it steady. The motor wants it raw.
The motor drinks straight from the firehose. The chips need a calm, steady tap. The part that makes the calm tap is a regulator.
Brain: every pin, and why that one
ATmega328P, 32 pins. Some are forced. Some were a choice.
Each pin is a finger. Some fingers have one special skill, so their job is fixed. The rest can do any simple on/off job.
Connections: the board's Eagle schematic. Reasons: the chip's fixed pin functions, from training data.
Brain: three helpers it cannot run without
Remove one. See what breaks.
A metronome to keep time, a water bottle for sudden thirst, and a hand that keeps the restart button from being bumped.
Radio: bits ride on a wave
2.4 GHz. A touch faster means 1, a touch slower means 0.
Whistling a code: a slightly higher note means 1, a slightly lower note means 0. Here the note is a radio wave.
Radio: same channel, or silence
126 channels. Remote and car must agree on one.
Walkie-talkies. Both must be set to the same channel number to hear each other.
Radio: what one message holds
Four parts, sent in a burst, many times a second.
A letter in an envelope: a knock on the door, who it is for, the news, and a check that nothing got smudged.
Radio: did it arrive?
The car answers every message.
The car shouts "got it!" after every message. No shout back means: send it again.
Radio: one byte over SPI
Select, tick eight times, release.
Passing a note one letter at a time. One wire taps the beat, and on every tap one bit crosses. Eight bits make a byte.
Gyro: three ways to turn
MPU-6050. A drift is only one of them.
Nod yes, tilt your head, shake your head no. The "no" turn is called yaw, and that is the drift.
Gyro: asked over I2C
Two wires. The brain asks, the gyro answers.
A classroom. The teacher calls one name, and only that pupil answers.
Gyro: the drift helper
On a car with a gyro: the back slides out, the board steers the other way.
Balancing a broom on your palm: you move your hand under where it falls. A gyro does that with the steering.
Motor: more load, more current
Two wires. Hold the wheel and watch.
Pedalling uphill. The harder the job, the more energy it takes. A stuck motor takes the most current of all.
Motor driver: four switches
This is an H-bridge. Close two switches to make a loop.
Turn a battery round in a toy and the motor spins backwards. The four switches do that turning for you.
Motor driver: the pins the brain uses
Two direction pins and one speed pin. The sleep pin is wired always-on.
The brain whispers, the driver has the muscles. Two pins say which way, one says how fast.
Speed: on, off, very fast
PWM. More on-time, more speed.
Flick a light switch very fast. On for half the time looks half as bright. PWM means pulse-width modulation.
Steering: the width of a pulse
One signal wire tells the servo an angle.
A clapping code: a short clap means one way, a long clap the other, in between means straight.
A chip program has four parts
The program is a text file. Almost every one has this shape.
A recipe card: ingredients, names for your bowls, prep you do once, then the step you repeat.
Six words the chip knows
Most chip code is these six, in different orders.
A tiny phrasebook. Six phrases get you a long way.
The loop the chip runs
Seven lines. The real ones, in the real order.
A goalkeeper: look, decide, move, and again, many times a second.
Zoom in: is the remote still there?
Inside readRadio(). The chip times how long the remote has been silent.
Marco Polo. No "Polo" for a whole second? Stop and stand still.
Zoom in: the gyro sum
Inside mrsc(). Three lines of arithmetic decide where the front wheels point.
A co-driver with a hand on the wheel. The faster you go, the harder the nudge.
Build one
Lego first, glue later. Get it working on a breadboard, then turn it into a board.
Files: github.com/TheDIYGuy999/Micro_RC_Receiver
Sources for this chapter
Toy specifications: the seller's page for the L.O.T Cars Nitro (legendoftoys.com). That car's board is not published, so this chapter teaches from a different, open-source board. Chips, headers, battery cutoff and steering correction of the Micro RC Receiver: its GitHub README. Everything else comes from the model's training data and was not checked against datasheets or the board files: which ATmega328P pins do SPI, I2C, PWM and ADC; the H-bridge and PWM explanations; servo pulse timing; lithium cell voltages; the firmware loop; the teaching layout. Neither board was opened or measured.
Twelve questions
Glossary
Where next
- Install KiCad, free: kicad.org/download. Guide: docs.kicad.org.
- The NIELIT course: folder · outline (web page) · outline (PDF).
- The car board: Micro RC Receiver.
- Full lectures: MIT's The Art and Science of PCB Design.
Written by an AI model, not reviewed by an electronics engineer. Values, design rules, chip pinouts and file names come from the model's training data. Check datasheets and your fabricator's limits before relying on them.