|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
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. Last edited by Andy Brockway : 20-09-2006 at 13:02. Reason: added Kronos link |
|
#3
|
|||||
|
|||||
|
Re: Using DC motors
Quote:
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! Last edited by Billfred : 20-09-2006 at 13:07. |
|
#4
|
||||
|
||||
|
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. |
|
#5
|
||||
|
||||
|
Re: Using DC motors
Quote:
|
|
#6
|
||||
|
||||
|
Re: Using DC motors
Quote:
|
|
#7
|
||||
|
||||
|
Re: Using DC motors
I think a victor is a little too big for my robot.
|
|
#8
|
||||
|
||||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| using non-vex motors | MarkH | Motors | 3 | 23-04-2006 21:04 |
| using more motors | Aren_Hill | Motors | 6 | 13-02-2005 17:44 |
| using more motors | Aren_Hill | Technical Discussion | 2 | 13-02-2005 15:52 |
| Using 6 motors in a drive system? | FIRST JerseyKid | Motors | 7 | 12-01-2005 23:49 |