Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   2001 (http://www.chiefdelphi.com/forums/forumdisplay.php?f=40)
-   -   Need help in creating program to use servo's to shift drive (http://www.chiefdelphi.com/forums/showthread.php?t=12605)

archiver 24-06-2002 00:34

Need help in creating program to use servo's to shift drive
 
Posted by Barry Horwitz at 2/9/2001 10:55 PM EST


Coach on team #316, LunaTechs, from Salem County College and DuPont.



My building team developed a drive assembly that has a servo attached to the drive motor shifter. This will assembly will to shift from low to high gears. I am trying to control the shifting only when the joysticks are in dead stick position. I have the drive motors as PWM1 & 2. The servos are PWM 3 & 4. The trigger on joystick one controls the servos. The program now allows shifting all the time. I have tried to put conditional statements in the subroutine section and in the PWM limit switch control area. HELP!!!



archiver 24-06-2002 00:34

Re: Need help in creating program to use servo's to shift drive
 
Posted by Joe Ross at 2/10/2001 3:07 AM EST


Engineer on team #330, Beach Bot, from Hope Chapel Academy and NASA/JPL , J&F Machine, and Raytheon.


In Reply to: Need help in creating program to use servo's to shift drive
Posted by Barry Horwitz on 2/9/2001 10:55 PM EST:



I'm not sure that I understand your question. What is the problem?

archiver 24-06-2002 00:34

Re: Need help in creating program to use servo's to shift drive
 
Posted by Michael "Special K" Krass at 2/10/2001 9:41 AM EST


Other on team #271, Mechanical Marauders, from Bay Shore High School and Verizon.


In Reply to: Re: Need help in creating program to use servo's to shift drive
Posted by Joe Ross on 2/10/2001 3:07 AM EST:



: I'm not sure that I understand your question. What is the problem?

I think what they're trying to do here is use the programming to check whether or not the joysticks are in a dead position (i.e. the 'bot's not moving), and than use that information to allow or disallow shifting gears on the drill motors. This would prevent someone from shifting gears while the drills were spinning, and really messing things up.

I got that much, but I don't know anything about programming, so I can't help much more than that.

Hope this helps,
Michael

archiver 24-06-2002 00:34

Re: Need help in creating program to use servo's to shift dr
 
Posted by Chris Orimoto at 2/10/2001 2:31 PM EST


Student on team #368, Kika Mana, from McKinley High School and Nasa Ames/Hawaiian Electric/Weinberg Foundation.


In Reply to: Re: Need help in creating program to use servo's to shift drive
Posted by Michael on 2/10/2001 9:41 AM EST:



If that is the case, then you COULD program the
operator interface LED's to respond when the
joysticks are in the "dead zone". That's what we
did last year...sorry, but I don't remember the code
off hand.

Just my personal thoughts...

Chris, #368

archiver 24-06-2002 00:34

Try this...
 
Posted by Nate Smith at 2/10/2001 3:07 PM EST


Other on team #66, Frostbite, from Willow Run High School and GM Powertrain.


In Reply to: Re: Need help in creating program to use servo's to shift dr
Posted by Chris Orimoto on 2/10/2001 2:31 PM EST:



: If that is the case, then you COULD program the
: operator interface LED's to respond when the
: joysticks are in the "dead zone". That's what we
: did last year...sorry, but I don't remember the code
: off hand.

: Just my personal thoughts...

: Chris, #368

Here's something that should work...

1. Define a bit variable to keep track of whether or not it is safe to shift.

shiftOK VAR bit

2. After your deadstick routine(if you don't have one, i'd highly recommend it), put in code to check if your PWM outputs are 127(off) and set your shiftOK to 1 if they BOTH are, 0 otherwise...(yes, i know this isn't the best code for doing this, but anyway...)

shiftOK = 0
if PWM1 = 127 then check2
goto cantshift
check2:
if PWM2 = 127 then setshift
goto cantshift
setshift:
shiftOK = 1
cantshift:

3. Then, check the value of shiftOK when determining if you want to shift or not...

Nate

archiver 24-06-2002 00:34

Re: Need help in creating program to use servo's to shift drive
 
Posted by Barry Horwitz at 2/10/2001 11:27 AM EST


Coach on team #316, LunaTechs, from Salem County College and DuPont.


In Reply to: Need help in creating program to use servo's to shift drive
Posted by Barry Horwitz on 2/9/2001 10:55 PM EST:



: My building team developed a drive assembly that has a servo attached to the drive motor shifter. This will assembly will to shift from low to high gears. I am trying to control the shifting only when the joysticks are in dead stick position. I have the drive motors as PWM1 & 2. The servos are PWM 3 & 4. The trigger on joystick one controls the servos. The program now allows shifting all the time. I have tried to put conditional statements in the subroutine section and in the PWM limit switch control area. HELP!!!
: I need to put a statement in the program that will only allow the trigger to move PWM3&4 when the joystick is in dead stick position. Where in the program should this go and what might it look like?
:Barry



archiver 24-06-2002 00:34

Re: Need help in creating program to use servo's to shift drive
 
Posted by Matt Starkey at 2/10/2001 3:12 PM EST


Engineer on team #236, Techno Ticks, from Lyme/Old-Lyme High School and Millstone Power Station.


In Reply to: Re: Need help in creating program to use servo's to shift drive
Posted by Barry Horwitz on 2/10/2001 11:27 AM EST:



: : My building team developed a drive assembly that has a servo attached to the drive motor shifter. This will assembly will to shift from low to high gears. I am trying to control the shifting only when the joysticks are in dead stick position. I have the drive motors as PWM1 & 2. The servos are PWM 3 & 4. The trigger on joystick one controls the servos. The program now allows shifting all the time. I have tried to put conditional statements in the subroutine section and in the PWM limit switch control area. HELP!!!
: : I need to put a statement in the program that will only allow the trigger to move PWM3&4 when the joystick is in dead stick position. Where in the program should this go and what might it look like?
: :Barry


You can put some conditional statements anywhere you want to as long as they are inside the main loop. Try using a series of "IF" statements if you are not too concearned with the loop time changing on you depending on the conditions.
1) is the trigger pulled? (assuming that the trigger is input that changes the position of the servo's). if not skip the rest of the routine.
2) if so, are the drive motors standing still (both equal to 127). If not, skip the rest of the routine.
3) if so, move the servo to the new position.

Servo position will have to be stored between loops and a statement somewhere in the code (outside of the conditional statements) to set servo position to stored position each loop.

Hope this helps -- Didn't want to give it away, but would be happy to answer any more questions.




archiver 24-06-2002 00:34

here you go
 
Posted by Stephen at 2/10/2001 5:34 PM EST


Other on team #122, NASA Knights, from Grafton High School (Robotics team is at NHGS) and NASA.


In Reply to: Need help in creating program to use servo's to shift drive
Posted by Barry Horwitz on 2/9/2001 10:55 PM EST:



put this directly before you shift your gears
if p1_y 127 then NO_SHIFT:
if p1_x 127 then NO_SHIFT:
after that, you would put your conditional about the button being pressed, then your shift sequence; at the end of all the shifting put
NO_SHIFT:

Hope that helps, if not then e-mail me at Steven3554@yahoo.com

P.S.
if you have a dead band, make sure that this goes AFTER the dead band.



archiver 24-06-2002 00:34

you need more than that...
 
Posted by Joe Johnson at 2/10/2001 11:05 PM EST


Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.


In Reply to: here you go
Posted by Stephen on 2/10/2001 5:34 PM EST:



I am not a big fan of shifting the transmissions, but
my understanding of those that do do it successful is
that they do a fairly complex set of instructions to
get it to shift correctly.

Something like: Stop. partial forward, partial backard,
shift, partial forward, partial backward. Continue.

Basically, you have to take the stress out of the
mechanism to get it to shift out of gear and then you
have to wiggle it to get it to fully engage in gear.

I think Andy Baker talked about this in a posting
earlier this season.

Good luck.

Joe J.




archiver 24-06-2002 00:34

Yep, something like that
 
Posted by Andy Baker at 2/10/2001 11:24 PM EST


Engineer on team #45, TechnoKats, from Kokomo High School and Delphi Automotive Systems.


In Reply to: you need more than that...
Posted by Joe Johnson on 2/10/2001 11:05 PM EST:



: Something like: Stop. partial forward, partial backard,
: shift, partial forward, partial backward. Continue.

: Basically, you have to take the stress out of the
: mechanism to get it to shift out of gear and then you
: have to wiggle it to get it to fully engage in gear.

Yes, I believe that's how we do it.

BUT, I do not know the code. Our software guys don't let me near the keyboard.

We've refined it down to the point where it takes under two seconds.

Andy B.



archiver 24-06-2002 00:34

Re: Yep, something like that
 
Posted by Travis Covington at 2/11/2001 6:24 PM EST


Student on team #115, MV ROBOTICS, from Monta Vista High School and Hitachi Data Systems - 3com - NASA Ames.


In Reply to: Yep, something like that
Posted by Andy Baker on 2/10/2001 11:24 PM EST:



what is the need for the forward and backward motion?

do the gearbox gears get ruined by not engaging?

how much damage occurs? or is it more for reliability purposes?

thx

-TC



archiver 24-06-2002 00:35

Re: Yep, something like that
 
Posted by Jay Lundy at 2/11/2001 6:36 PM EST


Student on team #254, The Cheesy Poofs, from Bellarmine College Preparatory.


In Reply to: Re: Yep, something like that
Posted by Travis Covington on 2/11/2001 6:24 PM EST:



: what is the need for the forward and backward motion?

: do the gearbox gears get ruined by not engaging?

: how much damage occurs? or is it more for reliability purposes?

: thx

: -TC

If you try to shift gear while the motors are running they get damaged. I'm not exactly sure how much damage they take or what happens to them but I dont think I want to find out. All I know is that they make a nasty sound.



archiver 24-06-2002 00:35

Re: Yep, something like that
 
Posted by Travis Covington at 2/11/2001 9:06 PM EST


Student on team #115, MV ROBOTICS, from Monta Vista High School and Hitachi Data Systems - 3com - NASA Ames.


In Reply to: Re: Yep, something like that
Posted by Jay Lundy on 2/11/2001 6:36 PM EST:



i know about not shifting while moving...im just curious about the disengament problems that occur such as the gear not meshing properly after you have shifted the servo position. how big of a problem is this?



archiver 24-06-2002 00:35

rotating robots syndrome
 
Posted by Joe Johnson at 2/11/2001 9:53 PM EST


Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.


In Reply to: Re: Yep, something like that
Posted by Travis Covington on 2/11/2001 9:06 PM EST:



Depending on how excited your drivers are during a
shift (or rather during a partial shift), your
transmission may be just fine, or it may never shift
again, or it may end up in no-man's-land between high
and low -- resulting in rotating robots syndrome, a
sickness where your robot just goes in circles, forward
and back, as your fans scratch their heads, beat their
chests, and watch the clock tick down to 0:00 in
disbelief ;-)

It can be hideous.

Joe J.




archiver 24-06-2002 00:35

Re: rotating robots syndrome
 
Posted by Matt Leese at 2/11/2001 10:05 PM EST


Other on team #73, Tigerbolt, from Edison Technical HS and Alstom & Fiber Technologies & RIT.


In Reply to: rotating robots syndrome
Posted by Joe Johnson on 2/11/2001 9:53 PM EST:



: Depending on how excited your drivers are during a
: shift (or rather during a partial shift), your
: transmission may be just fine, or it may never shift
: again, or it may end up in no-man's-land between high
: and low -- resulting in rotating robots syndrome, a
: sickness where your robot just goes in circles, forward
: and back, as your fans scratch their heads, beat their
: chests, and watch the clock tick down to 0:00 in
: disbelief ;-)

: It can be hideous.

: Joe J.
Well, if you're driving in circles i'd HOPE you'd hit the stop button....

Matt




All times are GMT -5. The time now is 05:35.

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