Hmmm..... interesting test dive today.
Auto heading works... sort of.... as I am using an integer value to read my heading and only allowing forward drive when the actual heading is <= +/- 5 degrees referenced to the desired heading, there is a dead spot between 5 degrees and 6 degrees where neither auto heading or forward drive work.
of course the tide is trying to spin the rov and the auto heading is correcting it but it sits at between 5 and 6 degrees so I can't drive forward. this needs a re-think.
EDIT- I've corrected the code above, it works better now.
Ballasting has helped my vertical problem, the vehicle now dives but very slowly and auto depth doesn't have enough power to work properly.
With my old single direction ESC it gushed up a fountain of water with full throttle applied before it dived, now it just whirls the prop and dives slowly. Current draw for that motor is also very low with the new ESC.
I'm trying to work out if this is a function of all bi-directional ESC's that they give half throttle compared to a single direction one. or if I just have a crap ESC that doesn't map the input pulse width to the output frequency properly.
Anyway, I've ordered a Mystery Cloud 30A boat ESC that is programmable and calibrateable. hopefully that will sort it out.
Just out of interest I found this link on how to measure the Kv of a brushless motor-
https://fishpepper.de/2017/10/17/tutori ... ess-motor/
Using my scope to measure it's output my motor is approximately 433Kv. that should give me 5200RPM max at 12v.
And I've checked with no load and the scope on the motor drive which is showing just under 2ms between peaks which works out at just over 5000 rpm. so far so good.
EDIT- Bingo!!! found the problem.... that esc IS giving me full throttle with no load but it's not liking the load the water puts on the prop at startup and it's throttling back. some setting in the esc that I can't access. not under-voltage cos that's regulated to 12.4v with a 300W dc-dc converter in the ROV, not overcurrent cos it should handle 30A. hmmmm..... lots of beard stroking going on. I'm confused.com.
It also ramps up the throttle slightly after a few seconds with no load. some weird car orientated algorithm methinks.
Although the product description states- " Can be used for vehicles, boats, underwater thrusters.
Bidirectional 1: 1 power output, without brake, direct reverse, fast speed and good linearity."