[go: up one dir, main page]

0% found this document useful (0 votes)
52 views9 pages

Electronics Writeup Final

The document describes the design of an automated in-cabin temperature control system using an Arduino development board. The system uses an LM35 temperature sensor to measure the cabin temperature and displays it on a 7-segment display. It varies the fan speed based on the temperature readings, increasing speed as temperature rises. Key components include an Arduino, breadboard, 7-segment display, LM35 temperature sensor and DC fan. The Arduino code controls the display segments and fan speed depending on the temperature value. Resistance values were carefully selected to safely operate the LED display at the appropriate current levels.

Uploaded by

saibharadwaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views9 pages

Electronics Writeup Final

The document describes the design of an automated in-cabin temperature control system using an Arduino development board. The system uses an LM35 temperature sensor to measure the cabin temperature and displays it on a 7-segment display. It varies the fan speed based on the temperature readings, increasing speed as temperature rises. Key components include an Arduino, breadboard, 7-segment display, LM35 temperature sensor and DC fan. The Arduino code controls the display segments and fan speed depending on the temperature value. Resistance values were carefully selected to safely operate the LED display at the appropriate current levels.

Uploaded by

saibharadwaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

 AIM:

To create an Automated In-Cabin temperature control system using a development board


based setup.

 APPARATUS:
-Breadboard -Step-down transformer
-P-N diodes -7805 IC
-Capacitor -resistor, LED
-wires

 FLOW CHART:
 CIRCUIT DIAGRAM:

 Arduino CODE:

#define segA 2//connecting segment A to PIN2

#define segB 3// connecting segment B to PIN3

#define segC 4// connecting segment C to PIN4

#define segD 5// connecting segment D to PIN5

#define segE 6// connecting segment E to PIN6

#define segF 7// connecting segment F to PIN7

#define segG 8// connecting segment G to PIN8


const int motor =11;
void setup()

pinMode(motor,OUTPUT);
for (int i=2;i<9;i++)

pinMode(i, OUTPUT);// taking all pins from 2-8 as output

}
Serial.begin(9600);

void loop()

{
int output = analogRead(A0);
int count1=(output*500)/1024;
Serial.print("temperature: ");
Serial.print(count1);
Serial.print("\t");
delay(500);

int count = (count1/10);

switch (count)

case 0://when count value is zero show”0” on disp

digitalWrite(segA, LOW);

digitalWrite(segB, LOW);

digitalWrite(segC, LOW);

digitalWrite(segD, LOW);
digitalWrite(segE, LOW);

digitalWrite(segF, LOW);

digitalWrite(segG, HIGH);
digitalWrite(motor,LOW);

break;

case 1:// when count value is 1 show”1” on disp

digitalWrite(segA, HIGH);

digitalWrite(segB, LOW);

digitalWrite(segC, LOW);

digitalWrite(segD, HIGH);

digitalWrite(segE, HIGH);

digitalWrite(segF, HIGH);

digitalWrite(segG, HIGH);
digitalWrite(motor,LOW);

break;

case 2:// when count value is 2 show”2” on disp

digitalWrite(segA, LOW);

digitalWrite(segB, LOW);

digitalWrite(segC, HIGH);

digitalWrite(segD, LOW);

digitalWrite(segE, LOW);

digitalWrite(segF, HIGH);

digitalWrite(segG, LOW);
analogWrite(motor,150);
break;

case 3:// when count value is 3 show”3” on disp

digitalWrite(segA, LOW);

digitalWrite(segB,LOW);

digitalWrite(segC, LOW);

digitalWrite(segD, LOW);

digitalWrite(segE, HIGH);

digitalWrite(segF, HIGH);

digitalWrite(segG, LOW);
analogWrite(motor,250);

break;

case 4:// when count value is 4 show”4” on disp

digitalWrite(segA,HIGH);

digitalWrite(segB, LOW);

digitalWrite(segC, LOW);

digitalWrite(segD, HIGH);

digitalWrite(segE, HIGH);

digitalWrite(segF, LOW);

digitalWrite(segG, LOW);
digitalWrite(motor,350);

break;

case 5:// when count value is 5 show”5” on disp


digitalWrite(segA, LOW);

digitalWrite(segB, HIGH);

digitalWrite(segC, LOW);

digitalWrite(segD, LOW);

digitalWrite(segE, HIGH);

digitalWrite(segF, LOW);

digitalWrite(segG, LOW);
digitalWrite(motor,450);

break;

case 6:// when count value is 6 show”6” on disp

digitalWrite(segA, LOW);

digitalWrite(segB,HIGH);

digitalWrite(segC, LOW);

digitalWrite(segD, LOW);

digitalWrite(segE, LOW);

digitalWrite(segF, LOW);

digitalWrite(segG, LOW);
digitalWrite(motor,550);

break;

case 7:// when count value is 7 show”7” on disp

digitalWrite(segA, LOW);

digitalWrite(segB, LOW);

digitalWrite(segC, LOW);
digitalWrite(segD, HIGH);

digitalWrite(segE, HIGH);

digitalWrite(segF, HIGH);

digitalWrite(segG, HIGH);
digitalWrite(motor,LOW);

break;

case 8:// when count value is 8 show”8” on disp

digitalWrite(segA, LOW);

digitalWrite(segB, LOW);

digitalWrite(segC, LOW);

digitalWrite(segD, LOW);

digitalWrite(segE, LOW);

digitalWrite(segF, LOW);

digitalWrite(segG, LOW);
digitalWrite(motor,HIGH);

break;

case 9:// when count value is 9 show”9” on disp

digitalWrite(segA, LOW);

digitalWrite(segB, LOW);

digitalWrite(segC, LOW);

digitalWrite(segD, LOW);

digitalWrite(segE, HIGH);

digitalWrite(segF, LOW);
digitalWrite(segG, LOW);
digitalWrite(motor,LOW);

break;

break;

 KEY POINTS:
- 7-segment display is used to display the In-cabin temperature.
-To protect the LED present in the 7-segment display, resistance is used to achieve desired
current level instead of a 3-pin regulator.
- A basic LM35 sensor is used to measure the temperature of the cabin.
-The fan speed varies based on the variation in temperature recorded by the LM35 sensor.
 PROBLEMS FACED:
-The connections to be made to make the 7-segment display functional.
-The code construction to achieve the functionality of the setup i.e. change in the fan speed
based on temperature and simultaneous display of temperature values.
-

 SOLUTION:
-Resistance value
R= VLED
ILED
VLED= 3.5 volts (referring the datasheet for red LED)
ILED= 17 ma
But for optimum operation of LED 8O% of the rated current is used.
R= 3.5/17 x 10-3
R=205.882 Ω
Closest available resistance is used
R= 220 Ω

 CONCLUSIONS:
-The sensor used determines the precision with which the temperature is measured.
-The resistance selection is crucial to safe guard the 7-segment display from damage due to
excess current flow.
-The program algorithm should cover every possibility to ensure error free execution and
setup functionality

You might also like