New here so bear with me. I have one of those DIY robot car chassis from Amazon that comes with a plastic platform mounted on three wheels, two are powered by 3-6V DC gearbox motors, and one of them is free-spinning. I have attached 3 pictures of my robot currently.
A little more detail about my setup: I have mounted the UNO on the top of the chassis, which is connected to three HC-SR04 sensors mounted on the front of the body. The motors are controlled by a L298N dual h-bridge controller. Everything is powered by one 12V 3000 mAh battery, which runs to the L298N board which has a 5V regulator that runs to the VIN pin of the UNO. Let me know if you need more detail.
So now on to my question:
I find that operating the DC gearbox motors at full speed is way too fast, not giving the sensors enough time to get a good measurement. So, my initial solution was to use PWM on the Enable pins for each motor to lower the speed, using the AnalogWrite() function. However, once I lower the value (0-255) to a number that corresponds to a low enough RPM for my purposes, the motors will stall and wont move again until I apply a little torque to the wheels.
I think my solution is to get a different motor that has a lower RPM rating. However, I also need motors that have capabilities for wheel encoding. The ones I have now have a shaft sticking out on both sides so i can mount an encoding disk, which is nice. I have searched and can't find a good website to buy a motor that fills my needs.
Can anyone point me somewhere?
Thanks so much.