Page 1 of 1

Selecting a computer/processing unit for a human-powered sub

Posted: Fri Mar 02, 2012 4:55 pm
by AdamBradley
Hi!

I'm a mechanical engineering student at the University of Bath, currently in my final year. I'm working on our racing submarine team, and my project for the year is to control the depth of our submarine. To give a rough idea (and prove I'm not joking, most people I tell don't believe me when I tell them about the team), have a photo (of a photo.. that's a poster we have stuck up on the wall of the lab)!

http://dl.dropbox.com/u/20645937/Sub%20poster.png

Ok, a run-down of what I need to do:

The submarine races at a constant depth - or it should do, anyway. Depth is never a component of the course, so straight line speed requires we travel at a constant trajectory, avoiding oscillatory motion as best as possible. We do this with a control system rather than manually, because the mental loading on the pilot is already huge - pedalling these things is not easy and you're doing it on Scuba air, without *much* to show you where you're going. Removing depth from the list of things the pilot has to think about is a great bonus.

The team races year on year, with new final year students taking over from the previous students, to work on and (hopefully) improve the subs for that year's race. There is already a depth control system in place:

A demand depth is set. Readings are taken from a depth gauge and an inclinometer, the data from which is then used to determine the signal sent to the stepper motor, which sets the elevator fin position. Simple, right? We already have a controller in place, all the maths on the characteristic equation for the submarine's motion has been done, it was just never ready to be tested last year, so I have to pick up the pieces, get it working, and then tune it. A PID controller has already been written, however that needs to be tested and tuned.

Currently, we have the depth gauge, inclinometer and stepper motor driver all plugged into a little netbook laptop, which sits in a pretty bulky watertight container, complete with batteries and other fun stuff. The laptop runs the controller in LabVIEW, and also serves as the data logger for later analysis of the submarine's path. The problem with this set-up is mainly that the watertight container is bulky. Realistically, it's too big for our subs this year (we've lost space due to switching to a heavier, bulkier hydraulics system for thrust, which then also required us to pack in a load of foam for bouyancy, all costing us space), so here (finally! :D) is what I am asking for help with: I need a controller capable of reading inputs from the Inclinometer, Depth Gauge, as well as outputting to (and receiving from) the stepper motor.

The hardware I have:

Inclinometer: LCP-45 Level Developments (http://www.leveldevelopments.com/PDF_Do ... ctions.pdf) connecting on RS232
Depth Gauge: SDI-12L Submersible Level Transmitter (http://blog.impress-sensors.co.uk/subme ... t-165.html), connecting through a converter to RS232
Stepper Motor; Astrosyn MY180 stepper motor (http://farnell.com/datasheets/653734.pdf) controlled by a Phidget unipolar driver (http://www.phidgets.com/products.php?ca ... ct_id=1062) which connects on USB.

I've been looking at a few alternatives - the Lego Mindstorm NXT looks very good, but I don't think I can get it to control the Phidget without some meaningful amount of programming, and I'd prefer to avoid anything that isn't flat control code if possible. I'm a mechacnical engineer, not electrical, and as such have very little experience with actual programming outside of mathematical use of MATLAB scripting.

My electric engineering friends have suggested I look at using a PIC, for which I'd need to export the LabVIEW VI to C, tweak it for whatever PIC I had, compile it, and then flash it onto the PIC... All unchartered territory for me, a lot of assumptions and guesses in that idea - so any advice and comments welcome!

Does anybody know of any other sorts of small self-contained computers/processors which I could use? Size/battery requirements are priorities, as if I can get a computer small enough, I can stick it in a proprietary waterproof box and not have to worry about making my own container for our electronics. Price is also a large consideration, my budget is about £100, though this is negotiable if I have a good enough solution :)

I've tried to condense a large project down into one sizeable post, I've probably missed loads of info - please don't hesitate to poke me if you think you can help!

Kind regards
Adam

Re: Selecting a computer/processing unit for a human-powered

Posted: Mon Mar 05, 2012 10:22 pm
by Biffo
The second batch of The Raspberry PI is due soon, but there is a lot of interest in it ,so if you think it is suitable, reg your interest early.

This explains it.
http://www.youtube.com/watch?v=6BbufUp_ ... e=youtu.be

Re: Selecting a computer/processing unit for a human-powered

Posted: Tue Mar 06, 2012 3:16 pm
by AdamBradley
Aaah...

That's very interesting. £22 for a fully fledged computer the size of a credit card, and all I need is an SD card with an OS on it? Humph. That sounds brilliant.

Now I need to hunt around the forums and support desks trying to work out if it'll actually work.. I think the biggest obstacle will be whether or not LabVIEW has a version that'll run on their ARMv6 architecture.

Thank you! Please let me know if you know of any other similar products about!

Re: Selecting a computer/processing unit for a human-powered

Posted: Tue Mar 06, 2012 9:08 pm
by Biffo
The Raspberry Pi can run the Linux Fedora op system I think?


You could go for a 'mini ITX board' the dimensions are about 17cm x17cm.
This is just a coventional computer that can run Windows etc.

http://www.novatech.co.uk/products/comp ... ay0dz.html

This is a typical ITX board, you will need as well, a cheap Celeron processor, some ram memory and a hard drive to get it going
plus a power supply you have to adapt, as I believe there are only mains one around for it at the moment?