The idea is to make ventilation fan controlled by temperature sensor, so when the Temp. is high than 25 c, the fan run automatically to reduce the heating degree.
This idea would help to keep on suitable work area without Air conditioning which save costs and save environment.
I used different Thing as below:-
A- Tinkercad to do simulation for the blender components.
B- Bread board, wires, 5V fan, arduino UNO board, LM35 Temp. sensor.
C- Avometer.
Tinkercad blocks show if read temp. sensor is bigger than or equal 25 set pin 6 to high and if no set pin 6 to Low.
Choose If from control as logic condition.
Choose bigger and equal than from Math.
Choose set pin from output.
C hoose reade teamp. sensor from Input.
The process of simulating come as below:-
Open tinkercad website.
Log in the account.
Choose create circuits.
Add Arduino UNO board ,breadboard,and DC motor and Temp. Sensor to the work space.
Assemble all components together as the picture attached.
create the code as blocks.
Run the simulation to stand on the result.
https://www.tinkercad.com/things/l6kLQ6lOm6W
The implementation process come as STEPS:-
first prepare the components on the work area as below:
Avometer to measure the volt and current in the circuit.
LM35 Temp. sensor.
5V fan.
Arduino uno board.
wire to connect all components together in the breadboard.
USB to Arduino connector to get the power
Second create the circle :
connect positive and ground from Arduino board to bread board.
put the LM35 on the bread board.
connect ML35 voc to the positive on the board and cround to ground on the board.
connect output LM35 to the Analog input on the board.
connect the fan t the positive and ground.
Upload the code to the Arduino board.
Note: some DC 5v Fans need relay to run with the Arduino as out-source of power because the Arduino board current is low to run it.
int val;
void setup() {
// put your setup code here, to run once:
pinMode(A1, INPUT);
pinMode(6, OUTPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
val = analogRead(A1);
float mv = (val / 1024.0) * 5000;
float cel = (mv / 10);
Serial.print("Temp = ");
Serial.print(cel);
Serial.print("c");
Serial.println();
if (cel > 25) {
digitalWrite(6, HIGH);
} else {
digitalWrite(6, LOW);
}
delay(100);
}
The challenge was to change the Temp. sensor LM35 code than in tinkercar because in Tinkercad is different type of sensor.
So i write the code as i saw in lecture video by identify the value and then divide value on 1024 as analog read data multiply 5000 then divided by 10 to return to Celecios degrees
as Below code:-
val = analogRead(A1);
float mv = (val / 1024.0) * 5000;
float cel = (mv / 10);
This assignment really nice to my final project because i learned how to get temp. degrees displayed and control the Tem. sensor with Fan which i can later change fan to buzzer and led as alerts.