ওষুধের রিমাইন্ডার ঘড়ি — DS3231 আর দুটো নব দিয়েMedicine Reminder Clock with DS3231
DS3231 নিজের কয়েল সেলে সময় ধরে রাখে, লোডশেডিং হলেও ঘড়ি থামে না। দুটো নব ঘুরিয়ে ওষুধের সময় ঠিক করা যায় — ঠিক সময়ে সবুজ বাতি আর বাজনা চালু হয়ে যায়।
The DS3231 has its own coin cell and a temperature-compensated crystal, so it keeps time through load-shedding. Two knobs set the reminder hour and minute — no phone, no menu — and at that time the green lamp and buzzer take over.
সার্কিট ডায়াগ্রাম · Circuit diagram
যা যা লাগবে · Parts you need
- 1 × Arduino Uno R3 Arduino Uno
- 1 × Clock module (DS3231 RTC) ঘড়ি মডিউল (DS3231 RTC)
- 1 × LCD 16x2 with I2C LCD ১৬x২ (I2C)
- 2 × Knob (potentiometer) নব (Potentiometer)
- 1 × Buzzer (5 V) Buzzer (বাঁশি, 5 V)
- 1 × Resistor 330Ω Resistor
- 1 × LED (green) LED বাতি
- 19 × Jumper wires জাম্পার তার
তার লাগানো · Wiring
| Clock module (DS3231 RTC) VCC | → | Arduino Uno R3 5V |
| Clock module (DS3231 RTC) GND | → | Arduino Uno R3 GND |
| Clock module (DS3231 RTC) SDA | → | Arduino Uno R3 A4 |
| Clock module (DS3231 RTC) SCL | → | Arduino Uno R3 A5 |
| LCD 16x2 with I2C VCC | → | Arduino Uno R3 5V |
| LCD 16x2 with I2C GND | → | Arduino Uno R3 GND |
| LCD 16x2 with I2C SDA | → | Arduino Uno R3 A4 |
| LCD 16x2 with I2C SCL | → | Arduino Uno R3 A5 |
| Knob (potentiometer) 1 | → | Arduino Uno R3 5V |
| Knob (potentiometer) 2 | → | Arduino Uno R3 GND |
| Knob (potentiometer) W | → | Arduino Uno R3 A0 |
| Knob (potentiometer) 1 | → | Arduino Uno R3 5V |
| Knob (potentiometer) 2 | → | Arduino Uno R3 GND |
| Knob (potentiometer) W | → | Arduino Uno R3 A1 |
| Buzzer (5 V) + | → | Arduino Uno R3 D8 |
| Buzzer (5 V) - | → | Arduino Uno R3 GND.3 |
| Arduino Uno R3 D13 | → | Resistor a |
| Resistor b | → | LED A |
| LED K | → | Arduino Uno R3 GND.3 |
Code (Arduino C++)
#include <Wire.h>
#include <RTClib.h>
#include <LiquidCrystal_I2C.h>
// Medicine reminder clock: the DS3231 keeps the real time even without power.
// Two knobs set the reminder — the left one picks the hour, the right one the
// minute — so an elderly user can turn it to "9 at night" without a phone.
// When the clock reaches that time the green lamp lights and the buzzer
// sounds for half a minute.
RTC_DS3231 rtc;
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
Serial.begin(9600);
if (!rtc.begin()) { Serial.println("DS3231 not found"); while (1) delay(10); }
lcd.init();
lcd.backlight();
pinMode(8, OUTPUT);
pinMode(13, OUTPUT);
}
void loop() {
DateTime now = rtc.now();
int hour = map(analogRead(A0), 0, 1023, 0, 23);
int minute = map(analogRead(A1), 0, 1023, 0, 59);
bool due = now.hour() == hour && now.minute() == minute && now.second() < 30;
digitalWrite(8, due ? HIGH : LOW);
digitalWrite(13, due ? HIGH : LOW);
lcd.setCursor(0, 0);
if (now.hour() < 10) lcd.print('0');
lcd.print(now.hour()); lcd.print(':');
if (now.minute() < 10) lcd.print('0');
lcd.print(now.minute()); lcd.print(':');
if (now.second() < 10) lcd.print('0');
lcd.print(now.second());
lcd.print(due ? " MED!" : " ");
lcd.setCursor(0, 1);
lcd.print("Med at ");
if (hour < 10) lcd.print('0');
lcd.print(hour); lcd.print(':');
if (minute < 10) lcd.print('0');
lcd.print(minute); lcd.print(" ");
Serial.print("Clock ");
if (now.hour() < 10) Serial.print('0');
Serial.print(now.hour()); Serial.print(':');
if (now.minute() < 10) Serial.print('0');
Serial.print(now.minute()); Serial.print(':');
if (now.second() < 10) Serial.print('0');
Serial.print(now.second());
Serial.print(" | Reminder ");
if (hour < 10) Serial.print('0');
Serial.print(hour); Serial.print(':');
if (minute < 10) Serial.print('0');
Serial.println(minute);
delay(500);
}
আরো project · More projects
- ডিম ফোটানোর থার্মোস্ট্যাট — তাপমাত্রা নিজে নিজে ঠিক থাকেEgg incubator thermostat (holds 37.5 C by itself)
- বায়ুচাপ দেখে উচ্চতা মাপার যন্ত্র — ওঠার সময় বিপ বাজেBarometric altimeter with a climb beeper (BMP280)
- সোনার হ্যাপটিক বেল্ট — বাধা কাছে হলে কম্পন বাড়েSonic haptic belt (vibration grows near obstacles)
- কনট্যাক্টছাড়া স্যানিটাইজার — VL53L0X লেজার চোখ দিয়েContactless sanitizer dispenser (VL53L0X laser eye)