0-10 V Analog
BAustin
Posts: 1
Hi,
I'm a seasoned programmer with just enough knowledge of electronics to hurt myself - maybe slightly less. I'm tasked with developing a simple control device that puts out a variable 0-10 volts according to various times and conditions (think light dimmer). I've had no problems with putting together it together - the LCD output, button input for end-user programming, motion sensors, etc. ... everything but the analog output. I had early success with the AD5220 digital potentiometer, but it is limited to 5V. Is there any reason I couldn't use an LM358 op-amp with the AD5220 to get 0-10V in 0.078V increments?
Can anyone clue me into a resource that shows what this might look like and how one would control it with Spin?
Or, is there a much simpler way to accomplish this?
-Brent
I'm a seasoned programmer with just enough knowledge of electronics to hurt myself - maybe slightly less. I'm tasked with developing a simple control device that puts out a variable 0-10 volts according to various times and conditions (think light dimmer). I've had no problems with putting together it together - the LCD output, button input for end-user programming, motion sensors, etc. ... everything but the analog output. I had early success with the AD5220 digital potentiometer, but it is limited to 5V. Is there any reason I couldn't use an LM358 op-amp with the AD5220 to get 0-10V in 0.078V increments?
Can anyone clue me into a resource that shows what this might look like and how one would control it with Spin?
Or, is there a much simpler way to accomplish this?
-Brent
Comments
Welcome to the Parallax forum! You can ditch the digital pot, if you like. I posted a circuit for a BASIC Stamp here that was for the same kind of app as yours:
For the Propeller, the difference would be that the input to the lowpass filter is a DUTY-mode counter output from the Prop. 2.2K and 0.1uF should work fine for the filter, instead of the higher values given for the Stamp. And the 10K:10K resistance in the output divider ratio needs to be changed to produce 10V from a constant 3.3V input instead of 5V.
-Phil
I use this circuit:
Then program the propeller pin as counter output in DUTY mode. The output voltage is directly proportional to the FRQx value.
A LM358 is ok except that the outputs can't swing rail to rail so the outputs will be 1.25V to about 8.75V if you run it from 10V.
A CA3140 will swing rail to rail.
So you can use a non inverting amplifier which is two resistors, see http://en.wikibooks.org/wiki/Electronics/Electronics_Formulas/Op_Amp_Configurations and scroll down a little for the non inverting amp. Gnd is zero volts. R2 is 3.33333 times R1 so an input of 0-3.3 V is multiplied to give 10V.
Need a RC network on the + input of the op amp to filter the pwm. Then you can drive it directly from a propeller pin.
I like ManAtWork's circuit, BTW. Nice job!
-Phil