You can often see the musical instrument shown in the picture below on video websites. This instrument is called kalimba, and it makes sound by the vibration of metal shrapnel. This project will guide you on how to design a kalimba electronic keyboard.
The core of an electronic musical instrument has two major parts, the key system and the sound system. The key system determines the feel when playing, and the sound system determines the expressiveness of the instrument. In order to simulate the feel of metal keys, we used the travel switch shown in the picture above to make the keys. This kind of travel switch also has a metal spring on it, which feels very consistent with the real kalimba. The sound system uses PWM to drive a buzzer to generate sounds of different frequencies.
The system structure diagram of the entire project is shown below:
The main control chip is STC15W204, packaged in SOP16. One of the 14 GPIOs is used as a PWM driver buzzer, and the other 13 GPIOs are connected to 13 keys, which can be made into a 13-tone kalimba. The 3D rendering is shown below:
The software is also relatively simple. The core idea is that when I press a button, it controls the PWM to output a square wave of the corresponding frequency to drive the buzzer to make a sound. The program block diagram is shown below
Generally, buzzers have a response frequency range. I tried several common buzzers on the market and found that the sound is relatively clear in the range of 500Hz - 1300Hz. If the frequency is lower than 500Hz, a hoarse sound will appear. If the frequency is higher than 1300Hz, the sound intensity will decrease. Moreover, the tone of the buzzer is relatively simple and can only emit a beep beep sound, so the performance of this version of the electronic keyboard is average. Fortunately, the production process is relatively simple. Interested readers can try to make one by themselves.
1. Schematic diagram and PCB design 2. Welding skills training 3.51 Microcontroller minimum system 4. Application of PWM 5. Application of key input
The main purpose of this project is to stimulate students' interest in learning and improve students' enthusiasm for participating in class.
By producing a real and interesting work, students can learn the knowledge they need to learn in the process and realize the application value of the knowledge they have learned.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet