请教用pwm做ad 的原理(详细的)

来源:百度知道 编辑:UC知道 时间:2024/05/17 10:39:23

可用555定时器
这里贴图不便,网上搜一下吧。

I had a Basic Stamp project that needed to measure a nominal 12 volt battery, and I wanted a simple
solution. This is the simplest I could come up with. The 555 timer will put out positive pulses. The pulse
width is inversely proportional to the difference in voltage between the voltage at "ANALOG IN" and
the voltage of the 4.7uF capacitor(let's say 2.5 volts). To calibrate this circuit, hook it up to a Basic
Stamp measuring positive pulses, and give the circuit a known voltage. Let's say you get the number
2092 when you give the circuit 15 volts. Your coefficient is 2092 * (15 - 2.5) = 26150. Now you are
ready to measure voltage with your Basic Stamp. Use the formula: voltage = 26150/pulse + 2.5 . You
will have to modify this to work within the limits of the Basic Stamp's math. The accuracy of this circuit
rivals many digital voltmeters within the range I tested it (6 volts to 18 v