Root Mean Square Circuit Design Advice - Page 1
Forum section: electronics / beginners

author: insteng
author_rank: Newbie
timestamp: December 14, 2019, 09:58:23 pm
content: I have an assignment to design a root mean square circuit based on the design I have attached. This is my first attempt and it is more complicated than the basic circuits I have designed in the past. I am just looking for some advice on the design, things to consider, things to test and what types of operational amplifiers would be best suited to this circuit. The input signal is in the range 10 to 20 kHz, 1V p-p.The first two stages form a precision rectifier circuit followed by the RMS circuit. U2A is a log squaring amplifier, U2B is an anti-log averaging circuit, U3B is an anti-log feedback amplifier.I have created a PSPICE simulation to test my circuit using 1V p-p sine waves to keep things simple. I have included simulation results for 10 Hz and 20 kHz signals. I am expecting the output to be 0.707V which is the case for the 20 kHz signal but the 10 Hz signal oscillates with a frequency of about 20 Hz which I am struggling to explain. I have noticed there is some high frequency noise with the 20 kHz signal as well, I think this might be from Op-Amps. The 20 kHz output also drops below 0V for some reason I can't explain. I selected TL08x because the bias currents and offset voltages are low which I suppose is suited for this kind of circuit. +/-9V power supplies are within the assignment specification.The transfer function of the RMS ciruit is Vout = SQRT(AVG(Vin^2) * R7*R8/R6^2). I assumed matched resistors would be necessary so the resistances cancel unless there is a more practical way to reduce the error introduced by resistance mismatches?

author: jimmc
author_rank: Frequent Contributor
timestamp: December 14, 2019, 10:24:18 pm
content: The 20Hz is not an oscillation, it is ripple caused by an insufficient time constant in your averaging stage.10Hz full wave rectified gives 20 Hz ripple, time constant of averaging stage (C1 R7) is 62mS so not very long compared with 20Hz (50mS).To prove a point up C1 by a factor of 10 and see the effect on the ripple.Jim

author: insteng
author_rank: Newbie
timestamp: December 14, 2019, 10:41:38 pm
content: Thanks for the comment Jim. I ran the simulation as you suggested and the ripple magnitude was a lot smaller although the time constant increased as expected. It sounds like there is a trade off between ripple magnitude and time constant in this circuit?

author: Brumby
author_rank: Unknown
timestamp: December 14, 2019, 11:28:54 pm
content: Quote from: insteng on December 14, 2019, 10:41:38 pmThere is indeed.To put it simply, ripple is the visible result of voltage fluctuations that are allowed according to the frequency and magnitude of the input waveform and the time constant of the smoothing circuit. For simple passive smoothing, this translates into more capacitance = less ripplebecauseof the longer time constant.In other words, fast response is the exact characteristic which delivers more ripple. I mean, how is a system able to distinguish between a fast changing waveform that you want to track and variations within a short time period that you want to average?The answer is, as you have surmised: it is a trade-off ... unless you want to get a lot more exotic in your circuit.

author: schmitt trigger
author_rank: Super Contributor
timestamp: December 14, 2019, 11:53:37 pm
content: According to the book "Handbook of Operational Amplifier Circuit Design", Stout and Kaufmann, the transistors should be preferably be matched devices on a single chip, as opposed to employing discrete devices as you show in your circuit.Fortunately several companies manufacture such devices. Nexperia is one of them. From their webpage:https://www.nexperia.com/products/bipolar-transistors/general-purpose-bipolar-transistors/matched-pair-transistors/#/p=1,s=0,f=,c=,rpp=,fs=0,sc=,so=,es=

author: insteng
author_rank: Newbie
timestamp: December 15, 2019, 12:16:27 am
content: Thanks for the comments. I have adjusted the time constant of the averaging op-amp to be more appropriate for the signals involved. This has also eliminated the issue with the output dropping below 0V but I'm still not sure what was causing that.I will search for matched transistors in this case also instead of the generic BC548B's that I used. I guess this will make the circuit less sensitive to temperature changes as well. Is there anything else that can be done to improve temperature stability?

author: harrimansat
author_rank: Regular Contributor
timestamp: August 16, 2022, 05:53:57 pm
content: try with a CA3046 or equivalent

author: MrAl
author_rank: Super Contributor
timestamp: August 17, 2022, 05:47:58 am
content: Quote from: insteng on December 14, 2019, 10:41:38 pmIf you have a problem with the time constant and ripple you might get it better with a 2nd order filter. That would have sharper cutoff and a somewhat lower time constant. Could be as simple as adding an RC filter somewhere or may require another op amp.