Shop OBEX P1 Docs P2 Docs Learn Events
Motor control for dummies? — Parallax Forums

Motor control for dummies?

Jay KickliterJay Kickliter Posts: 446
edited 2009-01-16 15:13 in General Discussion
Up to this point, all my personal projects have been non-mechanical. But I need to build a balancing robot for a class I'm taking. I've already done all the foundation coding for a couple air-based projects I'm doing, but I really don't know anything about motor control. I have 2 continuous servos, but they don't seem to have much control, they pretty much just go CW and CCW, with very little speed control. Can anyone recommend a SIMLE solution, that isn't too expensive (so I can get the school to pay for it)? Something that will provide snappy, but accurate controls with wide latitude? I am researching myself, so I'm not just waiting for your guys opinion, but your knowledge could save me a lot of trial and error.

Comments

  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-01-16 13:14
    How big is your robot going to be? If it's not too big, you could use some small motors and an L298N to control them. I'm not sure how well some steppers would work without any kind of feedback, but as far as precision control goes, these would probably be best. The L298N is a dual H-bridge capable of driving up to 2A with each bridge, or 4A total. This interfaces very well with many bipolar stepper motors and the propeller. You can even get up to three L298HN's from ST Micro Electronics(as free samples). These are the horizontal mount type, but you can easily solder them, then just bend them into shape by hand.
  • Jay KickliterJay Kickliter Posts: 446
    edited 2009-01-16 13:45
    Thanks. It's not too big. The standard stick on wheels. By precise I meant wide latitude of speeds. Am I correct in thinking that an H-Bridge is not throttleable? What I really need is something set and forget. Or can you just input a PWM signal into an H-Bridge to throttle a regular DC motor? See, I can't rely on using the Propeller. I'm using the Propeller to prototype, but I have to use a different microcontroller in the project, which does have set and forget PWN pins.

    Post Edited (Jay Kickliter) : 1/16/2009 1:50:21 PM GMT
  • LeonLeon Posts: 7,620
    edited 2009-01-16 14:32
    Microchip has lots of stuff on motor control:

    www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2125&param=en026178

    Some of their PWMs have H-bridge built-in, all you need are MOSFETs and drivers:

    ww1.microchip.com/downloads/en/AppNotes/00893a.pdf

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 1/16/2009 2:47:23 PM GMT
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-01-16 15:13
    Think of an H-bridge as just a transistor that you can "magically" move from either end of the load, allowing you to switch the polarity applied. You can turn this transistor on and off just like a normal transistor, and also switch the polarity. In reality, an H-bridge actually has 4 transistors. Most H-bridge's have some kind of Enable pin that turns the whole bridge power on/off.

    So, yes, you can supply a PWM signal to this just fine.
Sign In or Register to comment.