Underwater ROV Control

Ok everyone here it is my start.

So this is what I have been working on a control system for an Underwater ROV.

I made my very first projects page on Wiki here… [url]microframeworkprojects.com

I even made a video, yes it’s shotty and I am not one to make presentations, but will give you the jist of what I am doing.

If anyone happens to look over my code and has some suggestions please feel free to offer them. This is my first attempt of actually trying to make something practical.

Remember before I found TinyCLR, I didn’t know anything about embedded systems nor computer programming (not like I do now, but I am learning).

So at the very least if anyone can gain anything I hope it helps.(It’s not as complicated as the rest on here, but maybe will help out some other newbies)

Mike in MN

***spelling and added

500 points. Want to see more when ti is complete :slight_smile:

Thanks Gus, mostly for all the help and Guidance… :-[ :-[

You may be waiting for a while, now I gotta build the darn thing. Good excuse for me is that’s winter and all the lakes are frozen…lol

Mike in MN

Using an ROV to ice fish is cheating!

Good start man, can’t wait to see some props on that thing.

Lol you copied my hexapod project page :smiley:
Glad you liked it :wink:

Looking really nice! You might want to exchange that big serial connector with some own wiring. I can imagine that there is not so much space in the finished product.

Compliments, very nicely done! :clap:

Foekie, yeah I figured it was your Hexapod project that got me started, why not. If you look at the code for the Panda its very similar to your Hexapod also. Long term I might put a servo or 2 on the camera to pan and tilt, so there might be more I could learn from the Hexapod project…Thanks for sharing!

I also have some RS485 components on order and been learning about Eagle, I was thinking to make it more compact to design a board similar to the Tinker kit board, but specific in the components I will use that I expose all the pins, plus not have a need to stack different shields/boards and yes, streamline the cabling a bit.

I may not end up using the Relay board in the final project because it’s so big, but since I had it on hand it was good practice to play with.

Trying to learn a bit about sonar/depth finders also right now. That would be fun to implement also…:slight_smile:

Thanks again,

Mike in MN

The hard part with any ROV project isnt the electronics or control system but the build and water proofing issues. Have you deiced on how to build or what thrusters to buy?

With a nick like CNC-mike you probably have some great tools at your disposal. :slight_smile:

Haha cool, I did not yet look at your code. Will do now.
One thing I would like to tell you is that the hexapod code was built as fast as possible. It’s not so efficient to be honest. :whistle:

You might want to change this:

    
public int POVParse(int p)
    {
        int y = 0; // Stop

        if (p != -1)
        {

            if (p == 0)
            {
                y = 1; // Forward
                return y;
            }

            if (p == 4500)
            {
                y = 2;// Forward-Right
                return y;
            }

            if (p == 9000)
            {
                y = 3;//Right
                return y;
            }

            if (p == 13500)
            {
                y = 4;//Right-Back
                return y;
            }

            if (p == 18000)
            {
                y = 5;//Back
                return y;
            }

            if (p == 22500)
            {
                y = 6;//Back-Left
                return y;
            }
            if (p == 27000)
            {
                y = 7;//Left
                return y;
            }
            if (p == 31500)
            {
                y = 8;//Left-Forward
                return y;
            }
        }
        return y;
    }

into this:

    
        public int POVParse(int p)
        {
            int y = 0; // Stop

            if (p != -1)
            {
                switch (p)
                {
                    case 0:
                        y = 1; // Forward
                        break;

                    case 4500:
                        y = 2; // Forward-Right
                        break;

                    case 9000:
                        y = 3; //Right
                        break;

                    case 13500:
                        y = 4; //Right-Back
                        break;

                    case 18000:
                        y = 5; //Back
                        break;

                    case 22500:
                        y = 6; //Back-Left
                        break;

                    case 27000:
                        y = 7; //Left
                        break;

                    case 31500:
                        y = 8; //Left-Forward
                        break;
                }
            }
            return y;
        }

@ Geir…Well still playing around with stuff. Everything from Magnetic couplers to just machining some tight-tolerance shafts with seals. Yeah, I have access to machining equipment, but not personally only through work and friends that own shops, so kinda waiting till I get it figured out to pull those triggers…:)…

In the next year or so I would like to get my own little CNC mill and CNC lathe for the garage then a guy can do R&D work for nothing (other than the expense of buying the machines).

Depending on how the next couple months go, I may be getting a CNC mill. I used to own a machine shop and my ex-business partner and I are talking about a little side project which may mean that he will send one of his machines up to me. So crossing my fingers things will come together there…:slight_smile:

On a side note about thrusters, I have see alot of homemade stuff and ones that Crustcrawler sells(boy are the expensive). Would like to have one just to tear it apart, probably just a regular motor with some tight tolerance machining (oil filled I am sure). Probably would cost $100 to make, if you have the right equipment.

As far as the water tight stuff, goes this is all true. I think this is why commercial ROVs are so expensive, but with a little bit of research and design, should be accomplished. I have been making precision machined parts for years, instead of someone else’s designs, I figure I should be able to put something together myself, maybe???..lol

@ Foekie, well for my underwater project, I don’t need the speed like the AUV projects with gps and autonomous behavior, I just need to use it like a rc car, but underwater with sensors and stuff, shouldn’t need to be too fussy. But I am sure as time goes on depending on the things implemented, it may need to change.

Either way, it’s been a long project, could be longer yet, but now that I have something to control it with, it may start picking up speed.

Mike in MN

@ Foekie,

Yeah, that makes complete sense, I used the switch/case other places, don’t understand why I wouldn’t use it for this. Sometimes you just have one thing on your mind.

Good suggestion!

Thanks,

Mike in MN

Not fast as in “fast program” but fast as in “not so beautiful”. :whistle:

[quote]@ Foekie,
Yeah, that makes complete sense, I used the switch/case other places, don’t understand why I wouldn’t use it for this. Sometimes you just have one thing on your mind.[/quote]

Yes I did see that, so I was kind of wondering.
Such things are easily done wrong. (believe me, I know all about it :whistle: )

I guess I wouldn’t no any better/different…lol

As long as it all works, which it seems to.

The biggest thing for this project for some reason there was a leak that the GC wouldn’t clean up, I would run out of memory. After reading on the forum and playing, even envoking the GC wouldn’t clean it up, but that little sleep at the Serial Event trigger changed it. Don’t get it either, but works…:slight_smile:

It may have been something else driving the leak in the Panda, but with that sleep there, the memory stays about constant each time the GC runs. It was a growing Byte_Blob I believe.

Mike in MN

I can’t imagine that the event handler would cause this.
With bones the domino had the same event handler for receiving commands and nothing happened (even though I pushed to memory to it’s limit for playing larger audio).

Strange… :think:

Mike:
It’s a great project! :clap:

See!! It’s is ‘Freakin’ Easy!'
Just like I told you,
when you started a month or two, ago.

Yeah, I couldn’t figure it out, I think it has to do with the Serial buffer, not necessarily the event, but that little sleep fixed it, or covered it up…lol

@ sam

Yes it is ‘Freakin’ Easy’, but over whelming for a newbie/noob…lol

Yes, I would have only been able to put it together with everyone’s help on here!

“Has it only been a month or two, seems like forever!!!”

I do remember though that the first hardest stuff that I was bugging everyone about was the serial stuff though…Oh memories…lol… I did learn alot about bytes and arrays and such though through that

Thanks again!

Mike in MN

Looks like a great project Mike!

I was thinking I would play around with sch 40-80 4" pvc pipe first instead of doing a bunch of milling upfront. PVC is easy, cheap, and fast to demo. Should be able to get around 200-300ft. Any exit points (i.e. holes) will naturally be the key areas to focus on. I also saw something the other day on Discover (or something). A guy did some micro sensor stuff and attached to Seals or something to track dive depth, breathing, etc. He emerged the electronics in some kind of resin to make total water tight. Maybe someone knows what that stuff is? Then would not have to worry about crush or leaks. HW changes after resin probably not so good. Mabe some kind of hybrid system would allow some changes.

I would suggest PVC too. It might be not suitable for larger depths, but it’s easy, cheap and you can get it everywhere.

Also, milling aluminium is costly and needs to be done VERY precise. Not something you can do as a beginner… ::slight_smile:

Yes to the PVC. This how most hobbyist level stuff is made. And as far as a project that anyone is readily able to do, this gonna be my first step. Also to prove the concept and work out bugs.

Yeah, I read alot about different resins and such, I quick inexpensive solution to water proofing electronics guys have been doing is submersing all the electronics in wax. Go to a hardware store by some wax rings for toilet seals melt it down, pour it into a cavity with the electronics in it, done.

Alot guys use relays for controls and just make a wax brick with all the relays in there. Good thought, haven’t seen a wax embedded micro controller yet.

As far as the aluminum one, that will be some time, but in the mean time still fun, PVC will get the ball rolling though.

Mike in MN

Was just thinking. PVC should also take you all the way to bottom (.43*500ft= 215psi). As the compression strenth is much stronger then the burst ratings. And if you make the wax bricks, then I guess you can allow the pvc to fill with water and just worry about neutral buoyancy. The reminds me. The seal takes in just enouph air to be neutral at the depth it wants to fish at on each dive.