I'm new in electronics, and I have been working on a individual project (just for fun), in which I need to design a closed-Loop system, comprising AS5600 sensor (which is being used to read the Angle position the shaft), DC motor and a PID controller.
So far I have being able to read the angle position of the shaft as it rotates, by I2C communication with Arduino Uno. I am stuck now, because I cannot calculate the speed of shaft. I would like to know I could do it, so that I can start working on the PID controller to send the appropriate 12-bit PWM signal to the DC motor.
I'm new in electronics, and I have been working on a individual project (just for fun), in which I need to design a closed-Loop system, comprising AS5600 sensor (which is being used to read the Angle position the shaft), DC motor and a PID controller.
So far I have being able to read the angle position of the shaft as it rotates, by I2C communication with Arduino Uno. I am stuck now, because I cannot calculate the speed of shaft. I would like to know I could do it, so that I can start working on the PID controller to send the appropriate 12-bit PWM signal to the DC motor.
Regards
Since you are able to read the Angle position of the shaft, pick one of the angles and time how many milliseconds are taken until you see that angle again. That tells you how many milliseconds for the shaft rotation.
I'm trying to setup a PID controller that controls speed and position of a dc motor. I need the speed to ramp up and down at a certain rate.I also need the motor to follow a set position that is updated. I know how to do both separately, but I've never done both at the same time. Does anyone have any references or know a way about going about this? Any help would be appreciated.