Use wheel encoder to control a brushed motor (winch) on a boat

Hi,

I would like to control a winch brushed motor on a boat using information from an encoder inside the winch. Do you think it’s possible using the wheel encoder reading functionality for that purpose ?

Many thanks.

I would think that more information regarding your intended purpose would be required before anyone could advise you in any meaningful way… If the encoder is suitable for interfacing with the Ardupilot controller then I would think that you could at least control the winch remotely and receive rpm/distance feedback. Perhaps some form of autonomous operation might also be feasable whereby you could command the winch to wind out/in a given distance…

Yes you’re right. My winch is composed of a brushed reduced motor and an encoder to count rounds. The motor is connected to a brushed esc that would be connected to pixhawk. Also, the wheel encoder would be connected too to pixhawk to read number of turns if it’s possible (input instead output).

Afterthat, with a qml script on qgc, i would like to let the possibility to enter the number of turns we want on the winch and then the motor winch will be activated of this number of turns.

What do you mean by:

if it’s possible (input instead output)

Wheel encoders are used as an input to the Pixhawk so it can determine how far and in what direction the output has rotated. This seems to be exactly what you want.
I have zero experience with QGC and QML but as long as you can command the motor and read the position and have a reasonable degree of facility within the script then you should be able to do what you want.
Are you sure that using Ardupilot for this task is not a bit of overkill when even your most basic Arduino board costing less then $5 would be up to the task?

Yes, I think AP’s Winch library does what you’re looking for but it is not included in the Rover firmware. I originally developed this library for use on multicopters for the Japan Innovation Challenge but we eventually used a Daiwa winch instead (the manufacturer donated it to us and it works very well).

It should be possible to integrate the AP_Winch into rover but it’s a little tricky because we need to be sure that it doesn’t interfere with the EKF or BalanceBot code that also uses the wheel encoders. Probably best to add this as an enhancement request to the issues list and/or hack around with it yourself.

Many thanks. I will go on with that idea. The winch is on a boat wich is already controlled with ardurover so it’s a way to use it for the winch without the need of another hardware arduino.

Many thanks for that AP’s winch Librairy. I’m going to investigate that !

1 Like

Hi, finally we managed all with a roboclaw brushed controller. It was better to do that for us. The roboclaw can read wheel encoder and also is able to control current and so many functions. Really a good product! We wrote a qt executable for all the operations. This winch can be implemented into usv boats. It only needs 3s to 4s current and an usb port available on a computer.
The video where you can see user interface at 0:30.