Shop OBEX P1 Docs P2 Docs Learn Events
0 - 4V output range from Prop? — Parallax Forums

0 - 4V output range from Prop?

T ChapT Chap Posts: 4,223
edited 2012-05-03 19:40 in Propeller 1
I need to set 2 pins on a Prop to range from 0 - 4V. I recently asked about voltage boosters, and there are several that will get 3v3 up to higher voltages. But I am thinking something simpler. What about an optofet, output 0 - 3v3 from the Prop via PWM, have the FET acting like a variable resistor in a divider with a 5V source, tweak the resistors to produce a range from 0 - 4v. I am curious how you guys would do this.

Comments

  • TubularTubular Posts: 4,706
    edited 2012-04-30 19:08
    You could use Phil's circuit just described here
    http://forums.parallax.com/showthread.php?139705-Is-there-a-recommended-external-DAC-that-works-well-with-the-prop&p=1093983&viewfull=1#post1093983
    You may need an op amp with rail-to-rail I/O

    Do you have a 4v or 5v rail available?
  • T ChapT Chap Posts: 4,223
    edited 2012-04-30 19:31
    I can put 5 on it no problem.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-05-01 02:09
    Re rail to rail op amps, I've used the ca3140 with a lot of success. It swings right down to 0V. Use instead of the 358 in tubular's post. Hardly any difference in cost.
  • T ChapT Chap Posts: 4,223
    edited 2012-05-01 05:02
    Why not this LTC2633 12 bit i2C dual dac. I need two. Seems simple enough. It has a 4.096 internal ref option. I have not used a DAC before, but I am assuming the ref will set the max output voltage, just give the chip 5V.

    http://search.digikey.com/us/en/products/LTC2633ACTS8-HI12%23TRMPBF/LTC2633ACTS8-HI12%23TRMPBFCT-ND/2615219
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-05-01 08:45
  • T ChapT Chap Posts: 4,223
    edited 2012-05-01 09:09
    Thanks Tony. I like it, but I have never used SPI that's why I looked up i2c DACs. If SPI is just as easy to get up and running that would be fine with me. I will look to see what is involved with running an SPI driver, maybe there is something already setup for reads and writes in the obex. I2c is effortless. Maybe it is time to explore SPI.

    EDIT. How convenient, there is an object for this DAC.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-05-01 09:35
    Unless you require an extremely fast response time, you don't need a DAC chip, as others have pointed out. A DUTY-mode output combined with an RC filter and an op amp is more than sufficient to satisfy most analog output needs.

    -Phil
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-05-01 18:42
    Consider trying a multiplying DAC. There are a number of interesting things you can do with them. In one of the first medium frequency x-ray generators I learned, a table of values representing the desired waveform was presented to the conversion port on the dac, and the output reflected that shape scaled by the reference voltage. There are some other possibilities for these, but they may cost a bit more than a standard DAC and op amp design. You could also present a changing voltage to the Vref pins and let the DAC output scale the output proportional to a digital input. Just some ideas as I am getting ready to experiment with the Linear LTC8043.

    FF
  • T ChapT Chap Posts: 4,223
    edited 2012-05-03 19:27
    I got in some of the MCP4922 DACs today. A first with an external DAC and SPI as well. This does exactly what I wanted, nice learning experience.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-05-03 19:40
    Way cool!!! Will there be an x.0 addition to the OBEX? Nice price @ digikey, less than half of the LTC8043 device.

    FF

    Oooopppps, never mind the will there be a ____ question, just saw your edit.
Sign In or Register to comment.