Shop OBEX P1 Docs P2 Docs Learn Events
Motor Control: 2 Independent DC Servos — Parallax Forums

Motor Control: 2 Independent DC Servos

addictaddict Posts: 5
edited 2005-04-25 06:05 in BASIC Stamp
I'm working on a project that will use 2 independent motors with wheels attached, that will drive in a straight line.· I don't need to make any turns or go in reverse.· I just need to be able to control the speed of each motor, so that the unit goes straight for at least 20+ feet.· I've read my manuals that came with the "What's a Microcontroller?" and "Industrial Control" kits, but wanted to get opinions from more experienced enthusiasts.

I'm assuming that I would need something besides a 3904 to drive the motor?· I have a 12VDC - 18Ah battery that I can use to drive the motors.·

I've done some searching in the forums, but didn't find the answers I'm looking for.· Thanks for your time and help.·

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-22 05:33
    DC motors are speed controled through pulse width modulation (PWM), whats the specs of your motor (voltage, current)?
  • addictaddict Posts: 5
    edited 2005-04-22 09:38
    They are Torque Master 2620 Brush Servo motors. I ran them off a 10V power supply with 200mA, but no load on them. I will need to be able to compinsate the RPM, just in case a load is applied to one motor or the other.

    Vmax = 44VDC
    Imax = 5.7A (no RPM)
    Imin = 100mA (6167 RPM, no load)

    Thanks again,
  • addictaddict Posts: 5
    edited 2005-04-23 08:24
    Anyone? idea.gif
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-24 21:27
    Sorry been busy as of late, If you need exact speed control in the presence of varing loads you will need some sore of feedback system to measure the RPM then adjust the PWM duty cycle accordingly.
  • addictaddict Posts: 5
    edited 2005-04-24 22:23
    I do, which is why I posted here thinking someone would know the best way to accomplish this.· Since the Stamp only works on one function at a time, I need to be able to take readings and adjust accordingly for both motors, so they stay in "sync".·

    Would it make sense to set a reference RPM on one of the motors and then take measurements on the second motor.· The only problem I see with this is if the load changes on the reference motor, it will get out of wack.·

    Thanks again for your time.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-24 22:33
    Ok Ive got an idea, but I am a little confused about a particular point. If you'll clarify it Ill proceed with describing what I have in mind.

    You describe the motor as a "bushed sero motor", now, is this an actual servo (are there three wires?) or is this a regular motor whose intended use is in a servo (are there two wires?).
  • addictaddict Posts: 5
    edited 2005-04-24 22:46
    This is an actual Motor with 2 leads (Black and Red), which the label on it mentions DC Servo Motor. I got them from some random box at school.

    Thanks again for your time and help! [noparse]:)[/noparse]
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-25 06:05
    No problem, Ok my suggestion is to use a hall effect sensor and a magnet mounted on some portion of the rotating spindle, whenever the magnet passes the sensor it produces a pulse, by measuring the time it takes between pulses you can determine the rpm. You use this to adjust the duty cycle. The trick is you need to interleave the PWM pulses with measurement, fortunately the motor cares more about the duty cycle more than the overall frequency of the pulses, so you can have a little play in the frequncy. Or if you do not want the motor to be run at very low speeds you can just serialize the two operations, the time it takes for measurement is the minimum duty cycle.

    Its late and Im tired, if any of this is unclear let me know and Ill try to clarify after I wake up.
Sign In or Register to comment.