Advice on FFT ADC protection - Page 1
Forum section: electronics / projects

author: Aodhan145
author_rank: Frequent Contributor
timestamp: October 07, 2015, 10:36:07 pm
content: Hi,I am currently designing a spectrum analyzer music visualizer. I was going to use FFT to get the frequency bands from the audio signal. The audio signal goes to an ADC which then the value goes to a micro controller. I don't want any voltage outside of the range of 0 - 5V for input into the ADC. I worked out my computer at max volume produces a 5v pk-pk signal with no dc bias. I designed a circuit in spice to remove the bias and divide the signal by ~0.83... Could someone take a look over the circuit for me and see If I have fallen into any traps. I've designed it in LTSpice and have provided the file.Thanks in advance.

author: tggzzz
author_rank: Super Contributor
timestamp: October 07, 2015, 10:54:50 pm
content: Why don't you tell us what each part of the circuit is intended to do? For example, what is the purpose of U1? (Etc!)

author: Aodhan145
author_rank: Frequent Contributor
timestamp: October 07, 2015, 11:30:47 pm
content: Quote from: tggzzz on October 07, 2015, 10:54:50 pmIts fairly simple. The first op amp U5 is a summing amp. It takes the audio signal and adds 2.5V to give the signal a DC bias but it also inverts the voltage. The second opamp U1 buffers the first stage from the third stage. The third opamp U2 multiplies by ~-0.83 this is just to make sure the signal doesnt go over 5V. The caps and the diodes below supply a negative rail. R6 and D3 form a shunt regulator to regulate the rail to 6.3V this lowers the ripple and prevents adding noise on the audio signal. The 555 timer just supplies the charge pump inverter with a 0-12V ~10khz square wave ~66% duty cycle.

author: ajb
author_rank: Super Contributor
timestamp: October 08, 2015, 05:25:37 am
content: U1 is superfluous. The output of U5 is already a low impedance node, so rebuffering it doesn't provide any benefit.A simpler approach may be to AC-couple the input, since you presumably only care about AC anyway. By biasing the input to the middle of your supply, you can eliminate the negative rail and just use a RRIO op amp powered from your ADC's analog supply to buffer the signal if your ADC requires a low impedance source (they usually do). You can optionally add some attenuation (using a resistor divider followed by a unity-gain buffer is usually better than running an op amp at gain<1), but the op amp's output will be limited to within its rails (which are the same as your ADC's rails) so that's only necessary if you want to limit the range to something less than the supply (say, to a lower reference voltage).You're also going to want to incorporate some filtering to limit your input the the portion of the audio band that you care about.

author: tggzzz
author_rank: Super Contributor
timestamp: October 08, 2015, 07:34:39 am
content: Quote from: Aodhan145 on October 07, 2015, 11:30:47 pmThat's what theydo. I asked what they areintendedto do, i.e. theirpurposeor why they are there.It would also help if you could articulate thepurposeof voltage limiting, i.e. why it is important that the voltage doesn't exceed 5V, and what would happen if it did.QuoteYou will need to consider how opamps behave near the supply rails. Personally I wouldn't rely on a spice model until I had determined which subset of behaviour is it intended to model.I suggest you google for "voltage limiter" "voltage clip" with and without "opamp". There are many circuits, each of which is better/worse for different purposes (see above).QuoteAre you unconcerned about noise and interference from such a circuit?

author: Aodhan145
author_rank: Frequent Contributor
timestamp: October 08, 2015, 03:45:19 pm
content: Quote from: tggzzz on October 08, 2015, 07:34:39 amThe output signal is going to an ADC. I haven't decided which yet. I might use an atmega analog input. This cant go below 0V or above 5V so the signal needs to be within these voltages. Hence why I need this circuit. A voltage clip or limited would cause distortion to the signal. The charge pump inverter is noisy but I will do some more tests and might add a small LDO to regulate it to -6V

author: Aodhan145
author_rank: Frequent Contributor
timestamp: October 08, 2015, 04:00:02 pm
content: Quote from: ajb on October 08, 2015, 05:25:37 amThanks very much. I remove U1 which reduced the cost for a decent opamp. How you go about biasing the input thats what I was doing with the summing amp.

author: nctnico
author_rank: Super Contributor
timestamp: October 08, 2015, 04:13:11 pm
content: I'd feed the ADC from a log detector. You'll need less bits (8 bits will be more than enough) for a larger dynamic range. A dual diode (one leg with a known current and the other with the to-be-measured signal) can be used to calibrate the voltage drop in the diode. The ratio between the two is a measure for the input signal.

author: tggzzz
author_rank: Super Contributor
timestamp: October 08, 2015, 04:21:00 pm
content: Quote from: Aodhan145 on October 08, 2015, 03:45:19 pmYour circuit will prevent neither clipping nor distortion.You need to distinguish between "integrity" (a property of a correctly functioningsystem) and "protection" (prevention of damage).

author: Kalvin
author_rank: Super Contributor
timestamp: October 08, 2015, 04:37:42 pm
content: Maybe something like this?

author: Aodhan145
author_rank: Frequent Contributor
timestamp: October 08, 2015, 05:26:08 pm
content: Quote from: Kalvin on October 08, 2015, 04:37:42 pmThanks very much exactly what I was looking for. Why did I not think of something this simple

author: Kalvin
author_rank: Super Contributor
timestamp: October 08, 2015, 05:33:10 pm
content: Quote from: Aodhan145 on October 08, 2015, 05:26:08 pmIt is quite simple and modest. Just make sure that you understand what each component does in that circuit.

author: Aodhan145
author_rank: Frequent Contributor
timestamp: October 08, 2015, 06:12:15 pm
content: Quote from: Kalvin on October 08, 2015, 05:33:10 pmYeah I understand how it works. I feel a bit stupid.