Do the motors run off of a 50hz pwm with a 1-2 ms duty cycle like hobby servos?
The period on the PWM Outputs is 18ms or about 55Hz with a 1-2 ms pulse width. You must vary the pulse width to control direction and speed. As the pulse width varies from about 1 to 1.5 ms, the motor will be at full speed in one direction to neutral. As the pulse width varies from about 1.5 to 2 ms, the motor will be at neutral to full speed in the other direction.The nominal dead band (neutral) varies from 1.47ms – 1.55ms but over all temperature and voltage ranges could vary from 1.36ms – 1.68ms. The operating range of the Vex Controller is 5.5 – 9.0 Volts which will be applied to the + Power PWM Outputs. The + Power PWM Outputs can source up to 4 Amps. The PWM Control signal High is about 4 Volts @ 1mA and for a Low is about 0.6 Volts @ 1 mA.
i’ve been playing with hardware pwm on my kit, selecting USER and USER_CPP to get control of a couple of pins. things work swell. i now have a couple of variable brightness leds on my 'bot. was wondering what i need to do if i select USER control on a non-CPP pin, or if i select USER and IFI_PWM on a cpp pin. i also noticed that in your example code, (very helpful by the way), that, with the period set up the way you do it, if CCPR2L were set to 0xFF, the pwm duty cycle would exceed the period. i was afraid to try this out, but i was wondering if you knew whether this would have an adverse effect on the machine.
**If you select USER control on a non-CCP pin (PWM Outputs 5 - 8), you must write your own code to control those pins. Selecting USER control on a CCP pin (PWM Outputs 1 - 4) and IFI_PWM, will generate the same PWM Signals that the Master would have generated if you use Generate_PWM(PWM1,PWM2,PWM3,PWM4,PWM5,PWM6,PWM7,PWM8). If Generate_PWM(PWM1,PWM2,PWM3,PWM4,PWM5,PWM6,PWM7,PWM8) is not called under this situation, the output pins will not be controlled.
Note: When using USER control, the PWM signals are interruptible which can cause stretching of the PWM Output signal, whereas with the MASTER control they are non-interruptible. For more details on the CCP pin, refer to page 154 of the PIC18FXX20 Data Sheet.**
How can I connect more than 8 motors to the Vex system?
You can only have a maximum of 8 independent motors. You can “Y” 2 Motors to the same output but these 2 motors will always have the same output rotation. Vex “Y” cables are available on the Vex Robotics Cables & Accessories page. We do not recommend more than 2 Vex Motors per Output.
I was wondering, what is the max current draw? From reading the specs, it appears that each motor port can supply 4A. Does that mean that the total available power is 32A? If so, that’s more than 200W, which is impressive.
Yes that would be impressive, but the Max “combined total” from all Motor Output Power pins is 4 Amps. We have updated the Spec page to better clarify this issue, Starter Kit