Vex Motors with Arduino?

Hey,

I know this might be offtopic, but I can’t find any way to do this.

I just got an arduino, and I have been using it to drive Vex motors with the 7.2v Vex batteries. Only problem is, the motors go for a second and slow down. I don’t know much about electronics yet, since I’m not in highschool (yet) but I know that I need some device to keep a constant flow of current.

I have found something to do this. I think it’s called a UBEC? Not sure. But you plug in the battery and 5 volts, 8 amps comes out. Someone on the Arduino forum told me this would work, but the only ones I found on line were either out of stock or came from another country with very steep shipping.

I plan on wiring the setup so that that battery is only powering the motors, not the arduino.

Can anyone help me? I would do anything for help at this point! Thanks!

-Dylan

Which Vex Motors are you using (2-wire or 3-wire)?
If you are using 2-wire, are you also using a Motor Controller 29?
How are you attaching the motor to the Arduino?
Also, which Arduino are you using (3.3V or 5V?)

I’m not familiar with this item, but you shouldn’t need anything in addition to a Motor Controller 29 and the correct wiring.

Cheers,

  • Dean

I’m using the 3 wire motors with a 5v arduino, the arduino Mega. I just attached the ground lead of the motors to the arduino’s ground. I connected the signal leads to the digital ports. I connected the battery positive lead to the positive lead of the motors, and the ground lead to the ground of the arduino.

Also, forgot to mention I am using 6 Vex motors, all at once.

Thanks
-Dylan

This sounds like the right connection scheme to me. You may want to put a 1K resistor between the digital pin and the vex motor signal lead, since that is they way the Vex digital ports are wired. It shouldn’t matter, but it is worth a shot.

Does the slowdown still happen if you run just 1 motor?

If you have a voltmeter, can you measure the voltage between the black and red wires at the motor? I’m trying to determine if this is a power problem. If the voltage isn’t sagging when the motor slows, then it is probably a signal/software problem.

Cheers,

  • Dean

Hi,
I have a problem with the vex 2 wire motor + motor controller + arduino.

i have connected in the batery holder ( from vex) 6 bateries. So i have 7.2V aprox.

I connected it to the arduino, and i connected the + from the motor to the vin port , the - to the gnd port and the signal to a digital port.

I tried to send a software pwm to the port, but it doesnt work.
The motor it doesnt even move.

I think that i did not formed well the pwm signal.
If you know the pwm sequences that are needed please help me.

Thanks.

It’s the same as any RC servo, nominal 1.5mS pulse every 20mS or so. The cortex uses 18mS as the duty cycle. How is your digital output configured? Is it open collector? does it need a pullup resistor?

Thank you for the help. This helped .

I was using the wrong pulse and duty cycle .

I have another question.
I connected the arduino to a motor, sent it a train signal and waited .
The motor started rotating.

I connected other motor to the same setting , the speed of this motor was different from the last one.

I have 4 motors that run at different speeds ( not very different , but different ) using the same train signal.

do you have the code for that i am struggling to get mine working also

I posted some code over on Chief Delphi that you might find interesting. I use a bluetooth serial dongle and the Bluebots app to control VEXPro Victor 888 speed controllers from my Android phone.

The connection to the Victors is essentially the same as the connection to three wire VEX motors.

Jason

This should be helpful:
http://www.arkadian.eu/pages/663/vex-motors-on-arduino

Helpful link thanks.