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
On the <, <<, >> and > buttons
#1
Both the web interface and the OpenCPN plugin have these <, <<, >> and > buttons when the autopilot is not engaged. When I press them, the effect is normally that the motor goes into the right direction, although sometimes, it seems to go forth and then a bit back. Furthermore, the travel the motor moves is somewhat unpredictable: sometimes the move is small on the first press, larger the second press. Might this have to do something that the servo was not calibrated yet? 

What I actually would like to see, is that the motor moves (not too fast) when I press one of these buttons, and stops when I release them. Because with a tiller pilot, you typically hand-steer the boat until it is on a stable course, and then you want to hook up the tiller pilot without moving the tiller. So I'm used to flicking those buttons until it clicks on the hook, then hit auto. Right now, this is a hit-and-miss exercise. Does the servo allow this type of operation?

On a general note: how is the servo calibrated and is this remembered? It seems to figure out by itself what its travel is? What parameters are involved and what is the mechanism behind it? What can I do by myself, as some of the parameters seem to be editable in the opencpn plugin signalk client.

Thx!


Attached Files
.txt   servo parameters.txt (Size: 1.08 KB / Downloads: 192)
Reply
#2
(2019-07-30, 04:45 PM)ironman Wrote: Both the web interface and the OpenCPN plugin have these <, <<, >> and > buttons when the autopilot is not engaged. When I press them, the effect is normally that the motor goes into the right direction, although sometimes, it seems to go forth and then a bit back. Furthermore, the travel the motor moves is somewhat unpredictable: sometimes the move is small on the first press, larger the second press. Might this have to do something that the servo was not calibrated yet? 
The problem is with how it is handled, the software can be improved. The reason it might "go back" a little is the integrator used. Maybe it should reset this during manual movement.
Quote:What I actually would like to see, is that the motor moves (not too fast) when I press one of these buttons, and stops when I release them. Because with a tiller pilot, you typically hand-steer the boat until it is on a
I could add a setting in the plugin for manual movement speed. You can also reduce the servo.min_speed and servo.max_speed if you want to move slower, but this will have an effect when engaged too.

In the autopilot_control.py script, it's possible to command different speeds using the slider if the servo.min_speed is less than servo.max_speed

Quote: stable course, and then you want to hook up the tiller pilot without moving the tiller. So I'm used to flicking those buttons until it clicks on the hook, then hit auto. Right now, this is a hit-and-miss exercise. Does the servo allow this type of operation?
If you had rudder feedback in the tiller pilot, it would be possible to use the center function. To make it perfectly align to the rudder to easily engage, it would need feedback from rudder as well as tiller pilot position which is not implemented.

The actual gpio buttons should work better for manual control, but the remote control isn't great.

I generally get the tiller pilot about the right position then engage. If the autopilot can hold course it will work, maybe making an initial S turn.

It's a great idea to implement button up event for the opencpn plugin, but I'm not sure how I can do it for the web interface. There is also unfortunately some lag from the time you click to when the motor actually moves as well.
Quote:On a general note: how is the servo calibrated and is this remembered? It seems to figure out by itself what its travel is? What parameters are involved and what is the mechanism behind it? What can I do by myself, as some of the parameters seem to be editable in the opencpn plugin signalk client.

Thx!

It doesn't really figure out by itself anything. There are some routines for calibrating the servo, but they are basic hacks. Most of the servo settings are stored in the eeprom of the arduino for the motor controller. The default settings usually work, but you might improve things by changing some of them using the client.

You can also run:
signalk_client_wx [hostname]
Reply
#3
In my custom UI (https://github.com/marcobergman/pypilot_ray) I programmatically set servo.command for manually positioning the actuator. However, each time I do so, I'm instantly getting a SATURATED flag and it won't go away anymore. The servo.py code mentions "# if windup overflows, move at minimum speed". If I see this flag, does that mean my windup has already overflown? I don't want to be sailing with a machine that moves at minimum speed Big Grin !

Thx!
Reply
#4
What exactly are you trying to achieve? Control from new button interface? You might not want to make a new tcp connection to read each value.

I agree it should not move at the minimum speed, but also moving at the maximum speed could be bad in some cases.

What about a manual speed which you can adjust for manual control? I want to improve manual control.
Reply
#5
(2019-09-01, 12:43 AM)seandepagnier Wrote: What exactly are you trying to achieve?  Control from new button interface?   You might not want to make a new tcp connection to read each value.

I agree it should not move at the minimum speed, but also moving at the maximum speed could be bad in some cases.

What about a manual speed which you can adjust for manual control?   I want to improve manual control.

Sorry for not being clear. I'm worried that the saturated flag, which I seem to cause with my manual control action in standby mode, would impact the performance of the autopilot later on, when autopilot is activated. Like the machine says 'I'm saturated, I cannot work properly now'. 

So I'm not worried about the motor speed while doing manual control. The manual control motor speed is fine.

In other words, 
  • I don't know what to do when I see the saturated flag, and
  • I don't know what I have done wrong to cause the saturated flag.
So those are my questions.


BTW, I spent 3 hours today on the water testing my PyPilot raymarine tiller pilot conversion, and I'm over the moon with its performance! Sailing in 4-5 beaufort, consistently zero cross track error. So don't get me wrong - I'm quite happy.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)