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
#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


Messages In This Thread
RE: Errors on large motor controller with tinypilot - by syohana - 2019-07-21, 10:23 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)