This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Errors on large motor controller with tinypilot
#1
Hi there,

I'm trying to get sean's large motor controller working with tinypilot. Got everything connected and wired up at last.

When I try to move the rudder manually with the arrows on the web interface (autopilot not engaged) I get a brief (but fast) motor movement and then FWD_FAULT OVER_CURRENT or FWD_FAULT SATURATED, same in the other direction but with REV_FAULT.

I tried reducing both slew_ settings to 3.0 and increased MAX_CURRENT to 19.7. Since the motor controller has a 20 amp fuse I didn't want to go beyond that.

It doesn't seem to help. Do the manual rudder control buttons on the web interface actually respect those settings?

I'm moored alongside so I tested autopilot mode just by setting the course slightly off my heading to watch it adjusting the rudder. It seemed to work reasonably well, kept tweaking the rudder a small amount in the same direction. It didn't immediately have the same error as above but when I adjusted the course some more and it tried to move the rudder faster, then it got the same error.

I'm using a Navico hydraulic pump, 12v. Even with slew at 3 it's moving plenty fast enough.

Any ideas for which other setting I should adjust? As these settings don't seem to be accessible in the web interface I've been going in by ssh and adjusting pypilot.conf with nano editor, saving them, running "filetool.sh -b" and then "sudo killall python" which seems to restart the pilot and hopefully make it reload the config. I also tried a full reboot after editing the config and confirmed that the changes persist. Am I doing this the right way?

One more thought.... When the motor hit the limit of the hydraulic ram it kept on running (see my separate rudder calibration thread). I'm pretty surprised that it didn't immediately get an OVER_CURRENT error when it hit the stops, yet it gets those errors in normal movements!

Thanks!
Chris
Reply
#2
what imu do you have mine acts weird if it has a loose connection
Reply
#3
Hi Jim I'm not sure of the imu type but it's the standard tinypilot built by Sean. I think all the connections are ok. The compass seems to work and the pitch/roll sensors are steady and calibrated. I don't see how the IMU could cause a motor controller error.
Reply
#4
I have the large motor controller, received last month. I got over current errors below 7.8 amps with my Octopus hydraulic pump, but not with current limit set to 9 amps.

I still got saturated errors and don't know why. It did steer 5 days straight with no problem, basic pilot, calm seas, no wind motor sailing.

Tinypilot 20042019 image.
--
Larry - s/v Katie Lee Passport 45 Ketch (For Sale) - somewhere in Taiwan
Reply
#5
(2019-07-20, 09:59 PM)syohana Wrote: Hi there,

I'm trying to get sean's large motor controller working with tinypilot. Got everything connected and wired up at last.

When I try to move the rudder manually with the arrows on the web interface (autopilot not engaged) I get a brief (but fast) motor movement and then FWD_FAULT OVER_CURRENT or FWD_FAULT SATURATED, same in the other direction but with REV_FAULT.

Some of these flags maybe should be renamed but for now:

SATURATED -- really a warning rather than error, that the motor is being commanded harder than it is moving. This is normal in manual mode, if the autopilot is engaged it indicates that a faster motor would give better steering performance.
DRIVER_TIMEOUT -- is supposed to indicate the wiring from the controller to the motor is disconnected
FWD/REV_FAULT -- a real error indicating that the current limit has been reached and no more movement in that direction until it moves the other way


So, if you are seeing OVER_CURRENT in normal operation, you can:
1) reduce max_slew_speed. Are you sure you changed the max slew speed to 3, or the max slew slow? There are two settings, one for speed up and the other slow down.
2) increase max current. It is fairly normal to have twice the running current the first 100 milliseconds or so when moving. Reducing the slew speed should reduce this spike but you might need to account for this. The fuse is 20 amps, but it takes forever to blow at exactly 20 amps. You can make the max current 30 amps if needed. You can also use a 30 amp fuse. Maybe in the future I can have a lower current limit for average 20 seconds, for now it reacts in 50 milliseconds.
3) If the motor is fast enough, you can reduce the maximum speed by decreasing servo.max_speed to something less than 1.0. This will reduce power and noise but limit the speed of rudder travel.
4) If the motor draws less current stalled than first starting no matter what you change, this is unfortunate and not like most motors, but for larger motors and pumps it's a good idea anyway to use rudder feedback to limit the travel rather than relying on motor stalling.


I think you must have the old (broken) version of the plugin if you can't change the settings. It should be possible to change them through the web browser interface or the menu.

Also compile pypilot plugin from github, or if windows maybe this helps?
https://ci.appveyor.com/api/buildjobs/v3...-win32.exe


If you have a linux and can install pypilot on it, you will get the scripts for calibration, client and scope. The scope is especially useful to viewing the servo.current and understanding why OVERCURRENT is triggered.

You don't need to use filetool.sh -b after changing pypilot.conf. In fact you can do this:

sudo sv d pypilot
nano ~/.pypilot/pypilot.conf
sudo sv u pypilot

To avoid rebooting this should be much faster.
Quote:I tried reducing both slew_ settings to 3.0 and increased MAX_CURRENT to 19.7. Since the motor controller has a 20 amp fuse I didn't want to go beyond that.

It doesn't seem to help. Do the manual rudder control buttons on the web interface actually respect those settings?
It should.

I hope this helps.
Reply
#6
(2019-07-21, 04:35 PM)seandepagnier Wrote: Some of these flags maybe should be renamed but for now:

SATURATED  -- really a warning rather than error, that the motor is being commanded harder than it is moving.  This is normal in manual mode, if the autopilot  is engaged it indicates that a faster motor would give better steering performance.
DRIVER_TIMEOUT -- is supposed to indicate the wiring from the controller to the motor is disconnected
FWD/REV_FAULT  --  a real error indicating that the current limit has been reached and no more movement in that direction until it moves the other way


So, if you are seeing OVER_CURRENT  in normal operation, you can:
1)  reduce max_slew_speed.    Are you sure you changed the max slew speed to 3, or the max slew slow?  There are two settings, one for speed up and the other slow down.
2)  increase max current.   It is fairly normal to have twice the running current the first  100 milliseconds or so when moving.   Reducing the slew  speed should reduce this spike but you might need to account for this.   The fuse is 20 amps, but it takes forever to blow at exactly 20 amps.   You can make the max current 30 amps if needed.  You can also use a 30 amp fuse.   Maybe in the future I can have a lower current limit for average  20 seconds, for now it reacts in 50 milliseconds.
3)  If the motor is fast enough, you can reduce the maximum speed by decreasing  servo.max_speed to something less than 1.0.   This will reduce power and noise but limit the speed of rudder travel.
4)  If the motor draws less current stalled than first starting no matter what you change, this is unfortunate and not like most motors, but for larger motors and pumps it's a  good idea anyway to use rudder feedback to limit the travel rather than relying on motor stalling.


I think you must have the old (broken) version of the plugin if you can't  change the settings.   It should be possible to change them through the web browser interface or the menu.  

Also compile pypilot plugin from github, or if windows maybe this helps?
https://ci.appveyor.com/api/buildjobs/v3...-win32.exe


If you have a linux and can install pypilot on it, you will get the scripts for calibration, client and scope.  The scope is especially useful to viewing the servo.current and understanding why OVERCURRENT is triggered.

You don't need to use filetool.sh -b after changing pypilot.conf.  In fact you can do this:

sudo sv d pypilot
nano ~/.pypilot/pypilot.conf
sudo sv u pypilot

To avoid rebooting this should be much faster.
Quote:I tried reducing both slew_ settings to 3.0 and increased MAX_CURRENT to 19.7. Since the motor controller has a 20 amp fuse I didn't want to go beyond that.

It doesn't seem to help. Do the manual rudder control buttons on the web interface actually respect those settings?
It should.

I hope this helps.


Hi sean, thanks for the comprehensive reply.

I hadn't tried the opencpn plugin yet. It says on the opencpn website that the plugin doesn't work with the current version 5 of OpenCPN for MacOS so I was waiting for an update. I just noticed I still have opencpn 4.6 installed too so I have now installed the plugin on that and will have a play with it.

It seems like maybe the motor current measurement needs some smoothing or a longer sampling period, perhaps my motor is a bit noisy?

By definition the motor is stalled (not rotating) when it first starts so the startup current will in theory be exactly the same as the stall current. The difference is the duration - startup current decreases from stall current as soon as the motor starts turning. Perhaps the sampling period should me more like one second than 50ms? Or stepped thresholds, like 50ms:40a, 1s:25a, 10s:19a 

I reduced both max_slew_speed and max_slew_slow to 3. I will try going down to 2.

I hadn't tried the servo_max_speed setting, wasn't sure how it worked. I'll give that a go when I have time to play with the pypilot. Monday tomorrow, back to the day job Sad Can't test it now because my wife is sleeping next to the hydraulic pump motor, I wouldn't be popular!

I do have an old ubuntu laptop I could dig out or could run ubuntu in virtualbox to try those scripts.

Agree the error naming isn't intuitive. I had no idea what Saturation meant. FWD_FAULT could be changed to PORT_OVERLOAD, SATURATION to MOTOR_IS_SLOW?

Many thanks and best wishes,
Chris
Reply
#7
In theory the startup current is the same as stall, but the 50ms sample period may be enough. If not, reducing the slew speed will greatly reduce this startup current and it's a lot easier on the linkages of the drive system.

Maybe PORT_END and STARBOARD_END instead of FWD_FAULT and REV_FAULT?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)