Autosteer - step motors

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.

Hello @Tim-98,
opening the .jpg is still working for me, but i have just add a pdf as well.
ā€œhttps://github.com/hagre/AOG_Autosteer_ESP32/blob/master/Stepper/Stepper%20schematic.pdfā€

If you need more information feel free to ask!

Alright, thanks.

Iā€™m not sure if i just donā€™t get along or if the Pdf is different then what i was looking for. Is it on there how you connect and setup Stepper motor on the PCB v2 two?

Diodes are wrong way on your pdf-file

@Tim-98
I think You are correct, it was not intended to be connected to any existing PCB direct, but it is worth to think about how it could be done convenient.

@MylArti
Thanks. Yes the diods are somehow wrong, because the should symbol a LEDs with a resistor included in the switch. I have corrected the .pdf ā€œAOG_Autosteer_ESP32/Stepper Driver Schematic AgOpenGPS V1_1.pdf at master Ā· hagre/AOG_Autosteer_ESP32 Ā· GitHubā€