Group 25 Kevin Kong Mei Ling Yeoh Xianze Zhan ECE 445 Spring 2016 THIEF RESISTANT SHOPPING CART
Introduction According to National Association for Shoplifting Prevention, there are approximately 27 million shoplifters in our nation today. Our project is designed to tackle the act of thievery using the shopping cart by modifying the existing shopping cart. Combine weight sensors, barcode scanner, microcontroller, WI-FI and alarm.
Features Gather the total weight of the items and make weight comparison Require user interaction to scan (add), de-scan (delete) items using barcode scanner Gather the information of the items through Wi-Fi Activate the alarm and cart braking system Visually display information on LCD display
High Level Power Layout
High Level Signal Layout
System Overview Hardware: Power module User interface Sensors Control Outputs Software: ATmega328P Software Electric Imp Software
Power Module Boost Converter (LT1372) Supply steady voltage of 5V Able to supply 5V to all modules Voltage ripple causes instability input for weight sensor (inaccuracy in weight sensor)
Voltage ripple of boost converter Before Improvement After Improvement
Power Module (continued) Voltage regulator (LM7805) To solve the instability issue of weight sensor Use two lithium ion batteries as source Provide current of 0.27A to 0.31A during full operations Total operation hours (calculated) 3000mAh/310m ≈ 9.5 hours
Power Module (continued) Voltage regulator (REG ) Supply steady voltage of 3.3V to USB host shield Maximum current is 0.4A
User Interface LCD display Visually display the item name and its price, total price of items in cart Push buttons Delete, Checkout Delete: to remove item from the cart and the list Checkout: press when ready to checkout
LCD & Push buttons Schematic
Control Consists of WI-FI, alarm, ATmega328P, USB host shield, barcode scanner Decode the barcode and transfer the data to server through WI-FI Communicate with LCD
Control Schematic
Weight Sensors Sparkfun SEN Load Cells Wired 4 load cells up in Wheatstone Bridge configuration.
Weight Sensors Measured data points of weight sensor with different weights. Weight (g)Vout (V) ΔVΔV Incremental step: ± V/100g
Weight Sensors Where: aLoad = 0.0kg (1st data point) aReading =Arduino analog input value bLoad = 0.4kg (2 nd data point) bReading = Arduino analog input value newReading = current weight
Weight Sensors Arduino values (newReading) from Analog Input with different weights. Weight (g)newReading Deviation 0180± ± ± ± ± ± ± ± ±2 Incremental step: 5±2 per 100g
RFID RFID tag on shopping cart To track the status of the shopping cart Trigger alarm on EXIT if checkout is not complete
Outputs Alarm Buzzer – MCP320B2 Sounds when total weight in cart does not match total scanned items weight Breaking System Servo – ROB Rotates and stops cart wheel from spinning when alarm sounds
Software Overview ATmega328P Software Program in Arduino platform(.ino file) Handle different analog and digital I/O Driver for communicating with different modules Electric Imp Software Program in Squirrel language Handle input packages from ATmega and write data to imp via Wi-Fi communication Also used to implement database
Software Flowchart Indicates the full shopping experience Integrates Atmega and Imp software together
Flowchart ( Part 1) Indicates the main interaction between users and shopping cart during shopping experience
Flowchart ( Part 2) Indicates the check out process under thief resistant protection
Example Code Weight Sensor Code void Read_Weight(){ total=0.0; for(int i=0; i<100; i++){ //adding 50 readings together; newReading = analogRead(0); total += (newReading - aReading); } load = ((bLoad - aLoad)/(bReading - aReading)) * (total/100) + aLoad; load= load - offset; float compareValueFloat= load * 100; int compareValue = round(compareValueFloat); if(load<0) {load=0.0;} // millis returns the number of milliseconds since the board started the current program if(millis() > time + interval && compareValue!=prev_load) { Serial.print("Weight changed! "); //Serial.print("Reading: "); //Serial.print(newReading,1); // 1 decimal place Serial.print(" Load: "); Serial.println(load,1); // 1 decimal place, println adds a carriage return time = millis(); lcd.setCursor( 0,1 ); lcd.print("Weight: "); lcd.print(load,1); lcd.print(" kg"); } prev_load= compareValue; }
System Integration
Future Work Integrate RFID system Increase the sensitivity of weight sensors More user interface to improve customer shopping experience