Ake Hedman wrote: > I need some advice comments on this circuit > http://www.vscp.org/images/barometer001.gif Hmm, where to begin. I admit I didn't read all of your post (a bit long) so maybe some of this is explained or addresed there. However, several things look seriously wrong if this is supposed to do what I think you intended. 1 - This circuit performs thresholding with hystersis, which is contrary to feeding the output into an A/D input. You probably have the opamp inputs backwards. 2 - If this is supposed to be a linear amplifier and the opamp inputs are flipped, then why attenuate the input? R2 and R4 divide the input voltage by 2, which doesn't make sense if you ultimately want to amplify it. 3 - The R5 and C1 PWM filter has a rolloff frequency of about 900Hz. The PWM frequency needs to be well above that to filter out the individual PWM pulses. You need the residual PWM noise to be about 1/2 LSB on the A/D or less, and I doubt this filter will do that for reasonable PWM frequencies. You probably want a two pole filter at least. 4 - If this is supposed to be a diff amp with the PWM setting the "0" level, then R1 is definitely wrong. Since the PWM filter output impedence will vary with frequency and will be impossible to adjust for, it should be buffered. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist