Shop OBEX P1 Docs P2 Docs Learn Events
Running 3 VEX motors simultaneously with Activitybot — Parallax Forums

Running 3 VEX motors simultaneously with Activitybot

I am doing a project that requires 3 vex motors running off the activitybot. Is there any way to code this in simple IDE that could have them all 3 running at the same time using PWM?

Comments

  • ercoerco Posts: 20,255
    Motors or servos (standard or CR)?
  • rhecto1 wrote: »
    Is there any way to code this in simple IDE that could have them all 3 running at the same time using PWM?

    The short answer is yes.

    The long answer depends on specifics like the things erco mentioned.

    Since you've asked about Simple IDE, I assume you want to use C?

    I don't use C much on the Propeller myself (I like Spin) but I know enough about C on the Prop to know you can control three servos and three motors simultaneously.

  • Yes I will be writing in C. But they are actual motors, like connected shafts on a structure that uses the activitybot as a brain.
  • Are you using a motor like this?

    file_62_3.jpg

    What sort of h-bridge (motor controller) are you using? Are you using this one?

    276-2193-motor-controller-29-a_1_4.jpg

    Sorry about the big pictures. These are from the Vex website.

    You need some sort of h-bridge to power the motors.

    You'll want to power the motors directly from the battery power. Don't power the motor from USB power or you'll likely destroy your USB port.

  • This is exactly what I'm using:
    4032 x 3024 - 1M
  • 3 of them.
  • rhecto1 wrote: »
    This is exactly what I'm using:

    It looks like those motor controllers are controlled just like a continuous rotation servo. You'll want to send a 50Hz signal to the controller with pulses ranging from 1ms to 2ms. 1.5ms will cause the motor to stop with pulses longer or shorter causing the motor to turn in one direction or the other.

    Any examples showing how to control a servo should work with those motor controllers.

  • ercoerco Posts: 20,255
    edited 2016-09-23 21:48
    Nifty, that Vex Motor Controller 29 works like half of the dual controller I recently found, essentially turning DC motors into CR servos for full forward/reverse speed control using a single pin/wire.

    Per Duane, you're nearly there with an Activity Bot. Presumably you're already up to speed on driving the A-Bots Hi-speed CR servos/wheels for motion. Just hook up each 3-wire connector to the Propeller Activity board, which already has two extra servo-style headers. For your third motor controller you may have to use jumper wires/breadboard to connect. And you'll use the types of same code/commands to control your motors/controllers as your CR drive servos, just using different pins.



Sign In or Register to comment.