|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
repurposing servos
we were going use a pneumatic actuator to control ball flow but that got axed when we cam in over weight. it was replaced by one of the servos.
i added : ---------- pwm09 = p3_x printf(" %d || %d\r", p3_x, pwm09) // edited post "p3_y" to "p3_x" ---------- to my code hoping that i could just plug the servo into pwm09 and have it track back and forth and then rewrite the code later to include endpoints. the idea with the printf was to let me find reasonable values for the ends. the problem is that when i move the 3rd joystick i get no motion out of the servo it dose however move a tiny bit when the robot is first turned on. if i missed anything in my code or wiring I'd be grateful if some one could point it out. Last edited by Spindash54 : 20-02-2006 at 12:55. |
|
#2
|
|||
|
|||
|
Re: repurposing servos
Is anything being displayed by your printf? You didn't mention anything about that.
This is exactly how we dump out joystick and pwm values. Saturday it showed us that one of our joysticks from last year had died. The only difference in our code syntax is this: Code:
printf("Joystick1 X = %u\r\n", (int)p1_x);
printf("Joystick1 Y = %u\r\n", (int)p1_y);
Also verify your joystick is plugged in to port 3 and your servo to pwm09. By the way, the original version of the code has Code:
pwm07 = p3_x; |
|
#3
|
|||
|
|||
|
Re: repurposing servos
Quote:
the code _should_ have p3_x ... when i coppied my printf over i acidentaly changed it to p3_y also the print statement works all right it reads 130 centered though, but thats just being lazy with calibration even the pwm out check works so im at a lose to explain why i get no motion also the servo dosenotalways return to the same spot when it moves at first, even if the pwm out is fixed at 127 (joystick unplugged) |
|
#4
|
||||
|
||||
|
Re: repurposing servos
you are aware the servos run off the power from the little backup battery, yes?
also, make sure you dont have a line of code further down that sets the PWM9 port to 127. Teams often set the unused ports to 127, and then forget that line of code is in there! |
|
#5
|
|||||
|
|||||
|
Re: repurposing servos
Quote:
|
|
#6
|
|||
|
|||
|
Re: repurposing servos
Quote:
Quote:
|
|
#7
|
|||||
|
|||||
|
Re: repurposing servos
Do you have some other PWMs or speed controllers that are working? You could try swapping the servo to a PWM you know is working and swapping the speed controller to pwm09. If the servo doesn't work, then it's a bad servo or wire. If the speed controller doesn't work, then it's something in your code.
|
|
#8
|
|||||
|
|||||
|
Re: repurposing servos
FYI
Version 11 and earlier of the Master code had a "feature" that caused servos (not motors) to twitch occasionally on powerup. I haven't tested version 12 yet to see if that's been resolved, but IFI was aware of the issue. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Are Servos Motors? | John Gutmann | Motors | 1 | 30-01-2006 18:41 |
| CMUCam Servos not Responding on Robot | krigby | Programming | 7 | 20-01-2006 23:19 |
| Servos not getting right voltage | sheyna | Programming | 2 | 17-01-2006 21:57 |
| Standard Servos? | Matt Krass | FIRST Tech Challenge | 4 | 22-11-2005 08:09 |
| Hooking up 2 Servos | kutty18 | Programming | 7 | 04-02-2005 09:26 |