Hello,
I programmed a microprocessor (STM32F1 Core board) to output a pwm signal which I can vary its duty cycle by using two push buttons. One is used to increase duty cycle and the other to slow down it. Every time I push the respective button, the duty cycle increase or decrease by 10%. I tested my circuit using a light bulb and it worked nice. But my main objective is to control a motor speed. When testing the pwm with the motor, the speed changes by itself like crazy without pushing any button. It's like noise, but I am not sure. What could be happening?
I programmed a microprocessor (STM32F1 Core board) to output a pwm signal which I can vary its duty cycle by using two push buttons. One is used to increase duty cycle and the other to slow down it. Every time I push the respective button, the duty cycle increase or decrease by 10%. I tested my circuit using a light bulb and it worked nice. But my main objective is to control a motor speed. When testing the pwm with the motor, the speed changes by itself like crazy without pushing any button. It's like noise, but I am not sure. What could be happening?