Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 1.79 KB

README.md

File metadata and controls

28 lines (18 loc) · 1.79 KB

Techno Keyboard

An arduino-based keyboard that can play techno music.

Introduction

The design is mainly based on the features of phototransistors. When a phototransistor is covered from light, the current it generates will decrease significantly. The input from phototransistor is analog, but with a threshold, it can be turned into two states: covered and not covered.

If a tone is associated with the covered state, a phototransistor can act like a key on a musical keyboard. Compared to keys and buttons, phototransistors provides more flexibility in control. It allows the users to control the keyboard contactlessly through gestures.

To make music, more than one tone is needed. Thus, four phototransistors are included to produce 2^4 combinations for controlling 16 different tones. The tones are converted into frequencies, which can be played by a piezo.

Workflow

setup

Automatically calibrates each phototransistor in real-time according to the current state of the environment. The onboard LED will light up to indicate such process.

loop

  1. check the state of each phototransistor and generate the combination with bit manipulation; turn on LEDs that are associated with covered phototransistors
  2. calculate the frequency based on the combination
  3. sound the piezo with the frequency

Schematic

schematic

Circuit Hardware

hardware1 hardware2