My first Picaxe project - ROV

fizzit

Member
My Submersible ROV previously was controlled via relays and switches. The system took up 6 wires of the ethernet cable, so I could not, say, add more than one accessory controlled from the top such as a light, servo, or another camera. It also wasn't proportional. A couple months ago I had the idea of converting it to be microcontroller controlled! I had some experience with the basic stamp, but I only had one and couldn't afford another. I had also heard of the Picaxe from a friend that took a class on it from Ed Sobey, and looked it up, and, well, here I am.

On the recieving end there is a Picaxe 28X1 and an 08M. On the sending end (the control box) there is an 18X.

I used two thumb joysticks from sparkfun. As I found out when I got them, they have built in buttons which is extremely convenient because I don't have to put in a button for the light. The joysticks are set up so that the vertical thrusters are controlled by the horizontal potentiometer in the left joystick and each horizontal thruster is controlled by the respective vertical potentiometer in each joystick. For some reason one of the joysticks came without a horizontal pot which didn't matter to me but maybe be wary when ordering them.

I looked at commercial options and they were too expensive for what I wanted so I built my own ESC. I wouldn't have been able to do it without a bunch of helpful people on this forum and at RCGroups (they helped me find a suitable MOSFET). I used 6 FDP8878 Philips logic level MOSFETs and three 8A omron DPDT relays. Three MOSFETs switch the relays (reverse and forward) and three provide PWM control of the motors. Luckily the whole thing worked and continues to work without ever breadboarding it!

The rest of the recieving circuit, however, permanently resides on a breadboard. It was too long to fit with the end cap for the ROV in so I hacksawed it in half :p. In order to get the whole bundle in (breadboard, ESC, terminal strip) I had to flatten out all the components on the breadboard! On the breadboard are two sets of power rails, one 12v, the other 5. There are two voltage regulators. One is a LM317 providing 8.1 volts to the camera and a LM7805 providing 5v to the two picaxes on the breadboard.

The upgrades I have planned so far:
-After the first dive (today or tomorrow) I will add another MOSFET two switch on and off the lights. It would be a lot of work to reprogram the 28X1 to accept a signal to switch the light so I might just use the 18X to send a signal down a spare wire in the ethernet cable. I haven't wired in the buttons on the joysticks yet, though.
-Sometime soon in the future add the two servos I have to provide pan and tilt for the camera. This will be more work because I'll need to program the 18X and 28X1 and make a special servo mount for the camera.
-Sometime maybe add a manipulator to grab stuff or go fishing :)

Bugs in the code:
-Takes a moment to respond to controls
-Proportional control isn't quite right - when the joysticks are only halfway to the end of their range of motion the motor is already on full
-Too easy to trigger horizontal thruster when using vertical and vice versa

ROV specs:
built in 12v 7ah sla battery
4x modified 12v 500gph rule bilge pumps
100ft tether with 14ga power wire (used to carry main power but now just provides power to the control box) and ethernet cable
Viewing device is myvu solo universal media viewers

This post is already way too long so I won't add any more. Comments, suggestions, questions are appreciated!

test2.bas is for the 18x (control box)
RECEIVING END.bas is for the 28X1 (rov)

And here are pictures of the ROV and the control box
http://s1018.photobucket.com/albums/af305/bananafred/

Edit: Now the photos work. Woo for photobucket!
 

Attachments

Last edited:

Dave E

Senior Member
Sounds like a good project.
How do you use the bilge pumps? Like water jets?
Also, I was not able to see the pictures. Website lists 7 pictures but states that file is not found.
I would like to see a schematic if you have one.

Dave E
 

fizzit

Member
I basically took the casing off and the impeller off and put on modified (trimmed) RC airplane props. I have a schematic but it is terrible, I will redo it soon. I just tried re-uploading the photos and it still won't work :mad: I'll try another site.

Got the photos working. Now I'll make a new schematic.
 
Last edited:

fizzit

Member
48 views and one reply? :(

Anyways, I took it out for the first dive today and we put it in and all was going well for a few seconds until the vertical thrusters got stuck going "up" and wouldn't turn off. I could switch the relay and make them go into reverse and everything else was working fine. We pulled it out and opened it and a puff of smoke came out. Not good. I pulled out the circuit stuff and the FET controlling the two vertical motors was clearly smoked (shown in the pictures I just added to photobucket). I guess switching two motors at 4khz produced too much heat and in an unventilated area and without a heatsink it burned out. Luckily I have a spare TO-220 heatsink lying around so all I have to do is replace it and put a heatsink on it, I think... will that be enough?

New and old photos are here:
http://s1018.photobucket.com/albums/af305/bananafred/
 

BeanieBots

Moderator
I don't see a circuit to comment on.
So, you fried the MOSFETs using PWM?
You're not the first and you won't be the last:rolleyes:

This comes up every month and I think it's been about a month now so you're right on cue.
So, let's do it all again!

Which MOSFET?
What current?
What drive circuit?
Any over current/temp protection?
Any basic calcs for predicted heat dissipation?
Any consideration for gate capacitance? (gate what???)
 

Andrew Cowan

Senior Member
As far as cooling goes, why not make the heatsink touch the water? You've got a sub - use water cooling!

On a sub note, the 'quick reply' button takes me to the 'quotes' page.

Andrew
 

Hysub

New Member
ROV

48 views and one reply? :(

Anyways, I took it out for the first dive today and we put it in and all was going well for a few seconds until the vertical thrusters got stuck going "up" and wouldn't turn off. I could switch the relay and make them go into reverse and everything else was working fine. We pulled it out and opened it and a puff of smoke came out. Not good. I pulled out the circuit stuff and the FET controlling the two vertical motors was clearly smoked (shown in the pictures I just added to photobucket). I guess switching two motors at 4khz produced too much heat and in an unventilated area and without a heatsink it burned out. Luckily I have a spare TO-220 heatsink lying around so all I have to do is replace it and put a heatsink on it, I think... will that be enough?

New and old photos are here:
http://s1018.photobucket.com/albums/af305/bananafred/
FIZZ.............I´m ROV supervisor if you need some tips.......
 

fizzit

Member
@BeanieBots: Yeah, I have been forgetting about that... I'll put it up this evening. That's when I'll next be able to use a scanner.

Unfortunately I do not have a good multimeter or watt-meter so I cannot measure the currents involved, however from other people's measurements I can guess around 10-15A when the motors are running. I am switching at 4 KHz. It is a 12v system. My calculations predict that heat from switching losses is around 0.084w, which basically means I messed up. I also calculated that at 15A the heat dissipated from rDS(on) should be around 4W.

I didn't have any over current/heat protection, not even a heatsink which in hindsight was pretty stupid. What I'm trying to figure out is whether I just need a heatsink or if I need something more.

I didn't do anything for gate capacitance except the standard resistor.
 

Andrew Cowan

Senior Member
The standard resistor?

That sounds bad - can you post your schematic?

Resistor on the gate = slower on/off times = more heat.

A
 

BeanieBots

Moderator
"Standard resistor", what's that then?
You probably only need a small heatsink, just drive it properly.
I'll await your circuit and FET type before commenting further.
 

fizzit

Member
The MOSFET is the FDP8878. The circuit is now in the photobucket album.

Edit: I'm sorry about the quality of the schematic. I'm terrible at drawing. If its unusable I'll make another.

The third picaxe manual says to use a resostor when interfacing with Mosfets.
 
Last edited:

BeanieBots

Moderator
An extremely good MOSFET you have there!
http://www.fairchildsemi.com/ds/FD/FDP8878.pdf

Unlike many other 'logic' level FETs, this one really does switch on quite hard at anything much above Vg=4v. Even the gate capacitance is quite low for such a high current rating. (see fig 8).
Hence, I would not anticipate too many issues running at 4kHz PWM.

However, there are two issues of concern.
Your load current is ~15A with presumably a much higher surge current.
Check out fig 10. You could be quite close to the limit during switching.
With an R(on) of ~20mOhm at Vgs=4.5v and a load current of 15A, you will be dissipating ~4.5W. (close to what you calculated).
Add in switch losses and round up, that is ~5W.
With a junction to ambient thermal resistance of 43oC/W, you should expect a temperature of ~240oC with an ambient of 25oC.

That's too hot! Anything over ~70oC is bad news.
You WILL need a heatsink even with better drive.

Of even more concern is the lack of a catch diode across the FET.
It only has a 30v rating, you are probably giving it >100V from the motor flyback.

IMHO it essential to put a 'scope on the source to see how good the switching is and what volt drop you are getting.

EDIT:
Your gate resistors are 82ohm. That is comparable to the output impedance of CMOS logic drive so reducing it won't help much. I'd keep them in as protection for the PICAXE if/when the FET melts due to over temp which could apply 12v to the PICAXE OP and destroy the PICAXE as well.
 
Last edited:

fizzit

Member
I put a diode from the ground rail to the 12v rail on the speed controller along with the three on the relays. Will that be OK, or do I need one for each FET?
Thanks for all the help!
 

vikingsraven

New Member
If you need help

HI, i used to build Saab Seaeye ROV`s, Ive also been a ROV pilot tech 1 and done loads of motor and robotics stuff, if you need any advice or help let me know.
i would opto isolate those fets personally, why not go fo an hbridge driver for them as well.
Also try using 485 comms youll be able to get a longer tether on it.
if you get a chance contact me!
 
Last edited:

nbw

Senior Member
I like the idea of your project! I couldn't see a pic of the machine in its submersible case. Fantastic!
 

BeckettM

New Member
Andrew
I used to put a capacitor across the base resistor when I was pulse width modulating transistors. This helped with a faster switch on, and tended to square up the wave form.

I always prefer to use an transistor (or opto coupler) in between the drive IC and the thing that goes up in smoke, before the fuse blows.


Fizzit Nice project keep at it.
If all else fails more switching power.
 

fizzit

Member
Hey guys. It's been quite a while since I've posted about this, and things have been happening.
I actually haven't run the ROV since that dive with the fried transistor :)eek:)
I spent a heck of a long time working on it last summer and right after that dive I sort of got tired of working on it and took a break from it. However, now I'm back and I'll be using the ROV for something productive. I am doing a community service project for my school where I will inspect the city's docks with my ROV for structural flaws. I am currently making some modifications to improve reliability and usefulness so I can put in >15 hours on it without too many problems.

First:
I'll be re-doing the seals. Some stuff was leaking.

Second: I'm finishing up putting a pan-servo mount on the camera. Once I've assembled and tested all the other modifications, I will make the pan servo usable. Small steps.

Third: I've just moved all my components to a PC board. The size is considerably smaller than the breadboard and I won't have to worry about wires/parts coming loose. It's also more water and corrosion-proof.

In short, it's an overhaul. Hopefully it works, I will post pictures of the new hardware along with a video of my first dive once it comes! (this weekend, maybe)
 
Top