Integrated Circuit for Fan Module L9110, DHT11 (Temperature and Humidity Sensor) and LCD

Dear everyone,

I'm currently learning about how to produce light from LED by utilizing Fan Module sensor (L9110), environmental variable sensor using DHT 11(temperature and humidity) and LCD 16x2 using arduino-based.

Now, I want to integrate those become one circuit, which the result of temperature and humidity measurement would be displayed on LDC and LED able to emit light using fan module.

Can anyone suggest the diagram schematic / electronic circuit / circuit diagram for that purpose?

thank you in advance

Split the project into parts. Search for solutions, wiring and code, for each part.
There are ore then lots of tutorials or examples to look at.

1 Like

There is perhaps a language problem, here. All those must remain separate "circuits". You program your Arduino to combine all data and control of those circuits so they do what you want.

               +---|EXT|--------|USB|---+           +--------------+        +------------------+
               |    PWR          A5/SCL |           |BUCK CONVERTER|        | 12v POWER SUPPLY |
               |                 A4/SDA |     +-----|OUT+5v  12vIN+|--+-----|+12V      (mains+)|
               |          UNO      AREF |     | +---|OUT-5v  12vIN-|--|-+---|GND       (mains-)|
               |                    GND |     | |   +--------------+  | |   +------------------+
               | IOREF          SCK/D13 |     | |                     | |                
               | RST             DI/D12 |     | |   +-----------+     | |            ___,
               | 3V3             DO/D11~|     | |   |   RELAY   |     | |           ' |
          +----| +5V                D10~|     | +---| DC-    NC |     | |   +---------'--------+
          |    | GND                 D9~|-+   +-|---| DC+   COM |--<<-+ +---| GND          FAN |
          | +--| GND                 D8 |-|-+-|-|---| DIN    NO |-->>-------| +12V             |
          | |  | Vin                 D7 | | | | |   +-----------+           +------------------+
          | |  |                     D6~| | | | |
          | |  | A0                  D5~| | | | |                           +-----+
          | |  | A1                  D4 | | | +-|---------------------------|-LED |
          | |  | A2             INT1/D3 | | +-|-|---------------------------|+LED |
          | |  | A3             INT0/D2~| |   | |     +------------+        +-----+
     +----| |  | A4/DA  RS CK DI  TX>D1 | |   | +-----| GND  DHT22 |
     | +--|-|--| A5/CL  GD D0 5V  RX<D0 | +---|-|-----| SIG        |
     | |  | |  +------------------------+     +-|-----| VCC        |
     | |  | +---------------------------------+ |     +------------+
     | |  +-----------------------------------|-+
     | |       +------------------------+     | |
     | +-------| CLK    LCD 1602    VCC |-----+ |
     +---------| SDA                GND |-------+
               +------------------------+

      L9110 motor driver:
      https://cdn-shop.adafruit.com/product-files/4489/4489_datasheet-l9110.pdf
#include <LiquidCrystal_I2C.h>
#define LCDADR 0x27 // LCD address
LiquidCrystal_I2C lcd (LCDADR, 16, 2);

#include <DHT.h>
#define DHTPIN 8
#define DHTTYPE DHT22
DHT dht (DHTPIN, DHTTYPE);
float humidity;
float temperature;

#define  RELAYPIN 9

void setup() {
  startLCD(); // start LCD
  dht.begin(); // start DHT
}

void loop() {
  readDHT();
  displayData();
  displayFan();
  delay(2000); // two seconds refresh for DHT22
}

//*********************************************

void readDHT() {
  humidity    = dht.readHumidity();
  temperature = dht.readTemperature(); // fahrenheit: temp = dht.readTemperature(true);
}

void displayFan() {
  if (temperature > 25) {
    digitalWrite(RELAYPIN, HIGH);
    lcd.setCursor(13,1);
    lcd.print("ON ");
  }
  else {
    digitalWrite(RELAYPIN, LOW);
    lcd.setCursor(13,1);
    lcd.print("OFF");
  }
}

void displayData() {
  lcd.setCursor(3,0);
  if (humidity < 10)
    lcd.print(" ");
  lcd.print(humidity);
  lcd.print("%");

  lcd.setCursor(2,1);
  zeropad(temperature);
  lcd.print(temperature);
  lcd.print("C");
}

void zeropad(float value) { // right-align the value
  if (value < 100 && value > 0)
    lcd.print(" ");
  if (value < 10 && value > 0)
    lcd.print(" ");
  if (value > -10 && value < 0)
    lcd.print(" ");
}

void startLCD() {
  lcd.init(); // start LCD
  lcd.backlight();
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("H");
  lcd.setCursor(0, 1);
  lcd.print("T");
  lcd.setCursor(13, 0);
  lcd.print("FAN");
}

https://wokwi.com/projects/368080143500360705

Hi, @xfpd

[soapbox]
@xfpd , @aryhapsara wants to learn!!!!!
So lets show him how to start with developing code for each piece of hardware and get it going before putting it together, part by part.
Just producing a lump of code and schematic for the complete project is not very instructive, or confidence building to the OP.
[\soapbox]

:+1: :+1: :+1: :+1: @Railroader @Paul_KD7HB :+1: :+1: :+1:

Tom.. :smiley: :+1: :coffee: :australia:

1 Like

Yes, @TomGeorge I did make the mistake you noted. Not my aim.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.