Rexplorer v2

Rexplorer v2

Rexplorer v2 is a fully autonomous self-mapping robot to be used for indoor purposes.

My original intention was to develop a robot which could map an unknown area and relay the data to a monitoring system so as to provide real-time feedback about the layout of external environment.

I ended up making a robot that maps its own path, generally sticks to moving along the periphery of a room and sends a rough sketch of its traversed path to a smartphone via bluetooth.

This robot is part of the Rexplorer Project and is only an experimental prototype. There are certain conditions for sensing which have not yet been included, due to which undesirable movement may be caused. (Bug-fixes for the same will feature in the next version along with improved sensing algorithms and ultrasonic sensors.)

How it works:

There are 3 infrared proximity sensors at the front and sides of the robot which detect obstructions in its path. These digital signals are sent to an AVR micro-controller (ATMEGA 328 on Arduino UNO) which decides in which direction the robot should turn. The decision then activates the respective motors by sending a set of signals to the motor driver. Simultaneously, a second signal is sent to an Android application on a smartphone, via Bluetooth, containing information about the robot’s current movement which is in turn, used to draw a sketch of its path as it moves in real-time.

The Android application was made using MIT App Inventor 2 and the robot’s program was coded in the Arduino IDE (Integrated Development Environment), based on C++.

List of components: (all components are available at online stores such as

  • Wheels – 4 nos.
  • DC Geared motors – 4 nos.
  • Arduino UNO – 1 no. (Any version of Arduino can be used with the given code, provided it has the same or greater number of I/O pins and relevant changes are made in the uploading procedure. Additionally, any development board can be used provided the code’s logic remains the same and sufficient I/O pins are available.)
  • HC-05 bluetooth module – 1 no.
  • Infrared proximity sensors – 3 nos.
  • L298N motor driver – 1 no.
  • Lithium-ion rechargeable battery – 1 no.
  • Jumper wires – lots!

And finally, the codes! As always, please feel free to utilise, remix and improvise upon the codes. (And let me know how it went in the comments below!)

Smartphone application –

Arduino code –

int l1 = 6;
int l2 = 5;
int r1 = 11;
int r2 = 9;

int rs = 100;
int ls = 100;
int rts = 130;
int lts = 130;
//Coded by Raunak Hede-
//drive system
#define f analogWrite(l1, ls); analogWrite(l2, 0); analogWrite(r1, rs); analogWrite(r2, 0);
#define b analogWrite(l1, 0); analogWrite(l2, ls); analogWrite(r1, 0); analogWrite(r2, rs);
#define l analogWrite(l1, 0); analogWrite(l2, lts); analogWrite(r1, rts); analogWrite(r2, 0);
#define r analogWrite(l1, lts); analogWrite(l2, 0); analogWrite(r1, 0); analogWrite(r2, rts);
#define s analogWrite(l1, 0); analogWrite(l2, 0); analogWrite(r1, 0); analogWrite(r2, 0);
#define d delay(200);

//individual hemisphere control
#define leftfor analogWrite(l1, lts); analogWrite(l2, 0);
#define rightfor analogWrite(r1, rts); analogWrite(r2, 0);

#define leftstop analogWrite(l1, 0); analogWrite(l2, 0);
#define rightstop analogWrite(r1, 0); analogWrite(r2, 0);

#define leftback analogWrite(l1, 0); analogWrite(l2, lts);
#define rightback analogWrite(r1, 0); analogWrite(r2, rts);

//MAPPING system
#define forward Serial.write("1");
#define backward Serial.write("4");
#define left Serial.write("3");
#define right Serial.write("2");
#define forright Serial.write("1");Serial.write("2");
#define backright Serial.write("1");Serial.write("2");
#define forleft Serial.write("4");Serial.write("3");
#define backleft Serial.write("4");Serial.write("3");
#define stp Serial.write("0");
int state;
int s1,s2,s3;
void setup()
pinMode(l1, OUTPUT);
pinMode(l2, OUTPUT);
pinMode(r1, OUTPUT);
pinMode(r2, OUTPUT);
pinMode(A0, INPUT);
pinMode(A2, INPUT);
pinMode(A3, INPUT);
Serial.begin(9600); //initialize serial communication at 9600 bits per second

void loop()
 int fse=digitalRead(A0);//front
 int lse=digitalRead(A2);//digital
 int rse=digitalRead(A3);//digital
//specify sensor limits
 int fsl=0;
 int lsl=0;
 int rsl=0;
//sets to 1 if closed and to 0 if open

 if(s1==0 && s2==0 && s3==0)
 {//no blocks
 else if(s1==1 && s2==0 && s3==1)
 {//sides blocked
 else if(s1==1 && s2==1 && s3==1)
 {//all blocked- to rev- add about turn
 else if(s1==1 && s2==1 && s3==0)
 {//turn 90 right
 else if(s1==0 && s2==1 && s3==1)
 {//turn 90 left
 else if(s1==0 && s2==0 && s3==1)
 {//wall on right
 else if(s1==1 && s2==0 && s3==0)
 {//wall on left
 else if(s1==0 && s2==1 && s3==0)
 {// front block- turn 90 right
at school

Rexplorer v2 @ Sharada Mandir School Science Fair 2017

India Internet of Things Week 2015 by UNICOM

India Internet of Things Week 2015 by UNICOM

Three weeks back, I received a message from my mentor, Mr. Pranav Pai Vernekar (Founder of Inventrom) saying that he would be going to a conference in Bangalore. The conference was being organized by UNICOM. The theme was: ‘Internet of Things: Link Your World’ and it was part of India Internet of Things Week 2015.

This was a corporate conference, but it was interesting and I wanted to attend the event. So I sent an email to them. The next day I got a reply from the CEO of UNICOM, Mr. Nitesh Naveen himself! He said that they would consider it and get back to me on the same. That evening, I received another email saying that they would permit me to attend the conference and would also (most kindly) waive the standard entry fee. ☺

I was jumping with joy and immediately packed my bags

My father’s friend, Gaurish Dharwadkar from Travel Shop, booked the tickets. This was to be the first time that I would travel alone. He ensured that I had a pleasant experience.

On 9th September 2015, I boarded an Indigo flight to Bangalore. 50 minutes later I was at Kempegowda International Airport, Bangalore.

Early the next morning, I took a taxi to the conference venue: Movenpick Hotel & Spa

I pushed the door of the hall, in anticipation of what awaited me on the other side. When I entered, Mr. Axel Angeli was giving a talk on preparing for the next industrial revolution with IoT. He focused on the fact that data on a cloud is much more secure than data on a single computer. For the simple reason that new methods of encryption can be devised and also, divided data is harder to hack and steal.

The next talk was by the head of MediaTek Labs (India), Mr. Ashish Bedekar on wearable IoT.

After that came the much awaited ‘IoT Tech 10’. This is a sub-event in which companies can showcase their work in the area of Machine-to-Machine (M2M) and Internet of Things.

The companies were:

  • Emnics – Ethernet I/O card
  • Atoll solutions – Bluetooth Low Energy sensing solutions
  • Teamchat – Messaging platform for Machine-to-Machine, Human-to-Machine, and Machine-to-Human communication.
  • Inventrom Netplug: device which can make almost anything IoT enabled
  • Leaf TechnologiesAIR: a device which controls the lighting, temperature, etc. of your home according to your preferences.
  • Avench – Sav i3: a battery operated system which uses Bluetooth Low Energy to wirelessly monitor a biogas plant and relay information to a smartphone.

(At the end of the event, Teamchat won the IOT Tech 10 award.)

For the next half hour, there was a networking break, followed by an hour long panel discussion on exploring the emerging technologies in IoT.

After the discussion there was a workshop held by MediaTek Labs on integrating wearable devices with IoT using their development board: LinkIt ONE

The first talk post lunch was by Bipin Pradeep Kumar (co-founder of Gaia Smart Cities) on how the Internet of Things will proliferate as a network of networks of ‘Things’.

This was followed by ‘IT to IOT’ by Pavan Kumar & Viswanadh Akella from SAP Labs India. They stressed on the power of new generation smart applications that will be based on SMAC (social, mobile, analytics and cloud) coupled with Big Data.

Abhimanyu Prabhavalkar from Oracle’s IoT Engineering sector talked about using IOT as a tool to transform business from edge to enterprise.

The last event of the day in the Technology Track was a hands-on workshop by Inventrom on the usage of Raspberry Pi in IOT. In the workshop, participants were taught basic Python coding for GPIO pins on the Raspberry Pi.

At the end of the day, I took a taxi back to the place where I was staying. The next day, at around 12:00 pm, I boarded my flight back to Goa. I have to say that this was the first time that I met so many interesting people in the IT and IOT sectors, all in one place.

It was indeed, a very fruitful experience and I thank everyone at UNICOM Learning for having allowed me to attend this event.

BT Smart Alarm

BT Smart Alarm

Sometimes you’re plain old alarm clock just isn’t good enough. You need a drastic change in the external environment to shake you out of your deep slumber.

And this is just what the Bluetooth Smart Alarm does best!

The project consists of 3 modules and an Android application (made using MIT App Inventor 2).

20150302_214305     Screenshot_2015-05-01-12-44-19

How to use it:

Before going to bed, the user sets a wake-up time in the app. (The app will continue running in the background until removed from the list of background programs.)






At this point, the fan in the room is on and the lights are off.

When the alarm rings (in this case, a song), the fan will go off and the room’s lights will be turned on.


The user then has to switch off the alarm by clicking on a ‘Wakeup!’ button. This will also turn off the lights and the fan. Why the fan too? So that you feel hot and sweaty and don’t go back to sleep!

How it works:

I ] Components used in BT Smart Alarm Mod 1:

  • Relays rated at 250VAC, 5A with trigger 12VDC, 10A  – I used the JQC-3F(T73)DC12V
  • 2 pin PCB block screw terminals (2 nos.)
  • A small perfboard or veroboard

20150429_231924     20150429_231452     20150215_193428

II ] Components used in BT Smart Alarm Mod 2:

  • Arduino Nano v3.0
  • 2A Dual Motor driver module with PWM control (Any L298 based motor driver will do)
  • 2 Heat-sinks (small)
  • Barrel jack for 12v DC adaptor
  • Female header pins
  • Male to female jumper wires
  • 2 pin PCB block screw terminals (4 nos.)
  • HC-05 bluetooth module

20150429_231350     20150501_115719     20150501_115927

III ] Components used BT Smart ALarm Mod 3:

  • 12v DC adaptor which can provide upto 400mAh

IV ] Internal working:

Initially, the Arduino Nano turns off the lights and turns on the fan. When the user sets a wakeup time, the Android app stores the value and keeps checking it with another value containing the phone’s internal time. When the two values match, the app plays a song and sends a command to HC-05, which is connected to the Arduino. The Arduino then sends four individual signals to four separate relays. These relays control the lights and fan.

Video coming soon!