• Welcome to Jetboaters.net!

    We are delighted you have found your way to the best Jet Boaters Forum on the internet! Please consider Signing Up so that you can enjoy all the features and offers on the forum. We have members with boats from all the major manufacturers including Yamaha, Seadoo, Scarab and Chaparral. We don't email you SPAM, and the site is totally non-commercial. So what's to lose? IT IS FREE!

    Membership allows you to ask questions (no matter how mundane), meet up with other jet boaters, see full images (not just thumbnails), browse the member map and qualifies you for members only discounts offered by vendors who run specials for our members only! (It also gets rid of this banner!)

    free hit counter

DIY GPS Speed Control Project

The one second delay may be due to minimal draw on the circut to discharge the relay, or there is a capacitor in the mix or it is has to do with resistance. The switch is marked resistive. I would be curious to know the voltage of the wires when not hooked up to the switch vs when they are. Also when the switch is depressed to either side.
 
The one second delay may be due to minimal draw on the circut to discharge the relay, or there is a capacitor in the mix or it is has to do with resistance. The switch is marked resistive. I would be curious to know the voltage of the wires when not hooked up to the switch vs when they are. Also when the switch is depressed to either side.
I'll find out. But the switch depressed to either side makes the voltage go to zero.

Also, been thinking and reading about the N2k a little bit. From reading your posts, if you are able to communicate (read / write) on the n2k protocol, then that seems the better way to go. That way (assuming my switch actually sends n2k commands to the connext screen) no matter which boat, the same setup would work.

I always tend to oversimplify, but if all it takes is a can bus shield to read/ write N2k, then that seems to be the way to go.
 
I did get the 2 way communication working but only after unplugging the joystick. Having two items with the same address in the network did not work out so well so I cloned the joysticks protocol with the Arduino. Using the interupt method caused errors on the connext screen as well. I am sure there is a way around that but I did not like the results so never spent the time to figure it out. I am focused on the swtich because that would support a lot more boats. Even my boat has wiring for it coming off the ecu with a 2.2k resistor clip shunting it. Of course ecus could have been reprogrammed but my thinking is they did not bother and connext just sits on top of that like everything else.

Ground ouput in both directions leads me to belive that we want to know what the output on the other side is when ground is given to one.
 
If you look at the service manual it shows you how the no wake switch is wired. It shows that the up/down outputs are connected to ground through a resistor when it's pressed. It also shows that there is a resistor bridging the switches, most likely to detect if there is a disconnected wire somewhere.
 
Where do you get ahold of a service manual?
 
The one second delay may be due to minimal draw on the circut to discharge the relay, or there is a capacitor in the mix or it is has to do with resistance. The switch is marked resistive. I would be curious to know the voltage of the wires when not hooked up to the switch vs when they are. Also when the switch is depressed to either side.

Ok, switch hooked up or not, the voltage is the same. The interesting thing, is the voltage drops to zero on one side, and to 2.4 on the other side when the button is pressed.

Also, I don't believe that I was correct in my earlier assumptions that this switch operates on the n2k protocol. I'm not sure what the little board is in the middle of the cable between the switch and the screen, but it looks like the three wires go all the way back to the screen.
 

Attachments

  • IMG_6380.JPG
    IMG_6380.JPG
    397.7 KB · Views: 15
  • IMG_6382.JPG
    IMG_6382.JPG
    370.6 KB · Views: 16
  • IMG_6376.JPG
    IMG_6376.JPG
    560.9 KB · Views: 16
  • IMG_6377.JPG
    IMG_6377.JPG
    765.1 KB · Views: 16
  • IMG_6378.JPG
    IMG_6378.JPG
    430.6 KB · Views: 16
  • IMG_6379.JPG
    IMG_6379.JPG
    393.1 KB · Views: 16
Your a man on a mission!! Keep up the work.
 
@seabass2020 There are most certainly resistors at play both before and in the switch. My guess is that the connext screen is picking up the the signal from the switch and passing that onto the ecus through the engine canbus. Same way it works on my boat but instead of a switch with resistance connected to the screen it is the joystick sending the signal over n2k.

This means that n2k likely would not work for your boat. I bet there are resistors in that little box and in the switch. If you tap into the wires just below the switch with the switch still connected (the resistor in the switch will now come into play) I wonder if the one second delay goes away? That delay would not help keeping things smooth. As for the rest of the setup I recommend going with an 10hz active external antenna gps module and using the tinygps++ library to grab ground speed and feed into the pid loop. I also recommend an arduino with good horsepower and memory like a mega or due.

Keep us posted.
 
@seabass2020 There are most certainly resistors at play both before and in the switch. My guess is that the connext screen is picking up the the signal from the switch and passing that onto the ecus through the engine canbus. Same way it works on my boat but instead of a switch with resistance connected to the screen it is the joystick sending the signal over n2k.

This means that n2k likely would not work for your boat. I bet there are resistors in that little box and in the switch. If you tap into the wires just below the switch with the switch still connected (the resistor in the switch will now come into play) I wonder if the one second delay goes away? That delay would not help keeping things smooth. As for the rest of the setup I recommend going with an 10hz active external antenna gps module and using the tinygps++ library to grab ground speed and feed into the pid loop. I also recommend an arduino with good horsepower and memory like a mega or due.

Keep us posted.

Well, I also get a slight delay just pushing the actual button itself. But, i think you are spot on with the way the connext screen is receiving signal.

I don't really feel like the delay will cause any problems. I don't think I want to make RPM changes any faster than one second anyway. And I'm using the exact setup you recommended (except I'm using an UNO at the moment). External GPS with the tinygps library and feeding the target speed / current speed into a PID loop and returning a number from 1-15 (corresponding to total button clicks available). Just have to finish up a little bit of code.... I'm using a button to tell the arduino to use current speed as target speed (obviously this could change later). Should be ready to test on Saturday.
 
So glad you are pursuing this. The uno may be enough where it is not handling full n2k communication which takes a lot of resources. Of course the gps is nmea but that tinygps library helps cut out all of the uneeded stuff.

My concern with the one second delay ....Lets say you poll every 1/10 second and apply action every one second, it will be another one second before the update is applied with your current delay and the power transfer to the water get to that speed is not instant so lets say another second. In 3 seconds an agressive wakeboarder can apply a lot of load to the boat or a hard turn in a tight, quite, smooth water cove can bleed a great deal of speed rapidly. Add to that your update is coming in late so is it even enough? I recommend considering finding a way to add rate of turn into the logic as you will need bump up more as it increases and then back down more as it decreases.

Along the same line if the boarder cuts out hard then takes the pressure off before cutting back in to get some air then the load goes rapidly gone up, down, up, and down again in large increments. Depending on when the measurement was taken and the action applied the result could be the opposite of what you want with a large delay so adding a capcitor to bleed the relay coil or other hardware component depending on what the issue is will net a better result. Also is the relay needed? Will pwm or analog out work?

Regardless I want to say great work and I am anxiously awaitng to hear about your results.
 
When you say the voltage drops to zero on one side and to 2.4 on the other side, can you be more specific about which wires you're taking the readings from?

Being that there are resistors which connect the ground to the switch output at all times, there'd have to be very little current flowing through it. I'm not surprised that the voltage swings slowly. I bet the ECM triggers on a particular voltage threshold above 0v.
 
So glad you are pursuing this. The uno may be enough where it is not handling full n2k communication which takes a lot of resources. Of course the gps is nmea but that tinygps library helps cut out all of the uneeded stuff.

My concern with the one second delay ....Lets say you poll every 1/10 second and apply action every one second, it will be another one second before the update is applied with your current delay and the power transfer to the water get to that speed is not instant so lets say another second. In 3 seconds an agressive wakeboarder can apply a lot of load to the boat or a hard turn in a tight, quite, smooth water cove can bleed a great deal of speed rapidly. Add to that your update is coming in late so is it even enough? I recommend considering finding a way to add rate of turn into the logic as you will need bump up more as it increases and then back down more as it decreases.

Along the same line if the boarder cuts out hard then takes the pressure off before cutting back in to get some air then the load goes rapidly gone up, down, up, and down again in large increments. Depending on when the measurement was taken and the action applied the result could be the opposite of what you want with a large delay so adding a capcitor to bleed the relay coil or other hardware component depending on what the issue is will net a better result. Also is the relay needed? Will pwm or analog out work?

Regardless I want to say great work and I am anxiously awaitng to hear about your results.

Well the one second delay puts everything on hold. So it won't make another PID calc until the delay is up. You've brought up a lot of good questions and I really don't know until I try it out and see what happens.

I'm basing my logic mostly on the fact that when i am driving I never bump the RPM button more than once every few seconds. I think the one second delay would be a huge problem if the RPM interval was infinite, but because it's 200, the one second seems good for the boat to respond anyway. While I'm not really sure, I don't think the rider loading and unloading on the line will have much affect on the speed that would need to be compensated for that quickly. Again, I'm sure you have very valid points, and hopefully I've have some answers on Saturday.

Also, I am no longer using a relay. Because it's higher than 5 volts, I can't directly hook it up to the analog out. I am using a CD4066 chip which gives me 4 circuits I can open or close (again, i'm a rookie with electronics).
 
When you say the voltage drops to zero on one side and to 2.4 on the other side, can you be more specific about which wires you're taking the readings from?

Being that there are resistors which connect the ground to the switch output at all times, there'd have to be very little current flowing through it. I'm not surprised that the voltage swings slowly. I bet the ECM triggers on a particular voltage threshold above 0v.

There are 3 wires. Ground, Up and Down. If I press down, it's 0 volts between gnd and down. Up and GND will be 2.4. Let go of the button and it's the 6.7 volts between gnd and down.

Also, I have totally removed the switch and just used the arduino to close the contacts with GND and UP or DOWN and the voltage still moves slowly.
 
I wouldn't worry too much about the voltage moving slowly. It could have a lot to do with how your voltage meter is reading things, and could introduce some latency. I know myself I tap up/down quickly at times on the no wake control and it registers each click. I don't know exactly how quickly I've clicked it but it's definitely a few times a second.

It does seem a bit odd that on the down press it pulls the voltage from 6.47v to ground, but on the "up" signal it only pulls it down to 2.4v. Based on the schematic, it would appear that the up signal behavior makes more sense. Maybe the schematic isn't entirely correct? Maybe the "up" signal is wired to register on 2.4v instead of 0v to prevent accidental acceleration if the wire was ever to be shorted out somehow? Pulling the "up" signal to ground might throw some sort of error code instead to prevent any issues.
 
I wouldn't worry too much about the voltage moving slowly. It could have a lot to do with how your voltage meter is reading things, and could introduce some latency. I know myself I tap up/down quickly at times on the no wake control and it registers each click. I don't know exactly how quickly I've clicked it but it's definitely a few times a second.

It does seem a bit odd that on the down press it pulls the voltage from 6.47v to ground, but on the "up" signal it only pulls it down to 2.4v. Based on the schematic, it would appear that the up signal behavior makes more sense. Maybe the schematic isn't entirely correct? Maybe the "up" signal is wired to register on 2.4v instead of 0v to prevent accidental acceleration if the wire was ever to be shorted out somehow? Pulling the "up" signal to ground might throw some sort of error code instead to prevent any issues.


Not sure about the up /down. It works both ways. If i push up, up goes to 0, and the down wire goes to 2.4. If i push down, the down wire is 0 and the up is 2.4.

Also, If i didn't wait until the voltage read zero, then the boat didn't seem to register that i was "pressing" the button. However, no wake mode doesn't show the speed increments like it does on cruise assist. It will be easier to understand once it's on the water.
 
Ah, ok, that's odd.

It would be interesting to disconnect the switch then measure the resistance between the ground and the switch outputs, and the switch outputs themselves when the switch is open and pressed up/down. It should provide an idea of how it's wired internally. There may be no resistors in the switch at all, they may all be inside the ECM.
 
Ah, ok, that's odd.

It would be interesting to disconnect the switch then measure the resistance between the ground and the switch outputs, and the switch outputs themselves when the switch is open and pressed up/down. It should provide an idea of how it's wired internally. There may be no resistors in the switch at all, they may all be inside the ECM.

You know, I tried that, but I was unable to get a reading on my meter. It's one that I have to select the ohm range on, and I was unable to get a reading on it in any setting.
 
You usually have to switch the plugs on the meter to the Ohm plug instead of the Volts plug.
 
Well I've come full circle on this. Although I saved the PID version, I decided to remove the PID calc from my loop altogether. As I understand it, PID is a way of adjusting the correct AMOUNT of input to acheive a desired output without over correcting. In my case, I can only either go up or down on the input. And, it takes one second to do that. With that in mind, I found myself adjusting down the output of the PID loop until basically all it did was tell the boat to press Cruise Down if the target speed was less than current speed or vice versa.

So I ripped the PID loop out. I setup a Dead Zone where the boat will make no adjustments if it falls in that range. And then it will increment once per second to speed up/down depending on the GPS speed. I realize that puts me pretty close to where @Mainah was, but I'm hoping that with a deadzone, and the slower refresh rate that my results will be a bit smoother. I'm also not so worried about maintaining a super tight MPH hold. I'd be happy with +/- 1.5 and +/- 1.0 would be super awesome. Currently with my wife driving, we're at about +/- 8 mph.

Just waiting for Saturday to test this out. I attached a picture of my arduino as it sits now.
 

Attachments

  • IMG_6390.JPG
    IMG_6390.JPG
    541.3 KB · Views: 14
Back
Top