I am making a BLDC motor controller and I need an easy function that would check if the motor is running or not at any given time. I was thinking about measuring the frequency of the hall sensors but I would like to know if there is an easier way to do this. btw I am using PIC16F788.
Thank you
Since you really only need to monitor one (1) hall effect, that sounds like the easiest "is the motor actually turning" test. One I/O pin used and a few lines of code. And it would not have to be a continuous check (chewing up processor resources), rather just every so often according to your external process timing needs controlled by motor rotation or speed.
Since you really only need to monitor one (1) hall effect, that sounds like the easiest "is the motor actually turning" test. One I/O pin used and a few lines of code. And it would not have to be a continuous check (chewing up processor resources), rather just every so often according to your external process timing needs controlled by motor rotation or speed.
Read the state of one of the hall sensors, at a faster rate than what its likely to change at while running full speed, measure the amount of time it takes to change state, if its over a certain limit (lowest likely freq) then assume its stopped.
This process works well if your using interrupts.