SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

**MCU Simple Keyboard Design (1)** Designing a basic keyboard involves using seven notes: 1, 2, 3, 4, 5, 6, and 7. Each note corresponds to a specific frequency, and by generating these frequencies, we can create musical tones. The design uses a microcontroller to generate square wave signals through its timer/counter module.

SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

**Principle:** A piece of music is made up of different scales, each with its own frequency. By combining these frequencies, we can recreate the desired melody. A microcontroller can easily produce these frequencies using its timer function. For example, the timer T0 can be used to generate square waves. To do this, we need to calculate the correct count value for each note based on the frequency. The system uses a 12MHz crystal oscillator, which results in a 1MHz clock frequency. In this setup, the timer's counting period is calculated as T = 2¹⁶ - (5 × 10⁵ / corresponding frequency). This allows us to determine the initial values for the timer that correspond to each musical note. The table below shows the count values for different notes.

SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

**MCU Simple Keyboard Design (2)** Using a microcontroller to play a keyboard involves associating each button with a specific frequency. When a key is pressed, the microcontroller generates a square wave signal at that frequency, which is then amplified and sent to a buzzer to produce sound. Each musical note has a fixed frequency. For instance, the middle C (1) has a frequency of 523Hz, and its half-period is approximately 956μs. The microcontroller’s timer can be set to generate this frequency by calculating the appropriate initial value. If the machine cycle is 1μs, then the timer should be initialized to 65536 - 956 = 64580. Different buttons will correspond to different frequencies, allowing the keyboard to play various notes. Below is a table showing the frequencies and their corresponding timer values for 16 different notes in an octave.

SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

The hardware for this design is straightforward. The P1 port is used for scanning the keys, while the P0.1 port outputs the square wave signal. This signal is then amplified using a transistor before being sent to the buzzer. The complete circuit is shown below.

SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

**Simple Electronic Keyboard Design Using MCU (3)** In music theory, pitch is determined by frequency. Each tone corresponds to a specific frequency, and by generating these frequencies, we can create a simple tone generator. Combining this with a keyboard layout allows for the creation of a basic electronic keyboard.

SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

The circuit diagram is shown in the figure. It includes 8 switches corresponding to the 8 notes of a scale. Only one switch is active at a time.

SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

This schematic represents a mini keyboard circuit. To ensure the circuit starts properly, two diodes are connected in parallel with a resistor, simulating the behavior of a thermistor. Additionally, the LM324 operational amplifier requires ±5V power, so a voltage regulator and rectifier bridge are used to create a negative power supply. This completes the circuit board, making it ready for use. **Simple Computer Keyboard Design (4)** **8-Key Simple Keyboard Using NE555**

SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

**Physical Layout:**

SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

**Simple Keyboard Circuit (5)**

SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

**MCU Simple Keyboard Design (6)**

SCM simple keyboard design plan Daquan (six analog circuit design schematics detailed)

**Circuit Working Principle:** Rp1–Rp13 are the scale resistors for the keyboard and also serve as timing resistors for the oscillator. C2 is the discharge capacitor, and S1–S13 are the key switches. When any key is pressed, such as S1, the +6V power supply charges R2 via Rp1 and S1. Since C2 starts at zero volts, VT1 remains off. At this point, the +6V power supply provides a base bias to VT2, turning it on. Current flows through the speaker, creating a high voltage drop across it.

Electric Lifting Column

Electric Lifting Column,Electric Cylinder Linear Actuator,Telescopic Linear Actuator,Electric Slide Actuator

Kunshan Zeitech Mechanical & Electrical Technology Co., Ltd , https://www.zeithe.com