Coding for Kids

Arduino Speed Tracker: 7 Easy Steps to Measure Motion

Arduino Speed Tracker: 7 Easy Steps to Measure Motion

Arduino Speed Tracker: 7 Easy Steps to Measure Motion

How Fast Can It Go? Build a Smart Arduino Speed Tracker! 

Have you ever wondered how the speed of a moving vehicle can be measured? Speed is not just a number shown on a vehicle’s speedometer. It can also be calculated using sensors, distance, time, and programming!

In this hands-on STEM project, you will build a simple Arduino speed tracker using an Arduino, two IR sensors, an I2C LCD, and a buzzer. The Arduino Speed Tracker detects a moving object at two different points and measures the time it takes to travel between them. The Arduino then calculates the speed and displays it on the LCD.

If the measured speed is higher than the set speed limit, the buzzer gives an alert.

Arduino Speed Tracker: 7 Easy Steps to Measure Motion

Learning Objectives of Arduino Speed Tracker

By completing this Arduino Speed Tracker project, you will:

  • Understand how IR sensors detect moving objects.
  • Learn how speed is calculated using distance and time.
  • Understand how Arduino reads and processes sensor signals.
  • Learn how to display information using an I2C LCD.
  • Explore how electronics and programming can be used for speed monitoring.

Materials Required for Arduino Speed Tracker Project

  • Arduino Uno
  • 2 × IR Obstacle Sensors
  • 16×2 I2C LCD
  • Buzzer
  • Breadboard
  • Jumper wires
  • USB cable
  • Laptop with Arduino IDE
  • Toy car or small moving object
  • Ruler or measuring tape
  • Cardboard or a flat surface for the track

Step-by-Step Instructions to Build an Arduino Speed Tracker

Step 1: Build the Track for Arduino Speed Tracker

Create a small track using cardboard or any flat surface.

Place IR Sensor 1 at the starting point and IR Sensor 2 at the ending point.

For this project, keep the distance between the two sensors at 20 cm.

Make sure the toy car can pass directly in front of both sensors. Arduino Speed Tracker: 7 Easy Steps to Measure Motion

Step 2: Connect the IR Sensors 

Connect IR Sensor 1:

  • Output Pin → D2
  • GND Pin → GND
  • VCC Pin → 5V

Connect IR Sensor 2:

  • Output Pin → D3
  • GND Pin → GND
  • VCC Pin → 5V

The two IR sensors will detect the toy car as it passes each point on the track.

Step 3: Connect the I2C LCD

Connect the 16×2 I2C LCD:

  • SDA → A4
  • SCL → A5
  • VCC → 5V
  • GND → GND

Arduino Speed Tracker: 7 Easy Steps to Measure MotionThe LCD will display the calculated speed and speed-limit status.

Step 4: Connect the Buzzer

Connect the buzzer:

  • Positive Pin → D5
  • Negative Pin → GND

The buzzer will sound when the measured speed is higher than the selected speed limit.

Step 5: Set the Sensor Distance

Use a ruler or measuring tape to measure the exact distance between the two IR sensors.

For this project:

Distance = 20 cm = 0.20 metres

This value is used to calculate the speed.

If you change the distance between the sensors, update the distance value in the Arduino program.

Step 6: Upload the Arduino Program

Open the Arduino IDE and make sure the LiquidCrystal_I2C library is installed.

Connect the Arduino Uno to your laptop and upload the following program:

Arduino Speed Tracker: 7 Easy Steps to Measure Motion

Step 7: Test Your Arduino Speed Tracker Project

Open the Serial Monitor in the Arduino IDE and select 9600 baud.

Place the toy car before Sensor 1.

Move the car along the track.

When the car passes Sensor 1, the Arduino starts the timer.

When the car reaches Sensor 2, the Arduino stops the timer and calculates the speed.

The LCD will display the measured speed.

If the speed is higher than the programmed speed limit, the buzzer will sound and the LCD will display “SPEED LIMIT!”

Try moving the car at different speeds and compare the readings.Arduino Speed Tracker: 7 Easy Steps to Measure Motion

How Does the Arduino Speed Tracker Work?

Two IR sensors are placed a fixed distance apart. When the object passes Sensor 1, the timer starts. When it reaches Sensor 2, the timer stops.

The Arduino uses the distance and travel time to calculate speed:

Speed = Distance ÷ Time

The speed is displayed on the I2C LCD. If it exceeds the set speed limit, the buzzer sounds.

Process:
Sensor 1 → Timer Starts → Sensor 2 → Speed Calculation → LCD Display → Buzzer Alert

Arduino Speed Tracker: 7 Easy Steps to Measure Motion

Why Is This Arduino Speed Tracker Project Special?

This project turns a simple toy car into a miniature speed monitoring system.

Instead of only learning the speed formula, you can see how the formula works in a real electronic system.

The Arduino Speed Tracker project combines:

  • Science: Understanding motion and speed.
  • Technology: Using IR sensors and Arduino.
  • Engineering: Building and positioning the track.
  • Mathematics: Calculating distance, time, and speed.
  • Programming: Processing sensor information and controlling outputs.

Safety Tip

  • Check all circuit connections before powering the Arduino.
  • Disconnect the USB cable before changing the wiring.
  • Keep liquids away from electronic components.
  • Do not connect 5V and GND directly together.
  • Handle the Arduino, LCD, and sensors carefully.
  • Keep wires away from the moving toy car.
  • Ask an adult for help when using scissors or craft tools.
  • Do not use this prototype to measure the speed of real vehicles.

Variations to Try

Once your basic speed tracker is working, try these challenges:

Level 1

Change the distance between the two IR sensors and update the distance value in the program.

Level 2

Test different toy cars and compare their measured speeds.

Level 3

Change the speed limit and observe when the buzzer activates.

Level 4

Add an LED that turns on when the speed limit is exceeded.

Level 5

Display the distance, time, and speed on the LCD.

Level 6

Build a miniature road and create a model traffic speed monitoring system.

Real-World Applications

The basic idea behind this project can be used in many areas, including

  • Vehicle speed monitoring
  • Traffic management
  • Robotics
  • Conveyor belt monitoring
  • Industrial automation
  • Sports timing systems
  • Automated measurement systems
  • Smart transportation systems

Professional speed-monitoring systems use more advanced sensors and equipment, but this project demonstrates the basic idea of measuring motion using distance and time.

Conclusion

Building a speed tracking system using Arduino, two IR sensors, an I2C LCD, and a buzzer is an exciting way to explore STEM through hands-on learning.

You can see how sensors detect a moving object, how Arduino measures time, how mathematics is used to calculate speed, and how electronic components can display and respond to the result.

With a few creative improvements, this simple prototype can become an interesting model of a smart traffic-monitoring system.

Frequently Asked Questions (FAQ)

1. Why do we need two IR sensors?

Two sensors are used to measure the time taken by an object to travel between two fixed points. The first sensor starts the timer, and the second sensor stops it.

2. How does the Arduino calculate speed?

The Arduino uses the formula:

Speed = Distance ÷ Time

It uses the known distance between the sensors and the time taken by the object to travel between them.

3. What is the purpose of the LCD?

The I2C LCD displays the measured speed and speed-limit status, making it easy to see the result.

4. Why does the buzzer sound?

The buzzer sounds when the measured speed is higher than the speed limit programmed in the Arduino code.

5. What should I check if the speed reading is incorrect?

Check that both IR sensors are connected correctly and positioned properly. Measure the distance between the sensors accurately and enter the correct value in the program. Also check whether your IR sensors detect an object using a LOW or HIGH signal.

Explore More…

Real Projects, Real Results

From hands-on learning to competition wins—see what Chitti students achieve

Find a class near you

Pick your city, district or county. Each page has local class times, kit shipping notes, and a trial button for families in that place.

India & US cities

India states

United States states