Hi all !
What I want to achieve is a boat that can sail alone following some waypoints with the gps.
I'm new to arduino, but I already have a rc boat and coding knowledge.
Inputs I need are:
-GPS coordinates
-Compass direction (0-360° N-S)
-Wind direction (weathercock) (this could be optional if wind is regular)
-A GSM connection to communicate (It this I/O in fact, this is also optional, at least in the beginning)
Outputs are:
-two actuators to deal with the sails and rudder
So my question is what should I buy, what arduino and what additional gears ? The idea is to avoid as possible welding. I prefer the ready to use, plug and play, components. For instance I like the idea of TinkerKit http://www.tinkerkit.com/, but they don't have the modules I need.
Presumably since you have the boat, you know how to sail it? Seems to me the programming task is going to more than trivial- you can't just sail from point a to point b, as you'll know from the rc sailing. The decision of (eg) how high to point to windward and when to tack, and trimming the sail to keep it nice and tight is not likely to be that easy to code.
That said, you say you need actuators for the sails and rudder: aren't those already part of the rc boat's configuration? If not, Google sail servos.
You should assume that the wind WON'T be regular - even if it is the boat won't be and it's the apparent wind that matters.
Ensure that you are very competent at sailing the course using simple radio control before you try to automate anything. Only then will you understand what the software will have to be able to do.
First of all, the regularity of the wind is just a supposition to simplify the design. I sailed enough to know that if you want the optimal speed you need to constantly adapt the sail position, but your boat will still go forward if you set them and do something else for a while. However, my goal is to have a device to measure the wind direction and only if it is too complicated in the beginning I will renounce to it.
Jimbo, I fully understand how complex the coding part will be, however, it does not seem an impossible task and I would at least try it. But, as I'm new to arduino, I don't really understand how compatible modules are. If someone could give me a possible "shopping list" for what I want to achieve, I would be extremely grateful. I'm also interested in any suggestion of webpage or hints on the subject of compatibility between modules, actuators etc...
This is why I was asking about actuators, sure I already have some but I'm not sure how compatible with arduino they are.
Thank Robin for the link, it is interesting. As a first step, I will try to cross the pound close to my house, then I will consider the Atlantic
The usual approach to a project like yours is to break it down into its various parts and work on those individually until they work. You may want to look at the various UAV projects like below as they might be adapted to your boat project.
In the spirit of breakking the project down into bite-sized chinks I think I would first start by automating the rudder with the sails fixed (perhaps the sails could continue to be under R/C manual control to simplify recovery if/when things go wrong). Think about how the rudder must be managed to make the boat stay on a constant course or at a constant angle to the wind.
First get the mechanical part, the sailboat and the actuators to work. No amount of effort with the compass, GPS and software will help if the mechanical parts don't work.
Thanks Jremington for your advice. I already have a working rc sailing boat (which I built a few years ago), with enough space to fit electronics in it. That is why I'm now asking here for informations about the electronic hardware.
I join a picture of this boat, so you can make yourself an idea. It is sailing fine when radioguided, so now I want to robotize it
I assume you'll have some sort of autopilot that knows where it is and which direction it wants to travel. Then you need to know which way the boat is pointing and which way the average wind is moving. They both seem straight forward. Then you need to have a steering algorithm which decides which direction the boat should be sailing in to achieve the required course. This is where you would deal with currents, tacking, turning into the wind when the weather was too violent, and so on. To me, this is the hardest part. Then you need some rudder control to make the boat point in the direction you chose, and to position the sails to suit the boat orientation and speed and wind direction and speed. That might be non-trivial, but presumably if you know how to sail the boat you know how to do that.
You can control several servos from an Uno without any "shield". The Uno can directly produce a servo control signal on one of pins. The servos should have there own power supply (as the Arduino boards can't supply enough power) and there must be a common ground between the Arduino and the servo power supply.
I haven't used any GPS module with an Arduino. My inclination would be to buy the cheapest one that seems to have the facilities you need.
Be prepared to discover something doesn't do what you want and there is a need to change track.
Thanks Peter, this is indeed what I plan to do. You are right, the hardest part of programming will be to define the behaviour of the boat. This is also the part I'm mostly looking forward to
Robin, thank you very much, very good to know a bit more about the servos. It might be obvious, but then I don't understand why they are selling board for plugging the servos ?
You are right to point this out about the gps. I need to put the gps (as well as all the electronic) in a waterproof place. But then I'm not sure how the satellite reception will be. I guess I will not know about this before trying.
Does by any chance anyone have an idea how to build (or where to buy) a very light weathercock ?
The direction of sailing boats (full size and models) can be controlled with wind vanes. It may be more practical to use one rather than trying to make a very sensitive weathercock which would also have to be connected to some form of sensor. A rotary encoder would be an obvious choice but I don't know if they would be small enough to mount at the top of a mast. The wind vane, on the other hand, is mounted at deck level and can be big enough to exert a reasonable force on a sensor.
In a full sized boat the wind vane usually steers a small slave rudder which in turn steers the main rudder, making use of the greater force generated by the water.
Thanks Robin for this idea. Wind vane gears are very interesting.
Usually, the wind vane gears are used to keep a constant angle between the boat and the wind. (see for example The servo pendulum principle for self-steering on a sailboat - YouTube). If I understood well, you propose to connect the wind vane gear to a sensor rather than to the rudder. This is interesting, but would work only if the direction of the boat is supposed to be a straight line.
If I decide to make the boat turn at some point, then I will need to set the wind vane gear to a new neutral position and to adjust the sails to the new wind angle. These are two problems: I need an additional servo to accomplish the first task and another wind vane to measure the direction of the wind to determine this neutral position as well as the optimal sail position.
To me, the wind vane gear seems an option only if the boat keeps a constant angle with the wind during the whole sailing time.
However, your proposition led me to consider a wind direction sensor closer to the hull of the boat rather than at the top of the mast.
I think it should be possible to use your Arduino to reposition the wind vane for changes in direction or changes of boat direction.
Any wind direction sensor that is below the top of the highest mast will give incorrect readings due to the influence of the sails.
Perhaps you could have a simple weather cock at the mast head that just gives a rough indication of wind direction (maybe +/- 10 or 20 degrees) and use the wind vane for fine control.
I mentioned a rotary encoder previously, but now I'm not sure if it would be sufficient. They rely on never getting lost because they have no means to determine absolute position. That can be overcome with a constantly rotating shaft, but there is no guarantee a weathercock would return to a "home" position for hours or days. So I think there would need to be a sensor that detects the absolute direction of the weathercock without imposing any friction on it. One idea might be a ring of photodiodes and a disc attached to the weathercock with a tab that shrouds just one of the photodiodes at any one time. Maybe someone else has a better suggestion.
What size is your boat so we can have an idea of what size of equipment can be attached to it?