Shop OBEX P1 Docs P2 Docs Learn Events
motor speed control using potentiometer — Parallax Forums

motor speed control using potentiometer

coderbadcoderbad Posts: 29
edited 2015-04-09 21:47 in Propeller 1
Hi Friends

I want to make a motor speed control using a potentiometer, only the speed of the motor
someone know how I can do it?
Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2015-04-09 20:41
    What kind of motor? You'll need some kind of external motor driver if it's a DC motor. What do you plan to use? If you want tight control of the motor speed, you'll need some kind of speed sensor. What do you intend to use? If you're using a stepper motor, the speed is controlled by the number of steps per unit time. You'll still need some kind of external driver for the stepper coils. What would that be?

    Reading the value of a potentiometer is easy. You can use it as a voltage divider and read the voltage using two I/O pins and a couple of capacitors and fixed resistors ... look at the application note on the cog counters (AN001) which discusses this and includes code examples. You can also use a capacitor with the potentiometer and measure the charge / discharge time. Look at the BS2 Functions object in the Propeller Object Exchange for the RCTIME method which shows how to do this.

    Look in the Motor Control section of the Propeller Object Exchange for a variety of motor drivers for DC motors, stepper motors, and even servo motors. Read their description (usually at the beginning of their source code) and pick one or more to try.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-04-09 21:47
    If you have a continuous rotation servo, you could control the speed (really just the power) using one of these (erco told me about these and I think they're great):
    http://www.ebay.com/itm/Multi-Servo-Tester-3CH-ECS-Consistency-Master-Checker-Speed-Controler-CCPM-SS-/321463863858

    If your motor isn't a continuous rotation servo but a DC motor you could still control it with the same device if you use a HB-25 motor controller.

    https://www.parallax.com/product/29144

    As I mentioned earlier, this will control the power to the motor. The speed of the motor will depend on both the power to the motor and the load on the motor. In order to control the speed of a DC motor you really need encoders of some sort.

    As Mike said, you'll need some way of controlling the power to the motor. I have a tutorial about using L298N h-bridges here:

    http://forums.parallax.com/showthread.php/156410-How-To-Use-a-L298N-Dual-H-Bridge-with-a-Microcontroller-(QuickStart-Board)

    I used the inexpensive L298N h-bridges in the tutorial but the principles apply to other H-bridges.

    I posted a video of my robot using encoder feedback to post #41 of the OPP#8 thread:

    http://forums.parallax.com/showthread.php/158030-Open-Propeller-Project-8-Eddie-Firmware-Ported-to-Propeller-Activity-Board?p=1308338&viewfull=1#post1308338

    It shows and example of controlling speed using encoder feedback.
Sign In or Register to comment.