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;

3 watts stereo amp board pam8403 sound test with jvc loudspeaker.

PAM 8403 is a class d integrated amplifier that sounds good and energy efficiency. The ic requires only 5 volts for full 3 watts stereo (2 amperes 5 volts power supply need for full power) with 83 % efficiency @ 4 ohms load, so this amp board is good for battery power.

This amp board sound good and fast respond but impact not good as pam8610 (high power version 10 watts stereo) but high frequency seem cleaner. Bass respond not tight(maybe my speakers are oversize)

The amplifier board work well with 1-metre speaker cable so this amp is very stable and no need big power supply filter capacitor to eliminate hum from a power supply (Bass respond will be better if you add 2200 uf/16 volts electrolytic capacitor parallel to power supply filter. Make sure you connect electrolytic capacitor with correct polarity!!! or ka-boom. 

PAM 8403 specification:

- 3W Output at 10% THD with a 4Ω Load and 5V Power Supply
- Filterless, Low Quiescent Current and Low EMI
- Low THD+N
- Superior Low Noise
- Efficiency up to 90%
- Short Circuit Protection
- Thermal Shutdown

If you plan to make a little amplifier that sounds good and energy efficiency so PAM 8403 is the right choice for you.

This video uses zoom h1 as USB mic for a nice result.
see sound testing video here.

See how to connect volume control to any amplifier board here

PAM8403 wiring diagram is here

See how to add a power supply filter capacitor to PAM8403 amp board to improve the amp board sound quality here 

If you need more power 10 watts 8 ohms PAM8610 is the best choice for you

You may love class T amplifier sound, TA 2024 is a low-cost high-quality amplifier board, see review here