auto control of model boat

Hi

I am new to this so anything anyone can offer is much appreciated.

Problem: I have a camera attached to a model boat which sits in front of the boat at waterline which I use to film other boats. The camera boat is now quite unstable and difficult to maintain on course. Of course I can't control both the camera boat and the subject.

Challenge

To program an arduino (maybe a a nano) to control the rudder. The thought is that as soon as the rudder signal returns to zero, after being controlled by the transmitter as usual, that the arduino takes over control to keep the boat at that heading. I believe a PID sketch is that I need.. Also what sensor is best to keep a compass heading? (If it is too difficult to use the 'return to zero' of rudder signal I can use another signal on another channel.. )

Any help would be very welcome

John

The main issue I can see here is that the course across the ground is not necessarily the heading of the boat. Keeping the boats attitude on a given compass heading should be quite simple. One of these would do the trick. https://www.sparkfun.com/datasheets/Sensors/Magneto/HMC5843.pdf I'd suggest getting the technical issues sorted using an arduino (possibly just pushing it around on a skate board and watching the rudder) Then shrinkify the project onto a attiny chip. The whole thing would practically fit onto a postage stamp..

Johnredearth: The camera boat is now quite unstable and difficult to maintain on course.

I think the first step must be to make the camera boat more stable - perhaps a counterbalancing mass at the stern ?

I suspect that it will require some very sophisticated programming to make even a stable model boat autonomously capable of photography - simply due to the scale factors. The boat is to a reduced scale but the environment hasn't been scaled down.

My suggestion would be to put the Arduino in the subject boat and keep manual control of the photo boat.

...R

Thanks for the two responses

KenF Firstly, thanks for the lead on the magnetometer. I have to say though the first thing I did was to look on ebay.

http://www.ebay.com.au/sch/i.html?_trksid=p3984.m570.l1313.TR0.TRC0.H0&_nkw=HMC5843&_sacat=0&_from=R40

My heart stopped at the price of $400. Then looked on sparkfun and found it for $7.

What is going on here??

Secondly.. Robin2.. I have used the camera and managed to get some fantasist waterline shots of a number of boats. The tug is not that unstable. I guess I overstated the problem, and it has been re-ballasted etc. The trick is to have a a stable camera trajectory and work from there. The subject then can come and go and the camera will be predictable enough.

Cheers

John

What’s going on here?

Yes that’s a lot of dollars but when click on the item and read the detail it says “Quantity 36”. Still expensive but not quite so.

Another suggestion if you want to complicate the project further. You could use the directional info from the chip as an input to stabilise the camera. You could mount the camera such that it’s tilt and pan are contolled by a couple of servos. As the heading of the boat changes, so the camera would orient itself to continue pointing in a constant direction.

The third axis from the magnetometer could be used to cause the camera to tilt down as the bow rises and up as the bow falls. The nett effect would be to keep the camera pointing at a single point on the horizon.

A further enhancement would be to control the direction of the camera’s attention from your radio transmitter. You’d just need a couple of spare channels on your recever to provide the necessary input to the arduino.

KenF:

Yes nice idea. The fact is though that the roll of the boat enhances the video somewhat. The realism increases, and what is thought to be too much I can reduce with After Effects. I have a very nice video of the boat rolling in some big waves (for a model) and the camera is also being buffeted. Terrific stuff.

I should also note the camera is controllable for direction from the transmitter. Just a couple of micro switches and a waterproof motorised base. This is some stuff I have taken of models at our club. http://youtu.be/lFJZs_9rt6A

I have ordered the $7 version, yes just one, and the FTDI Basic Breakout - 3.3V, and the pro mini.

Cheers

John

Interesting footage and I see that your practical experience has shown that the video feed is far more stable than I'd have expected.

Another thought though. Rather than have the boat continue on it's current heading when it looses radio contact, you could, instead have it go to a predefined heading. This could be set by a simple potentiometer before you put the boat in the water.

So for example, if you are controlling the boat from the northern bank, you'd set the potentiometer to 0. If you're on the east bank, set it to 1/4 of it's full movement. 1/2 way around would represent south etc..

This way, when it looses radio contact it would automatically head back towards you.

You may want to consider a different approach, like designing a gyro-flywheel balanced camera boat from scratch. Battleships have giant flywheel gyros that spin TONs up to thousands of RPM. They need something to right the ship when the 16" guns fire a broadside volly. The air pressure is so great that no one is allowed on deck when they fire because it would turn their insides to jelly. I've been told that if you are within half a mile you can feel the air pressure wave traveling across the water.

boat stability ?

gyroscope.

https://www.youtube.com/watch?v=SNJ88mBusbE

as for control of direction, most wake and waves will alter the position or oscillate around a heading. so, with an even rudder, the heading will swing port and starboard about the same.

the problem or trick is to not attempt large movements of the rudder to keep direction as the natural rock and roll moves the boat but to make a small course change to keep the direction in the center of the extremes.

the gyroscope should steady the camera and allow for better pictures.

Really cool video. Try to imagine the size of the stabilizing gyros for a battleship. http://www.eugeneleeslover.com/USNAVY/CHAPTER-19-G.html

http://www.eugeneleeslover.com/USNAVY/CHAPTER-25-D.html

http://www.history.navy.mil/photos/images/h53000/h53510.jpg

http://www.history.navy.mil/photos/images/h53000/h53508.jpg

Wow thanks for that.

Fortunately I am not trying to fire guns just point a camera, and as I have said the movement of the boat adds to the scene. Have a look at this. This is not stabilised at all. It is raw footage that is not even cut well, but will add some lovely shots to a longer vid I am producing. Noting above after effects has specific effects to stabilise video and get rid of the fish eye but I am not sure how much I want to do it.

http://youtu.be/rlu-y9pGIqc

Nice U-boat! Is there any footage of the tug?

Electronics History Trivia. The Gun Director design project was more secret than the Manhatten Project. This was told to me by an engineer who was part of that project. He said the proof of it is that every has heard of the Manhatten Project but Nobody can tell you about the Gun Director design project. He said the analog computer for the fire control system (made with vacuum tubes at the time) led to the development of the OP AMP we take for granted today.

BTW, Does that U-BOAT dive ?