Page 1 of 1

Reading PWM output from a sensor

PostPosted: Mon Nov 27, 2023 2:38 pm
by evanpol
Hi,
I have a M150 ecu and am struggling find a way to read a frequency from a PWM output flow rate sensor through M1 Build.
Apologies if this is a simple task but I haven't been able to find any help in the manual nor the forums.

Thanks in advance for any help!

Re: Reading PWM output from a sensor

PostPosted: Mon Nov 27, 2023 3:59 pm
by David Ferguson
It looks to me like the GP packages have an object for fuel flow that you can use as an example (or just use). See "Fuel Flow Supply" and " Fuel Flow Return". Specifically look at the help for "Fuel Flow Supply Sensor" for details on how to configure this.

Basically, you assign an available "DIG/UDIG x Hybrid A" to the "Fuel Flow Supply Sensor Resource", then use the matching "DIG/UDig x" for the "Fuel Flow Supply Sensor Digital Decode Resource", configure per the "Fuel Flow Supply Sensor" help. Note the detected frequency is mapped to the Voltage for the Translation and Diagnostics with 0=0h, and 5V= 5000hz.

If you want Duty Cycle instead of frequency, then use "Hybrid B" instead of "Hybrid A" above. The mapping is 0V = 0% and 5V = 100% duty cycle.

Re: Reading PWM output from a sensor

PostPosted: Tue Nov 28, 2023 10:53 am
by evanpol
Thanks for the quick reply, I'm not too familiar with the GP packages and not sure if they're directly available to me.
I'm struggling to find the fuel flow supply resources you mentioned. Could you perhaps provide a more in depth explanation?

Re: Reading PWM output from a sensor

PostPosted: Tue Nov 28, 2023 10:58 am
by Stephen Dean
Hi,

If you go to MoTeC Online, you should have access to download a version of one of the GP Packages from there.

Re: Reading PWM output from a sensor

PostPosted: Tue Nov 28, 2023 11:04 am
by David Ferguson
In your M1 Build Project (probably based off of the GPA Project), look at the object tree for "Fuel", then "Flow" under that, then "Supply" -- that is the object that does exactly what you are asking (allows configuration to read a frequency from a PWM input).

As Stephen has said, you can download one of the GPA Packages, and open it in M1 Tune. Use an All Calibrate window to explore "Fuel Flow Supply", and the F1 Help for the objects I mentioned.