Edson wrote... >Hello Spehro et all, > > >> Maybe try PIC---[1K]-----x----> contrast >> | >> [470R] >> | >> 0V >> >> If you need a cap, the output Z of the above is around 320 ohns, so >> the value should be maybe > 3 /(320 * fpwm) >> Eg. 1kHz PWM, get 9.3uF, use a 10uF-22uF electrolytic.. > > this remember me a problem I haven't solved. When you have this RC >filter circuit: > > IN----R----*-----OUT > | > C > | > GND > > The RC time constant is 2*PI*R*C, so for a 2K2 resistor and 100nF cap >its: > t = 2 * PI * 2200 * 100e-9 = 1.4e-3 = 1.4uS > And the cutoff frequency is: > f = 1/t = 723.4Hz Actually, what we refer to as the "RC time constant" is usually the product T = RC, without multiplying by 2*pi. This product is used when calculating the time-domain response of an RC circuit such as above: when a voltage step is presented to the input, going from zero volts to some voltage Vin, the output waveform is described by the expression Vout = Vin * (1 - (e^(-t/T))), where t is the time elapsed since the input voltage step and T = RC. For AC circuit analysis, in which we're using the circuit as a low-pass filter, we use the 2*pi factor along with T to get the corner frequency of the filter, as: f(-3db) = 1/(2*pi*RC) just like you had. (I'm not disputing your frequency calculation, just clarifying the usage of the term "time constant".) > > Now, how can I calculate the RC time constant for the circuits below? > > IN----R1----*-----*----OUT > | | > C R2 > | | > GND GND The way to do this is to consider R1 and R2 to be in parallel with one another with regard to AC, since R1 is connected from C to a circuit node (the input) which has zero impedance with respect to ground (that is, the input is driven by a voltage source), just as is R2. So in terms of the resistance that the capacitor "sees", R1 and R2 are in parallel. So the cutoff frequency calculation for the above circuit becomes: f(-3db) = 1/(2*pi*C*(R1*R2/(R1 + R2))) > IN----R1----*-----*----R3----OUT > | | > C R2 > | | > GND GND > Now, this one depends on what the output is connected to: if the output is connected to a high-impedance load, such as a PIC A/D converter input or a digital voltmeter, then R3 simply "disappears" and the calculation is just like in the previous circuit. However, if R3 is connected to a short-circuit load (such as the inverting input of an opamp configured as a summer or an inverting amplifier), then R3 has to be taken into account. In this case, for calculation purposes, R3 appears in parallel with R2 and R1, and the cutoff frequency expression becomes: f(-3db) = 1/(2*pi*C*(1/((1/R1)+(1/R2)+(1/R3)))) And finally, if R3 is feeding into a load resistance Rload which is neither infinite nor zero, then you do the calculation as above but with (R3+Rload) replacing R3 in the formula. Hope this helps a bit... Dave -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body