A DREAM Robotics Agent

IDA

Integrated Drive Automaton

MILA's little sibling: the same tank chassis cut down to a plain Arduino, an ultrasonic sensor on a servo, an IR receiver and an L298N. No WiFi, no Bluetooth. Everything is driven from an IR remote.

C++ Arduino IR remote Tank MIT License
IDA's avatar: a human representation of the robot
IDA · avatar
IDA from the front: wooden tank chassis with an HC-SR04 ultrasonic sensor on a servo
Front
IDA from above: Arduino Uno, 2S 18650 battery pack and the ultrasonic sensor
Top

Overview

Small, simple, and remote-controlled

Drive

Three modes

Let her roam on her own in obstacle mode (the default at boot), drive her like a car, or control each track like a tank.

Avoid

Diagonal scanning

While driving, the sensor sweeps ahead and to both diagonals, so walls met at an angle are caught before a track corner hits them.

Turn

Variable turns

She backs up, looks left and right, and turns towards the open side: 45–90° into open space, up to a full 180° when boxed in.

Stay safe

Collision guard

In manual modes she force-stops if something gets within 15 cm while driving forward, and WASD stops as soon as you let go.

Speed

Four presets

Cycle 100 / 75 / 50 / 25 % with the remote's OK button.

Feedback

Buzzer & serial

A beep at power-up and when she stops for an obstacle. Distances, turns, modes and IR codes are printed at 115200 baud.

Hardware

What she's built from

  1. 01 Small wooden tank robot chassis
  2. 02 Arduino Uno (or Nano)
  3. 03 2S 18650 battery pack
  4. 04 L298N motor driver
  5. 05 MG95 servo
  6. 06 HC-SR04 ultrasonic sensor
  7. 07 5 V DC motors
  8. 08 IR receiver + IR remote
  9. 09 Buzzer

Pinout

Sensors, servo & buzzerPin
Ultrasonic TRIG8
Ultrasonic ECHO9
Servo10
IR receiver11
BuzzerA0
L298NPin
ENA5 (PWM)Right speed
IN1 / IN22 / 3Right motor
ENB6 (PWM)Left speed
IN3 / IN44 / 7Left motor

Remove the ENA / ENB jumpers on the L298N, otherwise the speed setting does nothing. Pins 5 and 6 are the only PWM pins left free: the Servo library uses Timer1 (pins 9/10) and IRremote uses Timer2 (pins 3/11).

Controls

Everything from the IR remote

1 · Obstacle

Autonomous

She drives herself, scanning ahead and to the diagonals and turning away from whatever is in the way. This is the mode she boots into.

2 · WASD

Car-style driving

Hold an arrow to drive forward, back, left or right. Let go and she stops.

3 · Tank

Independent tracks

Each colour button switches one track on or off. Press it again to switch that track off.

Tank mode buttons

ButtonTrack
RedLeft forward
GreenLeft backward
YellowRight forward
BlueRight backward

Red + Yellow drives straight ahead. The receiver can only read one button at a time, so the tracks latch on and off instead of needing to be held. OK cycles the speed in any mode.

IDA link: driven by NORA

NORA can drive IDA through her IR transmitter, from NORA's web page, Python controller or Bluetooth link. The link has its own protocol so nothing else in the fleet reacts to it: Samsung-format IR (38 kHz), address 0x0DA1.

CodeCommand
0x48Forward
0x49Backward
0x4ALeft
0x4BRight
0x4CStop (also leaves Obstacle mode)
0x4DObstacle mode
0x4EWASD mode
0x4FCycle speed

A drive command switches her into WASD mode by itself. NORA re-sends it every 150 ms while held, and IDA stops once the link has been quiet for 500 ms. Link frames print on the Serial Monitor as LINK:0x...

Talking with NORA

NORA chats with IDA over the same link (0x40 hello, 0x41 how are you, 0x42 happy, 0x43 curious, 0x44 sleepy, 0x45 let’s play, 0x46 bye, 0x47 “I am here” beacon (silent)). IDA answers in Brainfuck: every phrase is a program that prints its words, beeped one tone per symbol, and she beeps her reply program back and prints TALK:<phrase> on the Serial Monitor, and greets NORA when she comes back after a minute away. While she’s driving she just chirps, so answering never holds up the obstacle checks.

Using a different remote? Press its buttons with the Serial Monitor open: each one prints as IR:0x... Copy those codes into the IR_... defines at the top of IDA.ino.

Quick start

From USB cable to driving

You need the Arduino IDE, the bundled Servo library and IRremote v4+ from the Library Manager.

  1. Check the motors first. Upload scripts/motor_test/motor_test.ino. It repeats forward, backward, left and right for 1.5 s each and prints each step on the Serial Monitor. If a track spins the wrong way, swap that motor's two wires on the L298N (OUT1/OUT2 or OUT3/OUT4) instead of changing the code.
  2. Upload scripts/IDA/IDA.ino. On power-up the servo sweeps left and right, she beeps, then starts in obstacle mode.
  3. Take over with 2 or 3 on the remote.

Tuning

These values are at the top of IDA.ino. Edit them and re-upload over USB.

SettingDefaultWhat it does
turnTime550 msAbout a 180° pivot. Obstacle turns are a random 1/4 to all of this. Increase if her 180 falls short.
stopDist35 cmHow close an obstacle straight ahead gets before she stops and scans.
diagStopDist35 cmThe same, for the diagonal looks.
backupTime250 msHow long she reverses before scanning (0 turns it off).
guardDist15 cmHow close an obstacle gets before the guard stops a manual drive.