Filtering an output - analoque RMS? Now with schematic - Page 1
Forum section: electronics / beginners

author: gildasd
author_rank: Frequent Contributor
timestamp: December 28, 2015, 08:16:12 pm
content: Hello,This board is connected to a 12V wall wart (until it exploded).A 7809 converts the 12v to 9V.A ICL7660 creates a -9V rail. This supplies the -Vcc of all the Opamps.-9V is filtered via a RC (1kOhm, 47µF) for the "signal rail"This "signal rail" is feed into a pair of LM 336 create a +2.5V and a -2.4V for the sensors (the idea is to get +50mV something out of the sensor, or lower if possible).Each sensor get it's "own" voltage set from TL084 followers.The signal is from 0.01mV to 1mV.The output signal is pre amplified 1M/10K (or 100x) via OP07's.This in turn will be amplified by a TL084 running normal inverting amplifiers to a range of 0 to 3.3VIn turn fed into the ADC of an Arduino.It works - BUT - and I love big buts. After the preamp, the noise level is still a bit high, about 10mV for a signal of 1.2V - or 1%.It's useable, but not perfect.If I could reduce the spike by 50%, I'd be happy.The power rails have already been filtered:1000µF from +12V to ground.470µF from +9V to ground.1000µF from -9V to ground.270µF from -9V to +9V.This has removed 95% of the ripple but not the most damaging "spike".I have tried putting a RC filter on the -9V power line, but even with 100ohms, the power drop is too big for the circuit to work (negative TL04 and Op07's start acting up).An RC filter on the outputs make the signal oscillate. Maybe I'm doing that wrong.More µF's on the 12V, 9V and -9 does not bring any useful gain (tried up to 2500 µF, nice sparks, but no gain).Image 1Tools at hand; a 15MHz Philips analogue scope and a UT61B multimeter.Image 2The set up.Image3Different parts of the circuit.Image 4Top, negative signal out of the 7660.Bottom: After filtering, the spike is thinner but still there.50mV per division.Image 5Now at 5mV per division.The top signal is what is feed into the sensors.The bottom signal is the same.Image 6Output of the sensors.The bottom signal is the same.Image 7Output of the OP07's.The bottom signal is the same.Output of the sensors..

author: lewis
author_rank: Frequent Contributor
timestamp: December 28, 2015, 08:18:24 pm
content: Schematic?

author: gildasd
author_rank: Frequent Contributor
timestamp: December 28, 2015, 08:22:01 pm
content: Quote from: lewis on December 28, 2015, 08:18:24 pmOn it's way!

author: Simon
author_rank: Unknown
timestamp: December 28, 2015, 08:31:24 pm
content: maybe try inductors instead of resistors.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 28, 2015, 08:41:50 pm
content: Quote from: Simon on December 28, 2015, 08:31:24 pmI forgot - there are ferrites on the -9V rail, it cleaned the signal up but did not remove the spike.As for inductors;You mean a "CL" Filter? I tried , but I have no real knowledge of that kind of filter...The first attempt was with a 331kH inductor; I tried varying capacitors but only managed to create an "Echo" of varying strength.Then with a R68 Trio (normally found around a CPU in a PC), this got rid of maybe 5%, but two in series or parallel did not gather any other improvement.My selection of inductors:

author: gildasd
author_rank: Frequent Contributor
timestamp: December 28, 2015, 09:37:55 pm
content: Divided into blocks.that's how I work, I can Dremel it into pieces if I need to.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 28, 2015, 11:03:59 pm
content: Quote from: gildasd on December 28, 2015, 09:37:55 pmReplacing the 47µF by a 270µF low ESR in the RC filter on the signal rail has improved things slightly.

author: diyaudio
author_rank: Frequent Contributor
timestamp: December 28, 2015, 11:38:18 pm
content: Quote from: gildasd on December 28, 2015, 08:16:12 pmbefore you jump around with all kinds of filtering techniques, have you actually reduced the ground loops, created a star ground, all that ground wires makes a nice antenna for your scope probe, you might be chasing ghosts at this point in time.amplifying voltages below 1mV requires extremely careful layout, a PCB is always preferred.Rule 1:) Check all ground loops. also measure your psu plain and simple crap in crap out. so use a decent psu and test the noise characteristics.

author: Andy Watson
author_rank: Super Contributor
timestamp: December 28, 2015, 11:53:58 pm
content: Quote from: lewis on December 28, 2015, 08:18:24 pm+1.#gildasdAs above - try considering where the ground loops are and where to star-connect things - if that still fails, consider transferring the sensitive parts of the circuit to a solid-copper, ground-lane type of construction.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 29, 2015, 12:14:58 am
content: Quote from: Andy Watson on December 28, 2015, 11:53:58 pmThat's done, but I'll check again. Thanks for the reminder.When I was finding how the 336's worked, I was able to identify the RF "chatter" from my PC, screens, lights etc. It's weird how they all have an unique signature.For critical measurement, I switch everything off.But I'll close some loops just to be sure.I have to use a 12V 1A wall wart supply for the final project, no fancy PSU, the whole thing sits outside on a roof at the University etc.The final version will be on circuit board. This is a prototype.Meanwhile the negative and positive supply lines of the 336's got ferrites:They are now dead flat lines. I can't see anything on my scope. The noise on the output went down a bit, it's now 7mV to 8mV (from 10mV initially).I don't think there are any more gains to be made that side.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 29, 2015, 12:39:46 am
content: Quote from: diyaudio on December 28, 2015, 11:38:18 pmDone the ground loop.No change in amplitude, but the "noise" is now far "cleaner" and easier to trigger on.As for PSU, when I put the 7809 in, after careful testing, I added one cap on the 12V and 2 on the 9V.I did not get a flat line, but a low amplitude sinus of the kind that does not provoke leakage from the Vcc's of Opamps.All the noise comes from the 7660, it's bad, but a least an amplitude less bad than 555 negative voltage supply.The problem of the 7660 is that it provides a very low intensity, so if I could filter the signal rail with a RC, it not possible to do so with the "power rail".This power rail feeds the -Vcc's, the TL84's and the LM358 don't let this leak into the signal, but the OP07's do...

author: diyaudio
author_rank: Frequent Contributor
timestamp: December 29, 2015, 06:30:57 am
content: Quote from: gildasd on December 29, 2015, 12:39:46 amokay, sounds like some progress, sadly and im sorry to say this, you will need you need to reconsider your layout (its ugly even for a strip board), although I mentioned that amplifying sub 1mV signals are hard to do on a strip-board and near impossible to work reliably here are some tips and will work if done correctly for prototype purposes.1) partition the layout of the board similar to what you did, with the exception of that rat nest. use fewer cross jump.2) use one thick (use 4 strips joined to form a track), make sure its well soldered (tinned) as the main ground path running through the centre, use this as the main ground path reference.3) strategically place the the high gain amplifiers input and feedback path away from noise pick ups, keep the op-amp inputs short and terminate them to avoid false front-end swinging and erratic oscillations , also compensate all the high gain amplifiers, the OP07 has a GBW bandwith of up to 0.6mhz, 600Khz in close loop. so compensate with dominant pole at fc of 100Hz I assume your sensors are does not exhibit fast transitions of < 1Khz.4) use a 1nF and a 10uF near Vcc pin rail for each ic.Quote1K, + 47uFthats -9mA of -Vcc current. and a RC pole with a fc =3.386 Hz. 9mA?The problem I noticed, most people who post these types of problems think what they measure and probe with an oscilloscope is present in the circuit, this is not always the case only make conclusions like that if you confident your layout is tight.

author: Kleinstein
author_rank: Super Contributor
timestamp: December 29, 2015, 09:21:32 am
content: The 7660 and other charge pumps are notorous noise sources. They should have caps (non electrolytic) close to the input and output. Also LC filtering at both input an output is a good idea. The bucket capacitor is better a little larger and with series resistor or high ESR (non low ESR electrolytic).If possibly I would avoid the charge pump, for expample by using a raised virtual ground. The circuit looks a little like an amplifier for am DMS bridge or similar resistive sensors. I see no asolute need for the negative voltage there.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 29, 2015, 11:03:34 am
content: Quote from: diyaudio on December 29, 2015, 06:30:57 amUgly? But it's my baby!!!1) Will do, in the final PCB version.2) Will do, in the final PCB version. Basically my plan is to make the whole back side a ground plane3) - Yes the layout is a problem, my initial plan did not include the TL084 rail buffers... Nor the bunch of big rail caps... So I kinda free handed from there.- Keeping that noisy negative rail on the left and as far away from everybody as possible seems a must.- I don't have erratics right now, just that 8mV "dirty sine" out of the OP07.- The signal out of the sensors is DC, it does not have a frequency per se. So 1Hz to 10Hz.I'll try to compensate the Op07 as you say. Reading the data-sheet right now to understand how, but I can only find Offset nulling right now...Do you mean putting a low pass filter on the variable input? Not quite sure what you mean.4) "Use a 1nF and a 10uF near Vcc pin rail for each ic" - check the drawing.QuoteIt's now 1k + 270µF. This is by trial and error. Initially I did a filter using T=RxC, but that made a horrendous 20mV spikeathon after the sensor and OP07.So I guessed the time/div on the scope was off. So I then bread boarded an RC filter with a 100k trimmer and started testing caps looking only at the OP07 output.After much testing (starting with ceramics and finishing with electrolytics) I found a "sweet spot" between voltage drop and noise.However, circuit evolution and a ferrite changed the characteristics of the 2770 (bigger spike), so the 47µf was replaced by a 270µF low ESR.The resulting +2.5V and -2.4V sensor "excitation" rails are straight lines.This is bit a "learn as you go" thing.I was actually thinking of using two 7660's...One as now on the signal generation side of the board. Probably with low ESR caps.Another with different values low ESR caps or ceramics (to prevent resonance) to supply the amplification...All that said, at 8mV noise, this circuit is only at 4 to 5mV off what I can compensate by result dumping after the ADC.Thanks for all the advice and patience.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 29, 2015, 11:18:03 am
content: Quote from: Kleinstein on December 29, 2015, 09:21:32 am1) I have no idea about LC filters, all I can find (that does not seem to be written the tinfoil hat/over-unity brigade) are high pass filters... So I don't "get" what sort of values or calculations I should consider as a starting point.Will do your input/output ceramics.2) I do have a need for negative voltage, the Opamps did not like the virtual ground, i simply had very bad results, but I could have worked around that.But the main problem is the common mode on the sensors, I need between 1 and 100mV. Before, I had a common mode of 1.64V using a virtual ground and the difference amplifiers would be erratic.I'm sure there are ways around the problems in "2)" but I don't think I have the time to solve them, I tried for many weeks and it was beyond me.I rather buy a basic open frame transformer and build a basic LM317/LM337 supply than deal with that again...

author: Ian.M
author_rank: Super Contributor
timestamp: December 29, 2015, 12:37:48 pm
content: As has been pointed out above, switched capacitor charge pump negative rail generators are extremely noisy due to the high transient currents when the transfer cap is switched in parallel alternately with the input and output decoupling caps. They are also lossy and have very poor regulation.Can you change to a 12V AC wall wart so you can use a capacitively coupled bridge rectifier for the negative rail, + linear regultators?If not, a 12V isolated DC-DC converter to provide a raw -12V rail + a linear regulator all in a shielding can, with feedthrough caps for +12V in and -9V out would certainly be a better choice than a 7660.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 29, 2015, 02:03:04 pm
content: QuoteDone on +Vcc and -Vcc.Top: original,Bottom : filtered.Changed channels, probes and sensors with no notable variation of the output.The picture is a bit misleading, the Iphone smudges the traces quite badly.Marginal gain again, the noise is down to about 6mV, so only about 2mV from the goal.I think I'll stop here, this last little gain should be achieved with the inclusion of the various upgrades that have been suggested here on "real" pcb.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 29, 2015, 02:05:48 pm
content: Quote from: Ian.M on December 29, 2015, 12:37:48 pmI'm looking for the DC to DC converter right now. In concept, it would be silver bullet.This kind of thing:http://www.digikey.be/product-detail/en/RY-1209D/RY-1209D-ND/2324019?

author: Ian.M
author_rank: Super Contributor
timestamp: December 29, 2015, 02:50:11 pm
content: Yes, that sort of thing. However, modules with low ripple are likely to be considerably more expensive, so you may do better to convert 12V in to 12V out, connecting the output +ve terminal to 0V so that the output -ve terminal is at -12V, then follow it by a LC Pi filter to reduce bleedthrough of its switching frequency and a linear regulator to remove any remaining ripple.This onehttp://www.digikey.be/product-detail/en/VFSD2-S12-S12-SIP/102-2070-ND/2295107may be worth considering if you decide to use a post-regulator.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 29, 2015, 03:15:53 pm
content: Quote from: Ian.M on December 29, 2015, 02:50:11 pmOh jolly geeIt makes the whole traditional AC/DC 317/337 seem the most simple method for a near "perfect" result...All the other options; 555, 2660, DC to DC, seem to have major down sides that require mucho dosh to solve.In any case, I'm within 2mV to 4mV of my objective using the 7660, so for now I'll tweak that.Edit: This would be ok price/perf wise;http://www.digikey.be/product-detail/en/SPDC400FC12M0.35/497-8257-ND/1917088but if it requires as much work as the 7660, then why bother?Edit the Edit - Massive 100V Dc in... Not good.

author: Ian.M
author_rank: Super Contributor
timestamp: December 29, 2015, 03:42:33 pm
content: I presented a SPICE simulation of a capacitivel coupled bridge rectifier for a negative rail a while back:https://www.eevblog.com/forum/beginners/transformer-for-multi-output-psu/msg710698/#msg710698If you can use an AC output wall wart, that would almost certainly be your best bet for low noise supply rails.Otherwise if you rebuild the 7660 circuit in a screening can using low ESR caps, with LC Pi filters on input and output, you can probably reduce the noise considerably. It may help considerably to use parallel 7660 chips to reduce the output impedance (see datasheet), as the current spikes and output ripple get significantly worse at high load currents.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 29, 2015, 05:52:09 pm
content: Quote from: Ian.M on December 29, 2015, 03:42:33 pmWe are in full agreement. Changing just one capacitor on the 7660 did marvels, changing the others can only be better.Can you recommend a good source to learn about LC Pi filters? I can't distinguish between the good and the bad...BTW, the final boards will sit in a metal boxes that will act as "Elcheapo faraday cages".Meanwhile ~~~~ there were some improvements:3 low ESR caps were added on the end of the power line.This made the noise go in the 5mV range - so SUCCESSWhat I don't get, is that I tried this yesterday near the 7660, before feeding into the IC's, and it had minimal effect.I assume it's the interaction with the filtering on the Vcc's of the OP07 that is doing this...270µf from positive to negative.270µF from positive to ground.270µF From negative to ground.(Other values might be better, but I've got a bunch of recent motherboards that act as part donors for prototypes).1) The noise after soldering the extra filter2) Noise with the board unpowered and disconnected.3) Layout as it is now. Notice that two of the four OP07 have the Vcc's capped.

author: gildasd
author_rank: Frequent Contributor
timestamp: February 02, 2016, 11:24:32 pm
content: It works great.Added trimmers on the final amplification stage as a safeguard.The force on each is supposed to max out at 50kg for 100km/h of wind.But I'm pretty sure that the 50% "overclock" on the sensors will make them non linear at the top of their range, so I need to keep a bit of wiggle room.Surprised at how the ferrite/capacitor combo is effective at "cooling down" noise with a steep initial slope.