Sensor Test & Selection

At this stage of the project, I decided that it is time to determine which sensor will be used for the left, fretting hand setup. In order to find out which sensor in which position works the best, I directly compared the sensors one after the other in different positions and made notes what works and what does not. The good news is that we have a clear winner; the bad news is that there are still some issues remaining.

What kind of sensors are tested? I tested the HC-SR04 ultra-sonic sensor against the VL53L1X time-of-flight sensor. Both sensors were tested using two different rigs: Rig #1 is attached to the bottom of the neck and rig #2 is placed horizontally on top of the neck.

I started with the ultra-sonic sensor. Having worked with the time-of-flight sensor for a while now, I was surprised of how bad the results were. As I mentioned a couple of times (most notably in blog post #6), I always had problems with the ultra-sonic sensor as far as accurately pinpointing the fret location if a real hand is used as a reference. In conjuncture with rig #1, the ultra-sonic sensor gives very accurate distance and fret number readings if a flat surface is used as the object whose distance should be elicited. If this object is a hand, however, the readings become very inaccurate. Don’t quote me on this but I think the problem arises because the ultra-sonic sound spreads out a little bit as it travels through the air and, as a result, bounces off of multiple points of the fretting hand which in turn leads to fluctuating readings. Using rig #2, the ultra-sonic sensor did not work at all during the test. Here, the sound apparently bounces off of the frets instead of my hand. Depending on the angle of the sensor it just detects ranges between two to five frets.

Ultra-sonic sensor rig #1
Ultra-sonic sensor rig #2

These sobering results lead me to the time-of-flight sensor which, luckily, fared better than its ultra-sonic relative. No matter what rig, the distance and fret number readings are super exact until fret number eight, and I think with further coding, I can extend the range to the 10th fret at least. I think the issue at hand is that the library I am currently using calculates only integer values. However, since the fret ranges and their lower and upper limits are defined as decimal numbers, the integer numbers may become too inaccurate and unsuitable to calculate the fret numbers after the 7th fret. I have already asked for the advice of my supervisor regarding this matter. Another major concession is that the fret detection works best when playing barre chords. When playing a solo, I am confronted with the problem that the forefinger is always registered to be one fret before actual fret where solo is played. This unfortunately is the result of the usual hand and finger positioning when soloing. Since my goal is to extent the guitar’s range of sounds in a way that is not invasive, I must find a solution that does not require the player to alter his or her hand position…

ToF sensor rig #1
ToF sensor rig #2

Nevertheless, we have a clear winner: the time-of-flight sensor – especially in conjuncture with rig #2. It does not work optimally yet, but I will spend no more time with the ultra-sonic sensor and focus on the ToF. However, as far as learning the code is concerned, my time spent with the ultra-sonic sensor was not in vain. I learnt a lot and I could transfer a lot of code to the ToF.

Leave a Reply

Your email address will not be published.