Shop OBEX P1 Docs P2 Docs Learn Events
Linear Pot Feedback question — Parallax Forums

Linear Pot Feedback question

LautarocondorLautarocondor Posts: 15
edited 2007-12-06 00:49 in BASIC Stamp
I have built in the past X - Y - Z tables similar to those used on CNC milling tables. I've always used stepper motors to move the tables. My question is for a new project; I want to control the positioning of a much smaller system (around·4 inches long) using a DC type motor with a linear pot type feed back. I got this idea from looking inside a swiss made wire cutting machine.· I liked how this machine worked, it responded instantly to any attempts from me to change the postion.·How would I go about·doing this? It would have a display & keypad where you would enter a value in millimeters and the motor would immediatley find the spot. Thanks.

Comments

  • ZootZoot Posts: 2,227
    edited 2007-12-05 22:33
    You could used RCTIME on the linear pot. The trick would be threefold --

    1- using accurate cap and (optional) resistors on the RC network that allows for a fast RCTIME reading that is still accurate. You want to be able to sample the pot quickly so you can send a motor command, then do it all again.

    2- motor controller -- roll your own H-bridge or purchase an an-off-the-shelf controller

    3- PID (Proporitional Integral Derivative) control of the pot -> speed -> motor loop -- you don't want the motor "hunting" or oscillating. The Stamps in Class forum has a great discussion about PID by Andy Lindsay. Essentially you have a control loop where the pot is measured and compared against what the *desired* value is -- then speed and direction are sent to the motor to try to "close the gap". What a control algorithm does is make the motor move faster if the error is great, but slow up quickly as it approaches the "target" and not overshoot.

    I think the big variable here is the motor -- is it geared down? will it heat up if cycled in a PID loop from a controller?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • LautarocondorLautarocondor Posts: 15
    edited 2007-12-05 23:36
    I haven't built it yet. What type of motor would be better; it's not going to be carrying a heavy load, just positioning a mechanism. Thanks about he PID; I'll be sure and read up on that! I didn't think about over heating of the motor......
  • ZootZoot Posts: 2,227
    edited 2007-12-06 00:49
    A DC motor with enough gearing that you get positional accuracy even when the motor itself is spinning fast would be fine. Size vs. power vs. power consumption will really depend on your application. You'll need to decide. Obviously, the smaller the motor, the less current the motor driver will need to handle, which will certainly make things a bit more inexpensive.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
Sign In or Register to comment.