At first, I was not able to find an idea for the final project, but after thinking and coming up with more than one idea, this medical idea was developed, and the biggest reason for that was a situation that happened with my dad recently, where he forgot the medicine
, which caused him health complications, so I thought of an idea for my final project that helps the elderly to remember the date of their medication, completely away from technology
-Software
fritzing (I used it to design the electronic circuit)
fusion (Product design and electronic inclusion before implementation)
illustrator (Graphic and design for an aesthetic plus to enhance the look of the design.)
laserwork (Preparing the file and sending the laser cutting machine)
ِARDUINO
material
Using the Grabcad website, I uploaded files of electronics designs to make sure that they would fit the design
I modified the dimensions of my design based on it
The main features of the project can be separated into three parts: the base, the body, the moving part
then up to the modeling : i used fusion for sketching and then extruded some surfaces (sketches) and assembled them together with joints, then i added electronic components to think how they will be mounted together
then up to the modeling : i used fusion for sketching and then extruded some surfaces (sketches) and assembled them together with joints, then i added electronic components to think how they will be mounted together
Using the Grabcad website, I uploaded files of electronics designs to make sure that they would fit the design
I modified the dimensions of my design based on it
I first started with the base, which is the first part consisting of 6 parts and contains an Arduino + bread board inside and the upper part of it is a base for the second part the body .
for the main constructer of the project base i used small screws with 3mm diameter 3mm and nuts
The lengths for the base are 90mm*90mm*70mm
Secondly, I drew the body, which is a part consisting of 4 parts that contains components of the most important components, which are RGB led + LCD + on / off switch
122mm*63.5mm*50mm
The third part that I drew is the moving part that contains the drug tablets + LDRsensor
120mm*20mm*15mm
it have a hinge for movement
after that i arranged them to know what is a good size for the box
then i drew the sketches and i used T-slots for final assembly of the box itself
then i projected components openings and screws for final assembly
after finishing i exported all final sketches DXF for getting ready to laser cutting
i arranged all parts in illustrator and add some stuff there too like the led opening
for fabricating on laser i used laser work software to arrange files and setting up power and speed for the laser machine i then uploaded files and waited i used approximately 4 of 30x50 cm rectangular sheets
then i started assembling plywood parts and made sure it all fits
i made a special movement by a simple hinge with sc
I used fritzing in designing the circuit but I can't find the lcd i2c & LDR that I actually used to show how to connect the pins
i ask about it in slake and hassen send it to me
I connected the LDR sensor to more than one pin until I settled on pin A0 and set it with downloading its own library
First, I connected the positive and gnd of arduino on bread board
And I started connecting the rtc + LCD, because of the presence of i2c in them, but it was damaged because the rtc was not used, because a specific hour was not specified in the code.
I connected the RGB LED to each pin, red or green, and the cathode to the negative on preadboard
I connected the bazar to the pin number 5
the electrical components i used :
jumper wire terminal >> output
ldr module >> input
16x2 i2c LCD Screen >> output
buzzer >>output
on off switch
mini breadboard
a lot of Jumper Wire (male to male , and male to female )
Arduino UNO
and some 330ohm resistors basically for the LEDs
i used 9V adapter power supply to arduino
i tested every and each component alone
at first the code begins with some declarations and definition to libraries and other variables used
firstly i dowenload lcd i2c liberary
if (readldr <= 700)
{
if (count > 0)
{
digitalWrite(buzzer, LOW);
lcd.clear();
switch (flag) {
case 1:
digitalWrite(redLed[count - 1] , LOW);
digitalWrite(greenLed[count - 1] , HIGH);
break;
case 2:
digitalWrite(redLed[count - 1] , LOW);
digitalWrite(redLed[count - 2] , LOW);
digitalWrite(greenLed[count - 1] , HIGH);
digitalWrite(greenLed[count - 2] , HIGH);
break;
case 3:
digitalWrite(redLed[count - 1] , LOW);
digitalWrite(redLed[count - 2] , LOW);
digitalWrite(redLed[count - 3] , LOW);
digitalWrite(greenLed[count - 1] , HIGH);
digitalWrite(greenLed[count - 2] , HIGH);
digitalWrite(greenLed[count - 3] , HIGH);
break;
case 4:
digitalWrite(redLed[count - 1] , LOW);
digitalWrite(redLed[count - 2] , LOW);
digitalWrite(redLed[count - 3] , LOW);
digitalWrite(redLed[count - 4] , LOW);
digitalWrite(greenLed[count - 1] , HIGH);
digitalWrite(greenLed[count - 2] , HIGH);
digitalWrite(greenLed[count - 3] , HIGH);
digitalWrite(greenLed[count - 4] , HIGH);
break;
}
}
}
If the second one contains a condition that the door should not be opened
if (flag >= 4) {
flag = 0;
}
if (count >= 4)
{
delay(5000);
count = 0;
digitalWrite(buzzer, LOW);
lcd.clear();
for (int i = 0; i < 4; i++) {
digitalWrite(greenLed[i] , LOW);
digitalWrite(redLed[i] , LOW);
}
}
delay(100);
// Serial.print("min");
// Serial.println(t.min);
// lcd.clear();
First, I defined each component of the LED, buzzer and sensor as I added the LCD
#include <ds3231.h>
#include <Wire.h>
unsigned long startMillis = 0;
unsigned long currentMillis;
const unsigned long period = 30000;
struct ts t;
// 3,4,6,
#include <LiquidCrystal.h>
#include <LiquidCrystal_I2C.h>
int ldr = A0;
#define red1 13
#define green1 12
#define red2 11
#define green2 10
#define red3 9
#define green3 8
#define red4 7
#define green4 6
#define buzzer 5
int redLed[4] = {red1 , red2, red3 , red4 };
int greenLed[4] = {green1 , green2 , green3 , green4};
int readldr = 0;
LiquidCrystal_I2C lcd(0x27, 16, 2); //0x27 is the LCD Address
int backlightPin = 3;
// time when to wake up
uint8_t wake_HOUR = 6;
uint8_t wake_MINUTE = 40;
uint8_t wake_SECOND = 0;
int count = 0 ;
int flag = 0;
And I set the LDR in addition to setting the time
Second, the void setup I defined all the components, are they out put or input
void setup() {
Serial.begin(9600);
pinMode(ldr , INPUT);
pinMode(green1 , OUTPUT);
pinMode(red1 , OUTPUT);
pinMode(green2 , OUTPUT);
pinMode(red2 , OUTPUT);
pinMode(green3 , OUTPUT);
pinMode(red3 , OUTPUT);
pinMode(green4 , OUTPUT);
pinMode(red4 , OUTPUT);
pinMode (buzzer, OUTPUT);
Wire.begin();
DS3231_init(DS3231_CONTROL_INTCN);
lcd.backlight();
lcd.init();
pinMode(backlightPin, OUTPUT);
analogWrite(backlightPin, 50); // For External Backlight Control
Then the void loap, the first if, has the first command to be executed
void loop() {
//readldr = analogRead(ldr);
currentMillis = millis();
Serial.print("count");
Serial.println(count); Serial.println(readldr);
// DS3231_get(&t);
// if (t.min % 2 == 0)
readldr = analogRead(ldr);
if ((currentMillis - startMillis) >= period && readldr > 700)
{
lcd.setCursor(0,0);
lcd.print("Tablet Time");
digitalWrite(redLed[count] , HIGH);
digitalWrite(greenLed[count] , LOW);
digitalWrite(buzzer, HIGH);
readldr = analogRead(ldr);
count++;
startMillis = currentMillis;
flag++;
delay(100);
}
tisting tle lcd and leds with ldr
After the first fabrication, I calculated everything again and modified the errors caused by the difference in the thickness of the wood. Then I installed the base first, then installed the body and installed it in the upper part of the base, then installed the moving part
salma helped me in the design She took me and we went to Ram to get some stuff I forgot to order for the final project
waled healped me with enclojer the componant in fusion
sedkey and amr helbed me with maonting the LCD
fareda helped me with RDWORKES
Mohab made some points about Fusion
doaa ,rawan ,lama,hussien helped me to
gazaley Help me when there is something wrong with the wood after cutting and I wanted help with the drill
hassen helped me with fritzing
ooooooh >- -<
At first, I had concerns about the code, especially with the presence of several components in the project, and each component performs more than one purpose, but this problem turned into trivial in view of the problems that occurred with the cutting of wood with a laser cutting machine, and the biggest problem that occurred was the irregularity of all components together, due to Wood plank thickness difference
BUT
I reused all I could from damaged wood like this
Make the designdesigndesigndeddesigdesign
control via bluetooth module
More Design Beautification with colour
Make the LCD display the date and time