Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPM Calculations and Fuel? #2

Open
mattnj1975 opened this issue Jan 4, 2025 · 3 comments
Open

RPM Calculations and Fuel? #2

mattnj1975 opened this issue Jan 4, 2025 · 3 comments

Comments

@mattnj1975
Copy link

Hi,
I've built the circuit and am testing this, i have a question, where is the RPM>Alternator speed conversion...
Im assuming I need to use something like:-

const float multiplier = 1.0 / (3.5 * 4); // 3.5 is the alternator to crank pulley ratio for a 4 pole alternator.

I am also confused by:-

sensor->connect_to(new Frequency(6))
// times by 6 to go from Hz to RPM

As to convert from Hz to RPM you multiply by 60 not 6?

Matthew

@Boatingwiththebaileys
Copy link
Owner

Hi Matthew,

Thanks for raising this, its a really good question. I'll need to check that’s not a discrepancy in this code to what’s running on my boat, however, that 2nd calculation is just to calculate the RPM to go into the fuel calculation. What i get in SignalK is in Hz for RPM and then i use Kip for the conversion. Whats odd is both my fuel and RPM values are good. I'll check that out and come back to you.

@Boatingwiththebaileys
Copy link
Owner

Here is the SensESP V3 example of the RPM counter if that helps while i take a look at mine:

https://github.com/SignalK/SensESP/blob/main/examples/rpm_counter.cpp

@mattnj1975
Copy link
Author

Hi Matthew,

Thanks for raising this, its a really good question. I'll need to check that’s not a discrepancy in this code to what’s running on my boat, however, that 2nd calculation is just to calculate the RPM to go into the fuel calculation. What i get in SignalK is in Hz for RPM and then i use Kip for the conversion. Whats odd is both my fuel and RPM values are good. I'll check that out and come back to you.

Thanks, well you defo dont have the conversion from alternator speed (much faster than engine RPM) in your code in github and the fuel rate is out by a factor of 10...

There are a few other changes I have made, including saving the hours run for total runtime (not just uptime), built in NMEA2000 conversion and output and proper PCB..i will add/edit/fork it here when it finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants