Humidity sensor with led alarm | Arduino project

This page contains Arduino Humidity sensor with led alarm source code. This project is good for someone who wants to make a humidity meter or hygrometer with led alarm if humidity and temperature over a threshold. It's easy to make and doesn't require an external power supply, just use power from an Arduino UNO R3 board (USB power compatible with this project).

Electronic components list:
1 x Arduino Uno R3
1x 20 x4 I2C LCD display
1 x AM 2320 humidity/temp sensor
1 x 5 mm led ( 2 x if you plan to use led for pin 13 instead built-in led)
1 x 1000 ohms resistor ( 2 x if you plan to use led for pin 13 instead built-in led)
Any USB power adapter, 500 mA current at least.

Here is the Arduino code:
AM 2320 library
LCD display i2c library

#include <Wire.h>
#include <AM2320.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 20, 4);
AM2320 th;
int led2 = 12;

tda 7052B full wiring diagram, easy to understand

I accidentally bought IC TDA 7052b from local electronic store (it should be TDA 7052) . I have been finding circuit diagram in google but seem the circuits not working so I decided to test it in my own way. Finally, I found the best wiring diagram that works, so I think I must share it to help DIY lover like me.
TDA 7052B is bridge-tie load amplifier ic, so no need output capacitor coupling (Better bass respond and bass quality) 1.2 w@ 8 ohms load amplifier ic. The chip sound better compare to class d amplifier(pam8403) but less output power.
The image below shows how to wiring proper volume control for TDA 7052B
In real life, the IC can connect to 4 ohms loudspeaker without any problem.

List of component:

1 TDA7052 B
2 100 uf 16 volts electrolytic capacitor(C2)
3 10 uf 16 volts electrolytic capacitor (C3)
4 0.1 uf mks capacitor(C1)
potentiometer(volume control)
6 8 ohms 2 watts speaker( I use 4 ohms without problem).
7 DC source 3-18 volts (5 -9 volts recommend)

Connect input to volume control directly.

TDA 7052 B with DC volume control wiring diagram. You will see that the input pin(2) connect to output of signal source directly
(Sound may be better because signal does not pass through potentiometer,less passive component mean better sound quality).

The video shows testing circuit with failed circuit on the internet compare.

Need more power? 2.5 watts amplifier wiring diagram is waiting for you here