Hey guys,
I'm pretty new to controlling motors with arduino, so please have that in mind when reading.
I'm using analogWrite together with SetPinFrequency in the PWM.h library, to get a certain RPM on a nidec motor which is driven by input frequency - and it is working quite well. My program reads feedback RPM and then increases or decreases the frequency with SetPinFrequency until the wanted RPM is found.
However, there is one thing that I don't understand fully. It does not stop if I set the frequency to 0. The range of input frequency is supposed to be 50 - 382 Hz but if I put it to 0, the RPM is weirdly enough bigger than if it's just 50 Hz. It's the same thing with all frequencies below 50.
Does anyone know what the method does when the input is below, in this case, 50 Hz? And is the only way to stop the motor to use digitalWrite(pin, 0)?
Thanks in advance
(Arduino UNO if that matters)