infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 1 of 1

Thread: How to work out a formula for the duty cycle

  1. #1
    New Member New Member speculor is on a distinguished road
    Join Date
    Feb 2017

    How to work out a formula for the duty cycle

    I am implementing a 4-20mA current loop to my PIC. I have everything working.
    I am measuring the distance away from an object.
    When I hardcoded the distance as 300 the output voltage is 4V and when the distance is 12cm the output voltage is 0.8V.
    These values are got because the current needs to be 200uA before it enters the current loop.
    The current loop has a gain of 100, therefore giving 20mA on the output.
    The resistor I use is 20K.
    Here is the datasheet of my proximity sensor:

    (300cm) Current=420K=200uA×100=20mACurrent=420K=200uA×100= 20mA
    (12cm) Current=0.820K=40uA×100=4mACurrent=0.820K=40uA×100 =4mA

    The problem is I have to work out a formula for the duty cycle to get these values.
    The formula I am using is D.C = 300×2.2+158=818300×2.2+158=818 which gives 4V but if i substitute 12 for 300 I get 184 which does not correspond to 0.8V which is what I need.

    Can anyone help on this, if I am going about the wrong way or what way I need to approach this.
    Thank you

    Click image for larger version

Name:	4-20mA_LT1013_XTR115.jpg
Views:	0
Size:	30.2 KB
ID:	2779
    Last edited by speculor; Feb 15th, 2017 at 11:59 PM.

+ Reply to Thread

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.

Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.