Skip to the content
2 layers40 × 15 mmIR Sensor, the printed circuit board in 3D

An Arduino-based RC car platform with multiple interchangeable driving modes:

Size
40 × 15 mm
Copper layers
2
Thickness
1.6 mm
Parts
10
Nets
7
Pads
26
Tracks, vias
39, 3
Pours
1
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
16 Oct 2026
Updated
3 Nov 2026

Overview

IR Sensor is an open-source printed circuit board by nominee-max, from the nominee-max/3-modes-RC-car repository on GitHub. It is a 2-layer board of 40 × 15 mm with 10 parts on 7 nets, routed with 39 tracks and 3 vias.

It is built around the LM358. Its parts include 3 resistors, 3 diodes and 1 connector. It belongs with the sensors and measurement boards of this library.

Main components

1

README

README.md

3-Modes RC Car

An Arduino-based RC car platform with multiple interchangeable driving modes:

  1. Line following - Uses left and right line sensors to follow a track.
  2. Obstacle avoidance - Uses an ultrasonic distance sensor mounted on a servo to detect obstacles and choose a clearer direction.
  3. Hand-gesture control - Uses an MPU6050 motion sensor and nRF24L01 radios to send tilt commands to the car wirelessly.

The repository includes the firmware for each mode and KiCad design files for the line-follower and hand-gesture-control hardware.

Project Description

This project explores several ways to control the same two-wheel drive robot chassis. Each mode is implemented as a separate Arduino sketch so it can be tested and uploaded independently.

Implemented features

  • Two-motor differential drive using an L298N-style motor driver.
  • Line-following logic based on two digital sensors.
  • Ultrasonic ranging with servo-assisted left/right scanning.
  • Wireless control over nRF24L01 modules.
  • MPU6050-based tilt input using the Digital Motion Processor (DMP).
  • Motor stop behavior when the hand-gesture radio signal is lost.
  • KiCad schematics and PCB layouts for supporting hardware.

Repository structure

text
Firmware/
├── controller_radio/
├── hand_gesture_radio/
│   ├── Reciver_handgesture/
│   └── Transmitter_HandGesture/
├── line_following/
└── obstacle_avoider/

Hardware/
├── Line Follower/
└── hand gesture control/

Important hardware notes

  • The firmware targets Arduino-compatible boards and assumes the pin assignments in each sketch.
  • Motor direction and enable pins differ between the autonomous and hand-gesture sketches. Confirm wiring against the selected sketch before powering the car.
  • The hand-gesture transmitter and receiver must use the same nRF24L01 address and radio data rate.
  • The transmitter requires an MPU6050, and both radio endpoints require an nRF24L01 module.
  • Use a suitable external motor power supply and common ground. Do not power motors directly from an Arduino GPIO pin.

Getting Started

Prerequisites

Install the Arduino IDE and the libraries required by the mode you want to run:

  • Servo (included with the Arduino IDE) for obstacle avoidance.
  • SPI and Wire (included with the Arduino IDE) for radio and I2C communication.
  • RF24 for the nRF24L01 transmitter and receiver.
  • I2Cdev and MPU6050 for the hand-gesture transmitter.

You will also need:

  • An Arduino-compatible controller board.
  • A two-motor robot chassis and motor driver.
  • A USB cable for uploading sketches.
  • Mode-specific sensors and modules.
  • A separate, appropriate supply for the motors and a shared ground.

1. Clone and open the project

bash
git clone https://github.com/nominee-max/3-modes-RC-car.git
cd 3-modes-RC-car

Open the sketch for the desired mode in the Arduino IDE.

2. Wire the selected mode

Use the pin definitions at the top of each sketch as the source of truth. The currently implemented mappings include:

Line following

The line-following sketch uses:

  • Motor control pins: 2, 3, 4, and 7
  • Right line sensor: A0
  • Left line sensor: A1

Upload Firmware/line_following/line_following.ino, then place both sensors over the track and adjust sensor logic or motor wiring if the car turns in the wrong direction.

Obstacle avoidance

The obstacle-avoidance sketch uses:

  • Motor enable pins: 5 and 6
  • Motor direction pins: 8, 9, 10, and 11
  • Ultrasonic trigger: A5
  • Ultrasonic echo: A4
  • Scanning servo: 3

Upload Firmware/obstacle_avoider/obstacle_avoider.ino. The car drives forward until an obstacle is detected within approximately 40 cm, reverses briefly, scans both sides, and turns toward the side with more clearance.

Hand-gesture control

Upload the two sketches to separate boards:

  1. Upload Firmware/hand_gesture_radio/Transmitter_HandGesture/Transmitter_HandGesture.ino to the MPU6050 transmitter.
  2. Upload Firmware/hand_gesture_radio/Reciver_handgesture/Reciver_handgesture.ino to the car receiver.
  3. Install the RF24, I2Cdev, and MPU6050 libraries before compiling.
  4. Open the serial monitor at 115200 baud to inspect initialization and control data.

The transmitter maps MPU6050 pitch and roll to X/Y radio values. The receiver interprets those values as forward, reverse, left, right, or stop commands. If no packet is received for 500 ms, the receiver stops the motors.

3. Upload and test safely

  1. Test with the drive wheels off the ground.
  2. Verify that the motors stop at startup and when radio communication is interrupted.
  3. Check motor direction before placing the car on a track.
  4. Disconnect USB power before changing wiring.
  5. Test one firmware mode at a time; do not upload autonomous and radio-control sketches to the same controller expecting them to run together.

Roadmap

  • Add a single mode-selection interface instead of requiring a separate firmware upload.
  • Document complete wiring diagrams and connector labels for every mode.
  • Add a shared motor-control library to reduce duplicated drive logic.
  • Add configurable motor speed, sensor thresholds, and obstacle distance settings.
  • Improve line-following behavior with proportional or PID steering.
  • Add radio packet validation and clearer transmitter/receiver failsafe states.
  • Add battery voltage monitoring and low-battery protection.
  • Add calibration procedures for the MPU6050, line sensors, and ultrasonic sensor.
  • Add build and upload instructions for supported Arduino boards.
  • Add automated checks or hardware-in-the-loop tests where practical.

General README Template

The following outline can be reused for future project documentation:

markdown
# Project Name

Short summary of what the project does and who it is for.

## Project Description

Explain the problem, the main features, and the current implementation status.

## Features

- Feature one
- Feature two
- Feature three

## Repository Structure

Describe the important folders and files.

## Requirements

List hardware, software, dependencies, and supported platforms.

## Getting Started

Parts

10
QtyValueFootprintReferences
2LEDLED_THT:LED_D5.0mm_Horizontal_O3.81mm_Z3.0mmD1, D2
1100Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1
110kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR2
110kPotentiometer_THT:Potentiometer_Bourns_3266Y_VerticalRV1
1330Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR3
1LEDLED_SMD:LED_1206_3216MetricD3
1LM358Package_DIP:DIP-8_W7.62mm_SMDSocket_SmallPadsLM358
1POWER_CONConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_HorizontalJ1

The 9 most common of 10 parts.

Similar boards

  • 2 layers132.1 × 45.7 mmIPoS, the printed circuit board in 3D

    IPoS

    peterheinrich/InternetOverSpaghetti

    Transmitting IP packages over a pair of spaghetti thus demonstrating how media independent IP really is.

    42 parts342
  • 2 layers68.8 × 53.6 mmZArduino, the printed circuit board in 3D

    ZArduino

    zmaker/arduino_cookbook

    gli sketch del nuovo progetto Arduino Cookbook e dei video di YouTube

    46 parts269
  • 2 layers152 × 88 mmRFBitBangSMT, the printed circuit board in 3D

    RFBitBangSMT

    profdc9/RFBitBanger

    A QRP digital transceiver created from readily available parts for off-the-grid maintenance

    271 parts222
  • 2 layers118 × 103.5 mmEV Charger2, the printed circuit board in 3D

    EV Charger2

    fotherja/EV_Charger

    Arduino Uno Code for EV Charger

    62 parts167MIT
  • 2 layers113 × 62.2 mmFullScope, the printed circuit board in 3D

    FullScope

    tvlad1234/pillScopePlus

    Oscilloscope based around the STM32F401 Black Pill and a color LCD screen

    15 parts165Apache-2.0
  • 2 layers75.2 × 61.1 mmHelios, the printed circuit board in 3D

    Helios

    Grix/helios_dac

    Helios Laser DAC

    102 parts132
  • 2 layers144.1 × 182.2 mmSHVC CPU-01, the printed circuit board in 3D

    SHVC CPU-01

    starlightk7/OpenSFC

    OSHW Reproduction Parts related to the Super Famicom / Super Nintendo game console

    498 parts114CERN-OHL-S-2.0
  • 2 layers100 × 85 mmVNA, the printed circuit board in 3D

    VNA

    profdc9/VNA

    Vector Network Analyzer based on the STM32F103C8T6 bluepill

    178 parts93

Questions

How big is the IR Sensor PCB?

It measures 40 × 15 mm and has 2 copper layers, 1.6 mm thick.

What parts does the IR Sensor use?

10 parts, built around the LM358. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the IR Sensor KiCad files?

From the nominee-max/3-modes-RC-car repository on GitHub, at the commit this page was made from: the board is Hardware/Line Follower/IR Sensor.kicad_pcb and its schematic Hardware/Line Follower/Line Follower.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the IR Sensor design in my own project?

Its repository states no licence, so its author keeps all rights: ask nominee-max before reusing the design.