Exp3 IOT
Exp3 IOT
Simulate a control system by turning on/off fan based on temperature and humidity
2. Task to be done:
• Steps to Simulate Fan Control System in Tinkercad
• Select Components → Arduino Uno, DHT11/DHT22 sensor, NPN transistor (2N2222/BC547), fan (or LED),
resistors.
• Wire DHT Sensor → VCC to 5V, GND to GND, Data to Digital Pin 2 (use 10kΩ pull-up resistor if needed)..
• Connect Transistor & Fan →
1. Fan (+) → 5V
2. Fan (-) → Collector of 2N2222
3. Emitter → GND
4. Base → Digital Pin 9 via 1kΩ resistor
• Write Arduino Code → Read temperature & humidity, set threshold (e.g., Temp > 30°C or Humidity > 60%),
control fan via Pin 9
• Upload & Simulate → Run in Tinkercad, check Serial Monitor for data, ensure fan (or LED) turns ON/OFF based
on conditions.
3. Software/Tools used:
• Tinkercad – For circuit simulation and Arduino programming.
• Arduino IDE – For writing and uploading code to Arduino.
• DHT Library – To read temperature and humidity data from the DHT11/DHT22 sensor.
• Serial Monitor – To display real-time sensor readings and debug the system.
Required Components
• Arduino Uno (Microcontroller)
• TMP36 Temperature Sensor
• LCD 16x2 Display (With I2C or direct wiring)
• Relay Module (To control the fan)
• Fan (or DC Motor)
• Resistors (10kΩ for pull-up, others as needed)
• Breadboard & Jumper Wires
Wiring Connections
• TMP36 Temperature Sensor:
• VCC (Left Pin) → 5V (Arduino)
• VOUT (Middle Pin) → A0 (Arduino)
• GND (Right Pin) → GND (Arduino)
• LCD 16x2 Display (Direct Wiring / I2C Module)
• VCC → 5V (Arduino)
• GND → GND (Arduino)
• SCL (if using I2C) → A5 (Arduino)
• SDA (if using I2C) → A4 (Arduino)
• If directly wired, connect RS, E, D4-D7 to digital pins.
♦ Fan Connections:
• Fan (+) Positive → External Power 12V/5V
• Fan (-) Negative → Relay NO (Normally Open) Pin
• Relay COM (Common) Pin → GND
CODE:
5. Result/Output/Writing Summary:
• Understanding Sensor Integration – Learn how to interface the TMP36 temperature sensor with
Arduino to measure real-time temperature.
• Relay & Actuator Control – Gain knowledge on using a relay module to control high-power devices
like a fan with Arduino.
• LCD Display Implementation – Learn how to display sensor data on an LCD 16x2 screen for real-
time monitoring
.Evaluation Grid: