|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
||||
|
||||
|
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. |
|
#3
|
||||
|
||||
|
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?
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||
|
|||
|
Re: Make my motor turn!
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.
|
|
#7
|
|||||
|
|||||
|
Re: Make my motor turn!
Quote:
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do you make the robot turn a perfect 90 | eccmaster | Programming | 2 | 16-01-2008 20:54 |
| make motor go slower | coolguybigt | Motors | 1 | 19-02-2007 09:36 |
| 3-turn pots | archiver | 2001 | 2 | 24-06-2002 01:24 |
| How fast could a torque motor turn if a torque motor could.. | archiver | 2001 | 0 | 23-06-2002 22:54 |
| Robot Turn-in | Mike Martus | Off-Season Events | 0 | 08-11-2001 19:32 |