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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rudder feedback potentiometer range

I'm having some troubles with my rudder feedback on a PCNautic tiller drive. This tiller drive has an integrated rudder feedback potentiometer of 10k, with a full range of 0 to 10k.

My custom motor controller has the same rudder feedback schematics as in

Rudder feedback works OK, except when the tiller is fully at port or starboard (when the potentiometer has a value near 0 or 10k). At this moment pypilot will disable rudder feedback (rudder.angle = False)

This is because in motor.ino the value is expected to be between some limits:
1387             if(v < 1024+1024 || v > 65472 - 1024)
1388                    rudder_sense = 0;

Looking at the schematics (I'm not very good at this) it looks like when the potentiometer is 0 it is normal to have an ADC reading of 0, and at 10k the value is indeed too high, very close to 1.1V.

I found out that I can somehow "fix" this by adding extra resistors (1k for example) on both of "+5V" and "GND" potentiometer wires.

My question is : what is the normal behaviour ? Should the ADC reading be between 0 and 1.1V (as I see it working, and in this case full port/starboard positions are considered as errors), or should they be between 0.1 and 1V (as the code seems to imply), and in this case is there something missing on the electronics side ?

Thanks !
yes you can add extra resistors in series to ensure it is always in range. Out of range will disable rudder feedback.

the range is 0-1.1v or 0-5v depending on the mode
Ok, but should "fully extended" in either direction be considered as out of range ?

I can understand the logic behind the min/max rudder fault, where rudder feedback is used to restrict the rudder angle.

But I do not understand why rudder feedback is disabled when fully extended.

What is the range of values from the rudder feedback sensor you're selling in the store ?
fully extended would normally not be out of range.

It is disabled because if you unplug the rudder feedback, or short it, you can disable rudder feedback.

The rudder feedback sensor on my store works just like a potentiometer except it is a hall sensor. In this case you mechanically set it up to not use the full range (which is 360 degrees so you generally never will)
Ok, so you will never encounter this problem with a hall sensor, only with (some) potentiometers.

I will add those extra resistors on my board, maybe you should also do the same on the next revision of your controllers...

FWIW, two resistors of 510 ohm, one on each potentiometer end (+5V and GND) do the job for me.
@Stelian 5V? I thought you use reference 1,1V? (We use 5V reference, in our version I don't see your problem)
Hi Onno,

My motor controller design is quite old, and I use 1.1V reference voltage for ADC.

But even in this design, the potentiometer is pulled up to 5V (and the resistors divide this to be in range).

The problem is that the rudder sensor on the PCNautic tiller is too "perfect" Smile, at fully extended position the resistor value is 0 ohm or 10k.

With a standard potentiometer I have here, when turned completly to the left I get some milliohms, and to the right almost but not exactly 10k.

I don't know if your your electronic design around this ADC input is the same as in Sean's controller, but with the latter, if you set the potentiometer to either 0 or full 10k, you will get 0v and 1.1v on the ADC, and this is considered as an error (rudder feedback unplugged) by the motor controller...

Now I look more in to it I don't really remember why and what we did, we use 5V reference and have only 1K resister between GND, I think Niels has also changed/deleted the errors in our version because we also have the end-switches inside (you have too), actually the sensor has in our setup not much use for now, sorry for the confusion.
Your design may be close from the one in Sean's high power controller (which uses 5V ADC reference):


But with this design, there will still be a problem when the rudder feedback sensor is 0 ohm !

I think the drive behaves normally, so no need to be sorry Smile, it just happens to hit a limitation in the motor controller !

The rudder feedback can still be useful even with end-switches present, because this makes it able to restrict the rudder angle (of course, if you restrict the angle, you will never hit the limitation above because the tiller will not be fully extended ever !).

And it can also be useful as an aid for steering, but I'm not sure if Sean has already implemented this or not.
The high power controller uses 5v reference because there is an amplifier for current measurement. This allows rudder feedback to be ratiometric. The regular controller uses 1.1v reference to get a better resolution on current current, which causes 1.1v reference for all adc measurements including rudder feedback.

I cannot just add resistors to the design. It would be bad for the hall sensor which draws a constant 13 milliamps. It would reduce resolution in other cases. It is better you add resistors if you need them for now. Eventually, if there is a controller specific for a particular actuator or something it could make sense.

As for "steering aid" the "absolute pilot" implementation makes use of rudder feedback in the control loop but I have no feedback or testing on this yet.

Forum Jump:

Users browsing this thread: 1 Guest(s)