Built to order

Clap-Counting Fan Speed Controller

This project builds a fan speed controller that listens instead of being touched — an electret microphone detects claps, the firmware counts them inside a short window, and the fan is set to low, medium, high or off depending on whether you clapped once, twice, three or four times. A triac stage with zero-cross synchronization regulates the fan speed, and LEDs show the current level. Suitable for B.E./B.Tech final-year projects in Electronics.

Clap-Counting Fan Speed Controller — project thumbnail preview
More project photos (2)

The problem

The classic clap switch is a one-trick circuit: clap once, the light toggles. This project takes the idea seriously and builds a multi-level controller out of it — counting claps instead of merely detecting them turns one binary input into four commands, enough to run a fan's speed steps hands-free. The engineering is in two places: the acoustic front end, which must catch a clap's sharp transient while ignoring conversation and TV audio, and the power stage, where a triac with zero-cross timing regulates a real AC fan. Together they make a touchless controller that is genuinely usable and a strong demonstration of signal conditioning plus power electronics.

How it works

  1. The electret microphone picks up room sound; the preamplifier boosts it and the comparator fires a digital pulse on sharp transients.
  2. Firmware timestamps each pulse and counts how many arrive inside the 1.5-second clap window, ignoring pulses closer together than the debounce gap.
  3. One clap sets speed 1, two claps speed 2, three claps speed 3, four claps switch the fan off.
  4. The selected speed maps to a triac firing angle; the zero-cross detector keeps every firing synchronized to the mains cycle.
  5. The triac conducts for the chosen fraction of each half-cycle, regulating the fan motor's effective voltage.
  6. The speed LEDs update on every valid command, and the manual override switch forces full speed regardless of clap state.

Tech stack:

  • Arduino Nano (ATmega328P)
  • Electret microphone + preamplifier/comparator
  • BT136 triac · MOC3021 optocoupler
  • Zero-crossing detector circuit
  • 3-LED speed indicator
  • 230V AC fan demo load
  • Potentiometer sensitivity trim
Parameter Value
Command set 1 clap = low, 2 = medium, 3 = high, 4 = off
Clap window 1.5 s counting window (firmware, design)
Speed steps 3 triac firing angles + off
Detection range Claps within approximately 3–4 m in a quiet room (expected)
Supply 230V AC, 50 Hz fan load (design)
Load rating Up to 80W fan motor (design target)
Sensitivity Potentiometer-adjustable comparator threshold
Build type Breadboard/PCB prototype with table-fan demo load

Project features

  • [Clap counting, not just detection] Firmware counts 1–4 claps inside a 1.5-second window to select low, medium, high or off — four commands from one microphone.
  • [Electret-mic front end] Microphone with preamplifier and comparator converts the clap transient into a clean digital pulse.
  • [False-trigger filtering] Amplitude threshold plus minimum-gap timing rejects speech, TV audio and single knocks; the sensitivity is potentiometer-adjustable.
  • [Triac fan regulation] Zero-cross synchronized triac phase-cut drives the fan at three real speed steps.
  • [Speed indicator LEDs] Three LEDs show the active speed level at a glance.
  • [Manual override switch] A physical switch bypasses clap control for users who just want the fan on.
  • [Startup calibration] Power-on self-check confirms the mic chain and triac stage before accepting claps.

What is included

  • Working clap-counting fan controller prototype with demo fan
  • Arduino firmware (clap counting, debounce, triac timing, LED indication)
  • Full wiring diagram and mic/triac placement documentation
  • Sensitivity-tuning and false-trigger test procedure
  • Project report PDF (acoustic detection, clap transient analysis, triac fan control, measurements)
  • PPT presentation for final review
  • Viva Q&A preparation document (electret biasing, comparator thresholding, zero-crossing, motor speed control)

Limitations & prerequisites

  • Loud continuous noise (music, TV at high volume) can mask claps or cause false counts — this is a teaching controller, not a noise-immune industrial input.
  • Triac phase-cut fan control can produce an audible motor hum at low speeds on some fans; the report documents this as a known characteristic.
  • Detection range of 3–4 m is an expected figure in a quiet room; reflective rooms and background noise reduce it, and the student verifies their own range.
  • The 1.5-second window means commands take a beat to register — it is deliberate counting, not instant reaction.
  • Only the four defined clap patterns are recognized; there is no voice or pattern learning in the base build.

Frequently Asked Questions

How is this different from a simple clap switch?

A clap switch toggles on one clap. This controller counts — it measures how many claps arrived inside a 1.5-second window and maps the count to four different fan states. Counting needs timestamping and debounce logic; detection alone does not.

Won't talking or the TV trigger it?

The comparator threshold is set above normal speech levels, and the firmware requires the sharp attack transient of a clap plus a minimum gap between pulses. The included procedure tunes the threshold for the student's own room.

Why does the fan hum at low speed?

Triac phase-cut chops the sine wave, and the motor's windings vibrate at the resulting harmonic content. It is a documented trait of triac fan regulators, not a fault.

How does the triac set three speeds?

Each speed is a different firing angle after the zero-crossing. Earlier firing delivers more of each half-cycle to the motor (faster); later firing delivers less (slower).

What if I clap five times by accident?

Counts above four are ignored and the window resets — the fan keeps its current state rather than doing something unexpected.

Is this project suitable for a final-year project?

Yes — for Electronics programs. It combines analog signal conditioning, embedded timing logic and mains power control in one demonstrable build. Suitable for B.E./B.Tech final-year projects in Electronics.

Components & software requirements
  • Arduino Nano (ATmega328P)
  • Electret microphone + preamplifier/comparator
  • BT136 triac · MOC3021 optocoupler
  • Zero-crossing detector circuit
  • 3-LED speed indicator
  • 230V AC fan demo load
  • Potentiometer sensitivity trim
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download abstract (PDF)

Related guides

All guides
Blueprint-style technical illustration of rectifier circuits, AC-to-DC waveforms, diodes and a capacitor on an electronics benchElectronics students who can read a basic schematic and want the diode circuits behind every power supply as workshop tools, not textbook diagrams.

Rectifiers, Clippers and Clampers: The Diode Circuits Behind Every Power Supply

Every power supply hides the same trick: diodes forcing AC to flow one way, and a capacitor smoothing the pulses into DC. This guide explains half-wave and bridge rectifiers with real numbers, shows how to size the filter capacitor with one formula, and covers clipper and clamper circuits — the diode techniques behind input protection, DC restoration and voltage multipliers — plus a bench build you can measure yourself.

Read guide
Illustration of a voltage divider circuit with two resistors, showing the unloaded versus loaded output voltage difference.B.E./B.Tech Electronics and E&TC students scaling sensor outputs and interfacing mixed-voltage circuits in academic and final-year projects

Voltage Dividers: When They Fail and Why

Two resistors, endless confusion: learn when voltage dividers work and when they collapse. Covers the loading problem with a worked example, the 10x current rule, the Thevenin model that predicts every divider's behavior, proper design procedure, and what to use instead for power and level shifting.

Read guide
Illustration of an open datasheet showing pinout diagram, electrical characteristics table, and timing diagrams with a magnifying glass.B.E./B.Tech Electronics, E&TC, and Electrical students selecting components and debugging circuits for academic and final-year projects

Reading Datasheets Effectively: A Student Guide

Stop guessing, start specifying: learn to read datasheets like an engineer. Covers absolute maximum vs recommended ratings, honest reading of min/typ/max specs and test conditions, pinout traps, timing diagrams, application circuits worth copying, package suffixes, and a 15-minute routine for any new component.

Read guide
Get a quotation