I am trying to make a sound sensor that will be used with a microcontroller.
The first amplification stage is based on this document from TI with some modifications
The second and third stage is a precision full wave rectifier that will act as envelope with the RC placed at input of last amplification stage, the output signal should be an envelope.
In LTSpice the simulation works well till I added the RC+last amplification stage and the program is crashing.
The goal is to get at the output a signal similar with the one shown in the last image.
Any idea what I am doing wrong in the schematic?
Any ideas or comments for improvement are welcomed.
First stage: If it should work for very low signal levels you need a stable VBias (as with the light senesor).
But here it is different, because you don´t need to go down to DC. Here it´s a greater chance that VBias generated from VCC will work. It depends on the prcision you need.
***
For the rest: It depends what it is used for. If you don´t have very precise requirements as values with units... you are far more flexible to do all the processing stuff in software with a microcontroller.
It´s far more simple to adjust the software than to change the schematic and adjust part values.
Your third image looks just like amplitude modulation (similar to the waveform as an AM radio station broadcasts). It has a carrier frequency modulated by your audio signal (envelope).
Yet you mention RC in the last stage. Do you intend for an RC filter to de-modulate the waveform?
De-modulation is normally achieved with a plain diode (or transistor). Then a capacitor (or RC filter) adjusted to smooth the gaps between carrier waveforms. Both R and C value must be carefully adjusted.
In simulation the capacitor may need for you to put a different low-ohm resistor in the same wire. Without a resistor the simulator may think it can't calculate a capacitive time constant (RxC). (And the result may be an error or crash.)
Hello all,
I have assembled the PCB and after first testing I can say something is wrong.
In the schematic R3 C4 are not populated, the jumper is closed.
As you can see the output of the sensor is increasing in time till a maximum value.
Any idea why?
Hi,
The B2 or READ_SEN is going into the ADC of the microcontroller.
"the output of the sensor is increasing" I was referring to ACD readings, they are suppose to stay relative stable at a lower value.
I do not understand why the VREF2 starts at 0.5V but it slowly going to 3V.
Not necessary the reason for wrong Vref2, but according to datasheet ADR130 maximal load capacitance is 1 uF where you have 10 uF. It could be a hidden oscillation.
Thank you for your feedback.
I have manage to debug the board and the digital potentiometer was damaged (I guess I have soldered and disordered too many times), now everything works as expected.