Go to Post We're thinking of using static electricity to pick up the tubes. The programmers are trying to figure out how to make the robot shuffle it's feet on the carpet. - Tom Ore [more]
Home
Go Back   Chief Delphi > Other > VEX
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-09-2006, 11:51
Guy_E Guy_E is offline
Registered User
FRC #1574 (MisCar)
Team Role: Leadership
 
Join Date: Mar 2006
Rookie Year: 2006
Location: ISRAEL
Posts: 81
Guy_E has a spectacular aura aboutGuy_E has a spectacular aura about
Send a message via MSN to Guy_E
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
__________________
Team #1574 Misgav High School - Israel

Winner of the 2007 Israeli Regional

Winner of the 2007 Motorola Quality in Design Award

Visit our website:
www.miscar1574.com
Reply With Quote
  #2   Spotlight this post!  
Unread 20-09-2006, 12:59
Andy Brockway Andy Brockway is offline
Engineer
FRC #0716 (Who'sCTEKS)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Falls Village, CT
Posts: 458
Andy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond repute
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.
__________________
Andy Brockway
Team 716, The Who'sCTEKS

Last edited by Andy Brockway : 20-09-2006 at 13:02. Reason: added Kronos link
Reply With Quote
  #3   Spotlight this post!  
Unread 20-09-2006, 13:03
Billfred's Avatar
Billfred Billfred is offline
...and you can't! teach! that!
FRC #5402 (Iron Kings); no team (AndyMark)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: The Land of the Kokomese, IN
Posts: 8,484
Billfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond repute
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!
__________________
William "Billfred" Leverette - Gamecock/Jessica Boucher victim/Marketing & Sales Specialist at AndyMark

2004-2006: FRC 1293 (D5 Robotics) - Student, Mentor, Coach
2007-2009: FRC 1618 (Capital Robotics) - Mentor, Coach
2009-2013: FRC 2815 (Los Pollos Locos) - Mentor, Coach - Palmetto '09, Peachtree '11, Palmetto '11, Palmetto '12
2010: FRC 1398 (Keenan Robo-Raiders) - Mentor - Palmetto '10
2014-2016: FRC 4901 (Garnet Squadron) - Co-Founder and Head Bot Coach - Orlando '14, SCRIW '16
2017-: FRC 5402 (Iron Kings) - Mentor

93 events (more than will fit in a ChiefDelphi signature), 13 seasons, over 60,000 miles, and still on a mission from Bob.

Rule #1: Do not die. Rule #2: Be respectful. Rule #3: Be safe. Rule #4: Follow the handbook.

Last edited by Billfred : 20-09-2006 at 13:07.
Reply With Quote
  #4   Spotlight this post!  
Unread 20-09-2006, 13:11
Guy_E Guy_E is offline
Registered User
FRC #1574 (MisCar)
Team Role: Leadership
 
Join Date: Mar 2006
Rookie Year: 2006
Location: ISRAEL
Posts: 81
Guy_E has a spectacular aura aboutGuy_E has a spectacular aura about
Send a message via MSN to Guy_E
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.
__________________
Team #1574 Misgav High School - Israel

Winner of the 2007 Israeli Regional

Winner of the 2007 Motorola Quality in Design Award

Visit our website:
www.miscar1574.com
Reply With Quote
  #5   Spotlight this post!  
Unread 20-09-2006, 15:22
Guy_E Guy_E is offline
Registered User
FRC #1574 (MisCar)
Team Role: Leadership
 
Join Date: Mar 2006
Rookie Year: 2006
Location: ISRAEL
Posts: 81
Guy_E has a spectacular aura aboutGuy_E has a spectacular aura about
Send a message via MSN to Guy_E
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 .
__________________
Team #1574 Misgav High School - Israel

Winner of the 2007 Israeli Regional

Winner of the 2007 Motorola Quality in Design Award

Visit our website:
www.miscar1574.com
Reply With Quote
  #6   Spotlight this post!  
Unread 20-09-2006, 15:36
lukevanoort lukevanoort is offline
in between teams
AKA: Luke Van Oort
no team
 
Join Date: Oct 2005
Rookie Year: 2005
Location: Waterloo, ON, Canada
Posts: 1,873
lukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond repute
Send a message via AIM to lukevanoort
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.
__________________
Team 1219: 2009 - Mentor
Team 587: 2005 - Animator, 2006-2008 - Team Captain
Reply With Quote
  #7   Spotlight this post!  
Unread 21-09-2006, 05:28
Guy_E Guy_E is offline
Registered User
FRC #1574 (MisCar)
Team Role: Leadership
 
Join Date: Mar 2006
Rookie Year: 2006
Location: ISRAEL
Posts: 81
Guy_E has a spectacular aura aboutGuy_E has a spectacular aura about
Send a message via MSN to Guy_E
Re: Using DC motors

I think a victor is a little too big for my robot.
__________________
Team #1574 Misgav High School - Israel

Winner of the 2007 Israeli Regional

Winner of the 2007 Motorola Quality in Design Award

Visit our website:
www.miscar1574.com
Reply With Quote
  #8   Spotlight this post!  
Unread 21-09-2006, 12:58
Culvan Van Li's Avatar
Culvan Van Li Culvan Van Li is offline
Jack-Of-All-Trades
AKA: Andy
FRC #1939 (Kuh-Nig-Its)
Team Role: Engineer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Kansas City, MO
Posts: 36
Culvan Van Li is on a distinguished road
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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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