Shop OBEX P1 Docs P2 Docs Learn Events
help with -1.0v to 1.0v variable output circuit — Parallax Forums

help with -1.0v to 1.0v variable output circuit

ArchiverArchiver Posts: 46,084
edited 2004-02-23 13:12 in General Discussion
Kind Sirs:

I am a newbie to basic stamps, but having built a couple of
circuits am having a ball!

We need to control variable voltage from -1.0 to 1.0 volts, (1mA)
in maybe 10 mV increments. Could someone point me in the right
direction? Basic Stamp cookbooks have circuits 0-2.5V, 255 steps but
I cannot find any that can span into negative values.

Thank you for looking at this!
Curtis

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-02-21 05:22
    Curtis,

    First of all, you need two power supplies, one positive (typ: +5V) and
    one negative (typ: -5V). This allows you to produce an output voltage
    that ranges from +1V to -1V. You can purchase power supplies with plus
    and minus outputs or you can easily build one out of two wall-warts
    and two regulators(positive and negative).

    The complete +1V to -1V circuit would consist of the following items.

    1. Positive and negative power supplies, with a common ground.
    2. BS2p Stamp (provides 2-wire I2C serial output to DAC)
    3. MAX517 8-bit 2-wire serial DAC (digital-to-analog converter)
    4. Three op amps (typ: use an LM324 which contains four op amps)

    I suggest connecting the above components in the following manner.

    1. The Stamp and DAC would run off the +5 supply.
    2. The LM324 runs off +5 and -5 supplies.
    3. The Stamp I2C output (2 pins) connects to the DAC and sends 0-255
    serial data
    4. DAC generates 0 to +5V output (in 256 steps)
    5. Resistor divider on output of DAC reduces span to 0 to +2V
    6. 0 to +2V goes into the positive input of the first non-inverting,
    unity gain op amp (which acts as a buffer)
    7. The second op amp is used to provide a buffered -1V reference.
    8. The output of the first op amp is summed with the -1V reference in
    the inverting input of the third unity-gain op amp.
    9. The output of third op amp will be your desired -1V to +1V in 256
    steps.

    If you are not familiar with the general circuits described above I
    would suggest referring to "Practical Electronics for Inventors'" by
    Scherz, available from Amazon.

    BTW, you could use any type of Stamp, not just a BS2p, to control a
    parallel DAC (typ: AD558), but it would tie up at least 9 pins on the
    Stamp.

    Dave



    --- In basicstamps@yahoogroups.com, "flightline2004"
    <flightlinemail@c...> wrote:
    > Kind Sirs:
    >
    > I am a newbie to basic stamps, but having built a couple of
    > circuits am having a ball!
    >
    > We need to control variable voltage from -1.0 to 1.0 volts, (1mA)
    > in maybe 10 mV increments. Could someone point me in the right
    > direction? Basic Stamp cookbooks have circuits 0-2.5V, 255 steps but
    > I cannot find any that can span into negative values.
    >
    > Thank you for looking at this!
    > Curtis
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-21 14:36
    --- In basicstamps@yahoogroups.com, "barrowman11" <barrowman11@y...>
    wrote:
    > Curtis,
    >
    > First of all, you need two power supplies, one positive (typ: +5V)
    and
    > one negative (typ: -5V). This allows you to produce an output
    voltage
    > that ranges from +1V to -1V. You can purchase power supplies with
    plus
    > and minus outputs or you can easily build one out of two wall-warts
    > and two regulators(positive and negative).


    I'm thinking a center tap transformer. If you don't ahve two wall
    warts already. then a 7805 and 7905 Voltage regulators(s)




    >
    > The complete +1V to -1V circuit would consist of the following
    items.
    >
    > 1. Positive and negative power supplies, with a common ground.
    > 2. BS2p Stamp (provides 2-wire I2C serial output to DAC)
    > 3. MAX517 8-bit 2-wire serial DAC (digital-to-analog converter)
    > 4. Three op amps (typ: use an LM324 which contains four op amps)
    >
    > I suggest connecting the above components in the following manner.
    >
    > 1. The Stamp and DAC would run off the +5 supply.
    > 2. The LM324 runs off +5 and -5 supplies.
    > 3. The Stamp I2C output (2 pins) connects to the DAC and sends 0-255
    > serial data
    > 4. DAC generates 0 to +5V output (in 256 steps)

    PWM output from the Stamp would offer 256 steps and use the first of
    the op-amps as the buffer.


    > 5. Resistor divider on output of DAC reduces span to 0 to +2V
    > 6. 0 to +2V goes into the positive input of the first non-inverting,
    > unity gain op amp (which acts as a buffer)
    > 7. The second op amp is used to provide a buffered -1V reference.
    > 8. The output of the first op amp is summed with the -1V reference
    in
    > the inverting input of the third unity-gain op amp.
    > 9. The output of third op amp will be your desired -1V to +1V in 256
    > steps.
    >
    > If you are not familiar with the general circuits described above I
    > would suggest referring to "Practical Electronics for Inventors'" by
    > Scherz, available from Amazon.
    >
    > BTW, you could use any type of Stamp, not just a BS2p, to control a
    > parallel DAC (typ: AD558), but it would tie up at least 9 pins on
    the
    > Stamp.
    >
    > Dave


    Heck Dave, ya almost got a Stamp Project all written up !

    Dave



    >
    >
    >
    > --- In basicstamps@yahoogroups.com, "flightline2004"
    > <flightlinemail@c...> wrote:
    > > Kind Sirs:
    > >
    > > I am a newbie to basic stamps, but having built a couple of
    > > circuits am having a ball!
    > >
    > > We need to control variable voltage from -1.0 to 1.0 volts,
    (1mA)
    > > in maybe 10 mV increments. Could someone point me in the right
    > > direction? Basic Stamp cookbooks have circuits 0-2.5V, 255 steps
    but
    > > I cannot find any that can span into negative values.
    > >
    > > Thank you for looking at this!
    > > Curtis
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-21 21:52
    Hi Curtis

    One way to generate the negative power supply for 1 ma of current is
    to use a chip like the '7660 charge pump.

    Here is a circuit that can operate from the PWM output of the Stamp:

    400k 100k
    Vdd --/\/\----o
    /\/\----;
    | Vdd |
    | |\ | |
    `--|-\ |
    100k | >
    o---Vout= Vin*1.25 - 1.25
    Vin---/\/\-o----|+/
    P0 | |/|
    0.1=== | -5v ;
    ;
    uf | `
    | 7660 |--Vdd
    Vss `
    '
    | | |
    === | ===
    | | |
    `--o--o---Vss



    Vin Vout
    0 -1.25 PWM 0,0,100
    0.2 -1.0 PWM 0,10,100
    1 0 PWM 0,51,100
    1.8 +1 PWM 0,92,100
    2 +1.25 PWM 0,102,100

    The resolution is only about 20 millivolts, less than you asked for,
    but that could be improved with one more op-amp scale down the PWM.
    You can find the '7660 circuit in many references.

    -- Tracy




    >Kind Sirs:
    >
    > I am a newbie to basic stamps, but having built a couple of
    >circuits am having a ball!
    >
    > We need to control variable voltage from -1.0 to 1.0 volts, (1mA)
    >in maybe 10 mV increments. Could someone point me in the right
    >direction? Basic Stamp cookbooks have circuits 0-2.5V, 255 steps but
    >I cannot find any that can span into negative values.
    >
    >Thank you for looking at this!
    >Curtis
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-23 13:12
    If you can have a different ground reference on the output than on the stamp
    side, consider an op amp with the + pin biased to 1/2 the power supply
    voltage. (use a simple voltage divider). This +2.5 volts now becomes the
    output's ground so it must be isolated from the stamp ground. Let's consider
    using a 5 volt supply for this circuit. The bias voltage (new ground) is
    now 2.5volts. An input above 2.5 volts will be one polarity, an input below
    2.5 volts will be the other. If the circuitry you use inverts the inputs,
    and has a gain of one, a +3 input will result in a -.5volt output and an
    input of +2volts will result in a output of +.5 volts; both in reference to
    the new ground. I hope I didn't confuse you. Breadboard the circuit and
    play a little and it will make more sense. This will allow the device to
    operate with only one power supply.

    Jim
    http://www.geocities.com/jimforkin2003/


    Original Message
    From: barrowman11 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ZT3f-rSik0aUWRYTmNtx4LMkEkMl7P7O7HVXwKmmp40ckj_5iEcyPtpHhl-OJPnHQKd0DbmQSbzB32MG]barrowman11@y...[/url
    Sent: Saturday, February 21, 2004 12:22 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: help with -1.0v to 1.0v variable output
    circuit


    Curtis,

    First of all, you need two power supplies, one positive (typ: +5V) and
    one negative (typ: -5V). This allows you to produce an output voltage
    that ranges from +1V to -1V. You can purchase power supplies with plus
    and minus outputs or you can easily build one out of two wall-warts
    and two regulators(positive and negative).

    The complete +1V to -1V circuit would consist of the following items.

    1. Positive and negative power supplies, with a common ground.
    2. BS2p Stamp (provides 2-wire I2C serial output to DAC)
    3. MAX517 8-bit 2-wire serial DAC (digital-to-analog converter)
    4. Three op amps (typ: use an LM324 which contains four op amps)

    I suggest connecting the above components in the following manner.

    1. The Stamp and DAC would run off the +5 supply.
    2. The LM324 runs off +5 and -5 supplies.
    3. The Stamp I2C output (2 pins) connects to the DAC and sends 0-255
    serial data
    4. DAC generates 0 to +5V output (in 256 steps)
    5. Resistor divider on output of DAC reduces span to 0 to +2V
    6. 0 to +2V goes into the positive input of the first non-inverting,
    unity gain op amp (which acts as a buffer)
    7. The second op amp is used to provide a buffered -1V reference.
    8. The output of the first op amp is summed with the -1V reference in
    the inverting input of the third unity-gain op amp.
    9. The output of third op amp will be your desired -1V to +1V in 256
    steps.

    If you are not familiar with the general circuits described above I
    would suggest referring to "Practical Electronics for Inventors'" by
    Scherz, available from Amazon.

    BTW, you could use any type of Stamp, not just a BS2p, to control a
    parallel DAC (typ: AD558), but it would tie up at least 9 pins on the
    Stamp.

    Dave



    --- In basicstamps@yahoogroups.com, "flightline2004"
    <flightlinemail@c...> wrote:
    > Kind Sirs:
    >
    > I am a newbie to basic stamps, but having built a couple of
    > circuits am having a ball!
    >
    > We need to control variable voltage from -1.0 to 1.0 volts, (1mA)
    > in maybe 10 mV increments. Could someone point me in the right
    > direction? Basic Stamp cookbooks have circuits 0-2.5V, 255 steps but
    > I cannot find any that can span into negative values.
    >
    > Thank you for looking at this!
    > Curtis



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.

    Yahoo! Groups Links
Sign In or Register to comment.