New builder New ROV ...Old problems .. :)

What are you working on .... Show off your Rov's Projects here.
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

New builder New ROV ...Old problems .. :)

Post by perfo »

I'm building a ROV so no real surprises there.
I will be using as far a possible standard type ideas but maybe not in standard ways.

At risk of repeating myself as I was too verbose in my introduction section this is my initial thoughts :---

A little about my project:- There is a mechanical latching system under water that controls some gates and during maintenance I need to be able to visually check if these latches are engaging/disengaging fully. I have toyed with all sorts of ideas on how I could attach a camera to the latch and get the video to the surface but I can't have an umbilical connected to the camera if it's connected to the latch as the latches get moved about with a crane. Anyway this has led me to believe an ROV is the way forward. MAX depth 30m and pretty clean fresh water.

There are in totally three pits with two gates in each pit and about eight latch positions on each gate. I will only be doing one pit at a time so may need to navigate to 16 positions under water and thus my design would hopefully allow some sort of auto pilot to press a button and the ROV move the next latch position. This would make it a lot faster and more workable if visibility deteriorates for any reason. Generally the visibility is good and I'm fairly confident I could manually pilot the ROV to the various way points but near auto is better.

My thoughts on my ROV .

Body:-
Main chamber made of 100mm PVC waste pipe with screw on end caps.
Acrylic dome mounted to the front cap for camera viewing.
Two floats above the main chamber forming a bit of a V a little like the enterprise on star trek. I'm hoping this will give me a stable platform. Over all adjusted for as slight as possible positive buoyancy just so I don't kick up too much crap if I go near the bottom.

Motors :-
I was intending to use three brushless ducted fans for thrusters but the fellow from hobby king said they can only be loaded one way and if I tried to reverse them they would probably fail. So I moved on to out runners for the lower rotational speed and 40 or 50mm RC boat props. I would like these shrouded really and will have to give some though to how to do that. The problem I've got at the moment is finding cheap out runners with an esc that will do reverse. It seems to me a lot of the reversible esc's are used in cars and boats and for in runner motors. One CW and one CCW for the forward backwards thing and one for up and down. I'm guessing 200w motors will be ok for this ROV but have yet to get a proper feeling on if that is reasonable.

Kit :-
PTZ IP cam..
Depth sonar and hold system :- Hopefully I'll be able to adapt some cheapo Piezo transducers and work out the distance to the bottom with a sonar ping and then type in the depth I require and the ROV will hold at that depth.

Communication and command :-
Now this is where I may be deviating from the norm... and I haven't really got enough experience to know it will work but I think it should.
The max depth is 30m but distance from the shore (bridge) will be 50m or more.
So I intend to put a floating buoy with a WIFI AP , raspberry pi / Arduino in and a media converter and run fibre optic from there to the ROV. In the ROV will be a similar media converter then an IP switch with a port allocated to the Camera and another to the brains in a raspberry Pi or Arduino.
I can just have a simple rope then tied to my buoy and not have unnecessary drag from a long umbilical. This set up also allows multiple folk to see the picture if they want as all they'll have to do is log on the WIFI AP with any device..
I'll be sending the controls from my laptop to the AP and thus the ROV and can move around freely.

Positional Sonar :- I haven't clue if this will work but I could have maybe six ultrasonic receivers (again hopefully these would be cheapo piezos) in a ring around the buoy in the water probably encapsulated in a mineral water filled thin ally pod. The RPI in the Buoy can send a ping command to the ROV and the ROV fire off a ping from an ultra sonic Transmitter (Piezo) . Then by listening to the receivers and working out the time differences it should be able to accurately locate the ROV and feed back that location to me at the top (X,Y,Z). If this works it will make it some much easier to navigate to the latches as there are about 18 positions these latches could be in. I will normally only be interested in 6 of those per dive but it would be a nice solution to be able to click on the latch position on my screen and the ROV go there. If I could stick an accurate GPS sensor in the Buoy then this really would be a handy easy navigation aid. But alas I could only get about 3m accuracy with a cheap GPS and that's probably too inaccurate to be helpful. I haven't thought of another way yet on how I can get and accurate fix on the Buoys position. maybe something similar to the underwater positional thing and that is to fire a longish wave radio signal at the Buoy and have an array of antennae and look for phase shifts in the radio wave to triangulate relative to the transmitter. I don't know if this would be feasible and isn't on my first to dos..
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: New builder New ROV ...Old problems .. :)

Post by perfo »

So far I've ordered

Hobby king boat esc 50A 4a ubec
NTM prop drive series 35-36A 910kv.350W out runner motors..

I didn't know the delivery time was so long on these which is disappointing but whilst I'm waiting I'll progress other points.
I'm going to order a servo driver
probably the ADA fruit 16 channel 12 bit. I'm going up this route so that the RPI can concentrate on other issues and just update the servo drier via the I2C bus as and when it needs to. I had thought of using an Arduino for this but for £15 is saves me any set up / programming time.

My first request for help starts here :--------

I'm a tinkerer and I think I can handle the software for the RPI but I'm not very good at integration between web page and real world...

So I have a web page on my RPI with buttons and dials on use a mouse and click on a button and the corresponding Output comes on on the RPI so all good.
However I have a joystick (old xbox fat controller) connected to my PC and I Want to use this to move the dials on the web page and thus be used to control the motors on the PI.
My controller works ok in windows the drivers and everything are fine and pressing a button or moving the joystick does the equivalent in the joy stick set up thing in windows...
How do I integrate that into my webpage on the PI and then how do I get at that data to control my motors....
Any help please ?
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: New builder New ROV ...Old problems .. :)

Post by perfo »

Jaman42 wrote: Depending on what language you are programming in, if C then I would use SDL (http://www.libsdl.org/) and if Python I would use Pygame (http://pygame.org/). I was going down this route at a start but then decided to build a controller at the surface instead so I went with another Arduino with a usb host shield and the usb host shield library (https://github.com/felis/USB_Host_Shield_2.0), I am using a PS4 controller.
Thanks for the tip...

My main fiddling language is VBA as I've been stuck with work systems that have only got access to the Microsoft office container languages. However I need to polish up my python so I'd probably go that route. When I say polish I mean a really deep clean first :)

I'll go and have a look at Pygame then.. I was tempted with html 5 but don't know a lot about that either ...
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: New builder New ROV ...Old problems .. :)

Post by perfo »

hmmmm.
Do you know of any simple wed pages with some sort of joystick interaction I can have a look at ?
That might give me a clue as to how to start on this one...

Thanks
rossrov
Posts: 383
Joined: Feb 28th, 2013, 5:01 pm
Location: Australia

Re: New builder New ROV ...Old problems .. :)

Post by rossrov »

Hi perfo. If you Google "javascript joystick" you will find this, or something similar: http://www.gamepadjs.com/
This could have been the next step for me. I got a webpage with mouse x,y,z and buttons working well, sending proportional control data to the ROV. That was with plain HTML and JavaScript, no libraries. Since then I have ditched the browser control and telemetry and am using the Processing language instead. Browser is still used to view the IP camera stream, so IE and the Processing application are running simultaneously

Hope that helps
User avatar
Moki
Posts: 119
Joined: Oct 21st, 2014, 2:19 am
Location: The Netherlands

Re: New builder New ROV ...Old problems .. :)

Post by Moki »

I would go for Javascript (nodejs), you even have a "great" example already ;) (see viewtopic.php?f=41&t=1520)
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: New builder New ROV ...Old problems .. :)

Post by perfo »

For some reason my email me when I get a reply isn't working so I hadn't checked back to this thread today.
However I have been playing with Java script and the html 5 Gamepad API and managed to get a simple web page displaying the joy stick positions.
I got all the info from this web page as it well written and easy for a learner like me to understand...
http://gamedevelopment.tutsplus.com/tut ... -cms-21345

However I'm not off to check out the links you've given me ...thanks Chaps..
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: New builder New ROV ...Old problems .. :)

Post by perfo »

I don't seem to be able to use the gamepadJs one as it need gamepad api enabling in Chrome and I can't find it in the list. I'm assuming this is a different gamepad api to the one I tried in html5 as that one works ok in chrome.
I'll get nodes Js installed on the RPI and see how I get on with it...
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: New builder New ROV ...Old problems .. :)

Post by perfo »

Well I've got a joystick to work ok..I think I've got a windows compatible one on its way from a friend but I've had to fudge the one I've got and use WIn 7 in test mode to load the drivers :)

On the control side I'm following two avenues.. I'm reading and learning a bit about Node js and using Moki's excellent front end to try and fathom (pun intended) how to use it... however as I said above my main fiddling language is VBA and I've managed to read the joystick details in to excel and thus I can easily make a front end in excel that can include any graphics or control that I can dream up. This then interacts with a MySQL database on the raspberry pi. Both ends update every 10 ms.
This set up works and is very simple (for me with VBA) I'll still perceive with node js for now as I'm learning a lot but hmmmm if it looks like the major part of my project is learning new software then I may stick to what I know and go the MS route.
I've thought of an idea to cut down on the network traffic and thus kill any latency and that is to use demand and actual parameters. So rather than you moving the joystick right or left and the motors respond in real time. All the joy stick will do is to alter the demand value send it to the RPI and let it decide how to get there. This will enable a much faster/finer response from the PI and would include a PDI term controller to minimize over shot etc.. the PI will feed back actual position to the screen so you know where you are. This also means that the 10ms update time wont affect the motor output as once you set the heading the adjustments to motors etc will be done in real time as fast as the RPI can do it...

Where is my motor ??? I don't think I'll be ordering from hobby king international warehouse again..

Of course if anyone wants to know how to read their Joystick in to excel then let me know an I'll post the code.. It took me a long time to figure it out and like most things when I did it is actually quite simple and uses an inbuilt windows driver so you don't even need to install anything...
perfo
Posts: 151
Joined: Jan 27th, 2015, 12:05 am

Re: New builder New ROV ...Old problems .. :)

Post by perfo »

Motor , esc and programming card now here.... waiting for servo drive card..then play with electronics..

6 inch dia plastic pipe in my yard and waiting for end cap and screw on access hatch.. then play with plastics...
Post Reply