How can I measure Duty cycle ?


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Location
    ist
    Posts
    13

    Default How can I measure Duty cycle ?

    Hello friends ,

    I`m trying measure my cars injectors duty cycle .
    Have any body experince about this ?

    For example ,
    injectors running pwm cycle ,
    if injectors full open ,I must see %100 duty cycle on the display.

    Im trying measure injectors cycle (ms) than calculate duty ,
    but this is not correct way I think .

    This kit ,
    http://www.jaycar.com.au/productView...=&SUBCATID=347

    working great ,They are use a 16F84 pic only .

    thanks
    Last edited by MaxiBoost; - 17th December 2006 at 18:19.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by MaxiBoost
    Hello friends ,

    I`m trying measure my cars injectors duty cycle .
    Have any body experince about this ?

    For example ,
    injectors running pwm cycle ,
    if injectors full open ,I must see %100 duty cycle on the display.

    Im trying measure injectors cycle (ms) than calculate duty ,
    but this is not correct way I think .

    This kit ,
    http://www.jaycar.com.au/productView...=&SUBCATID=347

    working great ,They are use a 16F84 pic only .

    thanks

    PBP...
    Use the Pulsin twice; once to measure the pulse width when low, then right after that, measure the pulse width when high. Add the two results together. Multiply the total result by 100 and divide that total by the pulse-high result and you'll get a percentage relating to a duty cycle. This will get you close, but not absolutely perfect. The total pulse width could change a lot between successive readings (i.e. during fast acceleration or deceleration) and completely ruin the end result. Maybe a little bit of software filtering or averaging over a couple of cycles added to the software.
    JDG

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    What about "Capture" ?


    ----------------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Yup that's the much accurate way if the PIC have the CCP module. Case not, Pulsin may work... but accuracy is pretty poor.

    So you can still detect the rising edge, start a timer, wait 'till falling edge. You have now the High Pulse measure. From there you reset the Timer and wait the next rising edge. There you have the Low pulse measure.

    Few maths later, you have the duty cycle.
    http://www.picbasic.co.uk/forum/show...36&postcount=4

    also look at this one
    http://www.picbasic.co.uk/forum/show...se+measurement

    HTH
    Last edited by mister_e; - 18th December 2006 at 04:10.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Nov 2006
    Location
    ist
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    Yup that's the much accurate way if the PIC have the CCP module. Case not, Pulsin may work... but accuracy is pretty poor.

    So you can still detect the rising edge, start a timer, wait 'till falling edge. You have now the High Pulse measure. From there you reset the Timer and wait the next rising edge. There you have the Low pulse measure.

    Few maths later, you have the duty cycle.
    http://www.picbasic.co.uk/forum/show...36&postcount=4

    also look at this one
    http://www.picbasic.co.uk/forum/show...se+measurement

    HTH

    Hi again and thank your answers ,

    Dear mister_e ,

    I give to a circuit example in my first message (jaycar kit) use a 16F84A ,
    This kit is working good and without any problem .
    What is your comment ? or have you another idea ?
    I think ,they must use very simple programme !
    16F84 not have ccp module .

    If you can help me ,thank you
    if you can not ,thank you again

    regards

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by MaxiBoost View Post
    Hi again and thank your answers ,
    16F84 not have ccp module .

    which is why I said to use the pulsin commands in the earlier post.

Similar Threads

  1. Replies: 9
    Last Post: - 8th October 2008, 11:15
  2. how to generate 83.33khz with 16.7% duty cycle?
    By donatelo in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 23rd September 2008, 17:08
  3. HPWM the old fashioned way
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 19th November 2004, 19:09
  4. PWM _ Duty Cycle in Tenths
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 17th May 2004, 12:09
  5. Duty Cycle Dilemmas
    By crankshaft in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th February 2003, 12:40

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts