Final-year projects / Smart home

Voice and app home automation with energy saving

Smart plugs are common but each brand has its own app, and lights and fans are often left on in empty rooms. A single controller for a room's switches, with app, voice and manual control and auto-off when the room is empty, saves energy.

ESP32Mini or Major projectECE, EEE, CSE, Diploma
ESP32RADARTEMPERON1.52 AFeatured
Parts
₹2,040
Build
12 weeks
Board
ESP32
Objectives
6
Mains wiring must be in a closed board with an MCB and checked by your guide. Build and demo first with 12 V loads.

Block diagram

Inputs
  • Wall switchesStill work by hand
  • RADAR
    Radar presence sensorKnows when the room is empty
  • TEMPER
    Temperature sensorRuns the fan by heat
  • CURREN
    Current sensorMeasures what is drawn
Controller
  • ESP32
    ESP32Talks to the app and voice assistant
Outputs
  • ON
    4-channel relaySwitches lights, fan and socket
  • CLOUD
    Cloud dashboardStores readings, plots trends and sends alerts+
  • PHONE
    Phone appShows readings and sends commands over Bluetooth+

Objectives

  1. To switch four loads from a phone app, a voice assistant and the existing wall switches, with each always showing the true state.
  2. To turn loads off after 10 minutes with no presence.
  3. To run the fan automatically above a set temperature.
  4. To measure energy saved in one room over a week.
  5. To publish readings over MQTT and show them on a live dashboard with threshold alerts.
  6. To monitor and control the system from a phone over Bluetooth.

Parts and specifications

Total about ₹2,040 at typical online prices. Tap a part for its pinout and datasheet notes.

Design calculations

Two-way switching

Each load toggles when either the app or the wall switch changes, like a staircase switch: state = previous state XOR change.

Current from ACS712

20 A module: 100 mV/A around 2.5 V. After the divider the ESP32 sees 1.67 V at zero. 0.3 V p-p change (scaled back ×1.5) ≈ 0.45 V → 4.5 A peak.

Energy saving

A 60 W fan and two 18 W tube lights left on 3 hours a day in an empty room waste 96 × 3 = 0.29 kWh a day ≈ 105 units a year.

Pin map

SignalPin or connection
Relays 1 to 4GPIO 26, 27, 32, 33 (active-low)
Wall switch inputs 1 to 4GPIO 13, 14, 15, 4 through optocouplers or low-voltage switches
RCWL-0516 OUTGPIO 34
DHT22GPIO 18
ACS712 OUTGPIO 35 via 10 kΩ / 20 kΩ divider (5 V module)

Firmware outline

  1. Connect to Wi-Fi and the cloud (ESP RainMaker or Sinric Pro) which links Google Assistant and Alexa.
  2. Read wall switches with debounce; on change toggle the matching relay and report the new state.
  3. On app or voice commands set the relay and report back so all controls agree.
  4. If no presence for 10 minutes, turn everything off; if the room is hot and occupied, turn on the fan.
  5. Every minute measure current and add to an energy total.

Test plan

TestExpected result
Voice: 'turn on light 1'Relay on within 2 s, app updated
Wall switch flippedLoad toggles and app shows it
Room left emptyLoads off after 10 minutes
Wi-Fi offWall switches still work

These rows start your results table when you plan the project.

Viva practice

Say your answer out loud first, then check. The first 2 answers are free; Maker opens all 5.

1. Why must wall switches keep working?
2. How does a voice assistant reach the ESP32?
3. Why radar and not PIR for presence?
4. What is the risk of relays on mains?
5. How do you secure it?

Make it yours

One or two upgrades for a mini project, two to four for a major one.

Build these first

Datasheets and sources to cite

  • Espressif ESP RainMaker documentation
  • RCWL-0516 notes
  • IS 732 (wiring of electrical installations)

About this project

How much does the voice and app home automation with energy saving project cost?

About ₹2,040 for the parts in the base list: ESP32 DevKit V1, 5 V relay module (4 channel), RCWL-0516 radar motion sensor, DHT22 temperature and humidity sensor, ACS712 current sensor (20 A), HLK-PM01 5 V mains module or 5 V adapter, Switchboard, sockets, bulbs and MCB.

How long does it take?

About 8 weeks for the base project, built on an ESP32. Each upgrade adds time.

Which branches is it suitable for?

Electronics and Communication, Electrical and Electronics, Computer Science / IT (IoT, AI), Diploma (any electronics branch), as a mini or major project.

Which pins and design calculations does it use?

Relays 1 to 4 on GPIO 26, 27, 32, 33 (active-low); Wall switch inputs 1 to 4 on GPIO 13, 14, 15, 4 through optocouplers or low-voltage switches; RCWL-0516 OUT on GPIO 34. Worked calculations on this page: two-way switching, current from acs712, energy saving.

How do I test it?

Voice: 'turn on light 1': Relay on within 2 s, app updated. Wall switch flipped: Load toggles and app shows it. Room left empty: Loads off after 10 minutes. Wi-Fi off: Wall switches still work.

What are the objectives?

To switch four loads from a phone app, a voice assistant and the existing wall switches, with each always showing the true state. To turn loads off after 10 minutes with no presence. To run the fan automatically above a set temperature. To measure energy saved in one room over a week.