Posts

Showing posts from November, 2024

Procedure for Automatic Plant Watering System without Flyback Diode

Image
  Procedure for Automatic Plant Watering System without Flyback Diode Step 1: Gather Components Arduino UNO Soil moisture sensor NPN transistor (e.g., 2N2222 or BC547) or N-channel MOSFET (e.g., IRF540N or IRLZ44N) Water pump 1kΩ resistor 5V or 12V power supply for the pump (depending on the pump specifications) Jumper wires Breadboard Step 2: Connect the Soil Moisture Sensor Attach the VCC pin of the soil moisture sensor to the 5V pin on the Arduino. Connect the GND pin of the sensor to the GND pin on the Arduino. Attach the A0 pin of the sensor to the A1 analog pin on the Arduino. Step 3: Set Up the Transistor or MOSFET For NPN Transistor: Connect the emitter pin of the transistor to GND . Connect the collector pin to the positive terminal of the water pump. Connect the base pin to Arduino digital pin 8 via a 1kΩ resistor . For N-Channel MOSFET: Connect the source pin of the MOSFET to GND . Connect the drain pin to the negative terminal of the water pump. Connect th...

Temperature and Humidity Monitor

  Project Title : Temperature and Humidity Monitor Components Required Arduino UNO DHT11 sensor I2C LCD Display Jumper wires Breadboard Connections DHT11 Sensor : VCC -> 5V GND -> GND Data -> Pin 2 I2C LCD Display (Assuming your setup): Using the Adafruit_LiquidCrystal library: SCL -> A5 SDA -> A4 Code # include <Adafruit_LiquidCrystal.h> # include <DHT.h> // Define DHT sensor type and pin # define DHTTYPE DHT11 # define DHTPIN 2 // Initialize DHT sensor DHT dht (DHTPIN, DHTTYPE) ; // Initialize the LCD Adafruit_LiquidCrystal lcd ( 0 ) ; // Assuming default I2C address void setup () { // Begin serial communication Serial. begin ( 9600 ); // Initialize the DHT sensor dht. begin (); // Initialize the LCD lcd. begin ( 16 , 2 ); lcd. setBacklight ( 1 ); // Display a welcome message lcd. print ( "Temp & Humidity" ); lcd. setCursor ( 0 , 1 ); lcd. print ( "Monitoring..." ); delay ( 2000 ...