2022-04-06, 09:19 AM
Hi,
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 https://pypilot.org/schematics/hbridge_controller.pdf
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 !
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 https://pypilot.org/schematics/hbridge_controller.pdf
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 !