SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By Mee_n_Mac
#165154
qwertymodo wrote: Preferably, though, I'd rather just use a capacitor from Vout to ground for filtering, depending on how well it works.
Perhaps you meant a resistor and cap, as a passive low pass filter.
http://en.wikipedia.org/wiki/Low-pass_f ... ealization

Note that a cap in parallel w/the feedback resistor (R5) is an active LPF w/o the need for a 2'nd op-amp.

You can do both the above to get a 2 pole LPF w/o the 2'nd op-amp.
By qwertymodo
#165177
Mee_n_Mac wrote:Perhaps you meant a resistor and cap, as a passive low pass filter.

Note that a cap in parallel w/the feedback resistor (R5) is an active LPF w/o the need for a 2'nd op-amp.

You can do both the above to get a 2 pole LPF w/o the 2'nd op-amp.
Yeah, I meant resistor + capacitor, but the active filter cap on the feedback is one less resistor, so I'll probably just do that instead. I don't really need a second-order filter, so I'd rather not add the extra parts (we're already at over 30 resistors/caps for the 4 flex sensors). Thanks for all the help.
By qwertymodo
#165286
Ok, so I played around with it some more in LTSpice to try to get rid of the extra 2 resistors (R7 and R8 in my previous LTSpice schematic), and I think I managed to do it. The numbers didn't make sense until I realized that the voltage divider created by R5 and R6 (in the schematic attached to THIS post, the component numbers are a little different than last time) seems to be acting like a series resistance added to R3, and the value of that series resistance seems to be equal to the value of R5 and R6 in parallel. So, my feedback resistor needs to equal Acl * (R3 + ((R5 * R6) / (R5 + R6))), where Acl is 3-3.5ish, depending on how wide I want the dead zones to be. Does that look right? Also, is that capacitor hooked up correctly for the low-pass filter? If my understanding of the R5 || R6 series resistance behavior is correct, a 100nF capacitor should result in a 1 / (2 * pi * (R1 || R2) * 100n) = ~11-27Hz cutoff (since the series resistance varies with R2, so the cutoff frequency will vary as R2 changes as well), which sounds good... maybe we'd want an even lower cutoff, I don't know, but I have tons of 100nF caps, so it's a good starting place.
You do not have the required permissions to view the files attached to this post.
By UhClem
#165297
Re: R5||R6, you have stumbled onto Thevenin equivalence

The filter frequency is set by C1 and R4. Keep in mind that the lower the frequency cutoff the greater the delay. You can easily simulate the frequency response by swapping R2 for a voltage source. (In series with a 100K or so resistance. See Thevenin.)
By qwertymodo
#165312
UhClem wrote:Re: R5||R6, you have stumbled onto Thevenin equivalence
Aha, I knew that calculation seemed familiar, though I couldn't quite place it because it's been 3 years since I took that particular EE class, and I'm not an EE major, so it's not something I keep up on... :)
By qwertymodo
#165538
Alright, managed to simplify the circuit slightly by removing the series resistor on the inverting input, since the Thevenin resistance of the offset voltage divider on the inverting input already serves that purpose. Since there are 4 copies of this circuit in the final product, every bit helps (resistors are cheap, but it makes tracing the final PCB a lot easier). Putting the capacitor in this configuration instead of in parallel with the feedback resistor also simplifies the routing a bit, even though it does have the effect of causing the cutoff frequency to vary with the flex sensor, but fully flexed (R2 = ~400k), the cutoff frequency is 8.8Hz, and fully relaxed (R2 = ~80k), the cutoff frequency is 27.4Hz, so that range is fine for our purposes.
You do not have the required permissions to view the files attached to this post.