Issue with smaller delay in controlling DC motor

Hi, as usual new guy to Arduino. I am working on some project that includes high power motors that I am controlling with BTS7960 instead of L298. The thing is I want to run motor back and forth meaning it will spin 180 degree left, stop and then spin right for 180. This is supposed to be at high speed. I figured out all about torque etc. if I use simple analog switching circuit and control motor this way it works just fine. Below in brief what I am doing

RUN motor Left at full speed
Delay of 400ms

RUN motor Right at full speed
Delay of 400ms

The motor is powerful enough to handle this. I am also supplying enough current and voltage to provide high speed and torque. Now the problem is at 400ms I don't really get any noticeable speed. Each iteration (left+right) takes about a second which is way slower and not tolerable. But if I go any lower than 400 the motor behaves weird. Rather than spinning it just flickers in same position.

Does anyone know why is this happening and any suggestions to solve that? FYI the motor speed is 12000 rpm toque of 7.6kgf.

Perhaps your motor is too heavy, meaning it requires a high torque to make itself turn? I'd suggest a motor of lower speed.

Yup tried that too. For torque I am keeping current high 10A thats max of my PS. Motor can take upto 16A. between 0-255 speed I tried going as low as 50. Below 50 the motor just makes wizzing noise of current going through coils but wont spin. This is all without load. I tried using smaller/slower motor and got exact same behavior of speed and delay i.e. for below 400ms like 399 delay the motor just shakes like a kid watching horror movie. But set to 400 and everything works perfect.

To think it might be something to do with how fast driver and Arduino are able to communicate? The driver PWM is 25kHz, also I have baud rate set 96K. I am a software engineer so don't have lot of practice with these things.

I thought you said earlier that you wanted the motor to turn through only 180 degrees. At 12000rpm, it rotates at 200 rps, so half a turn would take 1/400th of a second, or 2.5ms. Are you literally switching the motor on for only 2.5ms?

Yup, your understanding is correct, which is exactly why I want the delay to be less than 400. I can deal with slow speed say 100RPM if Arduino and motor driver cant handle 2.5ms but 400 is just too large.

I made another simple analog circuit without arduino etc. I wont go in detail as it may not be relevant but doing that I get what I need.

Problem is not that the delay is not small enough problem is how 399ms makes motor flicker in place but 400 makes it go right? Again Without load!

A motor is an inductor so current is increasing slowly. It may take a second or more until the nominal current is reached.

I dont want to sidetrack. I know what a motor is, am an software engg not an idiot. I am letting you the setup nothing else. Please refrain from commenting if you don't have constructive responses that may lead to solution.

Ah, wait, I think I understand. You're saying that you'd like to give the motor a 2.5ms burst, but the shortest burst that works is 400ms. Bursts shorter than 400ms result in the motor not turning properly. Is that right?

If so, we need to see your code and a schematic of how everything is connected up. Post the code in code tags: </>

I was following the exact schematic and code from this guy

Except the delay which I wanted to be less.

Good news is I got it now less than 400, the lowest it goes now is 100ms which is fine with me for now. Below 100 the motor dont flicker just dont spin enough to reach 180 degree, which I understand due to number of mechanical factor and mot arduino’s fault.

I did this with simple change, I had wrong GND connected from board to driver. The video shows GND right above 13 is connected to driver, I had the one next to 5V on Arduino connected to driver.

Thanks for your help though!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.