Autonomous Smart Suitcase Pixy Camera!
by LaHeEB in Circuits > Microcontrollers
2402 Views, 7 Favorites, 0 Comments
Autonomous Smart Suitcase Pixy Camera!
- Definition
ASS is an autonomous smart suitcase that will follow the user wherever he goes. Apart from this it also has additional features such as lost mode, bag fall detection and an LCD to display the user information. The bag will mainly be used by commuters, handicapped people and others in indoor facilities.
We all know the hassle of pushing along our baggage in the airport. It is a tedious process that aggravates our tiredness and difficulty during the journey. The aim of our project “autonomous smart suitcase” is to eliminate the issue of pushing the suitcase around. Not only this I will also be adding additional functionality to the suitcase that will make my suitcase more easy to use and convenient.
- Applications
ASS has applications in the following areas:
· Airports as luggage
· Universities
· Hospitals
· Offices
· Other indoor facilities
Components Required
List of Components:
_Hardware_
Children electric motor gear box,DC12V
Arduino Mega ADK Or Mega 2560.
Adafruit Ultimate GPS Breakout with External Antenna.
HC-06 Wireless Bluetooth Serial Transceiver.
10000 MAH Lipo Battery Or Any Capacity you want.
Sim Card.
Android Device. "Any mobile phone or tablet"
Ultrasonic Module HC-SR04 Distance Measuring.
Pixy2 CMUcam5 Smart Vision Sensor.
3 Axis Accelerometer Gyroscope.
_ Software_
Project Specification and Objectives
- Specification
•Max weight of luggage: 7 Kg.
•Speed: 5 km/h.
•Operating Time on full charge: 3 Hours.
•Wireless: Bluetooth, GPRS, and GPS.
•Image recognition: 2 m Max distance, 20 cm stop
- Objectives
1.Simulates the latest advanced technology of the actual autonomously following.
2.Reduces the need for the human control interference.
3.Acquires capability to develop the artificial intelligence systems.
4.Acquiring the ability to integrate theoretical knowledge and practical skills by designing a real-world application based on specification requirements
Parts Description
Pixy2 CMUcam5 Smart Vision Sensor.
Pixy2 is smaller, faster and more capable than the original Pixy. Like its predecessor, Pixy2 can learn to detect objects that you teach it, just by pressing a button. Additionally, Pixy2 has new algorithms that detect and track lines for use with line-following robots. The new algorithms can detect intersections and “road signs” as well. The road signs can tell your robot what to do, such as turn left, turn right, slow down, etc. And Pixy2 does all of this at 60 frames-per-second, so your robot can be fast, too. Find More HERE|
L298N Motor Drive Controller.
L-298 has two enable input to control any device by enabling or disabling it. L 298 IC is most commonly used to make motor drivers or motor controllers. These motor controllers can be controlled by any micro controller e.g Arduino, PIC, Raspberry Pi etc. They receives input from micro controllers and operate the load attached to their output terminals correspondingly. L-298 motor driver (H-Bridge) is able to control two different DC motors simultaneously. While it can control a single stepper motor as well. L 298 has two Pulse Width Modulation (PWM) pins. PWM pins are used to control the speed of the motor. By changing the voltage signal’s polarity at its input we can rotate the motor in either clockwise or counter clockwise direction. Find more HERE!
GPS breakout board
The breakout is built around the MTK3339 chipset, a no-nonsense, high-quality GPS module that can track up to 22 satellites on 66 channels, has an excellent high-sensitivity receiver (-165 dB tracking!), and a built in antenna. It can do up to 10 location updates a second for high speed, high sensitivity logging or tracking. Power usage is incredibly low, only 20 mA during navigation. Find more HERE!
Ultrasonic Module.
The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like bats do. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package.
From 2cm to 400 cm or 1” to 13 feet. Its operation is not affected by sunlight or black material like sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect). It comes complete with ultrasonic transmitter and receiver module. Find more HERE!
Arduino GSM Shield
The Arduino GSM Shield V2 connects your Arduino to the internet using the GPRS wireless network. Just plug this module onto your Arduino board, plug in a SIM card from an operator offering GPRS coverage and follow a few simple instructions to start controlling your world through the internet. You can also make/receive voice calls using the on-board audio/mic jack and send/receive SMS messages. Find more HERE!
Architecture
Subsystem 1: Wireless communication
Main functions:
GPRS Communication between bag and the user
GPS signal reception for the bag
Bluetooth connection between user and the bag
Hardware used:
GSM chip
GPS chip
HC 06 Bluetooth chip
Android device
Subsystem 2: User following autonomous mode
Main functions:
Follow the user autonomously
Detect of the bag falls down and make a notification
Receive image data using the camera
Detect the users legs
Move the bag according to the position of the user
Stop if he is very close to the user
Hardware used:
DC motor
DC motor controller
Ping transmitter
ping receivers
Camera and processor
Subsystem 3: Sensory sub system
Main functions:
Detect the orientation of the bag using an accelerometer
Play the buzzer in case the bag is lost
Display message in case the bag is lost
Hardware used:
Accelerometer
Buzzer
LCD
Autonomous Mode Video
This video showing the ASS in the autonomous following mode
Bluetooth Mode Video
This video showing the ASS in the Manual Mode
Falling Detect Mode Video
This video showing the ASS in the Detect Mode
The Android App
You Can download for the Google store HERE!
Codes Sample!
GPS
#include
SoftwareSerial GPRS(7, 8); //7 = TX, 8 = RX
unsigned char buffer[64]; port
int count=0;
int i = 1; //if i = 0, send SMS.
void setup(){
//delay(10000);
GPRS.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the Serial port of Arduino baud rate.
Serial.print("I'm ready");
Serial.print("Hello?");
}
void loop(){
if (GPRS.available()){ // if date is comming from softwareserial port ==> data is comming from gprs shield
while(GPRS.available()){ // reading data into char array
buffer[count++]=GPRS.read(); // writing data into array
if(count == 64)break;
}
Serial.write(buffer,count); // if no data transmission ends, write buffer to hardware serial port
clearBufferArray(); // call clearBufferArray function to clear the storaged data from the array
count = 0; // set counter of while loop to zero
}
if (Serial.available()) // if data is available on hardwareserial port ==> data is comming from PC or notebook
GPRS.write(Serial.read()); // write it to the GPRS shield
if(i == 0){
GPRS.print("AT+CMGF=1\r"); //sending SMS in text mode
Serial.println("AT+CMGF=1\r");
delay(1000);
GPRS.print("AT+CMGS=\"+554988063979\"\r"); // phone number
Serial.println("AT+CMGS=\"+554988063979\"\r");
delay(1000);
GPRS.print("Test\r"); // message
Serial.println("Test\r");
delay(1000);
GPRS.write(0x1A); //send a Ctrl+Z(end of the message)
delay(1000);
Serial.println("SMS sent successfully");
i++;
}
}
void clearBufferArray(){ // function to clear buffer array
for (int i=0; i
buffer[i]=NULL; // clear all index of array with command NULL
}
}
Accelerometer
/*
ADXL3xx
Reads an Analog Devices ADXL3xx accelerometer and communicates the
acceleration to the computer. The pins used are designed to be easily
compatible with the breakout boards from SparkFun, available from:
http://www.sparkfun.com/commerce/categories.php?c...
The circuit:
- analog 0: accelerometer self test
- analog 1: z-axis
- analog 2: y-axis
- analog 3: x-axis
- analog 4: ground
- analog 5: vcc
created 2 Jul 2008
by David A. Mellis
modified 30 Aug 2011
by Tom Igoe
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/ADXL3xx
*/
// these constants describe the pins. They won't change:
const int groundpin = 18; // analog input pin 4 -- ground
const int powerpin = 19; // analog input pin 5 -- voltage
const int xpin = A3; // x-axis of the accelerometer
const int ypin = A2; // y-axis
const int zpin = A1; // z-axis (only on 3-axis models)
void setup() {
// initialize the serial communications:
Serial.begin(9600);
// Provide ground and power by using the analog inputs as normal digital pins.
// This makes it possible to directly connect the breakout board to the
// Arduino. If you use the normal 5V and GND pins on the Arduino,
// you can remove these lines.
pinMode(groundpin, OUTPUT);
pinMode(powerpin, OUTPUT);
digitalWrite(groundpin, LOW);
digitalWrite(powerpin, HIGH);
}
void loop() {
// print the sensor values:
Serial.print(analogRead(xpin));
// print a tab between values:
Serial.print("\t");
Serial.print(analogRead(ypin));
// print a tab between values:
Serial.print("\t");
Serial.print(analogRead(zpin));
Serial.println();
// delay before next reading:
delay(100);
}
1.2 Motor
const int pwm = 2 ; //initializing pin 2 as pwm
const int in_1 = 8 ;
const int in_2 = 9 ;
//For providing logic to L298 IC to choose the direction of the DC motor
void setup() {
pinMode(pwm,OUTPUT) ; //we have to set PWM pin as output
pinMode(in_1,OUTPUT) ; //Logic pins are also set as output
pinMode(in_2,OUTPUT) ;
}
void loop() {
//For Clock wise motion , in_1 = High , in_2 = Low
digitalWrite(in_1,HIGH) ;
digitalWrite(in_2,LOW) ;
analogWrite(pwm,255) ;
/* setting pwm of the motor to 255 we can change the speed of rotation
by changing pwm input but we are only using arduino so we are using highest
value to driver the motor */
//Clockwise for 3 secs
delay(3000) ;
//For brake
digitalWrite(in_1,HIGH) ;
digitalWrite(in_2,HIGH) ;
delay(1000) ;
//For Anti Clock-wise motion - IN_1 = LOW , IN_2 = HIGH
digitalWrite(in_1,LOW) ;
digitalWrite(in_2,HIGH) ;
delay(3000) ;
//For brake
digitalWrite(in_1,HIGH) ;
digitalWrite(in_2,HIGH) ;
delay(1000) ;
}
Bluetooth
/*
* Bluetooh Basic: LED ON OFF - Avishkar
* Coder - Mayoogh Girish
* Website - http://bit.do/Avishkar
* Download the App : https://github.com/Mayoogh/Arduino-Bluetooth-Basi...
* This program lets you to control a LED on pin 13 of arduino using a bluetooth module
*/
char data = 0; //Variable for storing received data
void setup()
{
Serial.begin(9600); //Sets the baud for serial data transmission
pinMode(13, OUTPUT); //Sets digital pin 13 as output pin
}
void loop()
{
if(Serial.available() > 0) // Send data only when you receive data:
{
data = Serial.read(); //Read the incoming data & store into data
Serial.print(data); //Print Value inside data in Serial monitor
Serial.print("\n");
if(data == '1') // Checks whether value of data is equal to 1
digitalWrite(13, HIGH); //If value is 1 then LED turns ON
else if(data == '0') // Checks whether value of data is equal to 0
digitalWrite(13, LOW); //If value is 0 then LED turns OFF
}
}