A self-driving car that reads ambient brightness with light sensors and steers toward the brighter side.
I'll write this up gradually as a review of the curriculum we followed.
Build Plan
- Gather parts (this article)
- What is A/D conversion?
- Reading values from the converter via SPI
- Pseudo-analog output with Raspberry Pi PWM
- Motor control with a motor driver
- Connecting light sensor input to motor control
Parts List
Raspberry Pi de Manabu Denshi Kousa (Electronics with Raspberry Pi)
AmazonThe textbook for this series.
This book walks through building a smartphone-controlled RC car.
Along the way it covers A/D conversion and motor control — we referenced it whenever we got stuck.
Raspberry Pi 3 B+
AmazonRaspberry Pi 2 or 3B also works.
Update: Raspberry Pi Zero W does work, but running VNC with a desktop while the camera is active gets quite sluggish.
Photoresistors × 2
AmazonPhotoresistors are light sensors — often included in electronics starter kits.
Two are needed, one for each side of the car, to compare left vs. right brightness.
A/D Converter: MCP3008
AmazonAn 8-channel, 10-bit A/D converter.
Note: it sometimes shows up on Amazon with absurdly inflated pricing (¥10,000+) — watch out for that.
Two channels are all that's actually needed, so any comparable chip will do.
If it's out of stock, try Akizuki Denshi.
HiLetgo L9110S Motor Driver
AmazonCrudely built but extremely cheap motor driver.
Controls two motor channels with a single board, which keeps the overall build compact.
Double Gearbox
AmazonTamiya dual independent gearbox — motors included.
Versatile enough to build a lot of different things with this one kit.
Caterpillar Track Set
AmazonTamiya track and wheel set.
Easy to customize — adjust track length and wheel placement as needed.
Universal Plate Set
AmazonUsed as the chassis base.
Anything flat works — even a piece of scrap wood.
Other supplies: battery holder, portable battery pack, jumper wires (lots).
That's it for now — more when I get around to it.
No comments:
Post a Comment