I am programming a L293D motor driver with a BLDC motor to spin at speeds of 60-300 RPM. It is for a hybrid drone/car where I want the motors to spin slowly while having the necessary torque to drive.
So far, I've followed instructions in the spirit of this guide in MatLAB:
I've attached a picture of my coding, where i tried various methods of controlling the motor, via "micro-stepping", spwm signals, and simply a sine wave function.
I've had the most success with the sine wave function, where the motor initially runs smoothly, but progressively the motion becomes jolted. On the oscilloscope, there was also a lot of voltage spikes, which I request your help in understanding and fixing. Perhaps I can somehow implement some diodes into the circuit? Also, the torque was non-existent.
I used a 12 volt DC supply, which gave out 0.5 amps to the driver.