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)!
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! ) 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!