This article will show how to communicate between Arduino and Visual Studio through COM (UART) port.
Project tutorial by whitebank
Make a program for the Arduino Pro Mini in Visual Studio to control motor speed with PID which can archive it exactly.
"in my test the motor stop and run when the error not equal zero."
-> maybe your parameter P, I, D is not suitable for motor, please find it. I also have this problem, after finding suitable parameter, motor runs OK.
-> Do not make error = 0, error = 0 doesn't make sense
1. The integral is limit to prevent to be big value -> when integral is big, "pwm_pulse" is always reach limit (255)
2. Your question makes sense. I broke the circuit, so now i have no chance to review it.
You can try, and show pwm_pulse when speed SV near PV (when error is 0)
I guess, when speed SV near PV -> there is no need pwm_pulse to rotate motor anymore. When speed down, error is increasing, pwm_pulse will go out.
Yes. Let's try it.
Or connect with your social account:
New here? Create an account