oramafere.blogg.se

Temperature controlled fan arduino
Temperature controlled fan arduino









Lcd.begin(16,2) // Initializes the 16x2 LCDįloat temp = dht. LiquidCrystal lcd(12,11,10,9,8,7) // Declaring LCD connections #define DHTTYPE DHT22 // Declaring the type of DHT sensor we are using (DHT22 or DHT11)ĭHT dht(DHTPIN, DHTTYPE) // Declaring DHT connection and type #define DHTPIN 6 // Declaring pin 6 for communicating to DHT22 sensor #include "LiquidCrystal.h" // Including LCD library Program #include "DHT.h" // Including DHT22 library Connect it to Arduino pins 10, 9, 8 and 7 respectively. Pin 11 ~ 14 are data pins (D4 ~ D7), used to transmit data/commands to LCD controller.But these pins are not used in 4 bit LCD interfacing, so connect it to ground. 9 parameters to the user's mobile 2 Monitoring/controlling environmental factors such as temperature, relative humidity, CO2 Arduino microcontroller-based. Pin 7 ~ 10 are data pins (D0 ~ D3), used to transmit data/command to LCD controller.Pin 6 is EN (Enable), it is used to indicate a valid data/command in data lines (D0 ~ D7).Connect it to ground since we are only writing data to LCD in this project. Pin 4 is RS (Register Select), it is used to select data or command register.Connect it to the variable terminal of a potentiometer whose fixed terminals are connected to ground and 5V. Pin 3 is VEE, for adjusting display contrast.Pin 2 is VDD, connect it to 5V output of Arduino.Now we can connect 16×2 LCD to the Arduino. Fourth pin is Ground, connect it to ground.Second pin is DATA output, connect it to pin 6 of Arduino.First pin is VCC power input, connect it to 5V output of Arduino.Connect it to 5V output of Arduino.Īfter that connect DHT22 sensor to the Arduino, it is using a single wire bus for communication. Pin 16 is Vcc1, which is logic voltage input (voltage level of control signals provided by Arduino).Pin 8 is Vcc2, which is the driver/motor power input, connect it to positive of the battery.Connect pin 7 (Input 2) of L293D to the pin 3 of Arduino.Connect pin 6 (Output 2) of L293D to the remaining terminal of the DC motor.Pins 4 and 5 of the L293D are ground pins, connect these to common ground (battery ground + arduino ground).Connect pin 3 (Output 1) of L293D to one terminal of the DC motor.Connect pin 2 (Input 1) of L293D to the pin 4 of Arduino.

temperature controlled fan arduino

  • Connect pin 1 (Enable 1) of L293D to pin 5 of Arduino.
  • Temperature controlled fan arduino driver#

    You can read articles L293D Motor Driver IC and H-Bridge Motor Driving for more information about the working of L293D. Components RequiredĬircuit Diagram Temperature Controlled Fan using Arduino – Circuit Diagram Explanationįirst we can connect L293D motor driver IC to Arduino as below. Arduino Uno is the heart of this project and a L293D driver IC is used to drive the DC fan/motor. DHT22 sensor is used to sense the room temperature and then we adjust speed of a DC fan/motor accordingly using PWM ( Pulse Width Modulation). Here we are going to make a temperature controlled DC fan.









    Temperature controlled fan arduino