1 to 5 volt output from the propeller ?
JMLStamp2p
Posts: 259
Good evening,
Is it possible to output 1 to 5 volts using a propeller output pin and a few external componets ? If so does anyone have a diagram or an object written ?
Is it possible to output 1 to 5 volts using a propeller output pin and a few external componets ? If so does anyone have a diagram or an object written ?
Comments
Are you asking if you can do that with 1 ouput pin? You could connect 2 pins to a serial in parallel out register
...but i haven't hands on experience with DAC yet
You can for example use 1/2 LM358 for the OPAMP, but there are thousend others...
If you use a Rail-to-Rail-Output OPAMP like the TS922 the supply voltage of the OPAMP can also be 5V.
For such a R-C DAC no additional Cog is necessary, a Counter in Duty-Mode does the job:
(this code is not tested)
Andy
one simple way to create an analog voltage is to use a DAC-Chip.
To create a voltage-range from 1.0V to 5.0V you simply limit the digitalvalue-range
that it starts not at value zero but with the value that relates to 1.0V.
If you can effort 8 IO-PINs of the propeller you could use an 8 bit DAC with parallelinput.
Then the driverobject would be simply to set these 8 IO-PINs to a bytevalue.
CHIP-examples for parallel input DAC08
there is also one for I2C-interface PCF8591. Here you would have to use
the I2C-object and send the right adress- and valuebytes
best regards
Stefan
I will check it out.
JMLStamp2p
Regards,
JMLStamp2p