Go to Post Having the ability, opportunity, and inclination to do manual labor makes you a better engineer. - MrForbes [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-20-2006, 11:48 AM
Spindash54 Spindash54 is offline
Registered User
AKA: Gregory Walsh
FRC #1468 (J-Birds)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Hicksville, NY
Posts: 40
Spindash54 is an unknown quantity at this point
Send a message via AIM to Spindash54
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 : 02-20-2006 at 11:55 AM.
  #2   Spotlight this post!  
Unread 02-20-2006, 12:04 PM
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
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);
The small twitch at startup comes from servo values being initialized, most to 127.

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;
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #3   Spotlight this post!  
Unread 02-20-2006, 12:10 PM
Spindash54 Spindash54 is offline
Registered User
AKA: Gregory Walsh
FRC #1468 (J-Birds)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Hicksville, NY
Posts: 40
Spindash54 is an unknown quantity at this point
Send a message via AIM to Spindash54
Re: repurposing servos

Quote:
Originally Posted by Keith Watson
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);
The small twitch at startup comes from servo values being initialized, most to 127.

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;

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   Spotlight this post!  
Unread 02-20-2006, 12:40 PM
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,211
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
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   Spotlight this post!  
Unread 02-20-2006, 12:41 PM
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 4,146
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
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.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #6   Spotlight this post!  
Unread 02-20-2006, 09:17 PM
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 9,639
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
2018 Beta Testing Results

  #7   Spotlight this post!  
Unread 02-20-2006, 10:33 PM
Mike's Avatar
Mike Mike is offline
Registered User
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,002
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: repurposing servos

Quote:
Originally Posted by KenWittlief
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!
I believe, if the servos are plugged into the main RC and not the camera, that they are run using the main battery. Whether or not an output is connected to a servo or motor is invisible to the controller, so it runs all outputs via the main. Servos are only powered by the backup battery if they are plugged into the camera.
  #8   Spotlight this post!  
Unread 02-20-2006, 10:56 PM
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Re: repurposing servos

Quote:
Originally Posted by Mike
I believe, if the servos are plugged into the main RC and not the camera, that they are run using the main battery. Whether or not an output is connected to a servo or motor is invisible to the controller, so it runs all outputs via the main. Servos are only powered by the backup battery if they are plugged into the camera.
Servos do not use the main battery.
Quote:
Originally Posted by Robot Controller Reference Guide
The Battery Backup circuit also supplies power to the center pins of the PWM OUTPUTS, which is required to operate servos.
...
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
Closed Thread


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
Are Servos Motors? John Gutmann Motors 1 01-30-2006 05:41 PM
CMUCam Servos not Responding on Robot krigby Programming 7 01-20-2006 10:19 PM
Servos not getting right voltage sheyna Programming 2 01-17-2006 08:57 PM
Standard Servos? Matt Krass FIRST Tech Challenge 4 11-22-2005 07:09 AM
Hooking up 2 Servos kutty18 Programming 7 02-04-2005 08:26 AM


All times are GMT -5. The time now is 03:03 PM.

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


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