Skip to content

Sanjay3184/IoT-Driven-Drug-Management-System

Repository files navigation

IoT-Drug-Management-System

Components Used

  • RFID reader (MFRC522) cheaper
  • RFID tags read/writable
  • DC FAN and relay to connect
  • BreadBoard (63x10), Some jumper Wires(M-F,F-M)
  • ESP32s

First up hardware,Software Setup

  • DHT sensor library (V1.3.5) : Install via "Manage Libraries" or "Library Manager" on the Arduino IDE, version number at the time of project it may not be the same currently.
  • Ensure that you have the following libraries in your arduino IDE
    • WiFi.h
    • MFRC522 by github community
    • DHT sensor library by Adafruit
  • With help of Circuit Diagrams connect manually rfid with both ESP's
  • One ESP have conection to DC FAN as well as DHT11 in my case to sense and operate DC FAN
  • connected accordingly to the wiring diagram provided.
  • reference link

Data generation in google sheets using appscript

AppScript code

  • under extensions > Apps Script
  • now click + and select script like wise create another script too, one for getting inventory data(tablet pack details mfg, expiry, time, data) from ESP, publishing it in 1st sheet
  • and another one for getting storage conditions fetched from ESP32 and publishing in 2nd sheet
  • after deploying each script via deploy option, do note WEB APP URL link to make ESP32 use it to communicate its data to appscript->sheets
  • the code for each script is in Appscript

Coding Setup in Arduino IDE

  • reference how to write in rfid tag https://youtu.be/npEjhi0IHKo?si=bXEsZQ4CZ5y_AAbJ
  • first thing is to write some data in your rfid tags for that refer rfid_write_data.ino file
  • after having data in rfid tags deploy these two codes accordingly for entry side ESP32 and exit side ESP32 ESP32 Codes
  • now deploy two codes in each of the ESP accordingly from ESP32 Codes

Finally Create a customized UI with AppSheet