I’ve been coding my own non-Ardupilot system, which has been a ton of work with uncertain results. It looks like switching to Ardupilot would let me take advantage of a ton of excellent work.
Before I dive into that path, can some clue me in on whether I can a couple of additional rotary-encoded motors to use as anchor windlass and the like? I’ve been digging through the manuals and forum and not been able to suss it out.
The idea is the boat would go to defined spot. Drop an anchor. Raise a flag.
Copter has Winch control and Winch Control in an Auto Mission but Rover doesn’t. There are Mavlink commands for Winch but not sure if they will work in Guided Mode with Rover. Controlling a Winch
Raising the flag could be as easy as activating a servo or relay output in the Mission.
If the winches are powered by 360 servos (or other supported motor drivers), there’s no need for winch specific messaging. Just control the servos using either built-in output logic or Lua scripting.
Thanks for the quick responses. I could use a brushed ESC or something for the winch motor, but I wonder if I can provide feedback from the rotary encoder so that I can send a “do 50 turns” command or something. Does that make sense?
It’s too bad that the rover lacks the winch control that the copter has.
At a glance, I don’t see anything blocking the addition of the winch backend and drivers to Rover.
The custom firmware builder online might lull you into thinking that you could just use that to enable winch functionality, but even if you checkmark the feature, I don’t see any hooks in Rover.cpp for including the winch features, so it would be ignored.
I may be able to help get it included, though I have no winch hardware to test. Do you know which firmware version you intend to use? Stable 4.2.3 with the NAVL1 controller, or a newer beta version with the updated (but sometimes finicky) newer position controller?
Thanks Yuri. I am at the beginning of my investigation and have not selected any particular software versions. I envision that the winch will simply be a motor with a rotary encoder. Simple.
I don’t know of a way to get encoder feedback on a motor that isn’t associated with the drive (motion control) system. In lieu of making changes to ArduPilot’s codebase, you could use an intermediate microcontroller that takes its cues from the autopilot (RC output and/or scripted serial) and translates it to results on your winch.
if you want to be able to move it a specific distance then your cheapest option would probably be a geared stepper motor driven by an arduino, then you can move it very precisely a set distance. you could use the mavlink interface to control the winch,
another option would be to run it over a pulley to register its distance, the problem with counting the spool the string is on is that the spool changes size depending on how much string is on it so it lets out less string for each turn more it lets out.
For raising a flag, all of this winch talk should be a moot point. Just use some limit switches and some relays. You’ll have to be a little creative with circuit design to avoid undesirable behavior, but I bet a little searching would turn up multiple examples of simple, cheap, pure analog circuits that feature limit switches and reversal functionality.
In my case, anchoring at depths from 20-100 feet, precision is not super important, and I anticipate that the line thickness will be a small fraction of drum diameter.