Self billing smart cart

High-Level Project Summary

Our project is a smart shopping cart that automatically calculates the price of purchases and sterilizes them. Nowadays, going to shopping malls has become a major concern for everyone for fear of crowding people with each other and transmitting infection due to the Corona pandemic, as well as for purchases where their outer surfaces are filled with germs due to frequent touching from people, and this makes people more vulnerable to infection with the Corona virus. So we found an effective solution to these two problems, so we decided to design a smart shopping cart that automatically detects the item's name and price on the LCD screen by scanning the barcode of the item and sterilizing it.

Detailed Project Description

Our project will serve the society to reduce the number of Corona Cases. Self billing smart cart that will automatically detect and calculate the price of the purchases and sterilizes them. By that, we ensure that we did not contact physically with anyone in the mall and our products are sterilized.

People will be able to scan their shopping cart with RFID and pay immediately by scanning the RFID, this will help reduce the number of COVID-19 cases. It will also help the government to reduce the amount of COVID-19 in the country.

The customers will use the application with the smart cart to get it necessaries and pay by it . They only will scan the products into the screen that is located in the cart. the price and the name of the products will show automatically in the screen with the final price, also it will have a button to delete any unwanted products.


We create this project by using Arduino UNO, RFID, LCD, NodeMCU, WATER PUMP, Infrared sensor, Relay,Push button, Potentiometer, Serial monitor and Resistwe. we also used arduino coding program, moreover we used Android Studio to develop the application that we will use beside the smart cart

These are the codes :


const int led1 = 13;

const int led2 = 12;

const int snti1 = 10;

const int snti2 = 11; 

#include <LiquidCrystal.h>

LiquidCrystal lcd (A0, A1, A2, A3, A4, A5); // pines del LCD. (RS, E, D4, D5, D6, D7) #include <Keypad.h>

const byte ROWS = 4; // Quattro righe

const byte COLS = 4; // Quattro colonne

int p1 = 0, p2 = 0, p3 = 0, p4 = 0;

int c1 = 0, c2 = 0, c3 = 0, c4 = 0; struct Product {​​​​​

String name;

int qn;

double unit_price;

double price;

}​​​​​; int MAX = 4;

Product products[10]; double total = 0;

int count_prod = 0; // Definizione mappa della tastiera

char keys[ROWS][COLS] = {​​​​​

{​​​​​'1', '2', '3', 'A'}​​​​​,

{​​​​​'4', '5', '6', 'B'}​​​​​,

{​​​​​'7', '8', '9', 'C'}​​​​​,

{​​​​​'*', '0', '#', 'D'}​​​​​

}​​​​​; byte rowPins[ROWS] = {​​​​​ 9, 8, 7, 6 }​​​​​; // Riga0,1,2,3.

byte colPins[COLS] = {​​​​​ 5, 4, 3, 2}​​​​​; // Colonna0,1,2,3

// Creazione della tastiera

Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); void setup() {​​​​​

pinMode(snti1, OUTPUT);

pinMode(snti2, OUTPUT); pinMode(led1, OUTPUT);

pinMode(led2, OUTPUT);

Serial.begin(9600);

lcd.begin(16, 2); lcd.setCursor(0, 0);

lcd.print(" WELCOME TO ");

lcd.setCursor(0, 1);

lcd.print(" SMART CART "); delay(2000); lcd.clear(); lcd.setCursor(0, 0);

lcd.print(" PLZ ADD ITEMS ");

lcd.setCursor(0, 1);

lcd.print(" TO CART "); products[0].name = "Biscuit-1";

products[0].unit_price = 35.00; products[1].name = "Soap";

products[1].unit_price = 38.00; products[2].name = "Rice(1KG)";

products[2].unit_price = 55.00; products[3].name = "Biscuit-4";

products[3].unit_price = 45.00; }​​​​​ void loop() {​​​​​

char key = kpd.getKey();

if (key) {​​​​​

Serial.println(key);

switch (key)

{​​​​​

case '1':

lcd.setCursor(0, 0);

lcd.print(products[0].name + " Added ");

lcd.setCursor(0, 1);

lcd.print("Biscuit:" + String(products[0].unit_price) + " ");

p1++;

digitalWrite(12, HIGH);

digitalWrite(10, HIGH);

digitalWrite(11, HIGH); delay(2000);

total = total + products[0].unit_price;

count_prod++;

lcd.clear();

lcd.setCursor(0, 0);

lcd.print(" the total price ");

lcd.setCursor(5, 1);

lcd.print(total);

digitalWrite(12, LOW);

digitalWrite(10, LOW);

digitalWrite(11, LOW); 

break; case '4':

if (p1 > 0)

{​​​​​

lcd.clear();

lcd.setCursor(0, 0);

lcd.print(products[0].name + " Removed ");

digitalWrite(13, HIGH);

delay(2000);

p1--;

total = total - products[0].unit_price;

count_prod--;

lcd.print(" the total price ");

lcd.setCursor(5, 1);

lcd.print(total);

lcd.clear();

digitalWrite(13, LOW); }​​​​​

else

{​​​​​

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("Not in cart!!! ");

digitalWrite(13, HIGH);

delay(2000);

lcd.clear();

digitalWrite(13, LOW);

}​​​​​

break; case '2': lcd.setCursor(0, 0);

lcd.print(products[1].name + " Added ");

lcd.setCursor(0, 1);

lcd.print("Soap:" + String(products[1].unit_price) + " ");

total = total + products[1].unit_price;

digitalWrite(12, HIGH);

digitalWrite(10, HIGH);

digitalWrite(11, HIGH);

delay(2000);

p2++;

count_prod++;

digitalWrite(12, LOW);

digitalWrite(10, LOW);

digitalWrite(11, LOW);

lcd.clear();

lcd.print(" the total price ");

lcd.setCursor(5, 1);

lcd.print(total);

break; case '5': if (p2 > 0)

{​​​​​

lcd.clear();

lcd.setCursor(0, 0);

lcd.print(products[1].name + " Removed ");

digitalWrite(13, HIGH);

delay(2000);

p2--;

total = total - products[1].unit_price;

count_prod--;

lcd.clear();

lcd.print(" the total price ");

lcd.setCursor(5, 1);

lcd.print(total);

digitalWrite(13, HIGH); }​​​​​

else

{​​​​​

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("Not in cart!!! ");

digitalWrite(13, HIGH);

delay(2000);

lcd.clear();

digitalWrite(13, LOW);

}​​​​​

break; case '3':

lcd.setCursor(0, 0);

lcd.print(products[2].name + " Added "); lcd.setCursor(0, 1);

lcd.print("Price(Rs):" + String(products[1].unit_price) + " "); total = total + products[2].unit_price;

digitalWrite(12, HIGH);

digitalWrite(10, HIGH);

digitalWrite(11, HIGH);

delay(2000);

count_prod++;

p3++;

lcd.clear();

lcd.print(" the total price ");

lcd.setCursor(5, 1);

lcd.print(total);

digitalWrite(12, LOW);

digitalWrite(10, LOW);

digitalWrite(11, LOW);

break; case '6':

if (p3 > 0)

{​​​​​

lcd.clear();

lcd.setCursor(0, 0);

lcd.print(products[2].name + " Removed ");

digitalWrite(13, HIGH);

delay(2000);

total = total - products[2].unit_price;

p3--;

count_prod--;

lcd.clear();

lcd.print(" the total price ");

lcd.setCursor(5, 1);

lcd.print(total);

digitalWrite(13, LOW);

}​​​​​

else

{​​​​​

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("Not in cart!!! ");

digitalWrite(13, HIGH);

delay(2000);

lcd.clear();

digitalWrite(13, LOW);

}​​​​​ break; case 'D':

lcd.clear(); list();

break; 

case '#':

lcd.clear(); lcd.print(" the total price ");

lcd.setCursor(5, 1);

lcd.print(total);

break;


case '*':

lcd.clear();

lcd.print(" the total price ");

lcd.setCursor(5, 1);

lcd.print(total);

delay(2000);

lcd.clear();

lcd.setCursor(0, 0);

lcd.print(" the pyment done");

delay (2000);

p1 = 0;

p2 = 0;

p3 = 0;

p4 = 0;

total = 0;

count_prod = 0;

lcd.clear();

lcd.setCursor(0, 0);

lcd.print(" PLZ ADD ITEMS ");

lcd.setCursor(0, 1);

lcd.print(" TO CART "); break; default:;

}​​​​​

}​​​​​

c1 = p1 * products[0].unit_price;

c2 = p2 * products[1].unit_price;

c3 = p3 * products[2].unit_price;

c4 = p4 * products[3].unit_price; products[0].qn = p1;

products[1].qn = p2;

products[2].qn = p3;

products[3].qn = p4; products[0].price = p1 * products[0].unit_price;

products[1].price = p2 * products[1].unit_price;

products[2].price = p3 * products[2].unit_price;

products[3].price = p4 * products[3].unit_price; 

}​​​​​ void list() {​​​​​

for (int i = 0 ; i < MAX ; i++) {​​​​​

if (products[i].qn > 0) {​​​​​

lcd.clear();

lcd.setCursor(0, 0);

lcd.print(products[i].name + "");

lcd.setCursor(0, 1);

lcd.print("Price(Rs):" + String(products[i].unit_price) + " ");

delay(2000);

}​​​​​

}​​​​​

}​​​​​

Space Agency Data

In a world of uncertainties, technology is the one constant that continues to move us forward. Nowadays during COIVD-19 the data in constant change some times the numbers increases and sometimes it is decreases. So, from what we notice , that the most places that the infection of COVID-19 increases is the malls and shops, where the physicals contact in exchanging money or touching the products, also , the crowdedness that happen during the sales . From this view we got our idea and developing the smart cart to be useful and safety of every one .

Hackathon Journey

Hackathon Journey was a very interesting and we learned a lot from it. The thinking and brainstorming we did in a short time produced great results and excellent ideas that can be applied. We got the idea from the reality of what we are living in today from the conditions of the Covid-19 pandemic, and to reduce injuries to some extent. The goal was to create a smart shopping cart through which to shop and pay, as well as sterilize products, including phone application that can be linked to the smart cart and facilitates the online payment process. We would like to thank NASA first and all those responsible for the competition and also our teachers at the university for their continuous support during the completion of this challenge.

References

Tags

#hardware,#app,#COVID,#smart,

Global Judging

This project has been submitted for consideration during the Judging process.