0
\$\begingroup\$

I need to control 2 DC motors (Maxon RE40) using an AVR (atmega328) through pwm. I was wondering what is the right way to approach the situation.

Should I increment the duty-cycle at a specific time interval or I should just take care that the difference between two consecutive duty-cycle its not too large?

I want the system to be as responsive as possible but also take care of the motors.

I need to understand the way a soft start should be designed (in software) and what are the possible trade offs.

Thanks

\$\endgroup\$
3
  • \$\begingroup\$ What do you mean by taking care of the motors? There are physical values like acceleraton, speed, jerk. Also what will you control: voltage or current? \$\endgroup\$ May 5 '16 at 17:50
  • \$\begingroup\$ I mean that I don't want to destroy the motors by changing the speed from full speed in one direction to full speed in the other direction. I control the motors using pwm through a driver (so voltage), but I also have current sensors for each motor (if this is relevant) \$\endgroup\$ May 5 '16 at 18:41
  • \$\begingroup\$ If you have current sensors, then you may wish to close the loop around current. This is one of the best methods for motors since current directly influences the motor torque. It is a bit more complex than 'limit the duty cycle' approaches. \$\endgroup\$ May 5 '16 at 20:03
1
\$\begingroup\$

But the motor has to change from full speed in one to another direction or form zero to full speed, that's why we use motors. You can limit the current and consequently the acceleration. the H bridge shall output such voltage that the current remains always in the margins. The best you can do is a PI regulator, the setpoint is rated motor current and the feedback is measured current. When you will start, the regulator will output a certain duty cycle setpoint and it will be increased by regulator output when the motor will gain speed (back EMF compensation). $$M=J\alpha + M_{load}$$ $$M \propto I_a$$ $$U_a=I_a*R_{winding}+U_{backEMF}$$ $$U_{backEMF}=k[V/krpm]*n[rpm]$$

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.