Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino 101-Based Smart Medicine Dispenser with RFID and LCD Display

View and Edit Project In Cirkit DesignerImage of Arduino 101-Based Smart Medicine Dispenser with RFID and LCD Display

Circuit Documentation

Summary

This document provides a detailed overview of a circuit that includes an Arduino 101 microcontroller, a buzzer, an LCD display, an RFID reader, a real-time clock (RTC) module, a potentiometer, a pushbutton, a DC motor, and a ULN 2003 driver. The circuit is designed to read RFID tags, display information on an LCD, control a motor, and sound a buzzer based on specific conditions. The Arduino 101 is the central controller, interfacing with all other components.

Component List

  1. Arduino 101

    • Description: Microcontroller board based on the Intel Curie module.
    • Pins: A5/SCL, A4/SDA, AREF, GND, D13/SCK, D12/MISO, D11 PWM/MOSI, D10 PWM/SS, D9 PWM, D8, D7, D6 PWM, D5 PWM, D4, D3 PWM, D2, D1/TX, D0/RX, AIN, ioref, RESET, 3V3, 5V, VIN, A0, A1, A2, A3, ICSP MISO, ICSP SCK, ICSP MOSI
  2. Buzzer

    • Description: An audio signaling device.
    • Pins: PIN, GND
  3. LCD Display (16 pin)

    • Description: 16x2 character LCD display.
    • Pins: VSS, VDD, VO, RS, R_W, E, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7, A, K
  4. RFID-RC522

    • Description: RFID reader module.
    • Pins: VCC (3.3V), RST, GND, IRQ, MISO, MOSI, SCK, SDA
  5. RTC Module

    • Description: Real-time clock module.
    • Pins: 32k, SQW, SCL, SDA, VCC, GND
  6. Potentiometer

    • Description: Variable resistor.
    • Pins: GND, Output, VCC
  7. Pushbutton

    • Description: Momentary pushbutton switch.
    • Pins: Pin 2, Pin 1, Pin 3, Pin 4
  8. DC Motor

    • Description: Direct current motor.
    • Pins: pin 1, pin 2
  9. ULN 2003

    • Description: High voltage, high current Darlington transistor array.
    • Pins: IN1, IN2, IN3, IN4, IN5, IN6, IN7, GND, +, COIL1, COIL2, COIL3, COIL4, COIL5
  10. Battery Pack

    • Description: Power supply.
    • Pins: +, -

Wiring Details

Arduino 101

Buzzer

LCD Display (16 pin)

RFID-RC522

RTC Module

Potentiometer

Pushbutton

DC Motor

ULN 2003

Battery Pack

Code Documentation

#include <Wire.h>
#include <LiquidCrystal.h>
#include <SPI.h>
#include <MFRC522.h>
#include <RTClib.h>

#define BUZZER_PIN 10
#define RFID_SS_PIN 10
#define RFID_RST_PIN 2
#define MOTOR_PIN 11
#define BUTTON_PIN 2

LiquidCrystal lcd(3, 4, 5, 6, 7, 8, 9);
MFRC522 rfid(RFID_SS_PIN, RFID_RST_PIN);
RTC_DS3231 rtc;

void setup() {
  Serial.begin(9600);
  while (!Serial);
  lcd.begin(16, 2);
  lcd.print("Initializing...");
  pinMode(BUZZER_PIN, OUTPUT);
  digitalWrite(BUZZER_PIN, LOW);
  pinMode(MOTOR_PIN, OUTPUT);
  digitalWrite(MOTOR_PIN, LOW);
  pinMode(BUTTON_PIN, INPUT_PULLUP);
  SPI.begin();
  rfid.PCD_Init();
  if (!rtc.begin()) {
    lcd.clear();
    lcd.print("RTC not found!");
    while (1);
  }
  if (rtc.lostPower()) {
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
  }
  lcd.clear();
  lcd.print("