my idea is coffee cooler
i was inspired by EOweek activity (smart house)
i learn about how to use the relay , it was great to try it again
and also solve the problem of burning my tongue while i'm drinking HOT CHOCOLATE
tinkercad
jumpers
breadboard
arduino
5v DC fan
I R sensor
lM35 temprature sensor
relay
220 ohm resistor
cutter
glue gun
cardboard
led
circuit design
components needed :
breadboard
arduino
2 LED S
2 220 ohm resistor
IR sensor
Temprature sensor LM35
5v DC fan
jumpers
the idea of the Coffee cooler is making visual alarm and sound when any body get near to the IR sensor , then if the temperature of cup measured by the temp sensor is greater than 70c the fan will start , if there isn't any cup lights and fan will turn off
the outputs are light & fan
the inputs are IR sensor and temprature
1- connect the arduino to the breadboard
possitive by red wire to the 5v
negative by black wire to the GND
2-connect the 2LEDs and 220 ohm resistor
possitive by yellow wire to the pin no.3
and pin no.11
negative leg with the resistor then connect to the negative row of the breadboard
3-connect the IR sensor
possitive leg with jumper wire to the pin no.5
connect negative leg to the negative row of the breadboard
4- connect the temp sensor to the breadboard
possitive by red wire to the possitive row of the breadboard
negative by black wire to the negativeof the breadboard
the middle leg to the arduino by purple wire pin A0
5-connect the relay and DC fan
as shown in this fig.
coding
here is the coding with explaination for each step beside
/*
*/
// the setup function runs once when you press reset or power the board
void setup() {
pinMode(3, OUTPUT); // red led
pinMode(11, OUTPUT); // white led
pinMode(5, INPUT); // ir sensor
pinMode(10, OUTPUT); // fan
pinMode(A0, INPUT); // temp sensor
Serial.begin (9600);
digitalWrite (10, LOW);
}
// the loop function runs over and over again forever
void loop() {
// if the temp sensor read temprature value greater than 70 switch LED on and switch the fan on
// int ir = digitalRead(5);
int val= analogRead(A0);
float mv=(val/1024.0)*5000;
float cel= mv/10;
if (cel > 70 ) {
digitalWrite(10, HIGH); // switch fan on
digitalWrite(3, HIGH); // switch red led on
// delay(100);
// print temprature value
Serial.println(cel);
Serial.println(",");
Serial.println(digitalRead (10));
}
if (digitalRead (5) == LOW){ // if the sensor feel the cup
digitalWrite(11, HIGH); // turn the white LED on
delay(1000); // wait for a second
digitalWrite(11, LOW); // turn the LED off
delay(1000); // wait for a second
}
// if there is no cup , turn off the fan and led
else {
digitalWrite(10, LOW); // turn the fan off
digitalWrite(3, LOW); // turn the white led off
}
}
i couldn't take alot of photoes for each step of wiring but i can explain it in dots
1- connect the arduino to the breadboard
possitive by red wire to the 5v
negative by black wire to the GND
2-connect the LED and resistor
possitive by yellow wire to the pin no.3
negative leg with the resistor then connect to the possitive by red wire to the 5v
negative by black wire to the GND
the same with the white led in pin 11
3- connect IR sensor
possitive leg to breadboard possitive row
negative leg to breadboard negative row
signal to arduino pin 5
4- relay wiring with fan
and connect the signal wire to the pin no 10
also connect 9v adapter to the rosette
possitive and negative to the breadboard
3- extend the wires to make mounting easier
5- connect the temp sensor with extended wires to make mounting easier
possitive leg to breadboard possitive row
negative leg to breadboard negative row
signal to arduino pin A0
upload the code and try the circuit ....
mount led
arduino soccet
locate ir & temp sensors
locate all wires and boards
cup stand
Title of Media
my first challenge was how to connect relay with fan , google search helped me alot
my biggest challenge was mounting
to make cup holder with a good space for sensors
i use try and eror to locate fan and ir sensor with certain relative distance and insure that the sensor will not read the fan as an object
Title of Media
this week i think i can make 80% of my project coding
Title of Media