I would like to use the steer by wire example that uses 2 bldc motors with 2 nema 17 stepper motors and l298n drivers instead. Other than switching out the motor and driver definitions, is there anything else i need to consider? I am using an esp32. Any help would be great! Thanks!
I have one more idea about this… since you’ll use I2C magnetic sensors, being more specific, you’ll use AS5600 sensors, this IC cannot change its I2C address, so you should to configurate a I2C bus for each sensor (see docs). Other thigh you can do is, check in the documentation the limitatios of Stepper Motor class implemetation cause i remenber, you can’t use any PWM Modulation type. For now its all i can thing, i hope this can help you.
Hey Ben, there are a couple of things worth considering here.
- Sensor Precision:
Since they have so many pole pairs, it’s my understanding that stepper motors like to have a high precision encoder to be used with SFOC, so the “12-bit” AS5600 (that sensor is known to have effectively 10 bit precision with noise) might cause problems when running stepper motors. A couple of replacements for this sensor if this becomes an issue are the AS5047/5048 or the MT6701.
- Driver Precision/Speed:
The l298n is known to be a pretty low-performance motor driver since it is slow to respond to inputs; that chip wasn’t designed to run BLDC motors. People have reported success with it using low pole pair gimble motors, but I suspect you might have issues trying to use it on a stepper motor, especially for anything other than low speeds.
Here’s a couple of links that speak to those points; It sounds like you might be able to get it working with that hardware with some effort in tuning (ramp speed, PID parameters, etc.), but if you’re willing to switch out the sensor/driver you’ll probably have better luck.