Connect with us

Simple circuit for RS232 > 12 bit DAC?

Discussion in 'Electronic Basics' started by BR, Oct 3, 2003.

Scroll to continue with content
  1. BR

    BR Guest

    Any schematics of this? I want to control only one motor from a PC. What I
    need is high resolution control of velocity. Position isn't necessary. The DAC
    will connect to the control voltage input of an H-bridge that has a built-in
    PWM generator. The motor is a small Kollmorgen Servodisc.


  2. Bob Masta

    Bob Masta Guest

    How about the parallel port instead? If you are running under
    DOS (so you can write directly to the port) you can use a simple
    R-2R ladder. You might need to buffer the digital outputs on
    some ports if their levels aren't uniform on all bits. If you only
    use the data out port you just have 8 bits, but you can also
    use the control port to get another 4 if you're careful. (The
    control port bits will almost certainly need buffering since they
    have pull-ups.)

    For the 8-bit version you can check out the LPTX driver
    Help files for my Daqarta system at
    This discusses using the port for analog in and digital out
    as well as analog out, so read through for the DAC section.

    Hope this helps!

    Bob Masta

    D A Q A R T A
    Data AcQuisition And Real-Time Analysis
  3. John Fields

    John Fields Guest

  4. BR

    BR Guest

    Thanks Bob. I later realized how slow the serial port is. I forgot to check
    this thread and started another. Looked around and found a 12 bit DAC such as
    the MAX508. Should make it easier (I think) to get going since its interface
    is a byte wide (8+4). But for starters it'll be an 8 bit DAC or a R-2R ladder
    as the experiment may work with that resolution.

    A control port will be used for the foward/reverse ports on the H-bridge.


  5. BR

    BR Guest

    John, I made the mistake of considering RS232 as it's too slow. It'll be via
    parallel port. What is an all-hardware solution? I'm using Quickbasic on an
    old 133 machine. Just a bunch of loops to change velocity and will need to
    edit those values frequently. If the experiment (fluid study) shows a result,
    the program can be run again to repeat the result. It would be ideal to
    manually control motor speed with a pot and ADC (looking for certain fluid
    activity) while writing control data to disk, and then later playback the
    data. But this would be a little ahead of myself at this stage. Bet Quickbasic
    sucks for that.


  6. John Fields

    John Fields Guest

    At 9600 bits per second you can accumulate 12 bits in 2.083ms, including
    the overhead of the RS-232 start and stop bits and the wasted four bits
    of data, so that's doesn't seem too shabby for a motor control
    For RS-232, basically a comparator or something like Jim Thompson's
    MC1489,(just thought I'd mention it to save him a post!^) or one of the
    zillion chips Maxim's got to change the bipolar RS-232 signal into a 0
    to 5V logic signal, two 8-bit shift registers, a clock, some glue logic
    and your DAC or R-2R ladder.

    For the parallel port, it's a couple of HC373's or 375's and your DAC
    or R-2R ladder and probably a little glue logic if you can't control the
    registers with the port's control pins.
  7. BR

    BR Guest

    It depends on what you want to control. Might as well go with SPP being
    50Kbytes/sec or better. The more throughput, the smaller the steps can be
    during fairly rapid changes in velocity. I ordered a surplus S6M4H servodisc
    "pancake" because it's a DC brushed type with zero cogging. It's design is
    amazing to me.
    They do have zillions and ran into a 12 bit DAC with byte wide loading, like
    MAX508. Didn't know they made them. Maybe easier to use?

    It's been a while since I've looked into this stuff and really need to move
    beyond the CMOS 4000 series :)


Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day