Avoiding mic input destruction

Hello all!

I’m VERY new to Audacity (and audio recording in general), so please be gentle. I am using Audacity 3.0.0 on Win10 Enterprise.

I am trying to record audio from piezoelectric knock sensors mounted to the two heads of my V engined motorcycle as a learning exercise. I will eventually be making some custom knock detection equipment (strictly as a learning exercise), but for starters I’m trying to get a baseline of the existing engine noise.

I can’t find any datasheets for the knock sensors; and although I have an oscilloscope which I can use to measure the peak voltages emitted from the sensors, I don’t have a means of determining the maximum allowable voltage into my microphone → USB adapter (which I’m using to provide some sort of protection to my laptop motherboard during initial setup and testing).

I have made (and attached) a recording of the engine cranking noise from the front head sensor (with the killswitch set to off, so it wouldn’t start) to get an idea of the magnitude of the measured waveform. However, this has been scaled to an amplitude of ±1.0; and I’m not sure what the scaling is between this value and the maximum recordable voltage for my particular mic adapter.

Is there any means of obtaining the originally recorded integer value of the peaks of the waveform from the project, so that I can compare them to the maximum allowable count?

I’m trying to play it safe, being cognizent of the fact that piezoelectric ignitors which generate thousands of volts exist, and I’m literally going to be asking the recording equipment to listen to the explosions in the cylinders a few centimeters from the microphones.

Thank you for your help!

You are clipping the ADC so the peaks are unknown but you can still see a good-looking waveform so you’re not too far off. And you obviously haven’t killed the adapter yet… :wink:

Nothing is “calibrated” and usually there is a level/gain control* so everything is variable. :frowning: But, since you have a 'scope you could make your own calibration - Generate a tone (Audacity can do that). Then play it back into your mic input. Line & headphone outputs are typically around 1V so you’ll probably have to attenuate it) and measure the voltage on your 'scope while monitoring the level in Audacity.

Regular microphones typically put-out around 10mV but of course it varies a LOT because microphone sensitivity varies and the loudness of whatever you’re trying to record varies. The mic input on a computer can probably handle 100mV or more before it clips and it can probably handle 5V (or more) before you actually damage it. If you are paranoid you can make a protection circuit with a couple of diodes.

Piezos can’t put-out much current so the odds are you’re not going to fry anything. But since the voltage isn’t controlled/limited a protection circuit “wouldn’t hurt”.

As you probably know, Piezo devices are high impedance and they “like” a load in the megohm range. The mic input on a soundcard’/laptop typically has an impedance of around 1K or 2K and “pro” balanced stage/studio preamps can be lower. That will “load” the piezo and lower the voltage.

Your “final design” might have higher impedance so your voltage could be higher.



\

  • Sometimes with a USB connection there is no gain control because you usually need to adjust the analog level before it’s digitized. Good USB audio interfaces always have a recording level knob.

Thanks for that info Doug, it’s great to know :slight_smile:.

The USB adapter I got was a cheapy, because I figured I might blow it up (and I’d be moving to different hardware anyway). No dice on the input signal attenuation.

I have an old standalone signal generator which I can use to output a “calibrated” waveform; but I had a think about it and I think I’ll just use a trimpot in parallel with the sensor to shunt current past the mic input and attenuate the sensor signal. Then, wind the trimpot until it’s shorting the sensor, hook up to the mic input, start recording, fire up the motor, and slowly wind the trimpot out until I get a sensible signal level. Finally, measure and replace the trimpot with a fixed value resistor so it doesn’t change while riding. I’ll pop a post of my results in a few days or so.

In my custom hardware, I’ll (hopefully) have datasheets which will give me the ADC maximum input voltages; and can add protection circuitry in case the vehicle power supply (up to 15V) gets shorted to the sensor signal somehow.