Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎹 Stylophone (Analog Keyboard)

An analog Stylophone (Digital Keyboard) designed and implemented using discrete analog circuits. This project generates musical notes using a 555 Timer, supports 20 tunable keys, provides both square-wave and sine-wave outputs, includes a vibrato effect, and drives a speaker through a Class A + AB power amplifier.

The complete system was designed, simulated in LTSpice, and validated through practical hardware implementation.


πŸ“– Table of Contents

  • Overview
  • Features
  • System Architecture
  • Hardware Design
  • Working Principle
  • Circuit Stages
  • LTSpice Simulation
  • Practical Implementation
  • Results
  • Challenges
  • Novelty
  • Repository Structure
  • Getting Started
  • Future Improvements
  • References

Overview

The objective of this project was to design an analog musical instrument capable of generating multiple musical notes without using any digital controller or microprocessor.

The Stylophone consists of several analog building blocks connected together to generate, process, and amplify musical tones.

The major stages include:

  • Tone Generation using a 555 Timer
  • Musical Note Selection using a Resistor Ladder
  • Vibrato Generation using an RC Phase Shift Oscillator
  • Waveform Conversion using a 4th Order Butterworth Filter
  • High Input Impedance Class A + AB Power Amplifier

The complete design was verified through both LTSpice simulations and hardware implementation.


Features

  • 🎡 20 Tunable Musical Keys (A3 to E5)
  • 🎼 Stylus-based Key Selection
  • 🎹 Square Wave Output
  • 🎹 Sine Wave Output
  • 🎚 Adjustable Volume Control
  • πŸŽ› Vibrato Effect
  • πŸ”Š Speaker Output
  • πŸ“Š LTSpice Simulation
  • πŸ›  Practical Hardware Implementation

System Architecture

The Stylophone consists of the following signal flow:

Stylus
   β”‚
   β–Ό
Resistor Ladder
   β”‚
   β–Ό
555 Timer Tone Generator
   β”‚
   β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ί Square Wave Output
   β”‚
   β–Ό
RC Phase Shift Oscillator
(Vibrato)
   β”‚
   β–Ό
4th Order Sallen-Key Butterworth Filter
   β”‚
   β–Ό
Wave Selection Switch
(Square / Sine)
   β”‚
   β–Ό
Class A + AB Power Amplifier
   β”‚
   β–Ό
Speaker

Hardware Design

The complete Stylophone consists of the following analog subcircuits:

  • 555 Timer Based Square Wave Generator
  • Musical Note Resistor Ladder
  • Zero Biasing Circuit
  • RC Phase Shift Oscillator
  • Fourth Order Sallen-Key Butterworth Low Pass Filter
  • Volume Control Circuit
  • Class A + AB Power Amplifier
  • Speaker Output Stage

Working Principle

1. Tone Generation

A 555 Timer configured in astable mode generates a square wave.

The oscillation frequency depends on the RC time constant.

Different resistor values selected through the resistor ladder generate different musical notes.


2. Musical Note Selection

A resistor ladder network provides twenty different resistance values.

Each key corresponds to a musical note.

Touching a copper key with the stylus selects the desired resistor and changes the oscillation frequency.


3. Zero Biasing

The output of the 555 Timer varies from:

0 V β†’ VCC

Since the following analog stages require a bipolar waveform, a zero-biasing circuit shifts the waveform around 0 V without affecting its frequency.


4. Vibrato

The vibrato effect is generated using an RC Phase Shift Oscillator.

The oscillator generates a low-frequency sinusoidal waveform (~10 Hz) that modulates the control voltage of the 555 Timer.

This produces a natural frequency modulation similar to musical vibrato.


5. Waveform Conversion

The raw square wave contains several higher-order harmonics.

A fourth-order Sallen-Key Butterworth Low Pass Filter removes these harmonics and produces a smooth sine-like waveform.

Users can switch between:

  • Square Wave Mode
  • Sine Wave Mode

6. Power Amplifier

A Class A + AB amplifier is used to drive the speaker.

Advantages include:

  • High input impedance
  • Reduced loading on previous stages
  • Higher output current
  • Lower distortion
  • Improved efficiency compared to a Class A amplifier

Circuit Stages

Tone Generator

  • 555 Timer Astable Multivibrator
  • Resistor Ladder
  • Frequency Selection

Vibrato Stage

  • RC Phase Shift Oscillator
  • Low Frequency Oscillator (~10 Hz)

Filter Stage

Fourth Order Sallen-Key Butterworth Low Pass Filter

Cutoff Frequency

β‰ˆ 700 Hz

Purpose

  • Remove higher harmonics
  • Produce smooth sine wave

Amplifier Stage

Class A + AB

Purpose

  • Drive 10 Ξ© Speaker
  • Improve output current
  • Maintain low distortion

LTSpice Simulation

The following stages were simulated individually before hardware implementation.

  • Square Wave Generator
  • Zero Biasing Circuit
  • Vibrato Oscillator
  • Butterworth Filter
  • Power Amplifier

Simulation confirmed

  • Correct oscillation frequency
  • Proper waveform conversion
  • Vibrato generation
  • Stable amplifier operation

Practical Implementation

The complete Stylophone was implemented on a soldered perfboard.

The hardware includes

  • Copper Tape Keys
  • Potentiometers
  • BJTs
  • Operational Amplifiers
  • 555 Timer
  • Passive Components
  • Speaker

The practical output closely matched LTSpice simulations.


Results

Successfully implemented

  • 20 Musical Notes
  • Square Wave Output
  • Sine Wave Output
  • Vibrato Effect
  • Volume Control
  • Hardware Speaker Output

Both simulation and hardware produced comparable results.


Challenges

Solved

  • Reduced supply noise using decoupling capacitors.
  • Resolved amplifier loading issues using a high-input-impedance Class A + AB amplifier.
  • Eliminated unreliable breadboard connections by implementing the design on a soldered perfboard.

Remaining Limitations

  • Lower-frequency notes are not perfectly sinusoidal.
  • Copper tape keys are susceptible to corrosion with prolonged use.
  • Perceived loudness differs slightly between square-wave and sine-wave modes.

Novelty

This project incorporates several features that distinguish it from a basic Stylophone implementation:

  • Dual waveform selection (Square and Sine)
  • Integrated vibrato modulation
  • Fourth-order Butterworth waveform shaping
  • Zero-biasing stage for bipolar signal processing
  • Low-cost copper tape keyboard
  • Complete analog implementation without any microcontroller

Repository Structure

Stylophone/
β”‚
β”œβ”€β”€ LTSpice/
β”‚   β”œβ”€β”€ Stylophone_Circuit.asc
β”‚   └── Simulation Outputs
β”‚
β”œβ”€β”€ Hardware/
β”‚   β”œβ”€β”€ PCB Images
β”‚   β”œβ”€β”€ Oscilloscope Results
β”‚   └── Final Prototype
β”‚
β”œβ”€β”€ Report/
β”‚   └── Project_Report.pdf
β”‚
β”œβ”€β”€ Presentation/
β”‚   └── Presentation.pdf
β”‚
β”œβ”€β”€ Images/
β”‚
└── README.md

Getting Started

Requirements

  • LTSpice
  • Basic Analog Components
  • Breadboard / Perfboard
  • Oscilloscope
  • Function Generator (optional)

Simulation

Open

Stylophone_Circuit.asc

using LTSpice.

Run the transient simulation.

Observe

  • Square wave
  • Vibrato
  • Filter output
  • Amplifier output

Hardware

Build each block individually.

Recommended order:

  1. Tone Generator
  2. Zero Biasing
  3. Vibrato
  4. Filter
  5. Amplifier
  6. Speaker

Finally connect all stages together.


Future Improvements

  • Polyphonic operation
  • Digital MIDI interface
  • Octave switching
  • Improved sine-wave quality
  • PCB implementation
  • Battery-powered operation
  • Stereo output

References

  • Andy Murkin – Stylophone Variations
  • Darcy J Projects – TouchTone555
  • Instructables – DIY Stylophone
  • Sallen-Key Butterworth Filter Design
  • Class A and Class AB Amplifier Design
  • Original Stylophone Circuit Documentation

Authors

V. V. S. Aneesh
IIIT Hyderabad

Nihaal Appana
IIIT Hyderabad


License

This project is intended for educational and academic purposes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors