Interesting idea. The MPX sensor output has a large amount of noise. You will need to filter it extensively before applying it to your circuitry. I seem to recall the app notes specifying a 750 Hz or so low pass filter. You will probably want an even lower cutoff frequency than suggested. A single pole RC is probably not sufficient for what you are after - a multiple pole op-amp filter may be better. Similarly, the PWM will probably need more filtering as well. Extremely clean power to the circuit is a must. Also, choose your sampling frequency carefully to avoid harmonics. Watch out for non-linear regions of the op-amp near ground and 5V rails. Finally, once you've treated it as best as is reasonable in hardware, remember that software filtering is your friend. > Is this a solution that is worth trying? I can take away any static er= ror=20 > during calibration but is there any sources for temperature or other=20 > dynamic errors that I need to take care of. I'd try it, with additional filtering of course. Temperature will effect the results, you will need to determine the temperature range and the accuracy required over that range to see if you exceed the expected results (a rather complicated calculation, considering all the "analog" parts and their tolerances). klumia@adelphia.net ----- Original Message -----=20 From: "Ake Hedman" To: "Microcontroller discussion list - Public." Sent: Sunday, May 15, 2005 2:43 PM Subject: [EE] Comments on circuit >I need some advice comments on this circuit=20 >http://www.vscp.org/images/barometer001.gif You probably laugh your gut= s=20 >out but but when you finished laughing please tell me what I have done=20 >wrong. > > My thought is to build an input stage for the Freescale MPX4115 pressur= e=20 > sensor. This sensor outputs 0.2V - 4.8V for the pressure range 15 - 15k= Pa. > > What I want to accomplish is: > > - Something that can be calibrated with just software. > - That works over many pressure ranges not just barometer pressure rang= es. > - Better than 0.1kPa resolution. > > If I connected the sensor directly to the A/D input I would get 0.13kPa= =20 > resolution. (5/1023) /(4.8/115) =3D 0.117 kPa/bit. > > By amplifying the signal by 10 I can get 0.012 kPa/bit but I then nee= d=20 > to shift it down to be able to read it with the A/D. > > So I set up a difference amplifier with a gain of 10 and feed the senso= r=20 > output to the (-) and a 100 kHz PWM signal through a LPF to the(-) gett= ing=20 > (sensor - Vpwm) at the A/D input. > > For the LPF I have set the corner frequency to about 16kHz. Don't actua= lly=20 > know how to do this for PWM but my thinking has been that the choose=20 > values filter the PWM frequency away leaving the DC component. (How is = the=20 > correct thinking?) > > Is this a solution that is worth trying? I can take away any static er= ror=20 > during calibration but is there any sources for temperature or other=20 > dynamic errors that I need to take care of. > > Comments appreciated (when you stopped laughing.. ;-) ) > > /Ake > > --=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 Kryddor/Te/Kaffe:=20 > 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 >=20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist