Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

0-5V input, 0-20mA output via NDP2

NDP2 0-5V 0-20mA V to I converter

  • Please log in to reply
5 replies to this topic

#1 Darrell L.

Darrell L.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 24 March 2015 - 11:30 AM

Firstly, let me say that Ive learned a TON of things about embedded development from this community and after lurking  :ph34r:  in and out of the forums for some time, its now my turn to share some of the knowledge that Ive acquired as a result.

 

This is also my first every write-up of any kind... so kindly let me know how I did!!! 

 

Having a requirement for a 0-5V input to a 0-20mA output, Ive arrived at the circuit contained within the attached .ZIP file (VtoI.png).  This is by no means my final circuit (as there is always room for improvement) but it is what Im using at the moment and it fills the need.

 

This circuit is comprised of two parts:

  1. The actual V to I converter (XTR111)
  2. The 12bit DAC (controlled via the NDP2s SPI bus)

 

Lets look at the first part:

 

The XTR111s circuit is setup according to the devices application notes.  One minor change Ive implemented is the ability to trim the output current so that at 0.000V input youd get 0.000mA as well as being able to adjust the output to 20.000mA when the Vin pin has 5.000V applied it.

 

 

And the 2nd part:

 

The LTC1257 DAC is a 12bit device capable of outputting 0.000V to Vref volts (there is a limitation to this.  Please refer to the devices datasheet for complete details).  The DAC itself requires a 12bit WORD in order to operate.  A 12bit WORD in this case is the lower 3 nibbles of 2 bytes.

 

To set the DACs output to the desired voltage level, you need only do the following:

  1. Apply 5.000V to Vref (the more accurate your Vref voltage, the more accurate your output voltage will be).

 

  1. Use the following formula to calculate the desired output level (refer to the source code example for greater detail)
    • 4095 * dacOutputVoltage / Vref

 

  1. Write the value to the device via the SPI bus.

 

In order to calibrate the 0-20mA output, you simply need to set the DACs output to 5.000V and adjust the trim pot to give you 20.000mA at the Iout output (use an ammeter connected directly between the Iout and Iout return terminals).

 

Its a pretty simple setup.  Took me a couple of hours of noodling to get it right.

 

Ive attached the source code, related datasheets and a simple schematic in order to complete this example.

 

Hope you enjoy reading this (and prototyping it?) as much as I had going through the excersise. :D

 

Attached Files


"Ever since you've fixed that paper jam, my computer has been running slower."


#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 24 March 2015 - 01:10 PM

Very nice, congrats!

To who's reading, this circuit may be useful for current-loop circuit, that is "sending" an analog signal over a very long cable. The more straightforward and intuitive voltage-way leads to pretty high errors.

 

You should have to post it in the "showcase" category: it seems more appropriate.


Biggest fault of Netduino? It runs by electricity.

#3 Darrell L.

Darrell L.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 24 March 2015 - 01:46 PM

Very nice, congrats!

To who's reading, this circuit may be useful for current-loop circuit, that is "sending" an analog signal over a very long cable. The more straightforward and intuitive voltage-way leads to pretty high errors.

 

You should have to post it in the "showcase" category: it seems more appropriate.

 

Thanks, Mario... I'll be sure to post it in the showcase.  ^_^


"Ever since you've fixed that paper jam, my computer has been running slower."


#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 25 March 2015 - 01:15 AM

Thanks for sharing this, Darrell!

#5 Dr Who

Dr Who

    Advanced Member

  • Members
  • PipPipPip
  • 261 posts
  • LocationNYC

Posted 25 March 2015 - 04:13 AM

The part described, XTR111 is a current loop transmitter. It is made by TI, originally Burr-Brown. And they also make a receiver, which called RCV420. 

 

I got interested in them when I found out that HP now Agilent now something else entirely made optoisolators who do the same thing, but for translating digital signals into the methods.

 

And I must say your ideas do hold merit. But please investigate the receiving chip to make sure the generated signals make sense.

----

And Chris please check to see why there are four Yeti outside your offices......



Doctor Who
"This signature does not exist!"

#6 Darrell L.

Darrell L.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 26 March 2015 - 07:54 PM

The part described, XTR111 is a current loop transmitter. It is made by TI, originally Burr-Brown. And they also make a receiver, which called RCV420. 

 

I got interested in them when I found out that HP now Agilent now something else entirely made optoisolators who do the same thing, but for translating digital signals into the methods.

 

And I must say your ideas do hold merit. But please investigate the receiving chip to make sure the generated signals make sense.

----

And Chris please check to see why there are four Yeti outside your offices......

Didn't know about the receiver IC... will look into this.  Thanks!

 

As for the generated signals, they do make perfect sense.  I currently have the circuit in an automated test fixture and have confirmed that the desired programmed currents are indeed what they should be (all via a series ammeter, of course).

 

Regards,

 

D.


"Ever since you've fixed that paper jam, my computer has been running slower."






Also tagged with one or more of these keywords: NDP2, 0-5V, 0-20mA, V to I, converter

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.