Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Make my motor turn! (http://www.chiefdelphi.com/forums/showthread.php?t=62292)

[RSMT]sturm 22-01-2008 17:02

Make my motor turn!
 
We're using the default code and we are trying to make the motor turn using the pwm functions and the pwm outputs 13-16. We have our motor hooked up and all components working as intended up to that point as far as physical electrical connections.

mluckham 22-01-2008 19:11

Re: Make my motor turn!
 
Do you have the motor connected to the M+/M- side of a Victor speed controller?

The same Victor that your PWM cable goes to?

Is the PWM cable plugged all the way into the Victor speed controller ... sometimes they are hard to get in due to the plastic of the PWM cable connector being a bit large.

Are you supplying 12 volts from the battery, through a circuit breaker, to the V+/V- side of the Victor speed controller?

Are the wires all in good contact?

Did you test the motor first (direct-connect to a 12 volt battery)?

Make sure you are not outputting a "neutral" value to the pwm13 variable in your code ... neutral (no voltage to motor) is in the range of 127 +/- 14 (114 through 141). If you are just testing and the motor isn't connected to any gears or the robot, just set pwm13 to something like 10, or 230.

Tom Line 22-01-2008 19:37

Re: Make my motor turn!
 
I'm doing this from memory, because I don't have the default code at home and I'm too lazy to do it, but to use pwm13-16, don't you have to use the Generate_PWMS(); function call?

TubaMorg 22-01-2008 23:47

Re: Make my motor turn!
 
Another tip: The LEDs on the Victors should change color as you move from full forward to full reverse to neutral (green, red, orange is neutral). Also teams have had trouble using the last four PWM connections. You can try changing your code so that you can use 1-4 instead.

Important point, though, is to watch the LEDs. If they are flashing then something isn't connected right.

JonathanLKS 23-01-2008 20:10

Re: Make my motor turn!
 
Other than everything else already mentioned, do you have alot of interrupts and are not using some kind of replacement for Generate_PWMs?

My team found that running with alot of interrupts can either disable or make pwm 13-16 irratic using only Generate_PWMs

TubaMorg 24-01-2008 00:01

Re: Make my motor turn!
 
Quote:

Originally Posted by JonathanLKS (Post 684609)
Other than everything else already mentioned, do you have alot of interrupts and are not using some kind of replacement for Generate_PWMs?

My team found that running with alot of interrupts can either disable or make pwm 13-16 irratic using only Generate_PWMs

Yes this is the problem teams tend to have if they use PWMs 13-16. Interupts conflict with the psuedo PWM's. Better to avoid the issue if possible by using any of the other PWMs.

Al Skierkiewicz 24-01-2008 07:54

Re: Make my motor turn!
 
Quote:

Originally Posted by [RSMT]sturm (Post 683764)
We're using the default code and we are trying to make the motor turn using the pwm functions and the pwm outputs 13-16. We have our motor hooked up and all components working as intended up to that point as far as physical electrical connections.

When you use the default code you must connect your PWM cables to the specified PWM outputs on the RC. The joystick port is already mapped for you, to specific motor PWM outputs. The RC manual has a complete documentation of the default code. (See Page 6, PWM Output map, default code only)
From the manual...
"PWMs 13-16 are meant to
be used if one desires to
control the robot using only
one joystick. The left and
right drive motors are
controlled by mixing the X
and Y axes of joystick 1."
Let us know if this helps.


All times are GMT -5. The time now is 10:44.

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