I was reading the 10 led bar graph thread, and the discussion of using pwm to output an analog value to be measured by an led stack.
I started to post a response saying that of course the method used in the "picaxe controlled variable power supply" was superior to pwm. I was going to suggest replacing the LM317 circuitry with a single 300~10K pullup resistor to +5 (as I have been doing for the past two years), and the mosfet would be able to set any output voltage between zero and +5V with 0.005V resolution by working against the pullup resistor while using feedback via a readADC10 to exactly set the output. The 08M has plenty of room to do the requisite math so that practically any input can be translated and the result output as a voltage to be directly read on a 3.5 digit panel meter with great accuracy. For example, 100psi could be output as 1.000V, and by moving the decimal place, can be read as 100.0psi on a dpm.
Then, I realized that I didn't know what I was talking about because I had never used pwm to achieve this particular goal. I just *think* I'm right, and for me that is always a formula for disaster.
So, three questions:
1. Does pwm, when used alone, deliver the kind of accuracy and resolution that is available by using a mosfet to control output with .005V resolution?
2. If the answer to 1) is "no," has anyone ever used readADC10 feedback with pwmout to achieve the kind of accuracy and resolution that is available using the mosfet?
3. If the answers to 1) and 2) are not favorable, is it time to give up pwm as a means to set analog levels when a much more accurate method is available with a trivial increase in complexity?
Just wondering . . .
I started to post a response saying that of course the method used in the "picaxe controlled variable power supply" was superior to pwm. I was going to suggest replacing the LM317 circuitry with a single 300~10K pullup resistor to +5 (as I have been doing for the past two years), and the mosfet would be able to set any output voltage between zero and +5V with 0.005V resolution by working against the pullup resistor while using feedback via a readADC10 to exactly set the output. The 08M has plenty of room to do the requisite math so that practically any input can be translated and the result output as a voltage to be directly read on a 3.5 digit panel meter with great accuracy. For example, 100psi could be output as 1.000V, and by moving the decimal place, can be read as 100.0psi on a dpm.
Then, I realized that I didn't know what I was talking about because I had never used pwm to achieve this particular goal. I just *think* I'm right, and for me that is always a formula for disaster.
So, three questions:
1. Does pwm, when used alone, deliver the kind of accuracy and resolution that is available by using a mosfet to control output with .005V resolution?
2. If the answer to 1) is "no," has anyone ever used readADC10 feedback with pwmout to achieve the kind of accuracy and resolution that is available using the mosfet?
3. If the answers to 1) and 2) are not favorable, is it time to give up pwm as a means to set analog levels when a much more accurate method is available with a trivial increase in complexity?
Just wondering . . .