Shop OBEX P1 Docs P2 Docs Learn Events
Digital to Analog Converter with Stamp — Parallax Forums

Digital to Analog Converter with Stamp

ArchiverArchiver Posts: 46,084
edited 2000-03-18 22:09 in General Discussion
Does anyone know if a Basic Stamp can be used for D to A converter. I
think that it can but have no idea how. If anyone has done this before and
has some information I would like to review this to get me thinking on the
right track. Also what type of stamp needs to be used.

Thanks
John

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-03-18 01:49
    Sure, the PWM command can generate a voltage across a capacitor. Of course,
    if you are pulling any load, you'll need a transistor or op amp buffer.
    Also, you can't do anything while charging the capacitor.

    You can also use a PAK-V for this. Then you get 8 channels of PWM that all
    run all the time and the Stamp can do other things.
    http://www.al-williams.com/awce/pak5.htm

    Regards,

    Al Williams
    AWC
    * Stamp project of the month at http://www.al-williams.com/awce


    >
    Original Message
    > From: JOHN8003@a... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=_-A2VpAbX6iB4AHzn3tI8hT5fkzIFj8-9ppAMzXuUhyU33vGQk12AG6pjO580FDnaWcOMLNZbeY]JOHN8003@a...[/url
    > Sent: Friday, March 17, 2000 7:23 PM
    > To: basicstamps@egroups.com
    > Subject: [noparse][[/noparse]basicstamps] Digital to Analog Converter with Stamp
    >
    >
    > Does anyone know if a Basic Stamp can be used for D to A converter. I
    > think that it can but have no idea how. If anyone has done this
    > before and
    > has some information I would like to review this to get me
    > thinking on the
    > right track. Also what type of stamp needs to be used.
    >
    > Thanks
    > John
    >
    >
    > eGroups.com Home: http://www.egroups.com/group/basicstamps/
    > http://www.egroups.com - Simplifying group communications
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-03-18 04:34
    D/A should be easy since you just can use a summing amp with integration.
    There is probably an easier way than this but it will work .. ( I think )
    assuming you have say a byte of data. Send the data out to a serial in parrallel
    out
    shift reg and then take each of the 8 outputs via a weighting resistor to the
    summing junction of
    an op amp. the output will be the analog of the original byte.
    A nother way is to use an A/D convertor ( see STAMP app for this ) and
    make closed loop with successive approx.

    rom: JOHN8003@a...
    Date sent: Fri, 17 Mar 2000 20:23:19 EST
    To: basicstamps@egroups.com
    Send reply to: basicstamps@egroups.com
    Subject: [noparse][[/noparse]basicstamps] Digital to Analog Converter with Stamp

    > Does anyone know if a Basic Stamp can be used for D to A converter. I
    > think that it can but have no idea how. If anyone has done this before and
    > has some information I would like to review this to get me thinking on the
    > right track. Also what type of stamp needs to be used.
    >
    > Thanks
    > John
    >
    >
    > eGroups.com Home: http://www.egroups.com/group/basicstamps/
    > http://www.egroups.com - Simplifying group communications
    >
    >


    ron... the motor man...
    Ronald Doctors
    http://www.members.home.net/rdoctors
  • ArchiverArchiver Posts: 46,084
    edited 2000-03-18 10:26
    At 08:34 PM 3/17/00 -0800, you wrote:
    >D/A should be easy since you just can use a summing amp with integration.
    >There is probably an easier way than this but it will work .. ( I think )
    >assuming you have say a byte of data. Send the data out to a serial in
    parrallel out
    >shift reg and then take each of the 8 outputs via a weighting resistor to
    the summing junction of


    At this point you could also use an R2R resistor ladder...




    2R
    D0 >--/\/\--o
    |
    < R
    >
    2R |
    D1 >--/\/\--o
    |
    < R
    >
    2R |
    D2 >--/\/\--o
    |
    < R
    >
    2R |
    D3 >--/\/\--o
    |
    < R
    >
    2R |
    D4 >--/\/\--o
    |
    < R
    >
    2R |
    D5 >--/\/\--o
    |
    < R
    >
    2R |
    D6 >--/\/\--o
    |
    < R
    >
    2R |
    D7 >--/\/\--o----> Analog Output (0-5V)


    Note: if R = 1K, then 2R = 2K


    ...If you could "Spare" the pins, you could use this idea right off of
    the Stamp, without the use of a shift register.


    >an op amp. the output will be the analog of the original byte.
    >A nother way is to use an A/D convertor ( see STAMP app for this ) and
    >make closed loop with successive approx.
    >
    >rom: JOHN8003@a...
    >Date sent: Fri, 17 Mar 2000 20:23:19 EST
    >To: basicstamps@egroups.com
    >Send reply to: basicstamps@egroups.com
    >Subject: [noparse][[/noparse]basicstamps] Digital to Analog Converter with Stamp
    >
    >> Does anyone know if a Basic Stamp can be used for D to A converter. I
    >> think that it can but have no idea how. If anyone has done this before and
    >> has some information I would like to review this to get me thinking on the
    >> right track. Also what type of stamp needs to be used.
    >>
    >> Thanks
    >> John
    >>
  • ArchiverArchiver Posts: 46,084
    edited 2000-03-18 22:09
    Beau,

    You forgot one 2R resistor to ground for the D/A. (See below)



    GND
    o
    |
    < 2R <--- Add this one
    >
    2R |
    D0 >--/\/\--o
    |
    < R
    >
    2R |
    D1 >--/\/\--o
    |
    < R
    >
    |

    etc, etc.


    Jared
    Electrolinx - http://www.geocities.com/electrolinx/
    VB Overdrive - http://extreme-vb.net/vboverdrive/
Sign In or Register to comment.