Arduino IoT Smart Projects
Arduino IoT Smart Projects
How It Works: A soil moisture sensor monitors the plant’s soil and detects
when it becomes too dry. If the moisture level falls below a set threshold, the
system triggers a response – for example, lighting up an LED to indicate the
plant needs watering (in more advanced setups it can even activate a water
pump). This prevents forgetting to water your plant by providing a clear
visual alert when the soil is parched.
How to Build:
Sensor & Circuit: Insert a soil moisture sensor into the plant’s soil
and connect it to an Arduino analog input. Connect a LED to a digital
output (with a suitable resistor). Optionally, you can add a small relay
and pump if you want automatic watering instead of just an LED.
Video Demo: Arduino Plant Moisture LED Indicator – This tutorial shows how
to use a soil moisture sensor with an LED, so you “never forget to water your
plants again,” by indicating with a red or green LED when the soil is dry.
(YouTube)
Components:
How It Works: A motion sensor (PIR) or distance sensor monitors the area
near a door. If movement is detected (or if someone approaches the door),
the system triggers an alert – typically sounding a buzzer and/or flashing an
LED. This creates a simple intruder alarm that can help secure a doorway. A
pushbutton can be included to disable the alarm when you enter with
authorization.
How to Build:
Code Logic: The Arduino continuously reads the sensor. When motion
is detected (PIR output goes HIGH) or distance drops below a threshold
(someone close), it triggers the alarm routine – turn on the buzzer and
blink the LED. Include a delay or latch so the alarm continues for a few
seconds. The pushbutton, when pressed, can reset or silence the
alarm. In one example code, the buzzer sounds and an LED blinks
when motion is detected, until a button is pressed to stop it.
Enhancements: You can use two sensors for better accuracy – e.g. a
PIR plus an ultrasonic. One project used an ultrasonic sensor to detect
someone within ~15 inches (turning a LED from green to red as they
get closer) and then a PIR to confirm motion and trigger a buzzer. This
multi-stage alert reduces false alarms.
Components:
How It Works: This project combines a light sensor and a motion sensor to
smartly control a room’s lights. The lights turn on only when it is dark and
motion (presence) is detected, mimicking an automatic lighting system. In
daylight or when no one is in the room, the lights remain off to save energy.
This prevents situations where a simple motion sensor might turn lights on
unnecessarily during the day.
How to Build:
Output (Light Control): You can start by using an LED bulb or lamp
as the “room light.” Use a relay module to control a 230 V lamp, or
simply use a bright LED for low-voltage demonstration. The relay’s
control pin connects to an Arduino digital output.
Code Logic: Continuously read the LDR value to determine if it’s dark.
When darkness is detected (light level below a set threshold) and the
PIR sensor indicates motion, have the Arduino turn on the light
(activate the relay). If either condition is false (room is bright or no
motion), turn the light off. Include a small delay or use a timer so that
the light stays on for a few seconds after motion to avoid flicker. This
way, the system avoids turning on lights in daylight, a problem solved
by adding the LDR to a basic PIR setup.
Video Demo: Automatic Lighting with LDR and PIR – A detailed tutorial
where a PIR motion sensor turned lights on even in daytime, so an LDR was
added to only allow the light to activate in the dark. The video shows wiring
and code for this “perfect automatic lighting system.” (YouTube)
Components:
LDR (Photoresistor)
How to Build:
Fan & Driver: Use a small DC fan (or DC motor). Because an Arduino
output cannot power a motor directly, connect the fan through a
transistor or a relay. A common approach is to use an NPN transistor
(like 2N2222) with a 1 kΩ base resistor to switch the fan on/off, and a
diode across the fan for flyback protection. If you want to control
speed, the fan should be connected to a PWM-capable output pin via
the transistor.
Code Logic: Continuously read the temperature from the sensor. If the
reading exceeds your threshold (e.g. 30°C), set the fan output HIGH
(turn the transistor or relay on) to power the fan. If below the threshold
(or if it falls back down a few degrees for hysteresis), turn it off. In a
more advanced implementation, you can adjust fan speed
proportionally using PWM: higher speed at higher temperatures. For
instance, one tutorial adjusts the fan speed using analogWrite based
on how hot it gets, rather than simply ON/OFF.
Components:
Arduino Uno/Nano
Power source for fan (if using 12V fan, an external 12V supply)
How to Build:
Door Sensor: Use a reed switch and magnet pair. Mount the magnet
on the fridge door and the reed switch on the frame such that when
the door is closed, the magnet is next to the switch (keeping it
“closed”). When the door opens, the magnet moves away and the reed
switch “opens,” which the Arduino can detect. Wire the reed switch to
an Arduino digital input, using a pull-up or pull-down resistor as
needed. (Alternatively, a mechanical lever switch or optical sensor
could be used, but reed + magnet is simplest for doors.)
Code Logic: The Arduino checks the door sensor’s state – if the reed
switch is open (door is open), start a timer. If the door remains open
beyond the set delay (e.g. 1 minute), activate the buzzer and flash the
LED to alert the user. As soon as the door is closed (reed switch closed
again), stop the alarm. Using millis() for timing is recommended so that
you can reset the timer if the door closes sooner. One published project
beeps a buzzer if the door is open too long and stops as soon as the
door is shut.
Video Demo: Fridge Door Alarm with Arduino – A builder shows a simple
setup where a magnet/reed switch detects the fridge door opening. If the
door stays open for a set time, a buzzer goes off and an LED lights,
reminding you to shut the door. (YouTube)
Components:
Piezo buzzer
How to Build:
Code Logic: In loop(), watch for the button state changing from “not
pressed” to “pressed” (use debouncing or the state change detection
method so you only count one per press). When a press is detected,
increment an attendance counter and update the display or log. For
example, one tutorial shows how to count button presses and display
the count on an LCD. You can also record a timestamp (if using a real-
time clock module) or just note the Arduino’s millis time for each press
to simulate logging the time of check-in.
Components:
Arduino Uno/Nano
How It Works: This device monitors the noise level in a classroom and gives
an alert (visual and/or audible) when the noise exceeds a comfortable
threshold. It uses a microphone sound sensor module to gauge the sound
intensity. If students get too noisy (above the preset level), the system might
flash a warning LED or sound a buzzer to remind the class to quiet down. It
effectively acts as a “noise thermometer” for the room.
How to Build:
Sound Sensor: Use an analog sound sensor module (commonly
containing a microphone and LM393 amplifier). Connect its analog
output to an Arduino analog input (or use the digital output if the
module has a threshold comparator, but analog gives more flexibility).
These modules often have an on-board potentiometer to adjust
sensitivity (the threshold at which the digital output goes HIGH).
Alert Outputs: Connect an LED (or an RGB LED) to an output pin with
a resistor. Optionally connect a buzzer to another pin. For a more
advanced display, you could use a series of LEDs as a bar-graph or an
LCD to show numeric sound level, but a simple single LED (green vs
red) is fine. One project uses an RGB LED: green when noise is low,
yellow when moderate, and red plus a buzzer when noise is excessive.
Code Logic: Continuously read the analog value from the microphone
sensor. Determine a threshold value that represents “too loud” (you
can find this by observing values on Serial Monitor during normal vs
loud conditions). When the sound level exceeds this threshold, trigger
the alert. For example, turn a LED from green to red and activate the
buzzer until the noise drops back down. If using an RGB LED, you can
light it green under normal conditions, switch to yellow if noise is
nearing the limit, and red when above limit, as described in a sound
alarm project. The buzzer can be used only in the highest noise
condition to avoid constant sound – or you might omit the buzzer for a
purely visual meter.
Video Demo: Noise Alarm Using Sound Sensor – Shows an Arduino with a
microphone module detecting ambient noise. When clapping or shouting
raises the level above the threshold, a red LED comes on and a buzzer
sounds. This demonstrates how a classroom noise monitor would alert when
students are too loud. (YouTube)
Components:
Arduino Uno (or any compatible board)
How to Build:
Item Detection: There are a few ways to detect items: one robust
method is using RFID tags on each item combined with an RFID
reader. Alternatively, use simple sensors per slot – for example, a push-
button or micro switch that gets depressed when an item is in place, or
a force-sensitive resistor (FSR) or weight sensor under each item.
For an RFID approach: attach tiny RFID sticker tags to your items, and
use an RFID reader (like MFRC522) hidden in the desk organizer to
scan for them. You might need to scan each item sequentially if using
one reader – or use multiple readers for multiple spots. For a simpler
approach: mount a normally-closed micro switch in each item’s
compartment that opens when the item is removed.
Notification System: Connect an LED for each item (to indicate its
status) or a single buzzer/LED that triggers if any item is missing. For
instance, a multi-item organizer could have green LEDs that turn red
next to the spot of any missing object. Or a single buzzer that beeps
and a general warning LED lights if one or more required items are not
detected. Additionally, a display or an IoT message can list which item
is missing (this would require mapping each sensor to item names in
code).
Code Logic: For each item’s sensor, check if the item is present. If an
item is missing (e.g., RFID tag not read, or switch not pressed), then
trigger the notification. For example: “Item X is missing!” could scroll
on an LCD, or the LED for that item’s slot could light up red, or a buzzer
could beep if any item is absent. If all sensors report items present, the
system can remain quiet or show a “All items OK” signal (like a single
green LED). Using RFID, you might have the Arduino periodically scan
for all expected tag IDs and see if any are not found – one project idea
uses an NFC/RFID reader (PN532) to detect tagged items like pens or
keys in an organizer, and uses a buzzer/LED to alert if something isn’t
in its place. If using switches or FSRs, just read their states (HIGH/LOW
or analog values) to determine presence.
Components:
How It Works: The IoT smart water bottle reminds you to drink water at
regular intervals and can even track your water intake. It typically includes a
timer (or real-time clock) to trigger a reminder (like a buzzer beep or an LED
flash) every set period (e.g. every hour). Advanced versions measure how
much water you drink using sensors and log that data. The “IoT” aspect
means it might sync with a phone app or send notifications, ensuring you
stay hydrated throughout the day.
How to Build:
Video Demo: Smart Water Bottle with Reminders – This project video shows
a water bottle attachment that periodically reminds the user to drink. It uses
an Arduino Pro Mini, an ultrasonic sensor to gauge the water level, and a 7-
segment display to show intake. The system can run for weeks on one
charge and tracks when you last took a sip, sending reminders if too much
time passes. (YouTube)
Components:
How to Build:
Code Logic: Use the Arduino’s pulseIn() to get the echo return time
from the ultrasonic sensor and calculate distance. First measure the
distance when the bin is empty (baseline distance from sensor to
bottom). As trash accumulates, the distance decreases. Set a threshold
distance for “full” (for example, if the original empty distance is 40 cm
and now it reads 10 cm, the bin is quite full). In code, if distance <
threshold, turn on the “full” LED or buzzer; if distance is greater, keep
the indicator off/green. Include some averaging or multiple readings to
avoid false triggers (like a momentary reading if trash is uneven).
According to an instructive project, the counter or LED can indicate
“half-full” vs “full” states using a couple of thresholds (15 inches vs
5 inches in one example), but a single threshold works too.
Optional Features: Add a time delay so that it only signals if the bin
has been full for, say, a minute (to prevent blinking if someone’s
tossing something and then removing it). For IoT: attach an ESP8266 to
send an MQTT message or an SMS via GSM when full. For instance, an
SMS alert system was implemented in some garbage monitoring
systems so that custodial staff are notified.
Video Demo: Trash Can Fill Level Indicator – An Arduino-based project uses
an ultrasonic sensor to gauge trash level and a simple LED display to show if
the can is <50%, ~50%, or full. When the distance becomes small (trash
near the lid), a red indicator comes on to signal that the bin is full. (YouTube)
Components:
LED indicators (e.g., one Green for “okay” and one Red for “full”)
How to Build:
Components:
How It Works: This is a model traffic light that changes its lights based on
sensor input, rather than a fixed timer. For example, imagine a traffic light at
a side road that stays green for the main road until a car is detected waiting
on the side. When a car is sensed (by, say, a pressure sensor or IR sensor at
the side road), the system will cycle the lights: the main road light goes from
green to yellow to red, then the side road light turns green to let the car go.
After a set time, it switches back. Essentially, the sensor triggers the
traffic light sequence, optimizing flow based on demand.
How to Build:
Traffic Light Setup: Use LEDs to represent the traffic lights. A typical
two-direction setup uses 6 LEDs (3 for each direction: Red, Yellow,
Green). If you’re simulating a single traffic light (one direction), 3 LEDs
are enough. Connect each LED to a digital pin via a resistor. It helps to
have them in a physical layout (e.g. a small cardboard “stoplight”).
Components:
Arduino Uno
3 LEDs: Red, Yellow, Green (for a single traffic light; double these for
two directions)
How to Build:
Lamp Output: Use a bright LED (or LED strip) to simulate the
streetlight. For higher-power LEDs or an actual lamp, use a MOSFET or
relay. But for a prototype, a single white high-brightness LED with a
transistor driver is fine. Connect the LED (with resistor) to a digital
PWM pin if you want to possibly implement dimming.
Code Logic: Continuously read the LDR to assess light level. If it’s
daytime (bright), keep the streetlight off regardless of motion. If it’s
night (dark), then check the PIR sensor. If motion is detected at night,
turn the streetlight LED on. You can keep it on for a fixed duration (e.g.,
30 seconds) after motion to cover someone walking by, then turn off if
no further movement. If motion continues (e.g. continuous traffic),
keep resetting the timer so the light stays on. This way, the light only
illuminates when needed. This exact idea was implemented to prevent
a PIR-controlled light from turning on during the day by adding an LDR
to the circuit. Essentially, the LDR acts as a gate: at night, allow PIR to
control; at day, override and force light off.
Energy Saving: You can program a dim mode instead of fully off.
Some systems keep lights at ~20% brightness at night and go to 100%
on motion. To do that, you would output a lower PWM value to the LED
when idle at night, and a higher value on motion. But if just using
on/off, it’s straightforward.
Video Demo: Smart Street Light with LDR & Motion Sensor – This tutorial
shows a streetlight circuit where a PIR sensor activates a lamp only in
darkness. In daylight, even if the PIR sees motion, the lamp stays off. At
night, when the PIR detects someone, the lamp turns on, then off after a
delay of no motion. The video illustrates wiring the LDR and PIR and the
Arduino code combining their inputs. (YouTube)
Components:
Arduino Uno/Nano
X
15. IoT Fire and Gas Leak Detector – Wireless Alarm System
How It Works: This safety device senses dangerous conditions like smoke,
fire, or gas leaks and sends alerts immediately through Wi-Fi or SMS, while
also sounding a local alarm. It typically uses a gas sensor (such as MQ-2 or
MQ-135) to detect smoke/LPG and possibly a flame sensor or temperature
sensor for fires. Upon detection, the Arduino activates a buzzer and warning
LEDs and, via an IoT module or GSM, transmits an alert to a phone or cloud
service. This way, even if you’re away, you get notified of a fire or gas leak at
home.
How to Build:
Sensors: Use an MQ series gas sensor (MQ-2 is suitable for LPG,
propane, methane and also smoke; MQ-135 for air quality/CO₂, etc.).
Connect the MQ sensor’s analog output to an Arduino analog input
(these sensors often require a few minutes warm-up). Optionally,
include a flame sensor module (IR-based) for detecting open fire or a
temperature sensor (like an LM35 or DHT11) to catch high heat.
Each of those would go to another input.
Components:
Buzzer (piezo)
How It Works: This automatic pet feeder dispenses food at preset times
and monitors the amount of food dispensed or consumed using weight
sensors. It can also alert the owner when the food supply is running low. The
Arduino controls a servo or motor that releases a portion of pet food on a
schedule (e.g., twice a day). A load cell (scale) measures either the portion
size or the remaining food in the hopper. The system logs feeding times and
amounts, and an IoT module can send notifications – for instance, “Feeding
complete – 50g dispensed” or “Food running low!” if the hopper’s weight falls
below a threshold. This keeps your pet fed on time and tracks their intake
and food inventory.
How to Build:
Mechanical Feeder: Create a mechanism to dispense food. Common
designs include a servo-driven trapdoor or a rotating auger in a tube.
For example, a 3D-printed auger in a PVC pipe attached to a servo or
continuous rotation motor works as a screw conveyor to drop kibbles.
Another simple approach: a servo-controlled flap that opens a
compartment for a moment. Choose a method based on your
materials. Mount the servo/motor and ensure it can reliably release a
measured amount of food (you may need to experiment to get ~X
grams per activation).
Components:
HX711 amplifier + Load Cell (e.g., a 1–5 kg load cell under bowl)
NodeMCU or ESP-01 (if using Arduino Uno + Wi-Fi) or SIM800L GSM (if
you prefer SMS alerts)
How to Build:
Code Logic: Use libraries to read the sensors (e.g., read MAX30100 for
pulse and SpO₂ – it typically gives pulse rate in BPM and SpO₂
percentage). Read temperature from DS18B20 or analog sensor.
Update the local display with these values every second or so.
Simultaneously, send the data via Wi-Fi/Bluetooth. For Wi-Fi, you might
use HTTP requests or MQTT to publish the data. For example, an IoT
project uses an ESP8266 to send heart rate, SpO₂, and temperature to
a cloud database, enabling real-time remote charting. If internet is not
available, you could log data to an SD card or transmit to a nearby
monitoring station using an RF link.
Components:
Nokia 5110 LCD or OLED display (128x64) to show vitals (optional but
useful)
ESP8266 Wi-Fi module (if Uno is used without network, e.g., ESP-01)
How to Build:
Scheduling & Control: Use an RTC module for timing (as with the
reminder box in #14). Program the dosage times (could be multiple
times per day). At the specific time, the Arduino activates the motor to
dispense that dose. If using a carousel, it might rotate to the next
compartment. If using individual pill dispenser motors, it might trigger
the specific ones needed for that time. This depends on the design.
Note: You’ll need to load the machine with the correct pills in advance
and align schedule accordingly.
Components:
Power supply (the motor may need separate 5V power if using many
steppers/servos)
How to Build:
Logic: Initially, all seats free (LEDs green). A student opens the app or
site, sees free seats (the system knows from sensors that no one is
sitting, and no active reservation). The student selects a seat and hits
“Reserve.” The system then flags that seat as reserved (but not
occupied yet), updates the LED to a different color or blinking red to
indicate pending reservation. If an occupancy sensor goes high
(someone sits) and it matches a reservation, mark it occupied and
keep it reserved (solid red LED). If the occupancy sensor goes high
without a reservation (someone took a seat without booking), the
system could either mark it as occupied (red LED) for visibility and in
app show it as taken. Ideally, you want to discourage unreserved
sitting by maybe making unreserved occupancy show differently (or an
alarm, but that’s up to implementation). If a reserved seat is not
occupied within, say, 10 minutes, the system cancels the reservation
(to prevent holding it all day) – LED back to green, status free. The
backend logic ensures all users see updated info in real-time.
Video Demo: Smart Library Seating – A prototype demonstration shows
multiple chairs instrumented with sensors and LEDs. A web interface displays
a map of library seats: green for available, red for occupied/reserved. A
student can click a seat on the map to reserve it; immediately, that seat’s
LED turns red on the actual chair, and the interface updates showing it
reserved. When the student arrives and sits down (pressure sensor triggers),
the system confirms the seat is occupied. Another part of the video shows if
a person leaves (sensor off) and no reservation remains, the seat returns to
green (free) on all clients. This project highlights real-time seat availability
and remote reservation working together. (YouTube)
Components:
LED indicators (one bi-color LED or two LEDs per seat for status)
Connecting wires (if seats are far apart, long wires or wireless nodes
per seat might be considered, but initially wired is fine)
Power supply able to cover all the seats’ electronics (consider using a
stable 5V adaptor if many LEDs and Wi-Fi usage)