Question about controlling 9 motors

Hello Everyone,
I’m trying to build a 3 legged robot using vex kit with 3 motors or servos on each leg. The problem I’m facing is that the controller I have only has 8 motor ports while I want to control 9 motors. Is there any way by which an input port can be converted into an output port for my 9th motor or do I have to use another vex controller for my last motor?

Ali

The normal solution is to use a y-cable, like this one: http://www.vexrobotics.com/276-1423.html

This works if you have two motors which are working together and you want to send them the same value at all times - they cannot be separately controlled. If you want to control 9 separate motors (and from the sounds of things I think you do), then you might need another microcontroller.

The input analog/digital ports (I’m assuming you have a PIC since you said 8 motor ports) basically cannot be turned into motor output ports without heavy modification.

Here are some brainstorms you might find useful.

  • A PIC output port does not have access to much power.
  • A PIC output port could probably be coded to output a motor PWM signal, jpearman or MarkO may have already posted something.
  • Quazar (I think) posted an old picture of a “solder-your-own” cheap power expansion circuit.
  • It is possible to get two Vex PIC CPUs to talk to each other, over their serial ports, per some post here several years old.
  • If you can get a Cortex CPU instead of a PIC, it has 10 ports.

Spider type walking robots are cool, and typically have 3 motors per leg, but they have more legs than 3. The ones I’ve seen online use servos instead of motors, so that they have the built-in feedback for positioning.

  • A three-point tripod can be stable, until you try to lift one leg and move it.

Yep. If you have a 2nd PIC microcontroller or a Signal Splitter (and some basic soldering/splicing skills), you can drive a 2nd bank of motors using this cable (discussion here) (source code here).

There are also a variety of other non-Vex products you can use to get more motor/servo ports such as the Pololu Serial Servo board, or hook an Arduino running Firmata to the serial port (v2.2 adds support for Servos).

Cheers,

  • Dean

In case you (original poster) wanted lots of advice from this forum, here is an example description that will explain what you are doing:

Example useful descriptions:
This is for a class (or a hobby, or science fair, or resume portfolio) due (when).
My flexibility matrix is (Schedule is fixed, my workhours are somewhat limited, scope of project is easiest to change), or some other order.
The goal (scope) is for robot to (sway-dance in place, not fall over, walk autonomously, walk in direction aimed by joystick, climb stairs, balance on 1 foot, do 3 finger sign-language, do same thing as video I saw on youtube)
I’ve already built the frame/legs/whole thing, see on gallery. (or I haven’t started yet)
I’m restricted to 1 PIC CPU only, (or 1PIC CPU driving custom hack electroncs), (or there are no limitations on electronics, or only limited by < $100)
I’m restricted to Vex metal (no cutting, with cutting, or unrestricted materials but low shop tools, or unlimited shop tools and materials available)
I’m using vex motors (or vex servos, or motors with pot feedback, or RC hobby servos, or some other motors).
Everything is powered by 1 vex 7.2v battery (or a 12v FRC battery, or what?)

Thanks a lot for all your replies. It was a big help.
In reply to jgraber, I’m doing a university project. The goal of the project is to implement this gait I saw on youtube for starters. Then a feedback control with a gyro or accelerometer would be nice

I’ve built frames and legs. I’m using 6 servos and 3 motors with potentiometer feedback. I’ve implemented and tested pid control on the 3 motors so it is behaving like a servo.
My restrictions are that my university has 6 pic kits and I want to avoid buying additional components, which is why I would prefer using another pic controller instead of using a signal splitter. For now, I’m using a DC power supply but I probably will buy a battery to make the tripod independent.

Also, for now I’m using trial version of easyC but I would prefer using mplab. However, I read somewhere that I need mc18 version 2.2 for mplab and I can’t find that anywhere. It would be a big help if someone could guide me regarding that too.

Ali

MPLAB for PIC is available at the VEX store

http://www.vexrobotics.com/products/accessories/logic/mplab.html

$50 if you don’t need the programming cable, but it’s not compatible with Mac OS

Cheers Kb

That is cool… Not very effective in motion though…

You will need to Synchronize the PICs together…

MPLAB ( if you want ) and mcc18 v2.40 SE is the version you need…

%between%
You might want to investigate my contribution to Vex:

Vex On-Line Controller Code v2.x (Available Source Version 0.80 Beta)

and

** Vex Serial Port Reader 0.81ß (VEX On-Line Code Version)**

technically, you can use a power expander and code the digital out to emulate a PWM signal

I’ve built … 6 servos and 3 motors with potentiometer feedback. I’ve implemented and tested
My restrictions … Ali

Wow, that worked out really well, especially the video worth 1MW.
I was afraid you were a middle-schooler in way over your head, but it looks like you are well on your way, and new we have a much better idea of your capabilities. Is this for a senior project or something?

Which joints are motors and which are servos?
Any problems with the servos being strong enough?
For using two (or more) PICS, you can connect serial ports.
An alternate idea is to have the second PIC sensor wires jumpered to the first PIC digital outputs, and run your own protocol.
Some distributed systems that need synchronized movements (eg dynamixel servos) use either a low latency trigger signal to launch a previously-setup command, or run a time-synchronized clock on all distributed systems and schedule the motor commands for future times.

Do you use [Inverse kinematics - Wikipedia methodology,
with an internal model of the physical balancing point?
Or emperical recorded movements?
Or force-sensors feet to know when one foot is nearly free?](Inverse kinematics - Wikipedia methodology,)

If you want to do this, here is a diagram for the needed cables.

Cheers,

  • Dean

Thank you everyone for all your help.

Yes it’s my university’s final year project. My team mate is working on software simulation and I’m working on hardware.

The upper two are servos and the lowest is motor. However I might make the lowest servo because with the code I’ve written, I can increase my servo’s speed which can help in a jerk motion of the lowest joint to push the body up, whereas my PID control code of motor might not provide the speed I require.

Since I haven’t fitted a battery to the body, the servo can manage the weight. They waver a bit but their performance will improve after I add the knee joint

Yes I initially thought of that but then I thought it would be better if my main controller was able to control the movement of every motor instead of just controlling protocols.

I intend to use inverse kinematics but if I want my robot to walk on uneven terrain then I might need to have a switch attached to the foot to know when it is on the floor.

Thanks a lot! I spent a week trying to find a compatible mplab and c18 version. Now my test programming is not giving compiling errors and if mplab works, I’ll translate all my easyc code into mplab code on monday.

I’ll try this in the coming week.