India Automation Challenge 2021
OR
##Inspiration: Being in the field of electronic engineering, we wanted to explore and experiment with the different possibilities of working with several sensors and components. The idea of controlling mobile devices using simple hand gestures is very fascinating and useful. We also wanted to make a product that solves several problems, makes tasks easier and all-in-all be a useful tool for people. ##What it does: Pantomime is a configurable gesture controller unit that can be used for reliable human-machine interaction. For the demo purpose, we have shown a use case of the Pantomime in a chassis of 4WD, which here can be easily altered with a smart wheelchair. The Pantomime responds to the hand gestures to control the 4wd rover. The motions we were able to show using the prototype are forward, backward, left, right. ##Challenges we ran into: Setting up the transmitter and receiver modules to send and receive the gesture commands was a bit tricky, there is a lag between the gesture made and the rover to perform the respective action, but later by modifying the code with some filters and adjusting the hardware circuitry as well, we got comparatively better results. We were also having some troubles with the 5v input port of the Arduino connected to the receiver that is on the rover, but we tackled that by moving the connections to the 5v port of the ICSP headers. ##Accomplishments that we're proud of: Completing the project on time including the PCB design, getting the prototype to work, and overcoming the obstacles faced while building it were some of our greatest achievements. ##What we learned: We learned about RF communication and interfacing the modules with an accelerometer and a 4WD rover. We also learned about checksums, the eradication of errors, and haptic feedback. ##What's next for Pantomime: Next, we would definitely try to make the interface much smoother and efficient. We would also like to make Pantomime market-ready and user-configurable. We are planning to test the same gesture controller on different mobile devices like drones in the future.
AVR Microcontroller(atmega328p), RF Modules, LIS3DHT Accelerometer, L298 High Power Motor Driver, Passive complementary parts, Screw Terminals, PCB
ArduinoIDE, EasyEDA, Recursive Filters, RadioHead radio driver
The prototype of the project was built using 4 300 RPM BO motors, 4 wheels, an L293d motor driver, a 433mHz RF (transmitter and receiver) modules to transmit and receive the gesture commands, and two Arduino Uno (one for the receiver i.e. on the rover, and the other for the transmitter circuitry) for communication and controlling purposes. Along with that, to power the rover, we used 2 3.7v Li-On batteries. The chassis was built using an acrylic board. Some basic Arduino coding was done to communicate between the transmitter and receiver with checksums. For the gesture identifying wearable, we interfaced the transmitter with a three-axis accelerometer to calculate the angle of inclination in each direction. And lastly to show the utility of the receiver we incorporated it in a 4WD rover. Since we need to design the PCBs, we used the EasyEDA PCB designer. To develop the firmware we used ArduinoIDE.
Two circuits were made one the transmitter, another is the Receiver the working principle remains the same as above mentioned.
#include <RH_ASK.h> #define base 200 #define R2 9 RH_ASK driver; void setup() Serial.begin(9600); void loop() if (driver.recv(buf, &buflen)) else if (buf[1] == 'b' && buf[0] == 's') else if (buf[1] == 's' && buf[0] == 's') else if (buf[1] == 's' && buf[0] == 'l') else if (buf[1] == 's' && buf[0] == 'r') else /* else if (buf[0] == 'l' && buf[1] == 'f') else if (buf[0] == 'r' && buf[1] == 'f') else if (buf[0] == 'l' && buf[1] == 'b') else if (buf[0] == 'r' && buf[1] == 'b') void forward() void back() void right() void left() void stop() #include "LIS3DHTR.h" #include <RH_ASK.h> #define WIRE Wire void setup() { pinMode(13,OUTPUT); delay(100); if (!driver.init()) float x = 0, y = 0; char buf[2]; void loop() { else if (x*10 > 3) else else if (y*10 < -3) else driver.send((uint8_t *)buf, 2); Serial.print(x); }
#include <SPI.h>
#define R1 6
#define L1 5
#define L2 3
{
pinMode (R1, OUTPUT);
pinMode (R2, OUTPUT);
pinMode (L1, OUTPUT);
pinMode (L2, OUTPUT);
if (!driver.init())
Serial.println("init failed");
}
{
char buf[2];
uint8_t buflen = 2;
{
if (buf[1] == 'f' && buf[0] == 's')
forward();
back();
stop();
left();
right();
stop();
{
left();
delay(100);
forward();
delay(100);
}
{
right();
delay(100);
forward();
delay(100);
}
{
left();
delay(100);
back();
delay(100);
}
{
right();
delay(100);
back();
delay(100);
}*/
Serial.println(String(buf));
}
}
{ analogWrite (L1, base);
digitalWrite (L2, LOW);
digitalWrite (R2, LOW);
analogWrite(R1, base);
}
{ analogWrite (L2, base);
digitalWrite (L1, LOW);
digitalWrite (R1, LOW);
analogWrite(R2, base);
}
{ analogWrite (L1, base);
digitalWrite (L2, LOW);
analogWrite (R2, base);
digitalWrite (R1, LOW);
}
{
digitalWrite (L1, LOW);
analogWrite (L2, base);
digitalWrite (R2, LOW);
analogWrite (R1, base);
}
{
analogWrite (L1, 255);
analogWrite (L2, 255);
analogWrite (R2, 255);
analogWrite (R1, 255);
}
--------------------------------------------------------------------------------------------------------------------------------------------
#include <Wire.h>
LIS3DHTR<TwoWire> LIS;
#include <SPI.h>
RH_ASK driver;
digitalWrite(13, HIGH);
Serial.begin(115200);
while (!Serial) {};
LIS.begin(WIRE, 0x19);
LIS.setOutputDataRate(LIS3DHTR_DATARATE_50HZ);
LIS.setHighSolution(true);
Serial.println("init failed");
}
char t = 's';
x = 0.1 * LIS.getAccelerationX() + 0.9 * x;
y = 0.1 * LIS.getAccelerationY() + 0.9 * y;
if (x*10 < -3)
buf[0] = 'l';
buf[0] = 'r';
buf[0] = 's';
if (y*10 > 3)
buf[1] = 'f';
buf[1] = 'b';
buf[1] = 's';
driver.waitPacketSent();
Serial.print(" ");
Serial.println(y);