Shop OBEX P1 Docs P2 Docs Learn Events
need help controling motors w/joystick — Parallax Forums

need help controling motors w/joystick

nknk Posts: 8
edited 2005-11-07 22:33 in Robotics
·····Im wanting to know how, if at all i can control two drive motors
·with directional control and speed control for a robot i am working on. Im shure it will use rc time and pwm but i cant figure out how to connect the two. Im using a joystick 2 axis with four buttons. The pots. for the axis control are centered half way through the travel, so there is no direct relationship between rctime and pulse width.


······························································ Please help,
································································ Nick

Comments

  • jeffrey morrisjeffrey morris Posts: 52
    edited 2005-08-25 09:44
    Do you mean like a joystick on a power wheelchair?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-25 15:31
    It is a relatively simple exercise, the Y-axis potentiometer controls the speed; the X axis controls the differential speed between the two motors. You didn't specify if your motors are DC or servos. If they are DC, do you have a motor controller for them? (MotorMind, Pololu, etc).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • AudiorigamiAudiorigami Posts: 3
    edited 2005-08-25 16:32
    try this:

    http://www.parallax.com/dl/docs/article/Roboto.pdf

    it's an example using the transmitter/receivers and two pots for joysticks, using RCTIME.
  • nknk Posts: 8
    edited 2005-08-25 21:02
    it is a power weelchair base with two· dc motors. im not shure on the amperage, though. It has 2 12 volt gell cell bateries in series and a 30 amp slo-blo fuse in line with the connector
  • nknk Posts: 8
    edited 2005-08-25 21:06
    no motor controller, though. can i make one with a transistor or solid state relay?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-25 22:51
    Yes you will need a motor controller.

    You may need to create your own since wheelchair motors are power hungry (most commercially availible motor controllers are designed for smaller motors). The basis of controlling a DC motor is called an H-Bridge, this is nessesary because you want to be able to make the DC motor go both forwards and backwards. Google the term to get more information on how they are constructed and basic method of operation. I am presently in the early stages of designing an H-bridge to run 24V motors (though I don't know if I will design it to handle as much current as you require), take a look at this post and pay particular attention the the schematic posted by Beau, you'll want something along those lines (a total of 4 of them, two for each motor). To obtain speed control you will need to PWM the current flowing through the bridge, this is either done by an extra transistor which supplies Vdd to both branches of·the bridge, or PWMing the input to the bridge itself.

    Lets defer the details of how the joystick will modify the speed of the motors for now, because you will need to buy or create the motor controller first.

    Can you provide any details on the actual motors? Frequently they will have specs printed right on the motor itself. If there are none, I think you can assume that each bridge will have to be able to handle 15A since the 30A fuse would account for both motors.

    Once you understand the basic principles of H-bridges we can work on finding some suitable transistors to use in the bridge, if you decide to make your own. I have fair experience in this area, but others such as Gunther have more knowledge about a wider variety of transistors (he recomends IGBTs, which are too expensive for my application but may be better suited for your application (they are around $8 apiece, which you'll need 8 of), but don't worry about this as of yet).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • nknk Posts: 8
    edited 2005-08-26 00:46
    there are no labels on the motors other than part number labels. im looking the parts up now
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-08-26 00:53
    nk -

    Here is a company which offers quality motor controller specifically for wheelchairs and robots which use wheelchair platorms as a base:
    http://divelec.tripod.com/

    Additionally, their motor controllers are built with a joystick interface capability, and they offer the necessary schematics and parts for completing the entire system:
    http://divelec.tripod.com/html/interface_circuits.html

    The JCSC interface shown above is the one which is probably the most appropriate for your application.

    I have used a number of their products and have been very happy with ther performance. They're also real nice folks to deal with, and will be happy to answer any questions you may have about their products or how to apply them. Just for the record, I have no affiliation with this company, I'm just a quite satisfied customer.

    Regards,

    Bruce Bates

    Post Edited (Bruce Bates) : 8/26/2005 12:57:39 AM GMT
  • nknk Posts: 8
    edited 2005-08-26 01:16
    all the site showed was what a new motor costs
  • nknk Posts: 8
    edited 2005-08-26 01:33
    o, your site is great! i cant count on the wheelchair mfg. site for anything
  • nknk Posts: 8
    edited 2005-08-26 02:22
    i just checked the battery case, and i found that the fuse is actually a 60 amp time delay fuse.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-26 11:39
    Then assume your motor controller will have to supply 30A per motor, you may want to give a little room say an additional 5-10A, because if a fault occurs you want the fuse to blow, not a transistor in your motor controller.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • nknk Posts: 8
    edited 2005-08-26 21:41
    Is there still any way i can make a motor controler?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-28 19:06
    Yes, see my post, posted 8/25/2005 5:51 PM. You need to make an H-bridge, do some google-work to get yourself upto speed on their construction and operation (this is how I learned, there are many easy to understand sites out there, that Im not going to waste the time explaining the basics since they already have done it and did a better job than I could). Once you've done that, we'll work out the particulars of your application, such as choosing which transistors to use in the H-Bridge.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Jim RicheyJim Richey Posts: 82
    edited 2005-11-07 22:33
    You might want to be careful powering those wheelchair motors,as I use 2 with my remote control lawnmower and they can draw as much as 100 amps apiece when placed in a stall situation.
Sign In or Register to comment.