Here I would like to present a small project I have done. It is a small remotely operated submarine.
It utilises the propeller chip to collect information on depth and direction. Two more propeller chips are used for steering. One placed in the joystick as described here: . Joystick
And one placed in the submarine used to control the parallax 25A motor control units.
The submarine performs pretty well and has a good operating time estimating at least 2 hours powered on an ordinary car battery. It is equipped with a TV camera for underwater pictures.
Main dimensions:
Length: 120cm, width: 60cm, height: 35cm. Weight about 50kg.
. Supplementary data
New! . How to build an accelerometer based Joystick!
Here is a description of some of the electronics:
For the depth data a circuit from Sencera called SPD-015-G-2 is used. It is mainly intended for medical purposes like measuring blood pressure but is also made in a version with suitable pressure span for this application. With a max pressure of 15 psi it will be good for a depth of about 10 meters or 30 feet. It measures absolute pressure and the "backside" of the internal cavity is connected to the surrounding which means that it has to be mounted inside a cavity isolated from the water pressure and a hose has to lead the pressure to be measured (i.e. water pressure) to the intake of the device. The device can not handle direct water contact why this hose has to have some sort of aneroid or balloon in the other end. I used a type of rubber ball intended for flushing children’s ears and can be bought at any pharmacy here in Europe.
The cavity is simply a water dissolver for pressurized air. It seemed suitable because of its low prize and the visibility it provided the main part made of clear plastics. It also has good sealing and has convenient NPT threading. One of the internal bolting had to be taken away why the external straps. (remember that the water pressure working on the cavity is coming from outside why the strapping will not be heavily loaded).
Inside the cavity are placed the pressure sensor, a quadruple op-amp and some resistors. The disadvantage of this construction is its poor temperature stability. The pressure sensor itself is temperature sensitive and the rubber balloon with its air content will be temperature sensitive. The construction could be improved by some temperature sensitive resistors. A better way may be to buy some other device more adopted for the purpose. The reason why I build this device was it was fun and I learned a lot about op-amps and ad-converters. The op-amp used was LMC660 and the ad-converter ADC0831. The wiring will be shown further down.
For direction information the HM55B was used. I downloaded a piece of code made by Beau Schwabe from the Parallax downloads page: http://obex.parallax.com/
: propeller object exchange, sensors, http://obex.parallax.com/objects/category/8/?o=2&ot=asc
I changed it so that the compass rose turns around instead of the needle. I also changed it so that the mean value from 21 readings is used. This to make the compass more stable. Here I still have a problem with the code because the step from 359 to 0 degrees causes problems. By mistake I have placed E and W signs 180 deg wrong as can be seen from pictures but that’s an easy change.
For the reading of the ad-converter ADC0831 I used a piece of code found in example 19 in the collection "Spin Code Examples" written by Dave Scanlan found on the forum. As output I used a graphical display instead in a similar manner as for the compass. The two peaces of code was mixed together as shown. To save space in the cache memory I have also altered the "graphics" object a little taking some parts away not used.
Below is shown the circuit. The hand drawn parts are the adding made by me to the propeller proto board.
Wiring diagram
The wiring diagram is a cutout of the scheme for the proto-board with my components added. Hopefully it will be possible to read. The zeroing of the op-grid is through the resistor 78k and the pot 5k. Depending on individual variance of the SPD-015-G-2 the 78k could need to be adjusted if the 5k will not be enough to zero.
The code is provided in a separate text file further down. Note that the sentence
long %0001 'mode PAL
under tvparams in the bottom part of the code means that the coding is for PAL-type TV. If you want NTSC-type coding change this sentence to:
long %0000 'mode NTSC
Now if everything is working the TV-display will show something like:
Here is a list of components used in the project:
Parallax provided equipment: Parallax proto board (rev A) with propeller ship
HM55B compass module
Other equipment: Sencera pressure sensor called SPD-015-G-2
Resistors: 270 Ohms, 560 Ohms (2), 1.1K, 10K (4), 22K, 56K (4), the 78K resistor comprising one 56K and one 22K.
Pot: 5K, Op-amp LMC660, Ad-conv ADC0831.
Pressure tight cavity: Water dissolver for pressurized air from BILTEMA (a Swedish company). Rubber balloon for flushing children’s ears (can be bought at pharmacy). Copper tubing and rubber hose. Wiring and connections.
Here is the code. The code is written in the spin language. Information can be found at Parallax home page.
It is a mix of downloaded parts and self made parts. There are more objects called in the main code but they are standard objects provided by parallax and can be found at their home page or included in the software.
HM55B Compass Module Code (This is the top part of the code)
Graphics_mini (This is the graphics object with changes to make it smaller)
HM55B Compass Module Asm (This is one of the objects in the code (not changed from parallax home page))
Other objects in the code will be found at parallax home page. They are also included when bying the propeller programming tool.
Good luck!
Jacob
Interesting links:
This is a site with many other homebuild projects!
http://easyweb42.exeo.se/
This is a link to a ship building project here in Motala. (Swedish language)
http://www.nordevall.com/se/gazeti/1/hem
This is a link to a ship building project in Forsvik not to far from Motala. The interesting thing about this project is that it is a new copy of a steam powered paddel wheel ship intended for channel service. (Swedish language)
http://www.dykkesiden.com/
This is a link to a wery nice Norwegian diving site (Norwegian language)
http://www.klensmide.se/
This is a link to hand made quality Swedish tools, especially suitable for wood carving.
IMPORTANT!: The author does not take any responsibility for that here presented information is free from faults. You build at your own risk and have to be careful testing the equipment. If any harm to people, living creatures or other material would arise the author don’t take any responsibility for this. This applies to both hardware and software. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.