This is an old revision of the document!


Smart Backpack

  • Student: Vlad Găvan, ACES

1. Overview

Recently back pain in children seems to become increasingly more common. Although most of the times the problem is not a serious one and the cause can not be found, one of the most probable factors is the carrying of heavy backpacks. There exists a law in Romania that states that the backpacks the students carry should not weight more then 10% of their body weight.

This project aims to solve this problem alongside the more serious safety problem of children going missing. It uses an ESP32 Lolin32 development board alongside a GPS module to help track children's whereabouts. The data received by the GPS module is recorded in a Firebase database on a daily bases. Besides this, in order to help the heavy backpack problems, the system uses an RFID scanner with a buzzer. RFID tags can be sticked onto the books which allows them to be scanned whenever they enter the backpack. If a book is not present in the configuration set up inside the Arduino code. the buzzer will create a small sound.

2. Hardware

The hardware components used to create the system mentioned above are the following:

  • ESP32 LOLIN32
  • RFID-RC522 scanner
  • NEO-6M GPS Module
  • Piezoelectric buzzer
  • RFID tags

The ESP32 microcontroller is used to process the data received by the GPS module and transmit it to Firebase as well as to signal if more than the needed books were carried if a tag doesn't correspond the timetable. Communication between ESP32 and the GPS module is achieved true the UART protocol, while communication to the RFID is done through SPI. The buzzer buzzes when the GPIO14 pin on the ESP32 is set to HIGH.

3. Software

The application was developed using Arduino IDE. The following libraries were used for the code: WiFi for the WiFi connection, Wire, TinyGPSPlus for interpreting the GPS data, Firebase_ESP_Client for transmitting the data to Firebase web server, SPI for communicating with the RFID, MFRC522, time to get the current day of the week. The WiFi credentials as well as the Firebase API_KEY, URL, email and password are defined at the beginning of the code. It also uses a TokenHelper and a RTDBHelper variable for token generation and RTDB payload printing.

Inside the loop we first get the day of the week with the help of the time structure and initialize our timetable.

  // Time structure that contains components of the calendar date 
  struct tm timeinfo;
  // Variable for day of the week
  char timeWeekDay[10];
  
  // Array of structs for the timetable
  timetable daily_program[2];
  daily_program[0].dayOfWeek = "Monday";
  daily_program[0].uid = "031D471C";
  daily_program[0].dayOfWeek = "Tuesday";
  daily_program[0].uid = "126051DD";
  daily_program[0].dayOfWeek = "Wednesday";
  daily_program[0].uid = "BC80C16E";
  daily_program[0].dayOfWeek = "Thursday";
  daily_program[0].uid = "5364CF06";
  daily_program[1].dayOfWeek = "Friday";
  daily_program[1].uid = "126051DD";
iothings/proiecte/2022/smart_backpack.1674176102.txt.gz · Last modified: 2023/01/20 02:55 by vlad.gavan
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0