Sailboat Support

This is not an easy job to accomplish.

Unfortunately not enough wind for testing today :frowning:

I have had a chance to do some more work on the code and wind-vane sensor instead. The code is now set up to do auto mode in a fairly basic way, I think it should be good enough to get stated with hopefully.

I was thinking about the wind vane design and the one I had planed to base my design on turned out to be 20cm long with the ‘flag’ 20cm tall this would have been nearly as big a the jib! So I decided to take my potentiometer apart to try and reduce the force needed to turn it. I found the fantastically smooth action was due to a sort of wiper pumping round a load of grease inside.

I tried cutting the wiper off to remove the pumping action but ended up just removing all the grease. Now with a spray of WD40 it spins much more freely. I have printed a mount to attach to the pot to the deck and the new plan to make as big a ‘flag’ as will fit without hitting the jib, probably out of foam board.

Then I think the best thing to do is just go and try it on the water.

ps, I also swapped the throttle control back so stick down is sheet in.

1 Like

That’s looking good!

Managed to do some proper testing today and a little work on the code.

Unfortunately my telemetry radio still hasn’t arrived so I took a wifi telemetry unit off a copter. I set this up using the same serial parameters as I have on copter and plane but it wouldn’t load the parameters. It connects fine and shows the HUD and location but won’t load the parameters, I have tried a few different baud rates but no luck. So I have frsky pasthrough telem that only works when disarmed and wifi telem that wont load parameters. Due to this I was unable to do any on the water tuning up. Any idea whats at the root of these weird telemetry issues?

Apart from those problems the new code worked quite well, the steering controller does a good job of keeping it in a straight line on all points of sail, it does have a tendency to tack round quite far but I think this is mostly due to me holding the stick over as you would in manual the target heading then ends up too far round. I think its the slowing right down as it goes trough the wind, then suddenly the sail fills and its off again, it takes a while to get sorted on the new tack. I expect a tune up of parameters would solve this but I was unable to do any tuning up. The auto sail setting worked OK, it was abit tricky on my small bit of water as the wind was quite shifty. I had it set up so the transmitter knob allows you to offset the home heading by ± 180 deg. This adjustment is so course its impossible to set it correctly, I have changed it to ± 45 deg, I think this should be plenty for most situations and will allow much finer control. The sail setting is still a bit hit and miss, but i’m not sure we can get much better without the proper wind vane. A steady wind and a tune up of the ideal sail angle parameter should help though.

Then I went on to try a downwind auto mission, this worked well no problems at all except some of the legs were abit too tight to the wind, again the controller could probably do with a tune up.


This map seems to have lost the first and last waypoints for some reason.

Hopefully tomorrow I can get the wind vane fitted and try out my new upwind sailing auto code.

1 Like

Nice video. Although the wind was calm, and it is hard to tell by the video, the sails look to flat. You may want to ease the outhaul to create about 25 - 30mm of a belly in the sails. They just looked stretched to tight with no Camber/ Draft in them at all. These little boats are sensitive to improperly " tuned " sails and you may see a big performance/ handling improvement. Notice the belly in the sails of 95 and 77.
Version:1.0 StartHTML:000000275 EndHTML:000652613 StartFragment:000652060 EndFragment:000652439 StartSelection:000652060 EndSelection:000652439 SourceURL:https://onedrive.live.com/?cid=C359165FD8509D0A&id=C359165FD8509D0A!23023&parId=C359165FD8509D0A!996&o=OneUp

@David_Boulanger Yeah your right, the whole rig is badly setup at the moment, I haven’t had time to do it properly.

I have found a issue with having zero throttle being sheets fully in, I keep accidentally disarming when tacking upwind in manual, I cant think of any way to get round this except changing the stick arming method, I guess if we add a separate sail input then we can put the throttle on the right stick and only use it for arming.

I manged to get the bottom of the frsky-telem not working. It turns out that logging to the SD card some how disables it, with logging turned off it works fine all the time. I saw some reports of bad SD cards causing this but the logs from yesterday seem perfect, I have tried a formatting and different SD cards with the same result, I guess is just F405-wing issue. So I have no logs from today’s testing.

I have installed the wind vane and it works perfectly! Setting up the parameters didn’t take to long although turning the boat round with the USB plugged in did cause me to half rip off the USB header so hopefully my proper telemetry shows up tomorrow and works better than the WiFi one. I also ran into another f405-wing issue, the analog input doesn’t work unless you disable the battery monitor. Not sure why this is as the RSSI library reads it fine and as the new library is based on that I would think it would also work, not too sure whats going on, I tried changing the RSSI to a different pin even though its disabled, at least it seams someone else has this issue too https://github.com/ArduPilot/ardupilot/issues/8920.

Then I went and did some more auto testing this time with the upwind code. The wind vane defiantly works better than the constant wind direction, although it probably helped that the wind was abit less shifty. It worked well in the stronger winds but did get stuck in the lighter bits. I ended up making a in the field extension.

Now is proven to work I will do a more permanent flag, I think just the more area the better, possibly raising it up would help too. I wanted to avoid having delicate bits sticking out all over the place, it only just fits in the car as it is.

I set up a basic 2 waypoint mission one upwind and one downwind followed by a RTL. It tacks upwind fine it tacks about every 6 foot though. I must have made a error somewhere in the code. I wondered if the sticky wind-vane was causing it to think the wind was changing direction so it would tack back but the quick tacking persisted with the constant wind heading setting.

This vid is 50% auto mode and 50% me taking over in acro to avoid boats and banks and things, I wonder if object avoidance would work…

4 Likes

This is great that things are progressing. Have you sailed RC Sailboats before? I have some other input but I don’t want to sound like a know it all because I am not. I just happen to sail these things competitively. I will watch the video again a few times. Some of the sail trim is a bit off to me on the first watch of the video. Again, I don’t want to sound like I’m the RC Sailing King, thanks for all this effort. The way I see it the better the boat is set up the better the code will work.

2 Likes

not RC, but lots of dingy sailing, I’m glad of the feedback, my rig is raked too far back I think at the moment? The sails are a bit of a botch job and don’t set very well. Once the code is broadly working well we can get the fine trim stuff sorted hopefully. Probably some of it could be tuned with the existing parameters but its too much effort without my telemetry working properly. It would be great if you could do some testing on one of your sailboats, I can compile the firmware for your hardware.

1 Like

Pete,

This is really fantastic progress! I wonder if you’d want to do a blog post? Basically it’s just the same as a discussion but set the category to “Blog” and also put the video right at the very top of the input box. If that’s too much of a pain I can copy-paste some of the important bits you’ve said above and blog it for you.

I would be happy do a blog post, hopefully in a day or two I can have auto working better and do a nicer vid without me having to take over to doge obstacles. Hopefully my telemetry will turn up, although I am considering swapping to a pixhawk lite to get around all these odd issues I’m having with the f405 wing, I will need another analog input too when this wind sensor turns up.

I have this EC12 to repurpose. I don’t sail it competitively anymore. I have a spare Pixhawk 1, Telemetry, GPS and all cables. The wind vane concerns me a bit.https://1drv.ms/u/s!AmAOYZwlkjMthVSFF7PuIeL1eRTD

3 Likes

Lots of room for all sorts of goodies. Options are endless.

https://1drv.ms/u/s!AmAOYZwlkjMthVWkwDHmdPRGAfmy

2 Likes

That’s a beautiful boat…

I’ve gone ahead and ordered the same Modern Device wind sensor and Bourns Continuous Potentiometer as mentioned above.

1 Like

The wind sensor is very interesting. I never thought of measuring wind speed in this way.

@iampete Nice work

I would study the possibility of mounting the wind sensors and vane on the top of the mast. It’s the best location for it.

@LuisVale. I totally agree. This is how I will set the boat up once I’m at the point of converting the boat to Ardupilot. Two reasons. The air 4 or 5 feet above the water is often a different speed and direction somewhat. On the bow, although easier to wire and implement, it is in harms way. A boat wake or wave when the boat is going windward will soak it down. Back a few years ago when I was first putting together my power catamaran and testing it I had a bit of a problem. I had a servo extension wire that was exposed to water coming over the deck. This was unknown to me. I went through a boat wake in salt water. Immediately one rudder went hard over, the one that was associated with the servo extension, and stayed there. It took me about 15-20 minutes to get back to shore. When I did the pins on the servo extension were gone. Not corroded a bit but gone with a little bit of green powder laying around. A lot of weight at the top of the mast is not exactly ideal but the wind instruments should be better off than on deck for sure.

Let me be clear. Initially for testing the wind vane on deck is O.K… For some type of boat intended to sail in rough conditions it needs to be on the masthead. But, that’s up to the builder of the vessel.

@rmackay9 my wind sensor has just shown up, the question is do we support it under the wind vane library or under the airspeed library. I think it makes scene to use the airspeed library, there is no reason why a ‘traditional’ airspeed sensor couldn’t be used. Although we would have to turn off all the ekf learning features.

You are both correct about the mounting of the wind vane, it would be better on the mast, the only practical place to put it would be right on the top. For my sheltered bit of water and small car the bow is actually less exposed than the top of the mast would be. Hopefully when we support magnetic encoder windveans the ‘flag’ will be much smaller and less delicate. I have finished a more permanent vane, I can proved stl files or the cad if that would be useful.

I have swapped to a pixhawk lite and now have no more annoying issues hopefully. I have mended the tacking code so it no longer tacks ever 6 foot and can do auto missions properly. I coded in tacking on geo-fence but I only saw it work once, not sure whats going on as it triggers the same code as the transmitter switch, it could be that the wind was getting abit light and it was struggling to get round, I have raked the rig back to upright and moved the jibe back a inch or so to make more room for the vane, this has also make it more prone to getting stuck head to wind. I also added takcing to acro but this doesn’t work at all, must have made a maths error, hopefully i can get it sorted tomorrow. I think I will add a maximum cross track error parameter for auto modes upwind.

Then I think the windvane needs abit of filtering on its output, currently the boat quite aggressively changes heading in wind shifts, also we could try and get it to spot if the vane is not moving due to lack of wind. The other option would just be to lower the maximum rates allowed when keeping a straight upwind course.

The next thing i think is some sort of stability control to sheet out if there is too much heel. Then I think I will have alook at the wind speed sensor.

3 Likes

Pete,

Wow, really great progress! I agree that implementing support for the wind speed sensor is probably best put into the airspeed library and, as you say, we can figure out a way to stop the EKF from attempting to use it.

I’m sure you’re right about the filtering required on the windvane… we have an AP_Filter library that could help with that.

At this stage we could probably look at merging it to master…

Just fantastic! I’m so looking forward to get my boat out there too!

1 Like