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;

2.5 watts lm 380n amplifier with stable wiring diagram.


1 Wide supply voltage from 10 to 22 volts so you can use battery power.
2 Use only 8 parts to make jobs done.
3 High bandwidth 100khz
4 Low distortion no more than 3% at 2 watts (not 10% thd at full power like commercial amplifier spec )

Lm380n is old but still good sounding ic if you can eliminate oscillation and power supply ripple. The ic is very easy to build and you don't have to attach heatsink for normal operation. 2.5 watts power is enough to drive small 8 ohms loudspeaker for your little amplifier project. This wiring diagram is very stable and low oscillate noise even your hand near volume control.

The cost of lm380n around 1$
R1 is 2 kilo-ohms resistor (See how to read resistor color code here)

Beware!!!! Capacitor C1,C3,C4,C5 is electrolytic capacitor so you must check polarity or the capacitor especially C3 will explode,that may cause severe injured,so you must know what you do.

See this ic sound test video.



  2. OK the list is for one channel.
    1 10 kohms potentiometer
    2 C1 2.2uf/25 volts
    3 C2 0.001 uf 100 volts
    4 C3 4700uf/35 volts(16 volts is fine)
    5 C4 1000 uf/25 volts(16 volts is fine)
    6 C5 100 uf/25 volts(16 volts is fine)
    7 LM380n ic
    8 R1 2 kohms 1/4 watts
    9 4 ohms speaker not less than 5 watts if you want play loud music.

    Please subscribe for my blog and youtube channel for more :)


Post a Comment