Using a stepper motor to control the sail?

Hi there everyone.

My name is Huldar, I’m super new to this (have never built something like this before) but I want to make a sailboat and I was thinking of using a stepper motor mounted with a gear to the mast to be sure that the motor could supply the needed torque for when the boat experiences strong winds. Now I just realised that ardupilot does not support stepper motors, only servos. Could somebody help me out with figuring out how to tackle this problem?

These are my ideas so far:

  • Use a servo instead of a stepper motor (not sure about this as they are generally not as strong right?)
  • Program support for stepper motors (I know how to program but I have no experience with ardurover and don’t know where I would start, I feel like I would need to have the hardware before I could start working on the software. I did find this issue though: Tracker: Stepper support · Issue #13767 · ArduPilot/ardupilot (github.com))
  • Use the winch method used in the videos in the docs ( Modes — Rover documentation (ardupilot.org)) but I have no clue about how I would waterproof the main sheet and I’m not a huge fan of this method.

Any feedback or ideas is appreciated.
Thanks.

 - Huldar

Hi. we have used special stepper motor controllers to use a stepper motor and a belt drive with 1:4 reduction for our rudder (we use a nema 23 motor). Pololu makes/sells them https://www.pololu.com/category/212/tic-stepper-motor-controllers
you have to use them in the “RC” configuration.
regards

1 Like

Hi Benjamin

how did you do that? I’m new to this thing
Regards

@fezile_mageba well we mounted a 5M 72 tooth Zahnriemenscheibe to the shaft of the rudder and an 18 tooth version to the NEMA 23 motorshaft and of course the belt. And we connected 4 Wires of the NEMA 23 to the Pololu Tic Stepper controller (link is in the previous post) and also our 32V Battery and the Pixhawk Servo output cable.

I must also say that this is not the most elegant solution. if i find some time i will make a version with a 35kgf*cm Servo and keep the 1:4 reduction by putting just the potentiometer from the servo on the ruddershaft… that way you get a similar result but the system costs less, is less complicated, lighter and consumes less energy.

regards Benjamin

Actually I’m building an autonomous surfboard with a stepper motor controling the steering on the sufboard. The advise that I got was that I should try converting a stepper motor into a servo. I think it will work fine for me, Do I need an arduino for this or should I just connect it straight to the pixhawk?
There’s no additional code needed maybe.

Fezile

i dont know how you can “convert” a stepper motor into a servo. They work very differently.

If you want to drive a stepper motor using the pixhawk servo output signal, you will need a stepper motor driver and a microcontroller that receives pixhawk servo output pwm signals (or you can alternatlvely use the pixhawks sbus output) and puts out step and direction pulses for the stepper driver.
i started making something like that with a Raspberry pi Pico (because of its programmable io interface) and an A4988 stepper driver from a 3d printer für testing purposes and it kind of worked a little (also with acceleration) and its definitely doable but i had a lot of problems with sending correctly timed step pulses and receiving sbus signal at the same time. so in the end i used the tic controller instead. :upside_down_face:

but as i mentioned in the post before, for a rudder of a boat, i would now just use a servo with enough torgue the precision of the servo is enough.
… the high precision of the stepper is more a thing for a 6 axis robot or a 3d printer or something like that where you actualle need it

regards