Update README.md
This commit is contained in:
parent
f0b6293a0e
commit
affef41205
57
README.md
57
README.md
@ -24,7 +24,7 @@ Because this is a DIY project, you should have some basic electronic engineerin
|
||||
|
||||
## Getting Started
|
||||
|
||||
It might take you a few days to assembly and configure your own taiko device. The chips are cheap, though, you can buy them from wherever you want.
|
||||
It might take you a few days to assembly and configure your own taiko device. The microprocessor chips are cheap, though, you can buy them from wherever you want.
|
||||
|
||||
### Preparation
|
||||
|
||||
@ -40,24 +40,39 @@ Almost all of these things have alternatives, now I will show you what I used:
|
||||
And miscellaneous stuffs like:
|
||||
|
||||
* Thick wood plank x 4, best to be [shaped like this](http://i.imgur.com/va20eVn.jpg)
|
||||
* Foamed plastics to connect and fixate the wood
|
||||
* Superglue
|
||||
* Other electronical tools like screw drivers and multimeters, etc.
|
||||
|
||||
A few things to note:
|
||||
|
||||
1. Any Arduino modules with ATmega32u4 chips or Due and Zero boards are supported. Arduino Micro is the cheapest one, though.
|
||||
2. Using a breadboard is a low-cost option, but it is not the best/stablest choice. I made a PCB blueprint that allows you to print the integrated board and solder up the parts.
|
||||
2. Using a breadboard is a low-cost option, but it is not the best/stablest choice. There is a PCB blueprint that allows you to print the integrated board and solder up. For details, please see "Making the PCB" part below.
|
||||
3. You can also design and build your own microphones modules, just make sure you know how to connect them to your Arduino module.
|
||||
4. Thick, solid, dense and heavy wood is the best choice, while plywood, particleboard and medium-density fiberboard (MDF) are fragile at their edges and can be easily damaged. For better experience, you should cut the planks with the shapes shown in [the picture](http://i.imgur.com/va20eVn.jpg). If you want it easier, just prepare 4 planks.
|
||||
4. Thick, solid, dense and heavy wood is the best choice, while plywood, particleboard and medium-density fiberboard (MDF) are fragile at their edges and can be easily damaged. For better experience, you should cut the planks with the shapes shown in [the picture](http://i.imgur.com/va20eVn.jpg). If you don't have the cutting tools and want it easier, just prepare 4 planks.
|
||||
|
||||
### Connecting the Parts
|
||||
|
||||
The scheme is quite simple. You don't even need and extra resistors or capacitors. **All you need are jumper wires.**
|
||||
The scheme is quite simple. You don't even need any extra resistors or capacitors. **All you need are jumper wires.**
|
||||
|
||||
Each microphone module has 4 pins, and we only need 3 of them (`A0`, `+`, and `G`). Simply connect their `A0` outputs to Arduino Micro's `A0`~`A3` inputs, then connect their `+` pins together with module's `5V` pin, then the `G` pins together to the ground. Use the following picture if you have any problems.
|
||||
Each microphone module has 4 pins, and we only need 3 of them (`A0`, `+`, and `G`). Connect their `A0` outputs to Arduino Micro's `A0`~`A3` inputs, then connect their `+` pins together with module's `5V` pin, then the `G` pins together to the ground. Use the following picture if you have any problems.
|
||||
|
||||
(Picture to be uploaded)
|
||||
|
||||
### (Optional) Making the PCB
|
||||
|
||||
To make the PCB, you can either DIY or ask local PCB manufacturer for help. If you choose DIY, you should prepare a few more things, including:
|
||||
|
||||
* 2.2 x 1.6 inches Empty PCB x 1
|
||||
* Thermal transfer paper x 1
|
||||
* Laser printer x 1
|
||||
* Standard 4-pin header x 4
|
||||
* Thermal transfer machine (or clothes iron)
|
||||
* Etchant
|
||||
* Soldering tools
|
||||
|
||||
Detailed process to make the PCB is totally off-topic, and you may need [this video](https://www.youtube.com/watch?v=mv7Y0A9YeUc) to help you. I have included the required printable board file `sanro.eps` in the `Eagle/sanro-arduino` folder. You can also download the scheme and board files and edit them by yourself with the [Eagle Software](http://www.cadsoftusa.com/download-eagle/).
|
||||
|
||||
### Uploading the Program to the Board
|
||||
|
||||
1. Download and install [Arduino IDE](https://www.arduino.cc/en/Main/Software).
|
||||
@ -69,24 +84,30 @@ Each microphone module has 4 pins, and we only need 3 of them (`A0`, `+`, and `G
|
||||
|
||||
## Configuration
|
||||
|
||||
***WARNING: Because of the deviations between the microphones and the installation of them on the planks, you will spend much time adjusting the hardware circuits and the parameters in the program. Be patient, there are lots of tries-and-errors up ahead.***
|
||||
***WARNING: Because of the deviations between the microphones and the installation of the planks, you will spend much time adjusting the hardware and the parameters in the program. Be patient, there are lots of tries-and-errors up ahead.***
|
||||
|
||||
### Hardware
|
||||
|
||||
Literally there is only one thing you need to do: glue each microphone to the wood plank. However, the problem is how you do it. There are two main criteria when doing this job:
|
||||
Literally there is only 2 things you need to do:
|
||||
|
||||
* Attach the microphone to the plank as close/tight as possible; and
|
||||
1. Glue each microphone to the wood plank
|
||||
2. Fixate the wood planks onto the foamed plastics
|
||||
|
||||
However, the problem is how you do them. There are some major criteria when doing this job:
|
||||
|
||||
* Attach the microphone to the plank as close/tight as possible
|
||||
* Seal the microphone to isolate it from outside noises
|
||||
* Don't let the planks contact each other
|
||||
|
||||
To accomplish both, you can remove the filter covering the microphone receiver, then attach the receiver face (the microphones are usually cylindrical, like the [KEYES K-036](http://i.imgur.com/gUWnUCc.png) that I used) tightly to the surface of the plank, and seal it with superglue. In this way, the soundwave from the plank can be directly transmitted to the microphone, loud and clear. Also, noises and soundwave from nearby planks can be reduced to the minimum.
|
||||
To accomplish them, you can remove the filter cover of the microphone receiver, then attach the receiver face (the microphones are usually cylindrical, like [the ones that I used in this project](http://i.imgur.com/gUWnUCc.png)) tightly to the surface of the plank, and seal it with superglue. In this way, the soundwave from the plank can be directly transmitted to the microphone, loud and clear. Also, noises and soundwave from nearby planks can be reduced to the minimum.
|
||||
|
||||
Also, please note that there is a potentiometer on the KEYES module, which is used to set the quiescent operating point of the microphone. Although I have implemented algorithms to eliminate the bias caused by unequal quiescent operating point of each microphone, **it is better to adjust the potentiometer manually and keep the quiescent operating points of the microphones at approximately the same level.** To do this, you may need to contact your microphone provider.
|
||||
Also, please note that there is a potentiometer on the KEYES module, which is used to set the quiescent operating point (Q-point) of the microphone. Although I have implemented algorithms to eliminate the bias caused by unequal Q-point of each microphone, **it is better to adjust the potentiometer manually and keep the Q-points at approximately the same level.** To do this, you may need to contact your microphone provider.
|
||||
|
||||
### Parameters in the Program
|
||||
|
||||
All you need to change is the `LIGHT_THRES` and the `HEAVY_THRES`, according to your microphone configuration.
|
||||
|
||||
The codes are short and self-explanatory, if you need help understanding them, please refer to the "About the Algorithm" part.
|
||||
The codes are short and self-explanatory, and if you need help understanding them, please refer to the "About the Algorithm" part.
|
||||
|
||||
(To be completed)
|
||||
|
||||
@ -94,19 +115,21 @@ The codes are short and self-explanatory, if you need help understanding them, p
|
||||
|
||||
The algorithm in the program is simple, and there are still much more to be optimized. All pull requests are welcomed!
|
||||
|
||||
In short, the signal processing job can be divided into 4 steps after acquiring the samples from the analog inputs:
|
||||
In short, the signal processing job can be divided into 4 calculating steps after acquiring the samples from the analog inputs:
|
||||
|
||||
1. Take the derivative
|
||||
2. Calculate the power of the wavaform
|
||||
1. Calculate the derivative
|
||||
2. Calculate the power of the waveform
|
||||
3. Calculate the convolution of the power
|
||||
4. Find the peak of the power convolution, compare it with the thresholds to see if there is a hit
|
||||
4. Find the peak of the power convolution and compare it with the thresholds to see if there is a light or heavy hit
|
||||
|
||||
This picture shows the algorithm in a clearer way:
|
||||
|
||||
(Picture to be uploaded)
|
||||
|
||||
Step 1 is to elinimate the difference of quiescent operating point, which makes it easier to calculate the power of the waveform.
|
||||
Step 1 is to elinimate the difference of Q-point, which makes it easier and more accurate to calculate the power of the waveform.
|
||||
|
||||
Step 2 is to enhance the signal to noise ratio (SNR), which can further eliminate the noise. `LIGHT_THRES` is also used here to cut the low-power part out.
|
||||
Step 2, calculating the power of the waveform, can also enhance the signal to noise ratio (SNR), which can further eliminate the noises. `LIGHT_THRES` is also used here to cut the low-power noises out.
|
||||
|
||||
Step 3 is to "polish" the power curve to make it more like a sequence of hit pulses, which makes it easier to find the power peak.
|
||||
|
||||
For Arduino microprocessors, the executing time for each loop is not stable - the processor always executes the instructions as fast as it can. Onece the loop ends, it immediately starts the next loop. This is extremely bad for sampling sounds. Therefore, the program implements a simple sampling frequency control mechanism to restrict the sampling frequency to no more than 1,000Hz.
|
||||
|
Loading…
Reference in New Issue
Block a user