Good night, everyone. I want to amplify and filter a signal that has a bandwidth of 3.5Hz and is of the order of 5 - 40 milliVolts. I plan to amplify the signal before filtering it so as to prevent losses of any of the useful signal components in this particularly small signal. I've only ever worked with signals with bandwidths of 1kHz - 10kHz before so I would like to get some advice on the following issues:

  1. What characteristics for the op-amp should I consider when I am looking at op-amp specification sheets for the amplification stage and why? What types of op-amp should I consider?
  2. Should I use active or passive filter for the filtering stage?
  3. If using an active filter, what characteristics of the op-amp should I be paying attention to when looking at the specification sheets and why?
  4. Does the type of capacitors I use with filtering stage matter?

Any help would be much appreciated.

  • \$\begingroup\$ What's the signal's output impedance? \$\endgroup\$
    – endolith
    Oct 25 '11 at 15:06
  • \$\begingroup\$ Since you mention an IR LEd/transistor pair, you may may want to try driving the LED with a 10's of KHz square wave and using a lock-in demodulator (either hardware or software) on the receive. That is to say, you subtract the received signal when the LED is off from the signal when the LED is on, and thus factor out a lot of optical interference. This can be done with op-amps, special purpose chips, or after the A/D conversion. \$\endgroup\$ Oct 26 '11 at 4:04
  • \$\begingroup\$ @ChrisStratton- I'm not sure how to implement subtraction/addition of signals in hardware or software as I have never done it before...could you give me some examples of what you are talking about or refer me to some source that will explain it for please? \$\endgroup\$
    – D Brown
    Oct 26 '11 at 5:23
  • \$\begingroup\$ Is the lock-in demodulator the same as the phase locked-loop demodulator? \$\endgroup\$
    – D Brown
    Oct 26 '11 at 5:48
  • \$\begingroup\$ Making a PhotoPlethysmograph, are we? \$\endgroup\$ Oct 26 '11 at 22:46

It would be useful to know more of the characteristics of the signal and what you need to do with it. You say it has a bandwidth of 3.5 Hz, but what is its upper and lower limit? In particular, do you care about DC? What impedance is the signal? What must the amplified signal drive? What output voltage and therefore gain? What is the overall purpose?

From the sparse information you supplied, it is hard to tell what you need the opamp to do. If the signal includes DC, then a low offset voltage will be necessary so as to not be large compared to the 5 mV input. If DC doesn't matter, then even this can be ignored as long as the offset doesn't cause the amplified signal to clip to either rail. If a lot of gain is needed, then capacitively coupling between multiple gain stages allows you to keep the AC gain but reset the offset to 0 each stage.

I would put a little low pass filtering before the first gain stage. It doesn't need to be tight. One or two passive poles rolling off around 20 Hz would be fine. It won't cut into the signal, but this keeps high frequency noise out of the system as early as possible so that it won't cause non-linear effects in the active circuit. If the result will ultimately go into a microcontroller and be processed there, then all you need is this loose low pass filtering on the input, then amplify to roughly fill the A/D range. Sample fast enough, like at 100 Hz (every 10ms, quite slow for a micro), to not alias given the loose input filter. Once in the micro, you can apply tighter and more accurate filtering, if that is needed. Again, we need more information.


You now say the signal will go into a microcontroller with a 0-5 V A/D range. A voltage gain of 100 looks to be about right then. Just about any opamp can handle that at this low frequency. Input offset voltage will be important, and it will be useful if the opamp can run off the same 5V supply as the PIC. A Microchip MCP603x with its 150µV input offset sounds like a good fit. As I said above, put a little low pass filtering in front of the opamp and run the output straight into the PIC A/D pin. I would still do some oversampling and additional low pass filtering in the PIC, which won't take much CPU at 100Hz or so sample rate.

Added 2:

Low pass filtering can be performed digitally by the algorithm:


FF is the "filter fraction" and controls the heaviness of the filter. For FF=0, the filter is infinitely heavy since its output never changes. For FF=1 the output simply follows the input with no filtering. Useful values are obviously in between. To keep the computation simple in a small micro, you usually chose FF so that it is 1 / 2^N. In that case the multiply by FF becomes a right shift by N bits.

For example, here is a plot of the response of two cascaded filters each with FF=1/4:

If you sample at 100 Hz then there are about 14 samples for every minimum necessary reading to support 3.5 Hz. From the step response you can see that this filter settles to about 92% within a 1/2 cycle of your 3.5 Hz maximum frequency. From the impulse response you can see that glitches will be attenuated by about 9.

Almost always when processing real world signals you want to oversample and then add a little digital low pass filtering. About the only exception I run into regularly is when the micro is doing pulse by pulse control of a switching power supply. In that case you need instantaneous readings as best you can manage and the speeds are high. For other things where the upper frequency is 1 kHz or less, digital low pass filtering is pretty much standard practise to attenuate noise.

  • \$\begingroup\$ The source of the signal is a IR LED/photo-transistor pair and the lower and upper frequency limits of the signal are from 0Hz to 3.5Hz. The purpose of this amplification and filtering is to condition the signal for the PIC18F452 A/D converter that has a dynamic voltage range of 0-5V.DC matters because I would like to use a DC signal for testing purposes. \$\endgroup\$
    – D Brown
    Oct 25 '11 at 12:44
  • \$\begingroup\$ Thanks for the advice and the follow-up questions Olin, it helped me to clear up a few issues I am having. \$\endgroup\$
    – D Brown
    Oct 25 '11 at 12:54
  • \$\begingroup\$ The IR LED/phototransistor pair will be some distance away(about 30cm-40cm) from the solderless breadboard where the signal condition circuitry and MCU will be so would the normal 0.33mm solid copper, tin-plated wire be sufficient or should I use another type of wire so as to minimize the corruption to the signal, since it is so small? \$\endgroup\$
    – D Brown
    Oct 25 '11 at 13:06
  • 1
    \$\begingroup\$ Soldering key components may be a good idea, even if a solderless breadboard is used for connecting. | At low enough signal levels you may need to look carefully at your "topology" - are you using a single ended opamp of a differential amplifier. Twisted pair feed? Shielding? Need depends on actual environment. 5-40 mV is not overly low but care still needed. \$\endgroup\$
    – Russell McMahon
    Oct 25 '11 at 13:23
  • \$\begingroup\$ @Olin Lathrop - Thanks for the added advice Olin, I'll definitely try it. I'm not sure how to do filtering in a MCU though, could you give me some help or refer me to some good online resource on that? \$\endgroup\$
    – D Brown
    Oct 25 '11 at 14:13

I'd be inclined to use DSP for the filtering, at that frequency you could use an ordinary MCU. I'd use a Microchip dsPIC, though, as I have plenty of chips and have bought the design tool, which would make the implementation trivial. I'd use an FIR filter with an appropriate windowing function, with the coefficients in flash memory, to minimise the RAM requirement. An FIR filter is the best solution for this application, if it is implemented properly.

  • \$\begingroup\$ @ Leon Thanks,that sounds like a great alternative Leon. So what you're saying is, I can use a MCU like the PIC18F (that's the one I have to use), and just sample the voltage values at specific time intervals at a sampling frequency that fits the Nyquist criterion? \$\endgroup\$
    – D Brown
    Oct 25 '11 at 12:35
  • 3
    \$\begingroup\$ Yes, the PIC18 has a hardware multiplier that will help. You will need some rudimentary analogue filtering to avoid aliasing. You can sample a lot faster than 2x, to minimise the analogue filtering requirement. Make sure that you have enough RAM in the PIC for your circular buffer. \$\endgroup\$ Oct 25 '11 at 14:11
  • 1
    \$\begingroup\$ @Leon: You don't need a circular buffer for filtering. I assume by that you are supposing FIR filter, probably a average of recent samples. I see that a lot, but it's not a good filter and takes a lot of state. Going back to the theory you can see there are better ways. FIR filters are good for when you need a complicated or somewhat arbitrary response. But if you just want to attenuate high frequencies to reduce noise, a simple IIR filter is better, easy to compute, and definitely less state. \$\endgroup\$ Oct 25 '11 at 17:32
  • \$\begingroup\$ leon what about anti alias filtering??? you still need to remove frequnecies at Fs/2 not matter how good your dsp is. Also using an op amp and cheap NPO capacitor will do a the job of many clock cycles.... \$\endgroup\$ Oct 25 '11 at 18:52
  • \$\begingroup\$ I mentioned that. \$\endgroup\$ Oct 25 '11 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.