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;

PAM 8403 board amp wiring diagram

PAM 8403 is a portable 3 watts stereo class d amplifier that uses only 5 volts D.C. to operate. The amplifier board is easy to wiring and very small size, you can make a small amplifier project that not requires high voltages to work.

The first thing you need to know.
  • PAM 8403 cannot bridge together because the amplifier is already bridge-tie-load output configuration
  • Over 6 volts can damage the amplifier module, if you want higher power you can check 10 watts class d amp PAM 8610 here
  • You must use shield wire connect from input source to volume control and from volume control to the amplifier board input if you don't want your amplifier to suffer from parasitic oscillation (sound like JeeeeJeeee)

Today I will show you how to wire PAM 8403 board amp that easy to understand. Let's see image below.

You can see that two speakers do not share output ground like normal amplifier because PAM 8403 is a  bridge-tied-load amplifier, if each speaker wire touches each other the amplifier IC will shut down or damage. You also check that the right speaker + connects to R + sign from amplifier board and speaker - must connect to R - and check left speaker wiring too if you reverse speaker polarity you loudspeaker may produce less bass.

Vcc sign is positive polarity (+)
GND is ground or negative polarity (-)
The amplifier inputs use same ground from a signal source you can see how to connect volume control to amplifier here

PAM 8403 board amplifier use 5 volts but need 1.5 amp for good sound so beware that you do not play loud music if you use computer USB power supply because the computer USB socket can supply 500 - 1000 mAh. you can see PAM 8403 sound test here

Enjoy your electronic hobby!!!