Helpful Information
 
 
Category: Embedded Programming
Project: Remote Control Boat

I saw people with remote control sailboats the other day, floating them on the reflecting pool in Boston. Beautiful.

I think I can do better. Their boats had no motor, only two adjustable sails.

I don't know if I'm going to do this project yet but I will lay down the ground work for it.

Plan:
This will be comprised of two parts.
The first part will be the actual boat. The second will be the controller.



Because I want supreme flexibility to make the design about three times as complex in the future, my controlling mechanism will use WiFi instead of a normal radio controller.


The remote control will have:
One Arduino Mega (overkill at this stage but will be wanted in the future)
One XBee adapter found at http://ladyada.net/make/xbee/index.html and corresponding XBee module.
Four Joysticks:

Rotate Mast #1
Rotate Mast #2
Control Rudder
Control Propeller


Approximate cost:
$50 + $10 + $23 + 4 * $2 = ~$80
Factor in mistakes and this will be approximately $100
Factor in shipping and you get as much as $125, hopefully not more
Obviously this is ridiculously expensive for a remote control but because (1) I'm buying the components separately and (2) I'm making it extremely powerful so I can reuse it later for a much more complex design, this cost is reasonable.

Note: I'm approximating $2 for joysticks because that's the cost of a cheap potentiometer. Rechargeable batteries may increase the cost a bit.


The Arduino will be able to interpret the joystick positions (* Have not figured this out yet - potentiometer? Will the joystick positions have 10-bit resolution? I only need two-bit: 00 -> DIRECTION 1, 01 == 10 -> DEADBAND, 11 -> DIRECTION 2).

It will send the appropriate commands to the XBee which will transmit it to the other XBee on the boat. It will send the signal every time it reads a change in the joysticks, or if no change has been detected, will resend after 0.1 seconds.

Powered by a either a 9V, 4 AA (6V), or maybe even 8 AA (6V).



The boat will have:
One Arduino Mega
One XBee adapter with corresponding XBee module
One four-channel motor controller found at http://www.ladyada.net/make/mshield/
Four Motors:

Rotate Mast #1
Rotate Mast #2
Control Rudder
Control Propeller


Cost: $50 + $10 + $23 + $20 = ~$100
Factor in mistakes and shipping and this may be as much as $150

Powered by a 9V, 4 AA, or 8 AA to the Arduino and probably 4 D (6V) to the motor shield.

The XBee will interpret signals.
Likely format: START OF SIGNAL - MOTOR ID - ROTATION - MOTOR ID - ROTATION (... etc) - END OF SIGNAL.
You could see something like this (let rotation be a two-bit resolution direction 1 - stop - stop - direction 2)

00000000 start of signal
00000000 motor 0
00000000 direction 1
00000001 motor 1
00000010 stop
00000010 motor 2
00000001 stop
00000011 motor 3
00000011 direction 2
11111111 end of signal

After 0.5 seconds with no received signal, all the motors would be stopped entirely.

Of course, can't forget about the cost of the physical components. Now, the four motors I already have, or if I have to buy more, they'll likely be fairly cheap. Estimated motor budget is $20 or less. Now, the actual hull of the boat is something that I will have to search for. I'm hoping not to spend any more than $50 here. That brings the total boat cost up to hopefully no more than ~$220.


This will be an expensive project, so if I do it, it's going to take a while to get the money and everything will be built in steps.

We'll see.

Feedback appreciated.

Sounds like a pretty cool project!

Most radio control receives will kill power to motors if they lose the signal. Are you planing to put a watchdog in?

Have you looked at a less power-hungry micro controller and receiving method? With wifi you need to transmit as well as receive. Could you find a communication protocol that will only receive, and therefor not have to power a transmitter? Once you get your program figured out, you could probably move to a bare bones controller as well.

I actually have a ridiculously complex project planned on top of the simple boat. (For this one I will have to build a 10-channel motor controller, among other things - so you see why I'm not stupid enough to start with that.) One of the complexities would be added two-way communication between WiFi devices. That's why I'm buying the Megas and not the Duemilanoves.

As for killing the power to motors - yeah, I think I mentioned that in my first post. I'm thinking of a simple communication scheme - every time a joystick changes position or every 0.1 seconds. The WiFi on the boat will interpret the signal and send down the bytes to the Arduino. The Arduino will read a start byte, bunch of bytes, and an end byte. If it gets no start byte for 0.5 seconds after it received its last end byte, it will send a signal to the motor controller to stop all the motors - essentially the 'do not move' signal.

I'm not sure about how I'm going to do power conservation. I mean, it'd be really cool to be able to entirely shut off external power to the motor controller (it powers the motors, not the controller) when the motors aren't in use. However, I feel that my first priority is getting it all to work and my second priority is getting it all small and waterproof. Power conservation can take a back seat next; rechargeable batteries make it not so necessary. Obviously I don't want to make one of those toys that seem really cool but only run for 15 minutes - but I've done this before; rechargeable D cells last for a very long time. Especially if you go out and buy the 4000 mA-hour ones. They're pricey - $13 for two from radioshack - but the motor shield has a 1.2A peak, 0.6A standard operation per motor; we're still talking nearly an hour at all four motors running at peak amperage (the H-bridges would crap out long before my batteries die.)

Mast and Rudder Control

You might be asking, how am I going to create a system that will only allow the masts and rudder to turn so far in one given direction? I mean, you can't have the masts doing a 360-degree spin, because they'll interfere with each other.

The solution, of course, is purely mechanical. String. Lame, right? You tie a piece of fishing wire or something equally strong, durable, waterproof, and light, to the tip of the boom. Tie the other end to the boat. That will give the masts a reasonable maximum angle of rotation - possibly as much as 90 degrees.

Similarly, the rudder will be stopped simply by it pressing against the hull.

This is a large picture of how a traditional, simple sailboat looks like. Good for reference.
http://www.boatcourse.com/Chapters/05_PersonalWatercraftAndOtherBoats/images/SAILBOAT_DIAGRAM.gif

This will be my design model. I don't know too much about sailing so I'll be nearly directly copying their sail design (shape and how they are oriented and come together).

ZSXCyY4mrjQ


Sidenote:
I can actually use video game controller joysticks as my joystick, if I so desire. Probably not for the original model, but maybe later. This would allow bi-directional control with a single joystick apparatus, which won't clutter up the remote control.

Do you know how to sail a real boat? If so, you know that you don't rotate the mast on a sailboat, but you do use lines (aka ropes) to hold the sail(s) in the position you want. A more "true" model would be to have the boom be controlled by a RC servo, with angles from 90 degress out to each side and all the positions between.

Based on the sailing that I've done, I would expect it to be hard to sail properly, as the position of the rudder during normal running is a question of feel. And you adjust the position of the sails when the rudder is fighting you.

You go fastest when the boat is balanced, not much rudder, as turning the rudder causes drag.

With wifi you need to transmit as well as receive.
The X-Bee is zigbee, not Wifi, designed for low power. I've had good transmission for a couple hundered feet, the specs say 100 meters is the most you can expect.

Some sort of deadman's switch is critical or you will lose the boat.

I've been on a sailboat a dozen times and I have done everything there is to be done with respect to sailing - controlled all the sails, rudder, etc; still, I don't know the theory too well. Mostly it's still on the order of "wind push sail".

The reason I'm doing motor and not servo is because the motor controller has enough space for four motors or two servos. Why bother with servos when slow motors work fine?

I'm not so interested in a 'true model', I'm interested in functionality. I can afford to do a lot you can't in a real sailboat (for example, 90 degree angle deviation to either side versus about 15-30 on a real sailboat). From what I've seen everyone rotates masts, nobody rotates the boom.

Of course the rudder would cause drag. I don't see how it's so much of an issue though - a real boat needs a rudder, this needs a rudder.

Now, from what I understand, the standard XBee model has 100 meters, BUT outside with line-of-sight you get as much as 300. Still, 100 is plenty because I plan to be using this on things like the reflecting pool in boston (that'll be my main test ground) or small lakes. I think the deadman's switch I mentioned above is sufficient for my needs.

If not, I can either upgrade XBee modules to more powerful ones and/or I can add an antenna. Which do you recommend?

The X-Bee is zigbee, not Wifi, designed for low power. I've had good transmission for a couple hundered feet, the specs say 100 meters is the most you can expect.

Some sort of deadman's switch is critical or you will lose the boat.

Ahh, I only read this part:

my controlling mechanism will use WiFi instead of a normal radio controller.

I can afford to do a lot you can't in a real sailboat (for example, 90 degree angle deviation to either side versus about 15-30 on a real sailboat). From what I've seen everyone rotates masts, nobody rotates the boom.

So the boom to mast joint is fixed?

A real sailboat when running (going straight downwind) will put the mainsail fully out to one side and the jib or spinaker off to the other (called wing-and-wing). The boom is out 90 degress, or close to it.

Going upwind, you use the sails as airfoils (just like airplanes) so they are trimmed closed to the centerline of the boat, with the end of the boom rarely outside the width of the boat.



If not, I can either upgrade XBee modules to more powerful ones and/or I can add an antenna. Which do you recommend?

Antenna. ZigBee responses well to antennas. A rubber duckie as the top of the mast would work fine.

Right, the boom-mast joint is fixed. I know how a real sailboat works enough to know what you said. I think my reasons for rotating the mast are valid:

1) Easier
2) Works just as well; the reason a mast on a boat doesn't rotate is because it's freaking HUGE and should be fixed; here it won't run through the entire boat as a lightning rod and is light and therefore doesn't need to be fixed
3) According to the videos; the pros rotate the mast

And thanks, I'll put an antenna on it.

a mast on a boat doesn't rotate is because it's freaking HUGE and should be fixed
The forces on a boat mast are huge, the freaking huge size is needed. And there are steel cables holding it upright, under huge tension.

What do you do (they do?) about the jib and controlling it?

On the antenna, since ZigBee uses the same 2.4gHz band as WiFi (b/g) you can use any antenna designed for that, making them cheap and easily available. There are even directional ones, which you could put on your end, since you can point it towards the boat easily, you have to be looking at it.

The forces are indeed huge. But the good part is that a 1:10 scale means 1:100 force. This allows me to use simple masts (fiberglass rods most likely, or something similar) with very little fish wire to replace cables. (Note: Actually, most cables are rope, not steel. Steel is pretty much only for the highest-tension cables that support the entire structure. 3/4 inch cable holds the rest, though sometimes there are several - as many as six on the boat I've been on - rope cables in one place.)

The jib is fairly rigid. It has a boom that can be thought of as the base of a triangle. Connected to the base is a pole that rotates. Where it is attached - where the center of rotation is - is different for every model I see; some are at the front, some are in the middle, some are somewhere in between. I'm thinking of attaching it to the middle.

The jib is shorter than the mast of the mainsail. The tip of the jib is just tied - fishing line, or whatever - to the tip of the mast of the mainsail.

(Note: Actually, most cables are rope, not steel. Steel is pretty much only for the highest-tension cables that support the entire structure. 3/4 inch cable holds the rest, though sometimes there are several - as many as six on the boat I've been on - rope cables in one place.)

On boats, they are called "lines" not ropes. sometimes halyards (which are the lines that lift the sails.

I've been on large racing yachts, and never seen a line bigger than about 1/2"

The jib is fairly rigid. It has a boom that can be thought of as the base of a triangle.

er, the jib's sail has to be curved to act as an airfoil. Having a boom on it is not typical for racing boats, but a lot of cruisers do. A boom makes your motor/servo control easier. Might be fun to model it as a line, with a closed loop going under the fordeck with a motor below.


The jib is shorter than the mast of the mainsail. The tip of the jib is just tied - fishing line, or whatever - to the tip of the mast of the mainsail.
Sometimes (often?) the jib is not as tall as the mainsail. But the same deal holds, a halyard holds it up and to the mast.

On a different tack, what do you plan to use to keep the boat upright? a lead keel?

I am, of course, talking about the jib that the RC boats have, not the real thing. Sorry for that confusion.

Yeah, the boat will stay upright due to a keel. Lead? Dunno, whatever.

Lead? Dunno, whatever.
Lead is really dangerous to work with. If you are scratch building the boat, then I'd use whatever plumbers use these days (they stopped using lead decades ago).

I'd make the keel a deeper than true to scale, to help give it more leverage.

I'm thinking aluminum or steel. Lead is simply harder to obtain. Low-quality bismuth would work fine as well, especially given its low melting point (easier to weld it if I have to weld).

I'm thinking aluminum or steel. Lead is simply harder to obtain. Low-quality bismuth would work fine as well, especially given its low melting point (easier to weld it if I have to weld).

You probably don't want to go with aluminum, it's just too light. Bismuth's low melting point doesn't actually make it easier to weld, if I recall right you can not weld it with standard argon or an argon/co2 mix as your shielding gas. (Though I might be mistaken, it's been a few years since I've looked at a welding theory book)

Hunting stores should be able to hook you up with lead shot. It is possible to safely work with it at home, but be careful about contaminating the water wherever you sail.

I actually had stainless steel in mind when I thought of the keel. It is fairly dense, won't rust, and although it isn't the easiest thing to work with, any fab shop should have cutoffs of SS plate that they will give away or sell for pretty cheap. Throw in a $20 or a case of beer and they might even cut/drill it to meet your needs.

If you do have to weld it, mild steel is easiest. Or you could even go with copper and solder it if you have a heat source big enough. Last time I had to solder two pieces of thick copper, I threw them on the BBQ and used that as a re-flow oven, though you probably don't have and don't want to buy solder paste and proper flux if you're just doing a one-off...again, a case of beer at the local fab shop goes a long way ;)

Dude, I just turned 19, I've still two years until I can go around offering cases of beer.

Dude, I just turned 19, I've still two years until I can go around offering cases of beer.

I knew you were 19, but I forgot about the location difference. :D










privacy (GDPR)