Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   VEX (http://www.chiefdelphi.com/forums/forumdisplay.php?f=162)
-   -   Using DC motors (http://www.chiefdelphi.com/forums/showthread.php?t=49078)

Guy_E 20-09-2006 11:51

Using DC motors
 
Hi,
I have another question, but this time rather more complicated.

I have 2 DC motors which I want to connect to the VEX controller. Because they are DC I can't connect them to the PWM port.
My Electronics teacher has suggested me to build 2 small electric circuits using L293 chips that control motors, connect each chip to an amplifier and connect all that to a digital output.

If I do all that, I will we able to simulate a PWM signal, using the digital outputs and a timer.

My problem is that I don't know how to write the code for the PWM control in a way that it will be running simultaneously with the general code of the program.

Can someone help me?

I hope I've made myself clear,

Guy

Andy Brockway 20-09-2006 12:59

Re: Using DC motors
 
This has a pretty good write up on building the circuit plus it gives you some code to make it all work. It is not discussed at this site but the chip does have a pwm controlled pin for controlling speed. There are many sites that will give similar results if you search using L293.

Here is another site.

Billfred 20-09-2006 13:03

Re: Using DC motors
 
Quote:

Originally Posted by Guy_E
Hi,
I have another question, but this time rather more complicated.

I have 2 DC motors which I want to connect to the VEX controller. Because they are DC I can't connect them to the PWM port.
My Electronics teacher has suggested me to build 2 small electric circuits using L293 chips that control motors, connect each chip to an amplifier and connect all that to a digital output.

If I do all that, I will we able to simulate a PWM signal, using the digital outputs and a timer.

My problem is that I don't know how to write the code for the PWM control in a way that it will be running simultaneously with the general code of the program.

Can someone help me?

I hope I've made myself clear,

Guy

What kind of DC motors are you working with? If they're 12V (or 24, or 36, or 48), you should be able to interface a Victor directly with the Vex controller's PWM outputs (just use a Y-cable to get the appropriate male-to-male connection). Someone who's more familiar with the Victors can tell you if and how well they handle smaller voltages.

It's less legwork, which may be a good or a bad thing for your project, but there is something to be said for keeping it simple. Hope this helps!

Guy_E 20-09-2006 13:11

Re: Using DC motors
 
My problem is not with the electrical part.

What I want to know is how to intergrate it with the general vex code. Just to mention, im programming using MPLAB.

Guy_E 20-09-2006 15:22

Re: Using DC motors
 
Quote:

Originally Posted by Billfred
What kind of DC motors are you working with? If they're 12V (or 24, or 36, or 48), you should be able to interface a Victor directly with the Vex controller's PWM outputs (just use a Y-cable to get the appropriate male-to-male connection). Someone who's more familiar with the Victors can tell you if and how well they handle smaller voltages.

It's less legwork, which may be a good or a bad thing for your project, but there is something to be said for keeping it simple. Hope this helps!

I wish I could use a victor, but my motors are 6-8V DC .

lukevanoort 20-09-2006 15:36

Re: Using DC motors
 
Quote:

Originally Posted by Guy_E
I wish I could use a victor, but my motors are 6-8V DC .

The Victor 884 is rated for 6-15V.

Guy_E 21-09-2006 05:28

Re: Using DC motors
 
I think a victor is a little too big for my robot.

Culvan Van Li 21-09-2006 12:58

Re: Using DC motors
 
Another thing to be aware of is the difference in PWM (pulse width modulated) signals. The VEX motor ports output a PWM signal that has a 1-2ms pulse every 18ms (11% - 22% duty cycle). This is the same style that is used for remote control servos. The Victor88X controllers are designed to take this type of signal.

If you design your own circuit using a L293 (or similar part) you will probably need to generate PWM signals that cover the entire sepectrum of duty cycles (0% to 100%) because you will probably be driving a transistor to drive the motor directly.

I'd also recommend you look into the HB-25 from Parallax. It functions like the Victor controllers but costs about 1/3 as much. It's a little bit smaller too. I'm currently using these with my VEX controller for cordless drills.

Andy


All times are GMT -5. The time now is 22:06.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi