Hello,
for a project at my university I have to create a control loop for a reaction wheel, which is driven by a brusless DC motor.
My basic idea is to use a gyroscope sensor to measure the speed of the assembly driven by the reaction wheel. With the error resulting from the desired and correct speed, I can then set up a PID controller which calculates the ideal current (both the speed of rotation and the current are proportional to the torque of motor).
Now I would like to create another current loop, which determines the difference between the ideal and the actual current at the BDCM.
How exactly can I measure the current at the BDCM and use it as an input signal for the Arduino UNO?
Thanks for all the tips!