0% found this document useful (0 votes)
8 views31 pages

Arduino IoT Smart Projects

The document outlines several Arduino IoT smart projects, including a Smart Plant Monitor, Smart Door Security System, Automated Room Lighting, Smart Fan Controller, Fridge Door Monitor, Smart Attendance Tracker, and Classroom Noise Monitor. Each project includes a description of how it works, components needed, and step-by-step instructions for building it. The projects aim to enhance everyday tasks through automation and monitoring using Arduino technology.

Uploaded by

hamzasamy2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views31 pages

Arduino IoT Smart Projects

The document outlines several Arduino IoT smart projects, including a Smart Plant Monitor, Smart Door Security System, Automated Room Lighting, Smart Fan Controller, Fridge Door Monitor, Smart Attendance Tracker, and Classroom Noise Monitor. Each project includes a description of how it works, components needed, and step-by-step instructions for building it. The projects aim to enhance everyday tasks through automation and monitoring using Arduino technology.

Uploaded by

hamzasamy2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Arduino IoT Smart Projects – Guides and Tutorials

1. Smart Plant Monitor – Auto Soil Moisture Detection

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.

 Code Logic: Continuously read the sensor’s value. When it drops


below the “dry” threshold, have the Arduino turn on the LED
(simulating a watering alert). If using a pump, the code would instead
activate the pump for a few seconds to water the plant.

 Additional Features: Calibrate the moisture thresholds for “wet” vs


“dry” soil. Optionally, incorporate an IoT module (e.g. ESP8266) to
send a notification to your phone. In one project, an ESP8266
(NodeMCU) was used to send phone alerts and light an LED when the
plant needed water.

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:

 Arduino board (or ESP8266 for IoT features)

 Soil Moisture Sensor (e.g. capacitive or resistive type)

 LED (and a 220 Ω resistor) for the “water me” indicator

 (Optional) Relay module and 5V pump if automatic watering is desired

 Jumper wires and a breadboard for prototyping


2. Smart Door Security System – Motion/Distance Sensor Alarm

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:

 Sensor Setup: Connect a PIR motion sensor to the Arduino (the


sensor has 3 pins: 5V, GND, and a signal output to a digital pin).
Alternatively, you can use an ultrasonic distance sensor aimed at the
door to detect if it opens or if someone is standing in front of it.

 Outputs: Connect a buzzer to a digital output pin (with a transistor if


needed) and an LED for visual alert. Optionally add a pushbutton wired
to another input pin to serve as a disarm or reset switch.

 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.

Video Demo: Arduino PIR Motion Alarm – Demonstrates a simple motion


detector alarm using a PIR sensor. The buzzer sounds and an LED flashes
when the PIR picks up movement, and a button can reset the system.
(YouTube)

Components:

 Arduino Uno (or similar)

 PIR motion sensor (or HC-SR04 ultrasonic sensor)


 Piezo buzzer (for audible alert)

 LED (for visual alert)

 220 Ω resistor for the LED

 Pushbutton switch (to disable/reset alarm)

 Jumper wires, Breadboard

3. Automated Room Lighting – Light + Motion Controlled Lights

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:

 Sensors: Connect a Light Dependent Resistor (LDR) to an analog input


of the Arduino (as part of a voltage divider with a 10 kΩ resistor) to
measure ambient light. Also connect a PIR motion sensor to a digital
input pin for detecting movement.

 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.

 Calibration: Adjust the LDR threshold by testing – for example, read


the LDR value in normal room lighting vs darkness. Similarly, you can
adjust the PIR sensor’s sensitivity or use code to require a certain
number of motion triggers before turning off the light (to prevent it
from toggling off too quickly).

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:

 Arduino Uno or Nano

 PIR Motion Sensor

 LDR (Photoresistor)

 10 kΩ resistor (for LDR voltage divider)

 Relay Module (to switch a AC lamp)

 Light bulb or LED strip (as the room light output)

 Jumper wires, Breadboard

4. Smart Fan Controller – Temperature-Activated Fan

How It Works: A temperature-controlled fan automatically turns on when


the ambient temperature rises above a certain threshold, and turns off when
it cools down. This is done by reading a temperature sensor and driving a fan
(or motor) via the Arduino. The fan can run at full power above the threshold
or even vary speed with temperature. This project is useful for cooling
systems – for instance, turning on a fan in a room or electronics enclosure
only when needed.

How to Build:

 Temperature Sensor: Use a sensor like the LM35 analog


temperature sensor or a digital sensor (DS18B20 or DHT11). For
example, connect an LM35 to the Arduino’s analog input (the LM35 has
three pins: +5V, GND, and Vout to an analog pin).

 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.

 Display/Feedback: (Optional) Add an LCD or LEDs to display the


current temperature or fan status. In one project, an LCD was used to
show the temperature and to indicate when the fan turns on. This isn’t
required for functionality but helps with debugging and user interface.

Video Demo: Temperature Controlled Fan (Arduino) – Shows an Arduino-


based fan that automatically varies its speed according to the temperature.
A DHT11 sensor reads the temperature, and the fan (via a transistor) speeds
up when it gets warm, providing cooling only as needed. (YouTube)

Components:

 Arduino Uno/Nano

 Temperature sensor (LM35 analog sensor, or DHT11/DHT22 for digital


temp)

 Small DC fan (5V or 12V) or DC motor (with fan blades attached)

 NPN Transistor (e.g. 2N2222 or TIP120) to drive the fan

 1 kΩ resistor (for transistor base)

 Diode (e.g. 1N4148 or 1N4007 across the fan for flyback)

 Power source for fan (if using 12V fan, an external 12V supply)

 (Optional) 16×2 LCD display to show temperature

 Jumper wires, Breadboard

5. Fridge Door Monitor – Alarm for Open Door


How It Works: This gadget detects when a refrigerator door is left open and
sounds an alert to remind you to close it. It typically uses a magnetic reed
switch or similar sensor on the door. When the door remains open beyond a
set time (e.g. 30 seconds), the Arduino triggers a buzzer alarm and maybe
an LED indicator. This helps prevent wasting energy and food spoilage by
accidentally leaving the fridge ajar.

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.)

 Alert Outputs: Connect a buzzer to a digital output (with a transistor


driver if it’s a loud buzzer) and optionally an LED. For example, a piezo
buzzer can be driven directly from an Arduino pin, and an LED with a
series resistor from another pin.

 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.

 Power Saving (Optional): If you power the circuit by battery,


consider using low-power modes. In one example, the Arduino was put
into a power-down sleep mode and only woke to check the door status
periodically, to prolong battery life. This is optional but illustrates good
practice for a fridge alarm that might run off batteries.

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:

 Arduino (Nano or Uno)

 Reed switch (door sensor)

 Magnet (to trigger the reed switch)

 Piezo buzzer

 LED (any color for visual alert)

 10 kΩ resistor (for pull-down or pull-up on the reed switch input)

 Battery holder (if making it standalone inside fridge)

 Optional: Switch for power, and adhesive/tape to mount the sensor in


the fridge

6. Smart Attendance Tracker – Button Check-In System

How It Works: This project simulates an attendance logging system using a


simple push button as a “check-in” input. Each time the button is pressed,
the system records a “present” event – this could increment a counter, log
the time, or mark a student as present. It’s like a digital roll call: instead of
signing an attendance sheet, a student presses a button to register their
presence. This is a simplified stand-in for more advanced systems (like RFID
or biometric attendance), useful for demonstrations or small classrooms.

How to Build:

 Button Input: Connect a momentary push button to an Arduino digital


input. Use the built-in pull-up resistor or an external 10 kΩ resistor to
ensure you have a stable HIGH/LOW reading (e.g., one leg of button to
pin, other to ground, and use pinMode(pin, INPUT_PULLUP)).

 Feedback Display: Decide how to show/log the attendance. For a


basic setup, you might use the Serial Monitor or an LCD to display how
many check-ins have occurred. A simple approach is a 16×2 LCD
display to show “Count: X” or to print “Checked in!” each time the
button is pressed. Alternatively, just use the serial output to print a
message or increment count.

 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.

 Enhancements: For multiple students, you could use multiple buttons


(one per student) or a keypad – each student could press their
assigned button number. But at an intermediate level, one button can
simply simulate a single check-in system. If desired, you can store the
attendance count or log in EEPROM or an SD card. Another extension is
using an RFID reader so that each student scans a card instead of
using a general button – but that involves more hardware.

Video Demo: Arduino Push-Button Counter with LCD – Demonstrates how a


push button press can be counted and shown on an LCD. Each press
simulates a “check-in,” incrementing the counter on screen. This is
analogous to students pressing a button to mark attendance. (YouTube)

Components:

 Arduino Uno/Nano

 Push button switch (momentary)

 10 kΩ resistor (if not using INPUT_PULLUP, as a pull-down)

 16×2 LCD display (to show attendance count or status)

 10 kΩ potentiometer (for LCD contrast, if using a classic LCD)

 Breadboard and jumper wires

7. Classroom Noise Monitor – Loudness Alert System

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.

 Calibration: Use a quiet empty classroom to set a baseline and a


“busy classroom” to adjust the threshold. The sensor’s on-board
potentiometer can also be tuned so that its digital output pin goes LOW
when sound exceeds the chosen set point – you can directly use that
digital output as a trigger (HIGH/LOW) instead of analog readings,
which simplifies the code. For instance, many sound sensor modules
output a digital LOW when noise > setpoint, which can directly light an
LED and buzzer via Arduino.

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)

 Sound detector module (microphone + amplifier, e.g. KY-037 or LM393-


based sound sensor)

 RGB LED or 3 LEDs (green, yellow, red) for level indication

 220 Ω resistors for LEDs

 Piezo buzzer (for audible alert)

 Potentiometer (if needed to adjust sensor sensitivity)

 Jumper wires, Breadboard

8. Smart Desk Organizer – Missing Item Notifier

How It Works: This smart organizer keeps track of whether certain


important items (keys, wallet, notebook, etc.) are in their designated spots
on your desk. If any item is missing when it should be present, the system
notifies you – for example, an LED could blink or a buzzer could sound to
draw attention. Essentially, each item’s spot in the organizer has a sensor,
and the Arduino checks all of them to ensure nothing essential is forgotten
when you’re about to leave. If something is absent, you get an alert.

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.

 IoT Integration: For remote notification, you could add a Bluetooth or


Wi-Fi module to send a message to your phone listing the missing
items. For example, imagine an app that, when you press “Check my
desk,” the Arduino could report “Keys are missing!” to your phone. This
is an optional extension if you want to practice IoT communications.

Video Demo: Smart Organizer Item Tracker – (Conceptual video) Imagine an


organizer where each important item has an RFID tag. When you press a
“check” button, the system scans all tagged items. In a demonstrated
project, an organizer used RFID stickers and a PN532 reader: if any tag
wasn’t detected (item not in place), an LED would indicate that and a buzzer
would sound. This ensures you’ll be notified if, say, you forgot to put your
keys back. (Look for videos on “RFID item tracker” or “smart desk organizer”
for similar demos.)

Components:

 Arduino Uno (or similar microcontroller)

 For RFID approach: RFID reader module (e.g. MFRC522 or PN532)


and RFID tag stickers for each item

 For switch/FSR approach: Micro switches or FSR sensors (one per


item slot) to detect presence

 Buzzer and/or LEDs for notification


 Optional: HC-05 Bluetooth or ESP8266 Wi-Fi module (if sending phone
alerts)

 Optional: OLED or LCD display to list item status

 Jumper wires, possibly a custom enclosure/organizer with spots for


each item

9. IoT Water Bottle – Hydration Reminder

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:

 Reminder Timer: Use an Arduino with a real-time clock (RTC) module


(like DS3231) or simply the millis() function to keep track of time. For
accuracy over a full day, an RTC is better. Set an interval (for example,
1 hour) after which a reminder triggers. The Arduino checks the time
and when the interval hits, it will trigger the alert.

 Alert Mechanism: A simple alert is to blink an LED and/or chirp a


buzzer. For instance, every hour the Arduino could light up a blue LED
on the bottle and sound a short buzzer sequence to catch your
attention. You could also use a vibration motor for a silent alert. In one
smart bottle design, a small piezo speaker played a tone and an LED lit
up when it was time to drink.

 Water Intake Sensing (Optional): For tracking consumption, you


can incorporate a water level sensor or a load cell. One method is
to use an ultrasonic sensor at the top of the bottle to measure the
distance to the water surface – as the water level drops, distance
increases, which can be converted to volume. Another method: put the
bottle on a weight scale (load cell + HX711 amplifier) to measure how
much water mass is lost when you drink. This data can be logged to
estimate how many milliliters you drank. The project “Arduino Powered
Water Bottle” used an ultrasonic sensor in the cap to track water level,
and logged daily and weekly intake, reminding the user to drink if they
hadn’t in a while.

 IoT Connectivity: To make it IoT, use a module like ESP8266 or an


Arduino IoT Cloud capable board. The device can send data to a phone
app or cloud service. For example, it might send you a push
notification: “Time to drink water!” or update an app with how many
ounces you’ve consumed. In practice, the bottle can have a Bluetooth
Low Energy link to a smartphone app that records intake and pushes
phone reminders. If not using a phone, the device’s own buzzer/LED
serves as the reminder.

 Power Consideration: If you plan to carry this bottle, you’ll likely


power the Arduino with a battery. Choose a small Arduino (Nano or Pro
Mini) and use a battery (with a boost converter if needed) or a USB
power bank.

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:

 Arduino Pro Mini or Uno (Pro Mini for compactness)

 Real-Time Clock module (DS1307 or DS3231) for precise timing

 Piezo buzzer or vibration motor (for alerts)

 LED (for visual alert)

 Ultrasonic distance sensor (e.g. HC-SR04) or load cell + HX711


amplifier (for measuring water level)

 7-seg display or small OLED (if displaying intake amounts)

 ESP8266 WiFi module or Bluetooth module (if implementing phone


connectivity)

 Battery (Li-ion or 9V) and regulator (if portability is needed)

10. Smart Trash Bin – Full-Bin Indicator


How It Works: A smart trash bin uses an ultrasonic distance sensor to
detect how full the bin is. When the trash reaches a certain level (meaning
the bin is almost full), it triggers an alert – for example, lighting an LED on
the bin or sending a notification. This helps in timely trash disposal.
Essentially, the sensor measures the distance from the lid to the top of the
trash; a short distance means the bin is full.

How to Build:

 Distance Sensor: Mount an ultrasonic sensor (HC-SR04) at the top


inside lid of the trash can, facing downward. Wire its trig and echo pins
to two digital pins on the Arduino, plus 5V and GND. Make sure it’s
secured and pointing toward the trash, not obstructed by the bin’s
sides.

 Indicator: The simplest indicator is an LED on the outside of the bin


that turns on when full. A green LED could indicate “empty/okay” and a
red LED indicates “full.” You can also use a buzzer that beeps when full
(though that might be annoying if triggered at odd times). Another
output could be an LCD or even an IoT message to a phone – but at
minimum, an LED is effective. One project used a 7-segment LED bar
to show fullness in increments (one segment = 25% full, etc.), but you
can simplify to just “not full vs full” signal.

 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:

 Arduino Nano or Uno

 Ultrasonic sensor (HC-SR04 or similar)

 LED indicators (e.g., one Green for “okay” and one Red for “full”)

 220 Ω resistors for LEDs

 (Optional) Buzzer or piezo alarm

 (Optional) ESP8266 or GSM module for remote notification

 Power supply (battery pack or DC adapter)

 Mounting tape or hardware to secure the sensor in the bin lid

11. Parking Slot Notifier – Free/Occupied LED Indicator

How It Works: This project detects whether a parking spot is occupied by a


car and signals its status using an LED. A common implementation uses an
ultrasonic sensor or an infrared proximity sensor mounted at the
parking spot: if a car is present (distance is below threshold or IR beam is
broken), the system lights a red LED; if no car (spot free), it lights a green
LED. This mimics commercial parking systems where green lights guide
drivers to available spots.

How to Build:

 Sensor Placement: Mount an ultrasonic sensor at the spot – for


example, on the ceiling above the parking space pointing down, or on
a wall at car bumper height pointing into the spot. Alternatively, use an
IR reflective sensor on the ground or a pressure sensor in the
pavement. For simplicity, we’ll use ultrasonic (HC-SR04). Connect its
trig and echo pins to Arduino digital pins, 5V and GND similarly to the
trash bin project.
 LED Indicator: Place a visible LED that can be seen by drivers (e.g.,
above the spot or at the entrance). Connect a green LED and a red LED
to two digital outputs through resistors. These will indicate status:
green = free, red = occupied. Optionally, you can use a bi-color LED or
two LEDs in a housing.

 Code Logic: Continuously measure the distance. If a car is in the spot,


the distance reading from sensor to car will be much shorter than the
distance to the ground (empty spot). Determine a cutoff distance (e.g.,
if reading < 50 cm, assume a car is present). In code: if distance <
threshold, turn Red LED ON and Green LED OFF (spot occupied). If
distance is greater (or no echo, meaning no object), turn Green LED
ON and Red OFF (spot free). It’s good to include some smoothing or
require a few consecutive readings to change state, to avoid flicker
from minor movements. In a multi-spot scenario, each spot would have
its own sensor and pair of LEDs. The instructive model scenario: “if the
site is free a green LED would glow and if not, a red one would” –
exactly what our code will do.

 Expansion: If you have multiple spots, consider using an Arduino


Mega (for more pins) or multiple Arduino Nanos, each handling a few
sensors. You could also add an LCD or web interface to display the
count of free spots. For a single spot demo, an LED is enough. If
demonstrating indoors, you can simulate a “car” by moving an object
in front of the sensor.

Video Demo: Smart Parking Spot Indicator – A demonstration shows an


ultrasonic sensor detecting a car in a model parking space. When the car is
present, a red LED above the spot lights up; when the car leaves, the LED
switches to green. This mirrors real parking garages where sensors show
green for free, red for taken. (YouTube)

Components:

 Arduino Uno (or Nano/Mega for many spots)

 Ultrasonic sensor (HC-SR04) or IR sensor for vehicle detection

 Green LED and Red LED

 2× 220 Ω resistors (one per LED)

 Wires, Breadboard (if prototyping multiple spots)


 Optional: 16×2 LCD or seven-seg display to show number of free slots
(for multiple spots setup)

12. Traffic Light System – Sensor-Activated Signals

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”).

 Sensor: Choose a sensor to simulate a vehicle presence. For a model,


a simple way is a push button to represent a pedestrian crossing
button or a pressure pad, or an IR beam sensor across a road that
breaks when a car (or your hand) is there. Another easy method: use
an ultrasonic sensor facing the oncoming car lane to detect a car
waiting. Connect this sensor to the Arduino as described in earlier
projects. In one forum scenario, they kept a green light on until an
object blocked a sensor (simulating a car arrival), then triggered the
sequence.

 Code Logic: Implement a state machine for the traffic lights.


Normally, one light is Green and the cross-traffic is Red. Continuously
check the sensor: if no car is waiting, continue as is (or possibly cycle
normally if it’s a regular intersection). If a sensor trigger is detected
(car present on side road or button pressed), then initiate the change:
for example, Green -> Yellow -> Red on main road, and then side
road Green comes on. Keep it green for the side road for a fixed time
(e.g. 10 seconds), then switch it to Yellow and Red, and return the main
road to Green. If using only one set of lights (one direction), you can
simply turn Green to Red when triggered, perhaps blink an LED to
simulate pedestrian crossing. The key is the sensor’s role: “green light
on until sensor is blocked, then yellow for a couple seconds, then red”
– which stays until the sensor clears. Implement delays (delay() or non-
blocking timing) for the yellow light duration. For example: keep green
by default, when sensor goes active: greenOff(); yellowOn();
delay(2000); yellowOff(); redOn(); etc., then perhaps wait until sensor
goes inactive to return to green.

 Pedestrian Crossing Variant: Alternatively, the sensor could be a


pedestrian pushbutton. Code would be: stay green on main road, when
button pressed, go to yellow then red on main, turn on walk signal
(side green) for a few seconds, then back. This is a simpler variant of a
sensor-activated light.

Video Demo: Smart Traffic Light with Sensor – In this demonstration, an


Arduino traffic light stays green by default. When a “car” is detected (sensor
triggered), the light goes to yellow, then red, allowing a side road (or
pedestrians) to go. After the road is clear (sensor no longer triggered), the
light returns to green. The video shows the timing of each light and how the
sensor input causes the change. (YouTube)

Components:

 Arduino Uno

 3 LEDs: Red, Yellow, Green (for a single traffic light; double these for
two directions)

 3× 220 Ω resistors for LEDs

 Sensor for car detection: e.g. IR obstacle sensor, Ultrasonic sensor, or


simply a pushbutton to simulate a request

 (Optional) Another 3 LEDs if simulating cross-traffic light

 (Optional) Piezo buzzer for pedestrian crossing beep (as an extra


feature)

 Jumper wires, Breadboard

13. Smart Streetlight System – Motion-Activated Outdoor Light


How It Works: A smart streetlight saves energy by remaining dim or off
when no one is around, and switching on (or brightening) only when it’s both
dark outside and motion is detected near the lamp. It combines a light
sensor (to know if it’s night) with a motion sensor (PIR or ultrasonic) to
control a streetlight LED. For example, at night the lamp stays off until a
pedestrian or car approaches, then it lights up; it may turn off or dim after a
while of no motion. In daylight, it stays off entirely even if motion occurs (no
need for lights then).

How to Build:

 Light Sensor: Use an LDR (photoresistor) to detect ambient light,


similar to the room lighting project. This will be used to determine
night vs day. Wire it in a voltage divider to an analog input and choose
a threshold that indicates darkness.

 Motion Sensor: Use a PIR motion sensor (or an ultrasonic sensor


pointing at the road). PIR is commonly used for streetlights as it
detects people or cars by heat/movement. Mount the PIR facing the
area you want to cover. Connect it to a digital input on the Arduino. You
might need to adjust its sensitivity and timeout knobs.

 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

 PIR motion sensor (HC-SR501)

 LDR (photoresistor) + 10 kΩ resistor (for light sensing)

 High-brightness LED (or a 1 W LED with driver, or a relay with a light


bulb for demo)

 220 Ω resistor (if using a regular LED)

 NPN transistor or MOSFET (if driving a larger lamp or LED strip)

 5V relay module (optional alternative to control a mains lamp for


demonstration)

 Jumper wires, Breadboard

 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.

 Local Alarms: Attach a buzzer to a digital pin (with a driver transistor


if it’s a loud buzzer) and a bright LED or even a relay that could trigger
a siren. For example, a red LED can indicate alarm state. Many projects
use both a buzzer and an LED that turns on when gas is detected.

 Communication Module: For IoT, use an ESP8266 (if using Arduino


Uno, the ESP-01 or NodeMCU as a standalone) or a GSM module for
SMS. If Wi-Fi is available, the ESP8266 can send data to a server or to
an app (like Blynk or an email alert). If using GSM, insert a SIM card
and use AT commands (SoftwareSerial) to send an SMS with a warning
message when an alarm triggers. The choice depends on what you
have: Wi-Fi is cheaper (no SIM costs) and faster to set up with IoT
platforms; GSM works without Wi-Fi.

 Code Logic: Continuously read the gas sensor value. Determine a


threshold beyond which gas concentration is dangerous (the sensor
output is analog; you can consult MQ-2 curves, but you might just
empirically set a value). If the reading exceeds the threshold or if the
flame sensor detects fire (digital HIGH) or temperature exceeds limit,
trigger the alarm sequence. That sequence includes: turn on the
buzzer (maybe with a pulsing sound), turn on the red LED, and send
out an alert via the communication module. For example, send an SMS:
“GAS LEAK DETECTED at home!” or send values to an IoT cloud which
then notifies your phone. Ensure the notification is sent only once per
event or at reasonable intervals (so you don’t spam messages).
Possibly include a reset or silence function (like a button to
acknowledge the alarm). One hackster project outlines that on gas
detection, the system sounds a buzzer, lights a red LED, displays the
gas level on an LCD, and sends an SMS to the user.

 Testing: You can simulate gas by using a cigarette lighter (without


lighting the flame, release a little gas near the sensor) or a smoldering
match for smoke – carefully, in a ventilated area.
Video Demo: IoT Gas/Fire Alarm System – Demonstrates an Arduino with an
MQ-2 gas sensor. When the sensor picks up a high level of gas or smoke, a
buzzer immediately sounds and an LED lights up, while simultaneously an
SMS alert is sent to the user’s phone. The video shows the SMS being
received in real-time, proving the concept of remote notification in a fire/gas
emergency. (YouTube)

Components:

 Arduino Uno (or NodeMCU if using Wi-Fi directly)

 MQ-2 gas sensor module (or MQ-135, depending on target gas)

 Buzzer (piezo)

 Red LED (alarm indicator)

 16×2 LCD (optional, to display sensor readings or status)

 ESP8266 Wi-Fi module (ESP-01 or NodeMCU) or SIM800L GSM module

 Flame sensor module or temperature sensor (optional additional


sensor)

 5V Relay (optional, if you want to trigger an external siren or cut-off


valve)

 Jumper wires, Breadboard

16. Pet Feeder with Schedule & Weight Tracking

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).

 Scheduling: Use an RTC module (DS3231) or track time in code (but


RTC is more accurate) to schedule feeding times. Store the feeding
schedule in the code (e.g., 7:00 and 18:00 daily). The Arduino checks
the RTC and when the time matches, it triggers the servo to dispense.
You could also incorporate a manual feed button or remote feed
command (e.g., via Blynk app) for extra flexibility.

 Weight Sensors: Utilize a load cell + HX711 amplifier to measure


weight. You can place one load cell under the food bowl to measure
how much the pet eats (weight drops as food is eaten) and/or another
under the storage hopper to measure remaining food. The load cell
connects to the HX711 module which in turn connects to Arduino (via
two analog-capable pins). Calibrate the scale (you’ll need to get
calibration factor by known weights). Now you can weigh how many
grams are dispensed each time, and detect low supply when the
hopper’s weight goes below a set value. For example, if the hopper
normally weighs 1000 g full and now is 200 g, send an alert to refill.

 Alerts & Logging: Use IoT connectivity (ESP8266 or an Arduino with


Wi-Fi) to send data to a phone app or cloud. The system can log each
feeding event (time and amount). It can also push a notification like
“Pet fed 50 g at 7:00 AM” and “Warning: Food reservoir low” when
appropriate. If not using IoT, you could log to an SD card or display info
on an LCD (like total eaten today, etc.). An example IoT feeder uses
Blynk to allow remote feeding and monitoring; it lets you dispense food
via an app and also monitors if the pet actually ate it via a weight
sensor under the bowl.

 Build Structure: Construct a secure container for the food with an


opening controlled by your servo. Ensure the pet can’t easily get more
food out except when dispensed. Many designs are available online for
inspiration (gravity feeders, screw dispensers, etc.).
Video Demo: Automated Pet Feeder with Smart Features – The video shows
a pet feeder operating on a schedule: a servo-driven mechanism releases
kibble into the bowl at set times. A load cell under the bowl records how
much the pet ate and sends this data to a smartphone app. When the
storage bin is low, a notification is sent (and an LED on the device may light).
The owner can also trigger extra feedings remotely using the IoT app. This
project highlights scheduled control and weight tracking working together for
pet feeding. (YouTube)

Components:

 Arduino Uno or an ESP32/ESP8266 (ESP32 can handle Wi-Fi and


multiple I/O nicely)

 DS3231 RTC module (for scheduling)

 5V Servo (high-torque if moving heavier mechanism) or DC motor +


driver (to dispense food)

 HX711 amplifier + Load Cell (e.g., a 1–5 kg load cell under bowl)

 Second load cell (optional, under food hopper)

 NodeMCU or ESP-01 (if using Arduino Uno + Wi-Fi) or SIM800L GSM (if
you prefer SMS alerts)

 Blynk or similar IoT platform for notifications (if Wi-Fi based)

 LED and buzzer (optional local low-food alert)

 Power supply (servo and Wi-Fi might need a 5V 2A supply)

 Mechanical parts: container, tubing, 3D printed auger or flaps, etc.

17. Patient Vital Signs Monitor – Wireless Health Tracking

How It Works: This is a health monitoring system that measures a patient’s


vital signs – typically heart rate, blood oxygen saturation (SpO₂), and
body temperature – and sends the data in real time to a remote display or
cloud so that healthcare providers or family can monitor the person’s status
live. The core sensors often come integrated (for pulse and SpO₂) in a single
module like the MAX30100/MAX30102, and a separate temperature sensor
for body temp. The readings can be shown on an LCD and transmitted via
Wi-Fi or Bluetooth to a dashboard. For example, a patient wears a finger clip
sensor for pulse oximetry and a small temperature probe, and the Arduino
streams these readings to a hospital’s monitoring app.

How to Build:

 Heart Rate & SpO₂ Sensor: Use a MAX30100/MAX30102 pulse


oximeter sensor module. This is typically attached to a finger (via a clip
or just a finger sleeve) and connects to the Arduino via the I²C
interface (SDA, SCL pins). The module provides readings for both heart
rate and oxygen saturation by shining LEDs through the finger and
measuring light absorption. Connect it according to its pinout (usually
5V or 3.3V, GND, SDA, SCL). You’ll need to use a library (like SparkFun
MAX3010x library) to get the readings easily.

 Temperature Sensor: For body temperature, a popular choice is the


DS18B20 digital thermometer (which can be placed under the arm or
in contact with skin) or a thermistor. The DS18B20 connects via one-
wire bus to a single digital pin and you can use the DallasTemperature
library. Alternatively, a simple analog LM35 could be used (placed
where it can approximate body temp). Connect accordingly (LM35 to
analog input, etc.).

 Microcontroller & Display: Use an Arduino (or an ESP32 which has


Wi-Fi built-in). Connect a display like a 0.96″ OLED or an LCD to show
the readings (e.g., “HR: 72 bpm, SpO₂: 98%, Temp: 36.5°C”). This
allows local viewing.

 Communication (IoT): For real-time remote monitoring, incorporate a


Wi-Fi module (ESP8266) or use an Arduino that has connectivity. The
device can send data periodically to a server or IoT cloud platform. For
example, it could send vitals to an Adafruit IO or Thingspeak
dashboard, or use Blynk to display them on a phone. In a simple
scenario, an ESP8266 could host a small webpage showing the values,
or push data to a healthcare system. If using a standard Arduino Uno,
connect an ESP-01 or use HC-05 Bluetooth if you prefer to send data to
a nearby PC or phone app via Bluetooth.

 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.

 Power and Wearability: If intended for a patient to carry, consider


using a battery and a portable microcontroller setup (like a battery-
powered ESP32 or a Nano with a battery shield). Ensure the finger
sensor is comfortable (reuse one from a cheap pulse oximeter if
possible).

Video Demo: IoT Patient Monitoring System – A demonstration shows a


patient’s finger attached to a MAX30102 sensor and a temperature probe.
The Arduino/ESP board reads the heart rate (pulse) and SpO₂ and the body
temperature. These readings are then sent live to an IoT platform – for
instance, you can see on a phone or computer dashboard the patient’s BPM,
oxygen, and temp updating every few seconds. Such a setup allows doctors
to observe vital signs remotely in real time, as illustrated in the video.
(YouTube)

Components:

 Arduino Uno or ESP32/ESP8266 (ESP32 is powerful and has


Bluetooth/Wi-Fi built-in)

 MAX30100 / MAX30102 Pulse Oximeter & Heart-Rate Sensor module

 DS18B20 digital temperature sensor (and a 4.7 kΩ pull-up resistor) or


LM35 analog sensor

 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)

 (Optional) Bluetooth module HC-05/06 (if using Bluetooth to send data


to a nearby device instead of Wi-Fi)

 Jumper wires, Breadboard

 USB cable or battery pack for power

18. IoT-Based Medicine Dispenser – Automated Pill Dispenser with


Alerts
How It Works: This is an automatic medicine dispensing machine that
releases the correct pills at scheduled times and sends alerts/records
whether the dose was taken. It’s like a smart pill vending machine. At each
scheduled dose time, the device will dispense the medication (usually by
dropping pills into a compartment or cup) and notify the patient (via buzzer,
light, or phone notification). If the patient does not retrieve the medicine
(detected by a sensor), it logs a missed dose and can alert a caregiver.
Essentially, it combines the mechanics of dispensing (like a pill carousel) with
the intelligence of reminders and IoT connectivity for monitoring.

How to Build:

 Dispensing Mechanism: You can use a rotating carousel with


compartments for each dose or a set of tubes for different pills. A
common DIY approach is a rotating disk with slots for pills, driven by a
servo or stepper motor. At the scheduled time, the disk rotates to
dump the pills for that time slot into an output. Another method: use
multiple small servos controlling chutes for each medication type,
dropping a set number of pills. For simplicity, let’s imagine a circular 7-
day/24hr pillbox that rotates one position at a time. Attach a servo or
stepper to rotate the carousel. Ensure the structure only allows the
current slot to drop pills (and not others spilling).

 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.

 Alert and Acknowledgment: When a dose is dispensed, sound a


buzzer or an alarm to alert the patient that pills are ready. Possibly
flash an LED or display “Take your meds”. Now, to detect if the patient
actually took the pills: there could be a photosensor or weight sensor
at the cup where pills drop. For instance, an IR beam across the pill
retrieval cup that breaks when the patient reaches in, or a load cell
that senses weight change when pills are removed. Another approach
is to have a button the patient presses once they’ve taken the pills (or
a motion sensor that detects pill cup removal). If after a certain time
the system doesn’t detect pill pickup, it flags a missed dose. In an IoT
context, it would then send a notification to a caretaker or log it as
missed.

 IoT Communication: Integrate Wi-Fi (ESP8266/ESP32) or GSM to send


data. For example, use Wi-Fi to update a Google Sheets or a cloud DB
with “Dispensed at 8:00 – Taken ✅/❌”. Or send an immediate alert like
“Dose not taken!” to a caregiver’s phone if missed. It could also send
an alert if pills were taken (to confirm adherence). The device can also
receive commands – e.g., a remote override to dispense now if a
doctor decides an extra dose, etc. Start with one-way notifications to
keep it simple.

 Safety Considerations: Make sure the dispensing is reliable (no


jams, correct count of pills). Also, ensure the device doesn’t dispense
multiple times for the same schedule (use flags to mark that you’ve
dispensed and wait until next schedule). Include a manual input for
emergencies (like a button to dispense or a way to cancel an alarm).
Locking the pills except for the correct time is ideal (so patient can’t
accidentally take from future doses), but that might be mechanical
complexity beyond this scope.

Video Demo: Automated IoT Pill Dispenser – The demonstration shows a


carousel-type pill dispenser rotating at scheduled times to release pills into a
slot. When the dose is ready, a buzzer sounds and an LED lights. The patient
picks up the pills; a sensor detects this action. The device then sends a
notification (through Wi-Fi) to a cloud dashboard indicating the dose was
taken. In another scenario, if the pills were not taken after some time, it
sends an alert to a caregiver (“Missed 8PM dose”). The video highlights the
scheduling via an RTC and the use of an ESP8266 to communicate with a
smartphone app for logging and alerts. (YouTube)

Components:

 Arduino Mega or Uno (Mega if many outputs, Uno can suffice)

 28BYJ-48 stepper + ULN2003 driver, or a continuous rotation servo (to


rotate pill carousel)

 Real-Time Clock (DS3231)

 Buzzer and LED for local alerts

 IR sensor or photointerruptor (to detect pill pickup) or load cell +


HX711 for pill cup
 Push buttons (for user inputs like “acknowledge” or manual dispense)

 ESP8266 Wi-Fi module (ESP-01 or NodeMCU) for internet connectivity

 Power supply (the motor may need separate 5V power if using many
steppers/servos)

 Fabrication: pill container (maybe a modified pill box or 3D printed


wheel), frame to hold components, etc.

 (Optional) OLED or LCD to display messages/time

19. Smart Library Seat Reservation System – IoT Seating Manager

How It Works: This system allows students to reserve a library seat


remotely (through a website or app) and uses sensors on the seats to
detect occupancy in real-time. Each seat has an indicator (e.g., an LED) to
show if it’s reserved or free, and a sensor (like a pressure pad) to know if
someone is sitting there. A user could, for example, use a mobile app to find
an empty seat and reserve it. The seat’s light might turn red to show it’s
reserved. When the student arrives and sits (occupancy sensor triggered),
the system confirms the seat is occupied. If a seat is reserved but nobody
shows up for a while, the system can free the reservation. The data is
networked so all users can see current seat availability live.

How to Build:

 Seat Occupancy Sensor: Use a force sensitive resistor (FSR) or a


pressure pad on the chair to detect presence. Alternatively, a load
cell under the chair or an ultrasonic sensor under the desk looking for a
person’s legs could work. The FSR is simplest: place it on the chair
such that when someone sits, its resistance changes significantly
(pressure detected). Connect each FSR (or switch) to an analog input
(or as a digital if calibrated threshold). In a multi-seat setup, you might
use a microcontroller with enough inputs or multiple Arduinos each
handling a few seats.

 Reservation Indicator: Each seat gets an LED indicator that can be


green (free), red (occupied/reserved), possibly blue for “reserved but
not yet occupied,” etc. For simplicity, two states: green = available,
red = not available. Connect LEDs for each seat to output pins (you
may need transistors or a multiplexer if many – or use I²C expanders or
an Arduino Mega for lots of pins).
 Networking: Use an ESP8266 or similar on the Arduino to connect to
a central server or directly host a simple API. The “reservation system”
could be a web application or just a simple database. For a prototype,
you might use Blynk or a web dashboard that shows seats 1–N and
their status, and allows one to toggle a reservation. When a user
reserves via app, the microcontroller receives that command (e.g., via
a REST API call or Blynk write) and marks that seat as reserved (if it
was free). This would turn the seat’s LED red (and maybe label it as
“reserved” in the system). The occupancy sensor then updates
whether the seat is actually occupied. If the seat is reserved and
someone sits, it confirms occupancy. If it’s reserved and nobody comes
within X minutes, the system can auto-cancel the reservation (turn LED
back green). All these rules are handled in software.

 Microcontroller Setup: If using a single Arduino with Wi-Fi for


multiple seats, it will need to handle multiple sensor inputs and LED
outputs plus networking. An Arduino Mega + ESP8266 or an ESP32
(which has ample GPIO and Wi-Fi) would be ideal. The microcontroller
will run a small web server or MQTT client to handle reservation
commands and send occupancy updates. For example, each seat could
publish its status (“free/occupied/reserved”) to a cloud, and the user
app subscribes to these updates. Conversely, when a user reserves a
seat via app, a message comes to the device to mark that seat
reserved.

 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:

 Arduino Mega + ESP8266, or simply an ESP32 (which has Wi-Fi and


plenty of I/O)

 Force Sensitive Resistors or load cell sensors (one per seat)

 LED indicators (one bi-color LED or two LEDs per seat for status)

 Resistors for LEDs (e.g., 220 Ω)

 Connecting wires (if seats are far apart, long wires or wireless nodes
per seat might be considered, but initially wired is fine)

 A server or cloud service (could be a simple PC running a Node.js or


Python Flask app) to handle reservations – or use Blynk/IoT platform for
simplicity.

 Power supply able to cover all the seats’ electronics (consider using a
stable 5V adaptor if many LEDs and Wi-Fi usage)

You might also like