Python Tutorials – பாடம் 8 – Humidity Sensor on Raspberry Pi Pico

Humidity Sensor ஐ Raspberry Pi Pico வை பயன்படுத்தி கட்டுப்படுத்துவது

Required Components

  1. Humidity Sensor (DHT11)-1 no
  2. Raspberry Pi Pico Board-1 no
  3. Connecting wires-1 set

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Humidity Sensor உடன் Raspberry Pi Pico GP16 ஐ இணைக்க வேண்டும்.
  3. Humidity Sensor VCC மற்றும் GND உடன் Raspberry Pi Pico 3V3 (OUT) மற்றும் GND ஐ இணைக்க வேண்டும்.
  4. Python program ஐ சரி பார்க்க வேண்டும்.
  5. மின்சுற்றை சரி பார்க்க வேண்டும்.
  6. Python program ஐ ரன் செய்ய வேண்டும்.

Python Program

from machine import Pin
import time
from dht import DHT11, InvalidChecksum
 
sensor = DHT11(Pin(16, Pin.OUT, Pin.PULL_DOWN))
 
while True:
    temp = sensor.temperature
    humidity = sensor.humidity
    print("Temperature: {}°C   Humidity: {:.0f}% ".format(temp, humidity))
    time.sleep(2)

Arduino Tutorials – பாடம் 43 – Humidity Sensor on Raspberry Pi Pico

Humidity Sensor ஐ Raspberry Pi Pico வை பயன்படுத்தி கட்டுப்படுத்துவது

Required Components

  1. Humidity Sensor (DHT11)-1 no
  2. Raspberry Pi Pico Board-1 no
  3. Connecting wires-1 set

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Humidity Sensor உடன் Raspberry Pi Pico GP16 ஐ இணைக்க வேண்டும்.
  3. Humidity Sensor VCC மற்றும் GND உடன் Raspberry Pi Pico 3V3 (OUT) மற்றும் GND ஐ இணைக்க வேண்டும்.
  4. Arduino program ஐ சரி பார்க்க வேண்டும்.
  5. மின்சுற்றை சரி பார்க்க வேண்டும்.
  6. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

#include "DHT.h"
#define DHTPIN 16
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

void setup() 
{
  Serial.begin(9600);
  Serial.println("DHTxx test!");
  dht.begin();
}

void loop( )
{
  delay(2000);
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  float f = dht.readTemperature(true);
  
  if (isnan(h) || isnan(t) || isnan(f)) 
  {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }  
  Serial.print ("Humidity: ");
  Serial.print (h);
  Serial.println (" %\t");
  Serial.print ("Temperature: ");
  Serial.print (t);
  Serial.println (" *C ");
  Serial.print (f);
  Serial.println (" *F\t");
}

Python Tutorials – Lesson 8 – Humidity Sensor on Raspberry Pi Pico

To control Humidity Sensor using Raspberry Pi Pico

Required Components

  1. Humidity Sensor (DHT11)_1 no
  2. Raspberry Pi Pico Board_1 no
  3. Connecting wires_1 set

Circuit

Steps

  1. Make sure the components are working properly.
  2. Connect the Raspberry Pi Pico board GP16th pin to the Humidity Sensor.
  3. Connect Humidity Sensor board VCC, GND to 3V3 (OUT), GND of Raspberry Pi Pico Board.
  4. Check the Electrical Circuit.
  5. Check the Python program.
  6. Run the Python program.

Python Program

from machine import Pin
import time
from dht import DHT11, InvalidChecksum
 
sensor = DHT11(Pin(16, Pin.OUT, Pin.PULL_DOWN))
 
while True:
    temp = sensor.temperature
    humidity = sensor.humidity
    print("Temperature: {}°C   Humidity: {:.0f}% ".format(temp, humidity))
    time.sleep(2)

Arduino Tutorials – Lesson 43 – Humidity Sensor on Raspberry Pi Pico

To control Humidity Sensor using Raspberry Pi Pico

Required Components

  1. Humidity Sensor (DHT11)_1 no
  2. Raspberry Pi Pico Board_1 no
  3. Connecting wires_1 set

Circuit

Steps

  1. Make sure the components are working properly.
  2. Connect the Raspberry Pi Pico board GP16th pin to the Humidity Sensor.
  3. Connect Humidity Sensor board VCC, GND to 3V3 (OUT), GND of Raspberry Pi Pico Board.
  4. Check the Electrical Cicuit.
  5. Check the Arduino program.
  6. Run the Arduino program.

Arduino Program

#include "DHT.h"
#define DHTPIN 16
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

void setup() 
{
  Serial.begin(9600);
  Serial.println("DHTxx test!");
  dht.begin();
}

void loop( )
{
  delay(2000);
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  float f = dht.readTemperature(true);
  
  if (isnan(h) || isnan(t) || isnan(f)) 
  {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }  
  Serial.print ("Humidity: ");
  Serial.print (h);
  Serial.println (" %\t");
  Serial.print ("Temperature: ");
  Serial.print (t);
  Serial.println (" *C ");
  Serial.print (f);
  Serial.println (" *F\t");
}

Arduino Tutorials – பாடம் 16 – Humidity Sensor Using Arduino UNO

Humidity Sensor ஐ Arduino UNO வை பயன்படுத்தி கட்டுப்படுத்துவது.

Required Components

  1. Humidity Sensor(DHT22) -1 no
  2. Arduino UNO -1 no
  3. Connecting wires -1 set

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Humidity Sensor உடன் Arduino UNO வை இணைக்க வேண்டும்.
  3. Arduino UNO பின்னான 2 ஐ Humidity Sensor உடன்இணைக்க வேண்டும்.
  4. Humidity Sensor உடன் +5V மற்றும் Ground ஐ இணைக்க வேண்டும்.
  5. Arduino program ஐ சரி பார்க்க வேண்டும்.
  6. மின்சுற்றை சரி பார்க்க வேண்டும்.
  7. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

#include "DHT.h"
#define DHTPIN 2
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);

void setup() 
{
  Serial.begin(9600);
  Serial.println("DHTxx test!");
  dht.begin();
}

void loop( )
{
  delay(2000);
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  float f = dht.readTemperature(true);
  if (isnan(h) || isnan(t) || isnan(f)) 
  {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }
  float hif = dht.computeHeatIndex(f, h);
  float hic = dht.computeHeatIndex(t, h, false);
  Serial.print ("Humidity: ");
  Serial.print (h);
  Serial.print (" %\t");
  Serial.print ("Temperature: ");
  Serial.print (t);
  Serial.print (" *C ");
  Serial.print (f);
  Serial.print (" *F\t");
  Serial.print ("Heat index: ");
  Serial.print (hic);
  Serial.print (" *C ");
  Serial.print (hif);
  Serial.println (" *F");
}

Usage

  1. தொழில்துறை செயல்முறை மற்றும் கட்டுப்பாட்டு அமைப்புகள்(Industrial process &control systems)
  2. அலுவலக ஆட்டோமேஷன்(Office automation)
  3. துணி உலர்த்தி(Clothes dryer)
  4. நுண்ணலை அடுப்பு(Microwave ovens)
  5. அச்சுப்பொறிகள்(Printers)

Arduino Tutorials – Lesson 16 – Humidity Sensor Using Arduino UNO

Creating Humidity Sensor program using Arduino UNO

Required Components

  1. Humidity Sensor(DHT22) -1 no
  2. Arduino UNO -1 no
  3. Connecting wires -1 set

Circuit

Steps

  1. Make sure the components are working properly.
  2. Connect the Humidity Sensor to the Arduino UNO board.
  3. Connect the Arduino UNO board 2nd pin to the Humidity Sensor.
  4. Connect Humidity Sensor board VCC, GND to 5V, GND of Arduino Uno Board.
  5. Check the Cicuit Connections.
  6. Check the Arduino program.
  7. Run the Arduino program.

Arduino Program

#include "DHT.h"
#define DHTPIN 2
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);

void setup() 
{
  Serial.begin(9600);
  Serial.println("DHTxx test!");
  dht.begin();
}

void loop( )
{
  delay(2000);
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  float f = dht.readTemperature(true);
  if (isnan(h) || isnan(t) || isnan(f)) 
  {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }
  float hif = dht.computeHeatIndex(f, h);
  float hic = dht.computeHeatIndex(t, h, false);
  Serial.print ("Humidity: ");
  Serial.print (h);
  Serial.print (" %\t");
  Serial.print ("Temperature: ");
  Serial.print (t);
  Serial.print (" *C ");
  Serial.print (f);
  Serial.print (" *F\t");
  Serial.print ("Heat index: ");
  Serial.print (hic);
  Serial.print (" *C ");
  Serial.print (hif);
  Serial.println (" *F");
}

Usage

  1. Industrial process &control systems
  2. Office automation
  3. Clothes dryer
  4. Microwave ovens
  5. Printers