Hi All,

I want to measure the Duty Cycle of piezo automotive (in particular diesel) injectors where typical idle on-time is 500us and full load is 1000us. Results will be used in a feedback loop to control other parameters. The clincher is shortest period will be around 20ms or 50hz frequency at maximum revs so the pulses are far between noting only one cylinder's injector needs to be monitored.

With gasoline solenoid injectors this is easy as their on-time is measured in ms so DC math follows the traditional (on-time*100)/off-time.

I can probably rig up some analog stuff to integrate the pulses and then scale the output voltage in A2D measurement but the varying frequency component will have major effects and is totally devoid of digital precision in the acquisition section.

I can't think of any way to measure/calculate DC without first defining what 100% DC is in microseconds - can this be done otherwise in real time? PIC of choice is 16F88 but can be changed if required.

All suggestions appreciated.

Regards,
Bill