AI-Powered Arduino Radar Tracker
by Latife Kaya in Circuits > Arduino
44 Views, 0 Favorites, 0 Comments
AI-Powered Arduino Radar Tracker

This project combines Arduino, an ultrasonic sensor, servo motors, and AI-powered image recognition to create a 2D radar tracking system. It detects a 3D-printed model airplane and records its distance, simulating how smart sensing systems in self-driving cars, drones, or robotics work. The AI model is trained using Teachable Machine and runs in a browser to classify real-time webcam input.
Supplies
.jpg)




.jpeg)
- 1x Arduino Uno
- 2x Servo Motors
- 1x Ultrasonic Distance Sensor
- 1x LED (any color)
- Breadboard
- Jumper Wires
- USB Cable (for Arduino connection)
- Webcam (for AI image input)
- 3D-printed model airplane (or an image/model for detection)
- Computer with Google Chrome browser
- Tinkercad account (for simulation and modeling)
- Teachable Machine account (for AI model creation)
- Basic HTML/JavaScript editor (e.g. Visual Studio Code, Notepad++)
Design the Target Object
- Open Tinkercad.
- Create a new 3D design.
- Use basic shapes to model a small airplane (wings, fuselage, tail).
- Export your 3D design as an STL file and 3D print it.
- If you don’t have a printer, simulate it on screen for detection testing.
Downloads

Simulate the Circuit in Tinkercad
- Go to the Circuits section of Tinkercad.
- Place an Arduino Uno on the workspace.
- Add two servo motors:
- Connect signal pins to pins 6 and 3.
- Connect VCC to 5V and GND to GND.
- Add the ultrasonic sensor:
- Trig → Pin 5
- Echo → Pin 4
- VCC → 5V
- GND → GND
- Add an LED:
- Long leg to digital pin 2 through a 220Ω resistor
- Short leg to GND
- Simulate the setup to test connections.
Train the AI Image Classifier
- Visit Teachable Machine.
- Select Image Project → Standard Image Model.
- Create two classes: "Plane" and "Not Plane".
- Use your webcam to record samples for both classes:
- Show your airplane model in various lighting and angles for "Plane"
- Show backgrounds or hands for "Not Plane"
- Train the model and test it.
- Export the model → Choose “TensorFlow.js” format → Download the entire model folder (including model.json and metadata.json).
Build the Physical Circuit
- Place your Arduino Uno on a breadboard.
- Connect:
- Servo 1 (horizontal): Signal to pin 6
- Servo 2 (vertical): Signal to pin 3
- Ultrasonic sensor: Trig to pin 5, Echo to pin 4
- LED: Positive leg to pin 2 with resistor, negative leg to GND
- Use jumper wires and make sure all components are powered from the Arduino.
Upload the Arduino Code
- Open Arduino IDE.
- Paste the provided Arduino code.
- Verify and upload the sketch to your Arduino board.
- This code:
- Listens for direction commands from the browser
- Moves servos accordingly
- Measures distance with the ultrasonic sensor
- Adjusts LED brightness based on proximity
Set Up the Web Interface (HTML + JS)
- Open a code editor (e.g., VS Code).
- Create a file named index.html.
- Paste the full HTML and JavaScript code provided.
- Place the downloaded AI model folder (my_model) in the same directory as your HTML file.
- Open the HTML file in a Google Chrome browser.
Run the Full System
- Plug in your Arduino via USB.
- Click the “Start Tracking” button on your HTML page.
- Grant camera and serial port access.
- The webcam starts detecting.
- If the object is recognized as a Plane, the LED turns on and the system reads distance.
- If no plane is found for 2+ seconds, the servo motors move automatically in a search pattern.