Shop OBEX P1 Docs P2 Docs Learn Events
question on PWM on Basic stamp — Parallax Forums

question on PWM on Basic stamp

tedbeautedbeau Posts: 48
edited 2008-02-06 21:09 in Robotics
I am just getting started building a robot that will use a BS2. Here is my dilemma. I have two similar motors from two different model devices that I want to use as drive motors.

I am almost positive that they will not run at exactly the same speed under load.

I was thinking I could just add a pot to the faster motor to tune it to the correct speed. I assume the pot would waste power.

I think this would work OK, but was wondering, since the Stamp has PWM built in would it be a better way to go?

In the reference book I have they explain how to call the PWM routine but state that it will need to be refresehed to recharge the capacitor.

So in a normal drive the robot forward with both wheels turning (attempting to tune for same speed) would you suggest I use PWM on both motors, and change the duty cycle of the faster to slow it down?
I am thinking that I will be using a 754410 chip as a motor driver. I assume that the chip would get the PWM signal from the stamp, and pass it along to each motor with the correct duty cycle as it was recieved.

Am I on the right track or should I just put a pot in?

As you can tell I am not an electrical expert. My schooling is more towards the mechanical tilt.

Thanks for any advice.

Ted

·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-06 21:09
    The PWM statement is not the best way to try to control a motor. It's designed to be used for outputting variable voltages and the actual waveform consists of very short pulses where the average on time reflects the value given in the statement. They're sometimes too short for the motor driver to react to. Best would be to use a DC motor controller like the Pololu unit that Parallax carries. It includes the motor driver and you just send it the speed and direction you want to use. With two slightly different motors, you can just use different values for each motor for the maximum speed and adjust them proportionally if you want.
Sign In or Register to comment.