Hello, I am new to motors with encoders, and am having an issue controlling my new 75:1 Metal Gearmotor 25Dx54L mm HP 6V with 48 CPR Encoder. I am using an Arduino and the DRV8835 Dual Motor Driver Carrier. I have connected the motor, Arduino, and power supply to the motor controller following the wiring diagram. Currently I am just trying to control the motor (without any encoding functionality; the only wires that are connected are the red and black wires) using a simplified version of the sample code for this motor controller (https://github.com/pololu/drv8835-motor-shield) (I just changed it so that motor 1 would turn on and off every 5 seconds). However, when the motor is supposed to be on, I only hear a high pitched hum. I have tried various speeds, but there is always the same result (the hum is most noticeable, as expected, at high speeds). I tested my program by connecting a different motor without an encoder, and it worked exactly as I expected. Is there some limitation to using PWM with a motor with an encoder? I would appreciate any help, as I am very lost as to what is going wrong.
I also want to add that when I connect the motor directly to the power supply, I can successfully control the speed of the motor by increasing or decreasing the voltage.
Upon further research, I suspect that the motor controller is my issue - it can only supply 1.5 amps at peak, while the motor will pull about 6.5 when it tries to start. I will attempt tomorrow with a larger motor controller and provide an update. If there are any other issues with my setup, I would greatly appreciate feedback. Thanks!
As you mentioned, the DRV8835 Dual Motor Driver Carrier is underpowered for those motors. We typically recommend choosing a motor driver that has a continuous current rating equal to or higher than the stall current of your motor. What are you using as a power supply? If you are using the same supply to power your Arduino and motor driver, you might double check that the voltage is high enough for your Arduino (which typically have a recommended operating voltage range of 7V to 12V). Also, note that the voltage might drop when the motor is under load, which could be a concern if it drops below the operating voltage of your electronics.
Thank you for the response! I swapped out the motor driver for a larger one, and that solved the problem.