UnderWater Vehicle Project

Hello folks,

Sorry about the long post!

I have a bit of a project on the go which has to be finished by April. We've set our sights quite high considering the lack of experience we have, but there are 5 of us working on it so hopefully we'll get there.

Quick overview of the project:
I'm sure most of you know what an ROV is. Our project is a model AUV - Automated Underwater Vehicle, for which the ultimate goal (in industry) is a vehicle capable of navigating to a predesignated area and performing some task (i.e. actuate a valve on a horizontal christmas tree). The image recognition capabilities on the more advanced models using cutting edge software, and given we have a budget of £500, we're going to be downsizing quite a bit. The emphasis of our project is stability, which we are investigating on two fronts. The first is an efficient hull design, to minimize drag force due to underwater currents. The second is by way of a stability system - which I am working on.

I've had a look online to see how feasible a system we can develop, done a bit of thinking and would be delighted if you chaps could give me information. I've looked into AUVs and balancing robots for the stability aspect - essentially a similar idea but in water not air.

Ideally the AUV would navigate a predetermined path and then when it reached it's 'destination' it would try it's best to stay in that position.

Ultimately, I'd like to incorporate the following:
-Pressure Transducer - to gauge depth.
-3 Degree of Freedom Accelerometer + Gyroscope. This would allow me to implement a Kalman Filter.
-Datalogger to record sensor readings / responses.
-Propulsion via. 6 x 12v DC Motors, about 1.2A of current each. Possible speed control as oppose to On/Off/Reverse.

To sum up, I suppose I'm hoping for some general advice, as it's going to come down to a choice between this and a picaxe.

Is it possible to, for example, connect an h bridge to a board/shield combo to drive my motors?

For rotational stability, I came across this shield on DIY Drones:
http://store.diydrones.com/ProductDetails.asp?ProductCode=BR-0012-01&CartID=1

This would be ideal as it contains everything I require, and fits onto this board:

To sum up, I suppose I'm hoping for some general advice, as it's going to come down to a choice between this and a picaxe.

you would repent if u dont choose arduino :wink:
its highly user freindly and also many people to help you

Ultimately, I'd like to incorporate the following:
-Pressure Transducer - to gauge depth.
-3 Degree of Freedom Accelerometer + Gyroscope. This would allow me to implement a Kalman Filter.
-Datalogger to record sensor readings / responses.
-Propulsion via. 6 x 12v DC Motors, about 1.2A of current each. Possible speed control as oppose to On/Off/Reverse.

yes you could do this using an arduino

-.Is it possible to, for example, connect an h bridge to a board/shield combo to drive my motors?

you would require a h bridge ic like l298n to drive the motors or get a motor driver sheild readymade of a suitable ampere rating
but first run through all the example sketches and try to interface everything step by step in that way you can acheive it
and remember this is not a easy task ull need a lot of patience and enthusaism :wink:

Hi BrIDo,

I thought this sounded familiar. I see you're thinking about coming over from the dark side. I like the Picaxe for what it is but a large part of the discussions over there are about how to get around the limitations.

Given your tight deadline I'd say that at least with Arduino you can buy shields that do a lot (maybe all) of what you need so no design work on you're part. That leaves you to "just" write the code.

One thing to watch out for, not all shields can be used together because the pins clash. So just because there is a motor shield and a data logging shield they can't necessarily be used together. In an effort to help deciding what pins different shields use a new site has just been started (http://shieldlist.org/). There's nearly 200 shields on the list at present so there has to be some you can use :slight_smile:

Is it possible to, for example, connect an h bridge to a board/shield combo to drive my motors?

There are several motor shields, I've not looked at them closely but I'd say they can all control speed and direction, even if you have to do some PWM yourself (but that's a built-in function).

EDIT: I just did searches for the keywords you mentioned (Gyroscope, Accelerometer, Pressure, Datalogger, Motor) on shieldlist.org and got multiple hits for all accept data logger, which is strange because I'm sure I've see data logging shields before. The "pressure" shields may only read barometric pressure, I didn't drill down to look at every shield.


Rob

If you do a board search for ROV, you should find a lot of post on previous similar projects. For nautical stability, ballast on the bottom and flotation on the top is the simple configuration.

Well, I'm torn between the two at the moment if I'm being honest.

With the PICAXE I'll have to create the circuit from scratch, in terms of electronics has a steeper learning curve. The simplicity of the programming appeals to me, and at the moment I can visualise how I'd go forward with a circuit design. I like this idea because I'll be able to fully understand/justify every component I've included.

However, the IMU shield I found (linked earlier) contains everything I need in a ready-to-go unit. My reservations about going with it are that I'm not sure I'm comfortable with taking a 'designed unit' and adding bits and pieces when I don't know what's going on 'under the hood' so to speak. And in terms of programming, I've never done C before but I've done Matlab and some other bits and pieces over the years, HTML, basic.

That website is very useful for browsing shields - I think i'm starting to get the picture now.

Let's say I clipped that IMU shield onto the Arduino Mega Board. Then say I wanted to also include three H Bridges to drive my motors. Could I just make up the H drivers/motor circuit on a breadboard and attach it on? And would I wire it onto the Mega board, or the IMU shield. Are the pins continued through the shield? :-/

Lastly, other than RC speed controllers, is there any way I could obtain variable speed for my 6 motors?

Edit to add:

Yeah, the stability thing's been a bit of a nightmare to be honest. At present we've managed to get the design small enough so that, when fully submerged, we'd only need 40kilos for it to be neutrally buoyant!

Mathematically, what are the main differences between Picaxe and arduino, if any? Both seem to use preset values for trig functions, and are limited to sin,cos,tan and atan, but no atan2. And neither can support floating point, am I right? I'm assuming though, that there are arduino shields which you can clip on for this purpose, just as you can purchase a 'coprocessor' for use with the picaxe?

Mathematically, what are the main differences between Picaxe and arduino, if any?

Chalk and cheese I think.

The Arduino environment hides a lot of the inner C/C++ workings from you but it's all still there, you're actually using the GCC compiler and that supports everything (probably)

Tan2

and floats are just another data type with all the normal maths operators.

Let's say I clipped that IMU shield onto the Arduino Mega Board. Then say I wanted to also include three H Bridges to drive my motors. Could I just make up the H drivers/motor circuit on a breadboard and attach it on? And would I wire it onto the Mega board, or the IMU shield. Are the pins continued through the shield?

Most shields allow for the pins to pass through which means that you can stack several on top of each other (subject to them using different pins as I mentioned before).

So you put the IMU shield on then a motor shield and there should be no need to hack either or do your own H-bridge.

Lastly, other than RC speed controllers, is there any way I could obtain variable speed for my 6 motors?

Normally this is done with PWM, the mega has 12 hardware PWM pins I think, you set the ratio and forget them until you want to change the ratio.

Having said that it's possible that a motor shield will also have speed control. If not maybe you feed PWM into it.

The simplicity of the programming appeals to me,

To be fair the Picaxe can be easier to program, partly because it can't do as much. When you get into the serious coding though C/Arduino beats Basic/Picaxe hands down.

C is not an easy language to learn that's for sure, but there's plenty of people here who will help.


Rob

I don't understand the concern over weather you should get the arduino or picaxe. Get both and start experimenting with what they are able to do. You should be able to get both for less than $60, which is just chump change considering the total cost of your project. If you had to add 40 kilos of ballast, then you probably have a lot of air filled areas in your ROV, which will be difficult to seal if the ROV is going deeper than just under the surface.

I always post this site in these threads - great place for ideas, direction, and notes:

:slight_smile:

I'm sure most of you know what an ROV is. Our project is a model AUV - Automated Underwater Vehicle

BTW - from what I have gathered, the term "ROV" always refers to an underwater remote operated vehicle; the terms UAV and UGV refer to vehicles that are airborne (Unmanned Aerial Vehicle) and ground-based (Unmanned Ground Vehicle). The term "AUV" is not one I have run across before. This doesn't mean it couldn't be used, but since the industry seems to have settled on the above three terms I outlined (ROV, UAV, and UGV), and "AUV" could be confused for "UAV" - it is something to keep in mind...

:slight_smile:

Been pondering it long enough and I think we'll push ahead with the arduino. You've convinced me!

I'm not going to give up on the Picaxe completely though. I don't think we'll use it in this project, but I have an 18M2 at home, and might have a go at creating an IMU of sorts in my spare time.

Had a look at the homebuilt rov's website, cheers for that, big help - some really good data on there. The term 'AUV' is mostly confined to the subsea industry, where both ROV and AUV are used frequently. AUV's are a lot less publicised though.

I don't think variable speed control is going to be required here - with 40 kilos worth of mass, the motors only putting out about 1.8 lbs of thrust each ( according to homebuiltrov's :wink: ), I think they'll need to running at full throttle to have any chance of actuating the craft.

I found a research paper on the subject, where the chap utilized the razor 9 DOF IMU board from spark fun, http://www.sparkfun.com/products/9623. He wrote up code in C#, and ran it on his computer - but I'm sure it could be adapted to run on an arduino.

The data in the above board is processed by an onboard ATMEGA328 and output via serial. Would I then have a seperate arduino board taking data via serialin and running my desired code? I'm basically just making sure that, even though this comes programmed with the bootloader, it's not meant to act as the 'main' controller - given there is no mention of extra inputs/outputs.

Assuming I've got that correct, I'm planning to use that board with an arduino to process the data and drive 6 12v DC motors via H bridges. I've had a look at some of the motor driver shields available, but no single shield can drive 6 motors, and most are for low current systems (the motors can draw up a few amps), and I don't mind putting my own together anyway.

Again, if i'm going down the correct route - I need an arduino with atleast 6 analogue outputs. But, more importantly - what is the maximum number of variables the arduino can handle? The code I've been looking at claims:

132 bytes of data memory for global variables and 360 bytes for local memory. Is this do-able on an arduino - any arduino?

Paper is here:
http://imumargalgorithm30042010sohm.googlecode.com/files/An%20efficient%20orientation%20filter%20for%20inertial%20and%20inertialmagnetic%20sensor%20arrays.pdf

what is the maximum number of variables the arduino can handle?

A Mega has 8k of RAM, 2009 has 2k. Both more than enough for the code you mentioned, not sure exactly what they mean by "global" and "local" in this context, but if they are referring to RAM then you're good. Of course your code will need some (maybe a lot) as well.

it's not meant to act as the 'main' controller

It looks to me that board can be used just as a co-processor, but It seems to only come with test firmware, you still have to write the code to output what you want for your application. Is that what you were referring to by converting the C# code?

Would I then have a seperate arduino board taking data via serialin and running my desired code?

Sounds like a reasonable thing to do, write code for the RAZOR to output what you need and your application in the Arduino takes action based on that data.

I need an arduino with atleast 6 analogue outputs

No Arduino has "analogue output" as such, you use a PWM output and run the waveform through an RC low-pass filter to create a DC voltage.

But what's the analogue OP for anyway?

I tried reading that document, got lost after "This report presents..." :slight_smile:


Rob

Regarding global and local, the program runs in two 'subroutines' of which the local variables are confined to that subroutine and the globals are accessible from anywhere in the program. But the total number of variables is what I was unsure about.

In terms of converting the code, I was referring to converting the code in the paper to run on an arduino. It's written in C#, and after reading up on the idea, I don't think it'd be too difficult to port it across as they're virtually identical.

Reading that board, it apparently puts out all data from the sensors as 'serial'. Can this input data (3 varying voltages per sensor) easily be deciphered by another controller via serial?

When I said analogue output I wasn't really thinking - I'd basically be planning on building a small circuit of H bridges to drive 6 motors. This would keep the motors running on a separate power supply from the controller. In that sense I think I understand what's required - and that the motors would be controlled via H bridges using HIGH and LOW combinations from digital output pins. By PWM - is that just the process of rapidly turning the pins on and off to control the motors speed?

I'm working my way through the programming tutorials on the website, and they seem relatively straightforward for the moment.

Here's the detailed design we've been pushing forward with:
http://d.imagehost.org/view/0285/skinned

The corner pieces are still to be added, but the steel is made from 12mm square bar. The skin of the structure is 5mm steel sheeting, although we may have to use two 2mm sheets, one on top of the other. The hatch cover can be seen here as well, using an rubber-o-ring type arrangement to guarantee a seal. The 4 ducts seen will be used to take the craft to depth, and to actuate in pitch and roll. For yaw, two external motors on mounts will be fitted to the side of the craft.

Reading that board, it apparently puts out all data from the sensors as 'serial'. Can this input data (3 varying voltages per sensor) easily be deciphered by another controller via serial?

Yes, presumably there's a simple protocol you'll have to follow, but this should be easy.

By PWM - is that just the process of rapidly turning the pins on and off to control the motors speed?

Yep, you adjust the duty cycle (ratio of high to low) to change the motor speed.

Here's the detailed design we've been pushing forward with:

That's a serious-looking piece of kit.


Rob

The corner pieces are still to be added, but the steel is made from 12mm square bar. The skin of the structure is 5mm steel sheeting, although we may have to use two 2mm sheets, one on top of the other.

I'm curious - why steel bar? Why not aluminum or stainless steel? Why not square tube?

Cheers Graynomad. Regarding the PWM, how much of a 'limitation' on the speed control would their be if I used relays as oppose to h driver chips? Does the speed of the relays physically opening and closing make much difference?

Cr0sh, the whole skeletal structure is made from mild steel, as is the sheeting. Stainless steel and aluminium are just too expensive and for this particular project, not worth it, despite their corrosion resistant properties. The craft is only going to be tested in fresh water and will only run for maybe an hour or two.

We used square bar as oppose to hollow tubing to add more weight to the craft. The dimensions are approximately 650 x 450 x 200mm, and it's water tight, so the volume of water it will displace equates to about 40 kilos. Having them hollow and flooding them was something we considered, but it would give less weight than having them solid. We also thought about flooding the entire craft, but opted against it as it may cause more problems than it would solve.

I would love to build something like this myself! One idea is to use a box from, say, a remote controlled boat, and place all your electronics inside. Next, wire up the origional motor for your purpose with the arduino, and you have a pre made, waterproof box.
Then add a high power ultrasonic transmitter and receiver to gauge depth. Although it is probably different to whet you were thinking of, it would eliminate the need for the accellerometer/gyroscope, thus reducing prices.

what did u use as a pressure transducer

Does the speed of the relays physically opening and closing make much difference?

Sorry BrIDo I lost track of this thread somehow.

I'm sure you've figured something out by now, you can't use relays for PWM the frequencies are way too fast, you can use them for your direction control if you like.


Rob

We abandoned the pressure sensor because - the inside of the craft will be entirely sealed - and so a barometer would be of no use inside as the pressure would be constant regardless of depth. We looked at using an externally mounted waterproof one, but it'd cost about £150. It was just a nice feature to have but not at that expense.

I've struggled to find a suitable driver chip for my motors that would allow me to utilize the PWM feature. If I go with relays and lose that feature, I suppose with some precise programming I could work something out. To be honest, I'm debating with myself whether we actually need the PWM control as we'll probably have them going at full pelt just to shift the thing (~40kg).

We've got the materials and should have the welding started by the end of the week. The arduino boards, on the other hand, seem to be out of stock almost everywhere at the moment.