A 4WD Arduino robot car needs a chassis kit, four TT gear motors, two L298N drivers, and TCRT5000 line tracking sensors. The mecanum 4WD chassis kit ships with 60 mm omni wheels and an aluminum frame. This guide covers the chassis, wiring, sensors, and the line-following code that ties it together.
Which chassis kit should you start with?
The EQV mecanum 4WD chassis kit uses an aluminum alloy frame and 60 mm omni wheels. Omni wheels let the car strafe sideways as well as drive forward.
The smart robot car chassis kit is a simpler two-wheel base with a speed encoder and a battery box. Start with the two-wheel kit if this is your first robot.
How do you wire four TT motors?
Four TT motors need two L298N driver boards, one per side. Each L298N drives two motors, so wire the left pair to one board and the right pair to the other.
TT motors run on 3 to 6 V, and each motor draws under 1 A at stall on 6 V. Feed both drivers from the same battery pack through a switch.
Where do the line tracking sensors go?
Mount TCRT5000 modules under the front of the chassis, about 10 mm above the track. The 4-pack gives you one sensor per wheel line plus a spare.
Each module outputs a digital high or low signal when it sees the line. Read all four in the loop and steer toward the side that sees dark.
How do you add obstacle avoidance?
An infrared obstacle avoidance sensor mounts on the front bumper and stops the car before a wall. The module ships in a 5-pack or 10-pack for spares.
A PIR motion sensor such as the HC-SR501 detects people near the car. A DHT22 sensor logs temperature and humidity while the car runs its course.
What code makes the car follow a line?
The Arduino sketch reads the four TCRT5000 modules and sets motor speeds with analogWrite, using values from 0 to 255. PWM runs near 490 Hz on most Arduino pins, so motor speed steps feel smooth.
Add the speed encoder from the chassis kit to measure distance in wheel counts. One encoder tick equals a fixed distance, so the car can stop after a set run.
How do you power and test the car?
Four AA cells give about 6 V to the motors through the L298N boards. The driver boards drop that to 5 V logic for the Arduino Nano or UNO.
Test on the bench with the wheels off the ground first. Check that each motor spins the right way before the car ever touches the track.
Steps
- Bolt the four TT motors and 60 mm omni wheels to the chassis kit.
- Wire the left motors to one L298N and the right motors to the second L298N.
- Mount four TCRT5000 modules under the front, 10 mm above the track.
- Connect the sensor outputs to digital pins on the Arduino Nano.
- Load a sketch that reads the sensors and sets motor speeds from 0 to 255.
- Test on the bench with wheels lifted, then run the car on a taped line.
Frequently asked questions
Can I build the 4WD car with one L298N?
No. One L298N drives two motors, and a 4WD car has four. Use two driver boards, one per side.
What voltage do TT motors need?
TT gear motors run on 3 to 6 V DC. Four AA cells give about 6 V, which is the top of the range.
How high above the track should line sensors sit?
About 10 mm above the surface. Too high and the sensor misses the line; too low and it scrapes the track.
Do I need a speed encoder on a line follower?
No for basic line following, but yes for distance work. The encoder lets the car stop after a set number of wheel counts.
Parts used
EQV Mecanum Wheel 4WD Robot Car Chassis Kit, Aluminum Alloy, 60mm Omni Wheels, $47.11. EQV mecanum wheel 4WD robot car chassis kit in aluminum alloy. 60mm omni wheels with TT motors, single or double layer, complete kit or plate set. Assembly required. Ships from NY, USA.
Smart Robot Car Chassis Kit with Speed Encoder and Battery Box for Arduino, 2WD / 4WD, $48.22. Smart robot car chassis kit with speed encoder and battery box for Arduino. 2WD or 4WD with L298N driver, ultrasonic and tracking modules, UNO R3 board and assembly drawings. Ships from NY, USA.
TT Motor 130 Gear Motor + 65mm Wheel Set, 2 Motors + 2 Wheels, 3-6V DC, for Arduino Smart Car Robot, $9.63. TT motor 130 gear motor with 65mm wheel set for Arduino smart car robots. 2 motors + 2 wheels, 3-6V DC, 1:48 gear ratio, 800 gf cm torque. Ships from NY, USA.
L298N Dual H-Bridge Motor Driver Module for Arduino, DC / Stepper, 5-35V, 2A, $7.17. L298N dual H-bridge motor driver module for Arduino. Drives 2 DC motors or 1 stepper motor, 5-35V, 2A per bridge, built-in 5V regulator. 1, 2 or 4 pack. Ships from NY, USA.
TCRT5000 Infrared Reflective Line Tracking Sensor Module, 4-Pack, $7.02. TCRT5000 infrared reflective line tracking sensor module. 1: 25mm adjustable detection, LM393 comparator, digital output, 3.3: 5V. 4-pack for Arduino robot cars. Ships from NY, USA.
IR Infrared Obstacle Avoidance Sensor Module, 5-Pack / 10-Pack, $6.20. IR infrared obstacle avoidance sensor module for Arduino and robot cars. 2: 30cm adjustable detection, 35° angle, LM393 comparator, 3.3: 5V. 5-packs and 10-packs. Ships from NY, USA.
HC-SR501 PIR Motion Sensor Module, 2-Pack, $7.62. HC-SR501 PIR motion sensor module for Arduino and Raspberry Pi. 5: 20V, adjustable 0.3: 18s delay, up to 7m detection, <120° cone. 2-pack. Ships from NY, USA.
DHT22 / AM2302 Digital Temperature & Humidity Sensor Module, $5.96. DHT22 / AM2302 digital temperature and humidity sensor module. 0: 100% RH, -40 to 80°C, 3.3: 5.5V, single-bus output for Arduino and ESP32. Ships from NY, USA.
BMP280 Barometric Pressure & Temperature Sensor Module, 5-Pack / 10-Pack, 3.3V & 5V, $6.77. BMP280 barometric pressure and temperature sensor module. 300: 1100 hPa, ±1 hPa accuracy, I2C/SPI, 3.3V or 5V. 5-packs and 10-packs for Arduino and ESP32. Ships from NY, USA.
MQ-2 Smoke & Combustible Gas Sensor Module, $5.81. MQ-2 smoke and combustible gas sensor module for Arduino. Detects LPG, methane, propane, butane, alcohol, hydrogen, smoke : 300: 10,000ppm, 5V heater. Ships from NY, USA.
Arduino Nano 3.0 Compatible Development Board, Type-C USB, ATmega328PB, CH340C, $10.96. Arduino Nano 3.0 compatible development board with ATmega328PB MCU, CH340C USB-serial chip, and Type-C USB. Works with the Arduino IDE for maker, STEM, and robotics projects. Ships from NY, USA.
UNO R3 Compatible Development Board, ATmega328P CH340G : USB / Type-C, $9.27. UNO R3 compatible development board with ATmega328P and CH340G USB-serial, 16MHz, 14 digital I/O and 6 analog inputs. Works with the Arduino IDE. USB-B or Type-C, with or without cable. Ships from NY, USA.
RP2040 Pro Micro Development Board, 16MB Flash, USB-C, QMK Compatible, $8.37. RP2040 Pro Micro development board with 16MB flash, dual-core RP2040, USB-C, and BOOT and RESET buttons. Runs MicroPython and QMK firmware. Ships from NY, USA.
0.96 Inch OLED Display Module, SSD1306, I2C, 128×64, for Arduino / ESP32 / ESP8266, $5.47. 0.96 inch OLED display module, SSD1306 driver, 128×64 pixels, I2C interface, 4 pins (GND, VCC, SCL, SDA), 3.3V-5V. Works with Arduino, ESP32, ESP8266, and Raspberry Pi. Choose yellow-blue, white, or blue display. Sh
Related buying guides on Quality RC Parts
Motor Drivers for Arduino in the USA
Microcontrollers for Robotics in the USA
Browse all the guides on the Quality RC Parts Drone Guides hub, or start at the Quality RC Parts store.
Sources
- Arduino: Language Reference
- Adafruit: Servo guides and tutorials
- Espressif: ESP32 product page (2.4 GHz Wi-Fi, up to 240 MHz)
Quality RC Parts stocks parts in New York, USA and ships in-stock orders in 1-2 business days.
Last updated: 2026-11-10.