Autosteer - step motors

Wheel Angle Sensor, the potentiometer-like device used to detect the angle of one of your front wheels. Output: voltage (about 2.5V = 0°, when mounted correctly)

2 Likes

I setup stepper motor with AOG - second Arduino control stepper motor driver based on PWM from main Arduino (original autosteer program) :wink:

Sure, stepper motors will work, but what is the benefit? A DC motor takes the current, it needs for a given torque. For a stepper motor, you have to inject a current that is higher than for the torque needed, otherwise the motor won’t run. So you need (much) more electrical power. The only benefit I see is to avoid the need of a WAS. doppelgrau is working on that as he mentioned above, let’s see. I personally prefer a DC motor + encoder for the reasons I mentioned above.

Yeah but stepper motor not required any Gearset (planetary etc). I mount it directly to steering wheel and I can steer manually with engaged (of course disabled :sweat_smile:) . Stepper motor have more torque in lower speed so it not required any gearset :wink:

I am working on a stepper-motor solution for my NH, but it is still not as expected.
Some gearratio is required. I have printed 2 different diameters for the gears, but still not satisfying. I have increased (NEMA23) motor tourque from 1Nm to 3Nm with full steps, supply voltage from 12v to 36v, but still … :worried:
The Gt2-belt solution was promising, but the motormount is more difficult to get a constant tension in both rotation directions. (i had slipping in one rotation direction)
The printed gear distance has to be fixed, because otherwise it looses to much torque due to friction of the gears. (I had just pressed the motor onto the stearingwheelgear with a strong rubberband)

I am using accelstepper library included in the arduino nano-autosteer sketch. But still debugging/improving logic.

Due to the fact that my steeringwheel position is not always the same for a given tire-position, i have to use a WAS and update the virtual (stepper) position to the real center in the code.

Trying to use the already implemented configuration possibilities to adjust stepper-stepps-per-degree of the WAS, max acceleration and max stepper speed.

At slow spees the stepper is realy nice to get a perfect position, but there is an increasing tourque loss on speed.

I will get it to work, but it is not as easy as i expected, but the winter is long … :grin:

IMG_20200828_120331 IMG_20200828_120334 IMG_20200913_153919 IMG_20200913_153925

2 Likes

@hagre very nice work! What kind of center sensor are u using? I’m working on a WAS-free system as well, but my test with an inductive proximity switch was not satisfying so far (no clear switching point).

Okay could you please write here all components I need for stepper motor properly work? I can’t find all in one because there are lot of components I think…

You have to small gearset and motor. I use bigger motor without any problems :wink:

1 Like

@GoRoNb At the Moment i am still using a normal WAS to Update the virtual-stepper Position frequently. In the future, i would like to remove the WAS and use just a “center-switch” on the hydraulic actuator.

unfortunately this center switch is trickier than expected to me. Inductive proximity switches seem not suitable (at least my one). Testing with a magnetic sensor right now…

Let’s list what features an ideal engine for an autoster should have:
High torque
Small dimensions
Quiet work
Quick change of direction (no rotor inertia)
No resistance (free turning of the steering wheel) after turning off the power.
It seems to me that the above conditions are best met by a simple brushless motor.
If we have a steering sensor, the stepper motor does not make sense because it has more disadvantages than advantages. The control loop is based on the indications of the steering sensor anyway and measuring the steering wheel turns does not make sense.

2 Likes

And I think that stepper motors aren’t fast enough for uturn

it also could be an brushed motor without gearbox . . .

Hey how did you set up the code/make sign control a stepper?

I use second Arduino nano to convert PWM signal to STEP signal for stepper motor controller (dir is directly connected to AOG Autosteer board)

I have now upgraded to an closed loop stepper (NEMA24) with 4Nm and it looks very promising. Working on a fork of GitHub - mtz8302/AOG_Autosteer_ESP32: AgOpenGPS V5 + V4 autosteer code for ESP32. I will share the relevant data in a view days.

1 Like

First working stepper motor code is on github, based an mtz8302: GitHub - hagre/AOG_Autosteer_ESP32: AgOpenGPS V4 autosteer code for ESP32, it is waiting as a pull request to be merged into the master of mtz8302.

AgOpenGPS-Stepper Driver

I build in 2 extra hardware/electrical safety-layers with a 4x relais disconnecting the motor and simulating the the motor-coils with 2 x 10M Ohm Resistors to boot the closed loop driver without problem, and a guarded toogle switch mounted near the steering wheel to manual disengage if realy in trouble. All 4 wires are disconnected so the motor is spinning free without any force needed. The relay is disconnecting the stepper when autosteer is diasbles to prvent backfeeding current into the stepper driver by manualy rotating the motor.

A video of the working setup will follow soon.

2 Likes

If You use EN pin (Enable) then you don’t need this relays - driver is release coils and you can rotate engine shaft without any force and without any backfiring current :wink: . And for what You use closed loop? In example with Cytron DC Motor no need any encoder etc. Why there encoder is better?

1 Like

You are right, but …

I use the EN pin to control the driver but i don’t know enough about the internals of the stepper-driver to be certain to don’t back-feed high voltage during quick manual steering-wheel movements. And secondary to have a second layer of “disconnection” for driving on the roads… .

I have used a lot of different stepper motors to move the steering, but i had always troubles with lost steps and the flowing torque-drop to 0. I increased the torque with each new buy, but it was never enough. I tried to adjust the acceleration and maxSpeed to prevent the problem. In smooth conditions (flat and level soil) it could be set to an acceptable rotation speed for 99% of the time, but in rough conditions the values have to be reduced to an undesired level. It was always a compromise to keep a high reliability and good speed.
With the closed loop stepper the adjustment is more or less just for fun, because it is extremely forgiving. If you move the engaged steering wheel manually (you will need some force to do so) and release it again it will rotate back to the target position like a strong virtual spring. So no force from the driving-wheels on ground can interrupted the steering-control-loop. The position is always at the target position of AOG, and if there is a short “bump” it will recover imitatively. The only possible situation to have a problem, is when the max. right and left wheel angle is reached (hard-limit) and the software is not set to a correct value and would like to turn further.

I am very happy now with the actual configuration am using.
If someone would like to use stepper motors as well please start with closed loop-stepper and safe a lot of time and money.

Hello,
I’m wondering if you can give me some more information on using a stepper motor, i can’t open any of the photos you included there.