This project is an electronic erhu implemented using the ESP32 module, which can be connected to the mobile phone GarageBand to play music on the mobile phone.
The core components are 16 mechanical keyboard keys and an EC11 encoder. This is the complete schematic diagram for everyone to take a look at. It is relatively simple.
In order to allow free prototyping on the platform, the entire piano was split into upper and lower parts during PCB design, and the size of each part was controlled within the free prototyping range. There are 16 buttons on the top, and the main control unit and 4 LED lights are on the bottom . An encoder and pin header are used in the middle to connect the upper and lower parts.
It should be noted that a normal encoder will make a clicking sound when rotating, and it will also be accompanied by vibration. To solve this problem, we need to use tools to disassemble the encoder and remove the parts inside one by one.
Find the innermost spring piece, use tweezers to press down the two spring pieces, then put all the parts back in order, and finally seal the encoder.
Without the function of this spring, the encoder will be smoother when rotating.
The keys use red-axis mechanical keyboard keys. This axis has no sense of segmentation and makes almost no noise when pressed. It is very suitable for use on musical instruments.
Software source code address: https:github.com/ospanic/eerhu
In order to achieve better performance, the software of this project is written in C language. First, the MIDI protocol is implemented through Bluetooth to communicate with the mobile APP .
The buttons are used to control the frequency of the sound. Pressing different buttons will control the mobile phone to play notes of different frequencies through the Bluetooth MIDI protocol.
What is more creative is that the speed of the encoder here is used to control the volume of the sound. When it is not turning, the volume is zero. The faster it turns, the louder the sound. At the same time, the brightness of the LED light also changes according to the change of the volume.
Next, we also need a stick to make the erhu's bow. I just found a random branch here, smoothed the surface of the branch, and carved two grooves on both ends of it.
After the groove is carved, find a rope of suitable thickness and tie it to both ends of the stick. Be careful not to tie the rope too tightly, because we will wrap the rope around the encoder later.
After everything is ready, tie the bow rope to the encoder. You can see that when the rope is pulled, the brightness of the LED light changes with the change of our pulling speed.
Open the GarageBand APP on your phone, click Settings -> Advanced -> Bluetooth MIDI device to connect with our electronic erhu
Search station B for "I am Teacher Peng" to watch more interesting electronic production videos.
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