This all started with wanting to log everything. I wanted a way to log prop slip or atleast calculate it from the datalog. So the problem with a boat is getting accruate speed data. You need speed to calculate the prop slip. GPS is the only way to get it and now that I have EFI I can datalog all the engine data. But what about speed. The ECU has an input for speed but I need to get it from the GPS module to the ECU. This is where an Arduino pro comes in handy.

Here is the code I used to extract the data from the GPS using TinyGPS++ library to parse the nmea0183 sentences and convert the speed to a pulse output.

Hopefully this next summer I will have a new GPS antenna with a higher update rate then I will re-program with Atmel Studio instead of Arduino IDE.

#include <avr/io.h>
#include <avr/interrupt.h>

#include <TinyGPS++.h>

// The TinyGPS++ object
TinyGPSPlus gps;

volatile float mph = 0.0;

void setup() {
  Serial.begin(4800); // setup GPS serial connection
  DDRD |= (1 << 1);  // digital pins 7-0 B00000010 set rx pin as input
  DDRB |= (1 << 0) | (1 << 1) | (1 << 5); // set pin 8, 9, 13 as output B00100011

  cli();  //disable interupts
  TCCR1A = 0;  //registers for timer 1 to 0
  TCCR1B = 0;
  OCR1A = 65535;
  TCCR1B |= (1 << CS11) | (1 << CS10);  // prescale of 64
  TCCR1A |= (1 << WGM11) | (1 << WGM10); // turn on PWM mode 15
  TCCR1B |= (1 << WGM12) | (1 << WGM13); // turn on PWM mode 15
  TCCR1A |= (1 << COM1A0); // Enable timer 1 Compare Output channel A in toggle mode
  //TIMSK1 |= (1 << OCIE1A);  // enable TIMER1 COMPARE INTERUPT
  sei();  //enable interupts
}

void loop() {
//OCR1A = (125000 / 5.2) - 2; // -2 works better then 1
//delay(10);
  if (!Serial.available()) {
    // rolls over at 1.9 so that is the minmum in can run with this prescale
    //mph = 1.91; // 0.1 = 1249999, 1.9 = 65788, 2.0 = 62499
    //OCR1A = 65535;//(125000 / mph) - 2; // -2 works better then 1
    return;
  }

  while (Serial.available() > 0) {
    if (gps.encode(Serial.read())) {
      if (gps.speed.isValid()) {
        mph = gps.speed.mph();
        if (mph < 2.0) {
          mph = 2.0;
        }
        // example if using different ppm then 1/sec
        // mph = pulse count / (pulse per mile / time period)
        // 17.0 = pulse count / ( 16000 ppm / 3600 sec/hr )
        // pulse count = 75.55 Hz
        // (((1 / mph) * timer freq) / 2) - 1
        // (((1 / mph) / (1 / timer freq)) / 2) - 1
        //mph = 100.8;
        OCR1A = (125000 / mph) - 2; // -2 works better then 1
      }
    }
  }
}

After programming the Arduino I still needed to setup the Holley EFI to read the pulses correctly.

Here is the settings for that.

Then I set up some math channel calculations and voila, got what I needed.

Here is the logged prop slip.

As you can see it is about 22% slip in most of the areas. That is way too much. It should be about 10%. The solution is to upgrade the prop from a 4 blade to 5 and get more traction per say.

The other reason I wanted to datalog the speed was to do some cool video overlays with the data like this.

From this video you can also see I am at only 75% throttle and just about on the rev limiter of 6400. That means I needed more pitch in the prop as well. Maybe just the 5 blade will take care of that but there is a lot left in her.

Here is how she looks and sounds from the shore during the same run.