Shop OBEX P1 Docs P2 Docs Learn Events
5V D/A Conversion — Parallax Forums

5V D/A Conversion

tdeyletdeyle Posts: 85
edited 2008-10-07 01:56 in Propeller 1
Is the only way for me to obtain a 0-5V output "from" the Prop is with a digital pot or an AD8803? From what I can tell, due to the 3.3V VCC of the Prop, I cannot go above this, correct?

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2008-10-06 18:23
    Hello tdeyle,

    No. You can connect a 5V signal over a resistor.
    This issue is discussed in the following thread

    http://forums.parallax.com/showthread.php?p=585920

    best regards

    Stefan
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2008-10-06 18:28
    @stefan He is talking about an output.
    The only way I can think to do this (note, I am somewhat new to all this). Is to run PWM inversely on a transistor hooked to 5V. But due to constraints of the transistor you would have to put a currently limiting resistor on the input, thus limiting the current of whatever you are trying to power.
    I'm sure someone else will come up with a better idea.
  • tdeyletdeyle Posts: 85
    edited 2008-10-06 18:32
    Thanks, but I would like to control a 0-5V signal directly emitted from the Prop using the CTR module.
  • tdeyletdeyle Posts: 85
    edited 2008-10-06 18:33
    Bobb, yep, that was what I was talking about.
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2008-10-06 18:44
    Attached is a diagram of what I am talking about.

    R1 will have to be dependent on the transistor collector current limits and on the required power for your output.
    R2 will have to be dependent on the transistor base current limits

    When the Prop pin is high, output is 0V, when it is low (or input), output will be 5V. Use a PWM-type method (but backward) for control.
    1050 x 750 - 37K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-10-06 23:22
    I am guessing because you mentioned the AD8803 and digital pots that you want an ANALOG 0-5V signal. You need an opamp to boost the voltage from 0-3.3V to 0-5V. If you have a power supply of more than 7V or so then you can use a common LM358 opamp otherwise you will need a rail-to-rail opamp. Have a look at this circuit as this is the minimum you will need. The R1+R3 value trims the feedback ratio to 0.51515 so that along with the unity gain of the "non-inverting configuration" you have a total gain of 1.51515 which will deliver 5V output for a 3.3V signal.

    *Peter*
    730 x 296 - 12K
  • tdeyletdeyle Posts: 85
    edited 2008-10-07 01:17
    Works great Peter, thanks! I need a 1mV resolution, which by looking at my scope, will be difficult due to the noise riding on the signal. I am wondering if a voltage follower would help any.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-10-07 01:56
    Glad to see you actually tried it!

    Noise can also be a result of how the test instrument is connected too, so check your grounds etc. Unless you have a clean PCB layout you probably won't get rid of that noise so expect this with any breadboard layout. A voltage follower won't really help but you could RC filter the supply to the opamp (100R + 10uf) and even add a capacitor (try 1,000pf) in the feedback path from pin 1 to pin 2. Keep the components as close as possible to the opamp and keep the wiring/traces as short as possible.

    *Peter*
Sign In or Register to comment.