How to send 4-20mA (1/3000 resolution)

BronsonBronson Posts: 44
edited August 2010 in BASIC Stamp Vote Up0Vote Down
Hi,

I am doing a project using BS2 that need to send 4-20mA signal (1/3000 resolution).

The workflow is: After BS2 receiving input through RS-232 (ASCII), it will send 4-20mA signal.

I have no problem receiving ASCII data through RS232 and process the ASCII with BS2, but I have zero-knowledge about sending 4-20mA using BS2.

By browsing this forum, I found that I need DAC (16-bit for 1/3000 resolution). Can I use MAX5661? How to do the wiring between MAX5661 (or any 16-bit DAC) and BS2? How to do the BS2 code?

Pls help me.....Thx a lot

Bronson Alex

Comments

  • 8 Comments sorted by Date Added Votes
  • BronsonBronson Posts: 44
    edited August 2010 Vote Up0Vote Down
    Is AD421 (DAC 12-bit Serial-interface) suitable for BS2?
  • PJAllenPJAllen Banned Posts: 5,065
    edited August 2010 Vote Up0Vote Down
    Here's a recent Subject that dealt with 4-20mA:
    http://forums.parallax.com/showthread.php?t=120302&highlight=20mA

    Unfortunately, the ascii-art didn't exactly translate with the Forum's migration to its present format (if you copy and paste it into Notepad, it'll probably come right, with Lucida Console.) When it comes to pics I always post Dwgs, text is for text.

    For the DAC'ing, go to the Parallax http://www.parallax.com store site and search for DAC. You'll find links to sample programs, etc., which should provide clues for you if not for your specific device.
  • PJAllenPJAllen Banned Posts: 5,065
    edited August 2010 Vote Up0Vote Down
    Attached is a dwg for a current source (regulator.)
    It's not ascii-art, but it'll have to do.
    377 x 317 - 51K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 20,594
    edited August 2010 Vote Up0Vote Down
    The AD421 should work fine with the BS2. Since it's a loop-powered transmitter, you could even use it with digital isolators between it and the Stamp.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away.

    -Antoine de Saint-Exupery

    We had many discussions at the galley table and there had been many honest attempts to understand each other's thinking. There are several kinds of reception possible. There is the mind which lies in wait with traps for flaws, so set that it may miss, though not grasping it, a soundness. There is a second which is not reception at all, but blind flight because of laziness, or because some pattern is disturbed by the processes of the discussion. The best reception of all is that which is easy and relaxed, which says in effect, "Let me absorb this thing. Let me try to understand it without private barriers. When I have understood what you are saying, only then will I subject it to my own scrutiny and my own criticism."  This is the finest of all critical approaches and the rarest.

    The smallest and meanest of all is that which, being frightened or outraged by thinking outside or beyond its pattern, revenges itself senselessly; leaps on a misspelled word or a mispronunciation, drags tricky definition in by the scruff of the neck, and, ranging like a small unpleasant dog, rags and tears the structure to shreds.


    -John Steinbeck, The Log from the Sea of Cortez
  • BronsonBronson Posts: 44
    edited August 2010 Vote Up0Vote Down
    Phil, Could you pls send me the wiring diagram for using AD421?

    Thx
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 20,594
    edited August 2010 Vote Up0Vote Down
    I don't have a wiring diagram. The AD421 datasheet includes the information you need. Aslo, there's a schematic on this page that shows the AD421 connected to a PIC. The connection would be similar for a BASIC Stamp.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away.

    -Antoine de Saint-Exupery

    We had many discussions at the galley table and there had been many honest attempts to understand each other's thinking. There are several kinds of reception possible. There is the mind which lies in wait with traps for flaws, so set that it may miss, though not grasping it, a soundness. There is a second which is not reception at all, but blind flight because of laziness, or because some pattern is disturbed by the processes of the discussion. The best reception of all is that which is easy and relaxed, which says in effect, "Let me absorb this thing. Let me try to understand it without private barriers. When I have understood what you are saying, only then will I subject it to my own scrutiny and my own criticism."  This is the finest of all critical approaches and the rarest.

    The smallest and meanest of all is that which, being frightened or outraged by thinking outside or beyond its pattern, revenges itself senselessly; leaps on a misspelled word or a mispronunciation, drags tricky definition in by the scruff of the neck, and, ranging like a small unpleasant dog, rags and tears the structure to shreds.


    -John Steinbeck, The Log from the Sea of Cortez
  • BronsonBronson Posts: 44
    edited August 2010 Vote Up0Vote Down
    Thanks Phil...
    I will try your suiggestion right away.
Sign In or Register to comment.