● Introduction – What is an Intelligent Interface?
Intelligent user interfaces are human-machine interfaces whose
purpose is to enhance the performance, affectivity, naturalness and,
in general, usability of interactions between humans and machines
representing, reasoning or performing on a collection of models
(user, domain, dialog, voice, functions, etc.). This makes using
computers, apps, or devices easier and more efficient. The
intelligent interface is fundamentally transforming user experience by
making interactions more personalized and intuitive. Unlike
traditional interfaces, which often require users to adapt to
technology, intelligent interfaces adapt to users. Leveraging
advanced algorithms and natural language processing (NLP), these
interfaces can understand and predict user needs with remarkable
accuracy. The idea of the interface we wanted to design was an
intelligent interface for a robot in a maze competition that helps it
explore through the labyrinth. The interface would process input
information from the sensors that detect colors, obstacles, and
victims, then make decisions about direction and speed. It will also
display information about progress and detected victims in real time.
Diagram:
Input → Processing → Output
(Sensor information: color, distance, obstacles, victims) → (Robot
processes data to decide direction, avoid zones, and identify victims)
→ (Robot moves, delivers rescue kits, and display information)
● Concept & Design (Planning Phase)
This interface solves the problem of exploring a maze challenge. It
allows the robot to make smart decisions like detecting victims,
avoiding danger zones, and following the safest path to complete the
maze efficiently. It helps the robot analyze information in real time
and react instantly to changes in the environment. The interface
would be applied in educational robotics tournaments or in
classroom robotics projects where participants need to design
autonomous robots that navigate mazes or rescue simulations. The
inputs come from various sensors, such as color sensors (to detect
black zones and victims) and ultrasonic or infrared sensors (to
measure distances). The processing unit of the robot analyzes this
information and makes decisions based on it. The outputs include
the robot’s movements (motors), sound or light notifications when
finding victims, and possibly a display showing status or progress.
Diagram
● Programming – C++ Logic (Simulation)
Code:
long readUltrasonicDistance(int triggerPin, int echoPin) {
pinMode(triggerPin, OUTPUT);
digitalWrite(triggerPin, LOW);
delayMicroseconds(2);
digitalWrite(triggerPin, HIGH);
delayMicroseconds(10);
digitalWrite(triggerPin, LOW);
pinMode(echoPin, INPUT);
return pulseIn(echoPin, HIGH);
}
#define s0 A0 //Module pins wiring
#define s1 A1
#define s2 12
#define s3 5
#define out 2
#define ts A5
int data=0;
int Red=0, Blue=0, Green=0;
/** Functions ****************************/
void move_forward() {
digitalWrite(3, HIGH);
digitalWrite(6, HIGH);
digitalWrite(4, LOW);
digitalWrite(7, LOW);
analogWrite(9, 150);
analogWrite(10, 150);
}
void move_backward() {
digitalWrite(3, LOW);
digitalWrite(6, LOW);
digitalWrite(4, HIGH);
digitalWrite(7, HIGH);
analogWrite(9, 150);
analogWrite(10, 150);
}
void move_90degrees_to_the_right() {
digitalWrite(3, HIGH); // Motor A adelante
digitalWrite(4, LOW);
digitalWrite(6, LOW); // Motor B atrás
digitalWrite(7, HIGH);
analogWrite(9, 150);
analogWrite(10, 150);
delay(800);
stop_motors();
}
void move_90degrees_to_the_left() {
digitalWrite(3, HIGH); // Motor A adelante
digitalWrite(4, LOW);
digitalWrite(6, LOW); // Motor B atrás
digitalWrite(7, HIGH);
analogWrite(9, 150);
analogWrite(10, 150);
delay(1600);
stop_motors();
}
void stop_motors() {
analogWrite(9, 0);
analogWrite(10, 0);
}
void GetColors()
{
digitalWrite(s2, LOW); //S2/S3 levels define which set of photodiodes we are using
LOW/LOW is for RED LOW/HIGH is for Blue and HIGH/HIGH is for green
digitalWrite(s3, LOW);
Red = pulseIn(out, digitalRead(out) == HIGH ? LOW : HIGH); //here we wait until "out"
go LOW, we start measuring the duration and stops when "out" is HIGH again, if you
have trouble with this expression check the bottom of the code
delay(20);
digitalWrite(s3, HIGH); //Here we select the other color (set of photodiodes) and
measure the other colors value using the same techinque
Blue = pulseIn(out, digitalRead(out) == HIGH ? LOW : HIGH);
delay(20);
digitalWrite(s2, HIGH);
Green = pulseIn(out, digitalRead(out) == HIGH ? LOW : HIGH);
delay(20);
}
#include <Servo.h>
Servo servo_A3;
void setup() {
pinMode(4, OUTPUT); // IN1
pinMode(3, OUTPUT); // IN2
pinMode(7, OUTPUT); // IN3
pinMode(6, OUTPUT); // IN4
// VELOCITY (Enable)
pinMode(9, OUTPUT); // Motor A
pinMode(10, OUTPUT); // Motor B
pinMode(s0,OUTPUT); //pin modes
pinMode(s1,OUTPUT);
pinMode(s2,OUTPUT);
pinMode(s3,OUTPUT);
pinMode(out,INPUT);
pinMode(ts,INPUT);
}
void loop() {
float distance = 0.01723 * readUltrasonicDistance(13, 11);if (distance < 6) {
// Objeto detectado muy cerca
move_90degrees_to_the_right();
delay(700);
distance = 0.01723 * readUltrasonicDistance(13, 11);
if (distance < 6) {
// Si todavía hay obstáculo, gira a la izquierda
move_90degrees_to_the_left();
delay(1000);
}else{
move_forward();
}
// Intenta avanzar nuevamente
distance = 0.01723 * readUltrasonicDistance(13, 11);
if (distance >= 6) {
move_forward();
}
}
else{
move_forward(); // Camino libre
if (Red<Blue && Red<=Green && Red<23){ //if Red value is the lowest one and smaller
thant 23 it's likely Red
servo_A3.write(160);
delay(3000);
}
if (Red<Blue && Red<=Green && Red<23){ //if Red value is the lowest one and smaller
thant 23 it's likely Red
servo_A3.write(160);
delay(3000);
}
}
}
● 3D Design – Fusion 360
A button is a digital or physical control element that you can click or
press to trigger an action or function in technology, computing, and
communications. We designed this button to be easy to press, durable,
and clearly visible, ensuring quick operation under competition
conditions. It connects directly to the microcontroller’s input pin and
sends a signal that triggers the robot’s program to begin navigating the
maze. The button housing can be 3D printed and mounted securely on
the robot’s chassis.
● Excel – Supporting Data
Materials:
Additional Materials
● 1× TCS230 / TCS3200
● 1× Servo SG90 / MG90S
● Driver L298N
● Motors / Wheels N20 6 V 100:1
● Sensor: HC-SR04
● Energy / Control: Porta 4×AA
● (Optional) 1× Buzzer 5 V
● (Optional,) AA Batteries
Reflection & Next Steps
What part of the project was the most interesting or challenging?
The most interesting part was designing the robot’s intelligent interface
and seeing how the sensors and motors worked together to make the
robot move or perform other actions. The most challenging part was
programming the logic for the maze exploration and getting the sensor
to detect the black zone because our color sensor couldn’t detect black
and we needed to use a line tracking sensor to be able to detect the
color black.
What did you learn through this process?
We learned how important it is to plan the robot’s design carefully and
test each component with more time. We also learned how sensors
communicate with the control system and how small changes in the
code can affect the robot’s performance.
What would you like to improve or build next trimester when we
use Arduino (possibly)?
Next trimester, we would like to improve the robot’s code and make its
movements more precise when exploring the maze. We would also like
to add new features using Arduino, such as a display that shows
progress or the sound with the buzzer when detecting victims
automatically.