Go to Post Just the fact we were selected to compete in the eliminations energized the kids more than anything I had seen - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 19-09-2011, 19:21
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Disabling PWM outputs w/out disabling entire bot.

We have been operating a mobile T-shirt launcher based on the IFI control system (we're using one from 2008, so it's the "2004 control system").

Although we already have a disable switch implemented on the control board (using the Competition Port on the OI), it would be nice to have an additional "disable drivetrain" mode that leaves the relay outputs operational (so the compressors are still running).

Since the joysticks are essentially uncalibrated (all our calibration is done with the victors), outputting a value of 127 does not guarantee a neutral output from our victors. Instead, I would like to disable the PWM outputs entirely.

The only way I've found to do this is to move the drivetrain outputs to PWM 13 and PWM 14, then make the call to Generate_Pwms() conditional on the state of the "drivetrain disable" switch.

Is there a better way to do this?

Thanks for any help.
  #2   Spotlight this post!  
Unread 19-09-2011, 22:13
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,189
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Disabling PWM outputs w/out disabling entire bot.

Or, you could attach the victors to a separate fuse panel with its own breaker so that you could turn on the main breaker for control system/ spike/ relay power while the victors would need both switches to be 'on' to receive power from the battery.
__________________
  #3   Spotlight this post!  
Unread 19-09-2011, 22:38
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: Disabling PWM outputs w/out disabling entire bot.

Quote:
Originally Posted by PAR_WIG1350 View Post
Or, you could attach the victors to a separate fuse panel with its own breaker so that you could turn on the main breaker for control system/ spike/ relay power while the victors would need both switches to be 'on' to receive power from the battery.
That would work, except I am looking for something that could be done remotely (I apologize for not making it clearer). Specifically, I'm looking for a better software solution (I'm not very familiar with the IFI system, so I might've overlooked a better way to do it).

Thanks for the help.
  #4   Spotlight this post!  
Unread 19-09-2011, 22:58
Cuog's Avatar
Cuog Cuog is offline
Registered Linux User: 390661
AKA: Alex
FRC #0422
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Richmond, Virginia
Posts: 852
Cuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond repute
Send a message via AIM to Cuog
Re: Disabling PWM outputs w/out disabling entire bot.

You could use some small relay. http://www.mouser.com/ProductDetail/...KkytrQ6uppE%3d might be a bit overkill, but I'm sure you could find something similar.
__________________
KK4KQO
http://voltair.us
Too many projects, too little time.
  #5   Spotlight this post!  
Unread 19-09-2011, 23:04
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: Disabling PWM outputs w/out disabling entire bot.

Quote:
Originally Posted by Cuog View Post
You could use some small relay. http://www.mouser.com/ProductDetail/...KkytrQ6uppE%3d might be a bit overkill, but I'm sure you could find something similar.
Thanks -- but I've thought of using a relay already.

Let me add an additional constraint: I'm looking for a purely software solution (for the sake of space, reliability, and simplicity).

Thanks for the help.
  #6   Spotlight this post!  
Unread 19-09-2011, 23:32
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,189
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Disabling PWM outputs w/out disabling entire bot.

If you calibrate the victors such that 127 is neutral by using code rather than joysticks to calibrate them, why couldn't you just have a toggle switch on the OI to lock all pwm channels at 127?
__________________
  #7   Spotlight this post!  
Unread 19-09-2011, 23:46
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: Disabling PWM outputs w/out disabling entire bot.

Quote:
Originally Posted by PAR_WIG1350 View Post
If you calibrate the victors such that 127 is neutral by using code rather than joysticks to calibrate them, why couldn't you just have a toggle switch on the OI to lock all pwm channels at 127?
Because I'd be spending a large amount of time calibrating the joysticks in software -- it takes around 25 minutes to download new code and I'd have to "tweak" the center values several times to get it right (I could also display binary through the OI's LEDs to calibrate them, needing only 2 downloads). If a joystick's calibration changes (they're not exactly new, and I'm already noticing drift), or a joystick is replaced, I'd have to do it all over again.

That is a good idea, though; I'd just rather not calibrate them in software.

Thanks for the help.

Edit: To clarify, I think it's the "correct" solution, but I also think that it's more difficult to maintain than my "solution."

Last edited by flameout : 20-09-2011 at 00:00.
  #8   Spotlight this post!  
Unread 20-09-2011, 00:14
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,189
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Disabling PWM outputs w/out disabling entire bot.

Quote:
Originally Posted by flameout View Post
Because I'd be spending a large amount of time calibrating the joysticks in software -- it takes around 25 minutes to download new code and I'd have to "tweak" the center values several times to get it right (I could also display binary through the OI's LEDs to calibrate them, needing only 2 downloads). If a joystick's calibration changes (they're not exactly new, and I'm already noticing drift), or a joystick is replaced, I'd have to do it all over again.

That is a good idea, though; I'd just rather not calibrate them in software.

Thanks for the help.

Edit: To clarify, I think it's the "correct" solution, but I also think that it's more difficult to maintain than my "solution."
But you aren't calibrating the joysticks, your calibrating the victors.

To fix the joystick drift issues, designate a button that, when pressed, makes the current value the new center and, thus, send 127. Offset from center determines offset from 127.
__________________

Last edited by PAR_WIG1350 : 20-09-2011 at 00:19.
  #9   Spotlight this post!  
Unread 20-09-2011, 00:23
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: Disabling PWM outputs w/out disabling entire bot.

Quote:
Originally Posted by PAR_WIG1350 View Post
But you aren't calibrating the joysticks, your calibrating the victors.
Calibrating the victors isn't the hard part... the joysticks would still read something other than 127 when centered, and that has to be compensated for.

Quote:
Some trimmer pots connected to the OI and a few extra lines of code could compensate for drift in the joysticks and a toggle switch doesn't drift since it is either on, or not with nothing in between.
Adding in trimmer pots would be adding complexity mechanically/electrically, something I'm not inclined to do (it's something else to fall apart/get bumped on the OI). Also, a trimmer pot wouldn't be able to scale the joystick's input -- although the center would be at 127, the endpoints wouldn't be at 0 and 254 (I believe 0 to 254 is correct, although the exact values are unimportant for the point I'm trying to make).

What would the toggle switch be used for?
  #10   Spotlight this post!  
Unread 20-09-2011, 00:26
AdamHeard's Avatar
AdamHeard AdamHeard is offline
Lead Mentor
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Atascadero
Posts: 5,506
AdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond repute
Send a message via AIM to AdamHeard
Re: Disabling PWM outputs w/out disabling entire bot.

Why not calibrate the Victors, then have a switch that sets all outputs to 127 rather than the joysticks.

Trivially simple.
  #11   Spotlight this post!  
Unread 20-09-2011, 01:07
Cuog's Avatar
Cuog Cuog is offline
Registered Linux User: 390661
AKA: Alex
FRC #0422
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Richmond, Virginia
Posts: 852
Cuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond repute
Send a message via AIM to Cuog
Re: Disabling PWM outputs w/out disabling entire bot.

I'm starting to think that you're over-complicating the issue, then complaining when the solutions are complicated. No matter how you slice this pie, its going to take a little work, some added parts, or both.
__________________
KK4KQO
http://voltair.us
Too many projects, too little time.
  #12   Spotlight this post!  
Unread 20-09-2011, 15:19
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,189
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Disabling PWM outputs w/out disabling entire bot.

Quote:
Originally Posted by flameout View Post
Adding in trimmer pots would be adding complexity mechanically/electrically, something I'm not inclined to do (it's something else to fall apart/get bumped on the OI). Also, a trimmer pot wouldn't be able to scale the joystick's input -- although the center would be at 127, the endpoints wouldn't be at 0 and 254 (I believe 0 to 254 is correct, although the exact values are unimportant for the point I'm trying to make).

What would the toggle switch be used for?
I amended my post Seconds After I posted it, It no longer suggests trimmers, but rather a method of on the fly calibration. Which I now no longer recommend. If you are still worried about drift, program it such that any joystick input from 117 to 137 sends 127 to the victors.

The toggle switch would tell the robot to ignore the joystick values and send 127 to the victors no matter what as long as the switch is 'on'.
__________________
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


All times are GMT -5. The time now is 04:53.

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


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