digitaldanny / AudioEffectsGlove

A hand tracking glove that controls parameters of various audio effects.
1 stars 0 forks source link

Joint Movement Sensors - Prototyping #36

Closed digitaldanny closed 3 years ago

digitaldanny commented 3 years ago

Describe the solution you'd like

Additional context Research for this issue was completed in #22.

digitaldanny commented 3 years ago

If the resistance range is low, the output voltage range the ADC can capture will be low. A small number of ADC steps between a straight joint and a bent joint will create inaccurate joint angle estimations. This problem can be solved using an op amp as a differential amplifier to subtract out the minimum voltage and amplify the area of interest to 0 - 3.3 V. For example, if my voltage range is 2.51 - 2.56 V, I can subtract 2.51V and amplify the remaining 0.00 - 0.05V range to 0 - 3.3 V. This would result in a larger number of ADC steps for the voltage range of interest. I can design the amplifier using the formula shown below to provide the max voltage range 0-3.3V.

Differential Amplifier

digitaldanny commented 3 years ago

Copper tape and pressure sensitive fabric came in today (02/05). Picking up thin plastic sheets tomorrow.

digitaldanny commented 3 years ago

I made a ~1 inch long sensor to test that the change in resistance is high enough to sense. I taped the flex sensor to a glove under the pointer finger's MCP joint, and I put the flex sensor in a voltage divider with a potentiometer. I was seeing the largest voltage range with the potentiometer set at 1.2kOhms.

As I bent my finger, the voltage increased from ~2V to ~4.5V. This is a much larger voltage range than I was expecting, and I think it will be plenty to work with on the microcontroller. There was some very small noise, but a moving average filter might solve that problem without the need for low-pass filter hardware.

The minimum value was a little inconsistent (~1.8 - 2.2 V). I'm hoping adding a thin plastic sheet to the outside of the sensor will help return the sensor to a consistent starting point. Will test that out tomorrow when I pick up the plastic sheets.

digitaldanny commented 3 years ago

Was having trouble getting usable voltage readings from some sensors I made today before realizing that the adhesive side of the copper tape does NOT conduct like it was advertised that it does. I made a new sensor with this in mind, which is working much better.

Problematic curve using base resistance range Bend sensor voltage range

Better curve using offset resistance range Bend sensor voltage range - 10k Roff

Some other thoughts..

digitaldanny commented 3 years ago

Seeing some weird behavior when using my flex sensor in the mux breadboard.

0 - 0.7 when selected Flex voltage range - mux selected

0 - 2 when not selected Flex voltage range - mux NOT selected

digitaldanny commented 3 years ago

GOAL CHANGE

The final demo will be utilizing only 3 joint sensors to control echo time, (possibly) reverb time, and toggling the effects lock. Because of this, I will most likely limit my project to 3 joints being captured. The mux will still be useful because all amplification and filtering hardware can use the single mux output as the input. This limits the amount of hardware on the glove PCB.

digitaldanny commented 3 years ago

Log and Anti-log Amplifiers - This video analyzes anti-log circuits in the later half and provides a formula for creating the output curve. The issue is that this circuit requires a negative supply voltage. Right now, the plan is to use a single positive voltage supply so I will be avoiding this solution for now.

I'm going to try amplifying the flex sensor's output voltage range to reach rail-to-rail voltages. On the MSP432, I'll create a LUT of ADC values that determine a specific joint position and interpolate between to estimate the joint's position. This might be the best way to linearize the joint data before sending out to the client.

digitaldanny commented 3 years ago

Completed the following goals for this issue today.

Amplified output + First LPF Attempt

TODO:

digitaldanny commented 3 years ago

Quick update - Reducing the caps and increasing the resistors decreased the final discharge time from >400ms to ~130ms. This should be a lot less noticeable for the end user. I think it may be worth trying to drop this down a little more if possible. Will post a schematic of the current design tomorrow after I add the offset volt divider / buffer to the circuit.

Amplified output + Second LPF Attempt

digitaldanny commented 3 years ago

Focusing on charger PCB before coming back to this.