uCee Motoring
Perhaps "motoring" is a bit of a stretch, because it certainly isn't moving yet, but the motor code is running and working.
Here's a quick video showing a simple test of the PWM speed control of one of the motors:
As I move my hand closer to the IR range finder sensor, it slows the PWM down. Very simple, but an easy way to test that speed control is working.
The code for this is on my Github repository. Right now the current readings I'm getting from the h-bridge board are all over the place when its running at full speed. I don't expect to ever run this robot at full speed, and the current readings settle down as the motor slows down, so hopefully that will make them useful. The encoders are rock-solid, using the interrupt pin capabilities of the Teensy 3.1.
I'm going to use this PID library to implement closed loop speed control with the encoders. There's a really good multi-part writeup discussing how it all works - highly recommended. I'm going to translate the encoder ticks into mm/second, and use that as the Input for the PID library. I will specify the requested speed (Setpoint) in mm/second also, and if my conversion routine is correct, the robot's speed should be fairly precise.
Here's a quick video showing a simple test of the PWM speed control of one of the motors:
As I move my hand closer to the IR range finder sensor, it slows the PWM down. Very simple, but an easy way to test that speed control is working.
The code for this is on my Github repository. Right now the current readings I'm getting from the h-bridge board are all over the place when its running at full speed. I don't expect to ever run this robot at full speed, and the current readings settle down as the motor slows down, so hopefully that will make them useful. The encoders are rock-solid, using the interrupt pin capabilities of the Teensy 3.1.
I'm going to use this PID library to implement closed loop speed control with the encoders. There's a really good multi-part writeup discussing how it all works - highly recommended. I'm going to translate the encoder ticks into mm/second, and use that as the Input for the PID library. I will specify the requested speed (Setpoint) in mm/second also, and if my conversion routine is correct, the robot's speed should be fairly precise.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home