Spehro, First of all thanks for noticing the +/. swap. Had it on paper and the=20 component in eagle was the other way. Probably should have taken me=20 several hours to find on a board... ;-( When you say adding a 2nd pole filter do you mean to replace the PWM=20 LPF? My thought was to also remove ripple in software. In this case it=20 has known properties so this should be possible. Where does the 11.8 come from in 100/11.8? Thanks your help/suggestions are very much appreciated. /Ake Spehro Pefhany wrote: > At 08:43 PM 5/15/2005 +0200, you wrote: > >> I need some advice comments on this circuit=20 >> http://www.vscp.org/images/barometer001.gif You probably laugh your=20 >> guts out but but when you finished laughing please tell me what I=20 >> have done wrong. > > > First off, you've got the + and - inputs swapped. When > that's fixed, the gain will not be 10, but approximately > 100/11.8 =3D 8.47. The PIC output buffer will enter into it a bit. > If you don't like that, put a unity-gain op-amp buffer after the RC. > (with a dual op-amp, it's doesn't add any components). > Better yet make it a two or three pole filter with a time constant > in the tenths of a second. A single pole filter can only do so much. > Eg. if you use 100K and 1uF and PWM at 16kHz, then in one half-cycle > (31usec) the voltage will change by about t* (2.5/100K)*1/C =3D 0.7mV > at midscale, representing 7mV at the output or about 1.5 counts on a=20 > 10-bit ADc. > The ripple with your setup will be outside the range of my linear > approximation, many many counts. > > There's nothing inherently wrong with your concept, however just using = a > 12-bit ADC would be much better for most purposes. > > >> Is this a solution that is worth trying? I can take away any static=20 >> error during calibration but is there any sources for temperature or=20 >> other dynamic errors that I need to take care of. > > > If the pressure transducer is ratiometric from the supply, then the PWM > is not a bad way of subtracting from that. You'll have to consider > the sensor accuracy itself. If you use a decent op-amp with low offset > voltage and decent resistors, they should not contribute substantially = to > the drift. > > Best regards, > > Spehro Pefhany --"it's the network..." "The Journey is the=20 > reward" > speff@interlog.com Info for manufacturers:=20 > http://www.trexon.com > Embedded software/hardware/analog Info for designers: =20 > http://www.speff.com > > > > --=20 --- Ake Hedman (YAP - Yet Another Programmer) eurosource, Brattbergav=E4gen 17, 820 50 LOS, Sweden Phone: (46) 657 413430 Cellular: (46) 73 84 84 102 Company home: http://www.eurosource.se =20 Kryddor/Te/Kaffe: http://www.brattberg.com Personal homepage: http://www.eurosource.se/akhe Automated home: http://www.vscp.org --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist