Built to order

Capacitive Touch Piano using TTP223 Sensor Modules

This project builds a working one-octave piano played by touch — eight TTP223 capacitive touch sensor modules act as the keys, an Arduino Nano synthesizes the true equal-temperament note frequencies (C4 261.63 Hz through C5 523.25 Hz), and a small audio amplifier drives a speaker loud enough for a classroom demo. Each key has its own LED, an octave-shift button extends the range, and a volume knob controls the output. Suitable for B.E./B.Tech final-year projects in Electronics and Instrumentation engineering.

Capacitive Touch Piano using TTP223 Sensor Modules — project thumbnail preview
More project photos (2)

The problem

Capacitive touch sensing is everywhere — phone screens, elevator panels, appliance controls — yet students usually meet it only as a paragraph about changing capacitance. A touch piano turns the concept into something you can hear: each key is a TTP223 single-channel capacitive touch module whose output flips the moment a finger approaches its pad, with no moving parts and no mechanical bounce to debounce. The Arduino Nano reads all eight keys, looks up the exact musical frequency for the pressed note, and generates it with hardware-timed square-wave synthesis through a small power amplifier. Per-key LEDs give visual feedback, and an octave-shift button doubles the playable range. It is a compact, genuinely playable instrument that demonstrates capacitive sensing, embedded timing and basic audio electronics in one build.

How it works

  1. Each TTP223 module continuously measures the capacitance of its touch pad; a finger's approach changes it enough to flip the module's digital output high.
  2. The Arduino Nano polls (or interrupts on) the eight key outputs and identifies which note was touched.
  3. The firmware looks up the key's equal-temperament frequency and starts a hardware-timed square wave at that exact frequency.
  4. The square wave passes through a volume control into the PAM8403-class amplifier, which drives the 8 Ω speaker.
  5. The LED for the active key lights for the note's duration; releasing the key stops the tone (or sustains it in hold mode).
  6. Pressing the octave-shift button adds or subtracts 12 semitones from every key's lookup, extending the range without extra keys.
  7. Only one note sounds at a time — a deliberate consequence of single-timer synthesis, documented as a limitation with the polyphony extension in future scope.

Tech stack:

  • 8 × TTP223 capacitive touch sensor modules
  • Arduino Nano (ATmega328P)
  • PAM8403-class audio amplifier + 8 Ω speaker
  • Per-key LEDs with current-limiting resistors
  • Octave-shift and sustain push-buttons
  • Volume potentiometer
  • Acrylic/wooden key panel with printed note labels
  • USB 5 V / 9 V battery power
Parameter Value
Keys 8 capacitive touch pads (C4–C5)
Note frequencies 261.63–523.25 Hz, equal temperament (exact)
Octave shift ±1 octave (C3–C6 effective)
Touch response Under approximately 50 ms (expected)
Audio output Square-wave synthesis via PAM8403-class amp
Speaker 8 Ω, approximately 0.5–3 W (design)
Key LEDs 8, one per key
Supply USB 5 V or 9 V battery

Project features

  • [Eight TTP223 touch keys] One octave (C4–C5) of capacitive touch pads — no moving parts, no mechanical contacts, no debounce code needed.
  • [True note frequencies] Equal-temperament frequencies from 261.63 Hz (C4) to 523.25 Hz (C5) generated by hardware-timed synthesis, not approximate guesses.
  • [Per-key LED feedback] An LED above each key lights while its note sounds, useful for teaching and for visible demo feedback.
  • [Octave shift button] Shifts the whole keyboard up or down one octave, doubling the playable range to C3–C6.
  • [Audio power amplifier] PAM8403-class amplifier drives an 8 Ω speaker to classroom-audible levels, with a volume knob.
  • [Sustain/hold mode] A toggle holds the last played note for demonstrating envelopes, or plays staccato on touch-release.
  • [Labeled key panel] Acrylic/wooden panel with printed note names (C D E F G A B C) under each touch pad.
  • [USB or battery power] Runs from USB 5 V or a 9 V battery through the onboard regulator.

What is included

  • Assembled key panel with 8 TTP223 modules, LEDs and printed note labels
  • Arduino Nano controller with amplifier and speaker, wired and tested
  • Firmware source (key scanning, frequency tables, octave shift, sustain)
  • TTP223 sensitivity-adjustment notes for the student's own tuning
  • Wiring diagram and enclosure/panel drawings
  • Project report PDF, PPT presentation and viva Q&A document

Limitations & prerequisites

  • Monophonic: only one note sounds at a time, a hard limit of single-timer square-wave synthesis on the ATmega328P — polyphony needs a different synthesis architecture (noted in future scope).
  • One physical octave; the second octave comes from the shift button, not extra keys.
  • Capacitive keys need a reasonably clean ground and stable supply; noisy USB chargers can cause false triggers — the kit documents sensitivity tuning.
  • Square-wave tone is a buzzy piano approximation, not a sampled piano; a low-pass filter softens it but the timbre stays simple.
  • Touch response and loudness figures are expected/design values; the report includes the student's own verification procedure.

Frequently Asked Questions

How do the touch keys work without buttons?

Each TTP223 module measures the capacitance of its pad many times per second. Your finger adds capacitance, the module detects the change and drives its output pin high — no moving parts, no contact bounce, no debounce code.

Are the notes the real piano frequencies?

Yes. The firmware uses the equal-temperament formula (A4 = 440 Hz reference), so C4 is 261.63 Hz and every semitone is exactly 2^(1/12) above the last — the same tuning as a real piano.

Why does only one note play at a time?

The Arduino generates sound with one hardware timer producing one square wave. True polyphony needs multiple oscillators or a dedicated synth chip — deliberately out of scope, and a good viva discussion point.

Can I change the sensitivity of the keys?

Yes — each TTP223 has a capacitor that sets its touch threshold. The kit documents which capacitor to change and how to re-tune for the student's own panel material and thickness.

Does it need a computer?

No. It runs standalone on USB power or a 9 V battery — plug in power and play. The USB port is only used once, to load the firmware.

Is this project suitable for a final-year project?

Yes — for Electronics and Instrumentation programs. It demonstrates capacitive sensing, embedded timing, frequency synthesis and audio amplification in a playable build. Suitable for B.E./B.Tech final-year projects in Electronics and Instrumentation engineering.

Components & software requirements
  • 8 × TTP223 capacitive touch sensor modules
  • Arduino Nano (ATmega328P)
  • PAM8403-class audio amplifier + 8 Ω speaker
  • Per-key LEDs with current-limiting resistors
  • Octave-shift and sustain push-buttons
  • Volume potentiometer
  • Acrylic/wooden key panel with printed note labels
  • USB 5 V / 9 V battery power
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)

Get a quotation