I've been trying to develop a model for estimating the flowrate of urine based on audio (inspired by studies such as this one) and want to use it to make a device that could be used from home that doesn't use a phone.
I've started off with this MEMS microphone breakout from SparkFun, and have tried using a modification of the sample Arduino code along with an RS232 interface scale to run trials (with the urine stream emulated with a large syringe.)
After quite a few trials, I was pretty disappointed to get back sub 0.5 R2 (scikit-learn's definition) for both linear regression and gradient boosting, and felt as though I should try to get as close possible to the raw waveforms that the microphonr could produce, and then do even more to pre-process the data. One idea was to read audio directly off some USB / audio jack interface on my laptop.
This is the current set-up I've thought of:
The alligator clips are connected to a power supply at 3.3V. I've cut and resoldered some of the wires to different colors (did not have all of them readily available on-hand), but for reference by TRS: sleeve = green, ring = blue, tip = black. I took some readings off a multimeter as it was plugged into my XPS 15 and found the following:
VDC Readings:
- Green->Black: 0.109~ V
- Blue -> Black: 0 V or very close
- Green -> Blue: 0.109~ V
VAC Readings:
- Green->Blue: 0.377~ V
- Blue -> Black: 0.008~ V (could just be noise)
- Green->Black: 0.384~ V
I assumed from these that green (the sleeve) would be some sort of power input to headphones/microphones. I don't think this matches up with some standards that I've looked up such as here, but I've just been scared of toasting something on my laptop so I've mostly been not wanting to try other connections due to an abundance of caution.
As the connections stand right now, my laptop is able to identify the plug as a pair of headphones. I've looked up a few tutorials but am still at a loss for if there's any way to allow my laptop to recognize this microphone as a microphone. I've not been able to find anything in system settings to manually override this, though I will admit it could be right under my nose.
I suspect that I may need a TRRS jack (as they're used with headset microphones) for this to work. If not, I'd be glad to hear and would be thankful to anyone for their input on this or anything else with respect to what I've been doing.