pdjr-build / firmware-factory

Build environment for PlatformIO projects
Apache License 2.0
1 stars 0 forks source link

Spudpole zero point #2

Open preeve9534 opened 3 years ago

preeve9534 commented 3 years ago

We need to know a zero-point for every installation. I think this means "the number of turns on the winch spool when the windlass is docked". If we have this then we can calculate the length of line deployed.

Obviously this will be different for every install. I think there are a few obvious ways we could get this.

  1. We could program it into firmware, but then a module has to be programmed differently for each install.
  2. We could enter the number of turns into the module using dip switches. Easy for max 128 or max 256 turns, but maybe a bit error-prone in practice.
  3. We could make the module read the number itself.

I dislike (1). (2) is possible (3) would depend on a single button on the module PCB which sets the module into "learn mode".

During install you:

  1. Fully retract and dock the spudpole.
  2. Unwind all line from the winch.
  3. Press the "learn" button.
  4. Rewind all line onto the winch (during this process the module counts rotations).
  5. Press the "learn" button again to record the count.

Alternative ideas or preference among these most welcome.