Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Autonomous Program Switch (http://www.chiefdelphi.com/forums/showthread.php?t=79764)

Imadapocalypse 09-01-2010 19:54

Autonomous Program Switch
 
I am not sure if this is entirely possible but i was wondering if it possible to create a physical switch on your robot to toggle between autonomous programs.

ATannahill 09-01-2010 20:05

Re: Autonomous Program Switch
 
Since the robot responds to on board sensors, it sounds very possible.

EricH 09-01-2010 20:05

Re: Autonomous Program Switch
 
Quote:

Originally Posted by Imadapocalypse (Post 895040)
I am not sure if this is entirely possible but i was wondering if it possible to create a physical switch on your robot to toggle between autonomous programs.

I don't see anything saying you can't. It's been done before, admittedly with the IFI system. (I don't know of any with the cRIO yet.)

AcesJames 09-01-2010 20:07

Re: Autonomous Program Switch
 
Our team did just this in 2009. We had a physical switch on our robot that was used depending on the way we were positioned on the field. It had 2 settings, one being for the left, and one for the right sides of the field.

So to answer your question, yes, it is possible, and very helpful in some situations.

DanDon 09-01-2010 20:28

Re: Autonomous Program Switch
 
Yes it is possible, 375 used the same system last year. What I'm wondering though, is if it is possible to accomplish the same goal using this year's driver's station. It seems as if you can toggle the digital inputs on the robot from the DS.

miniman 09-01-2010 20:45

Re: Autonomous Program Switch
 
It will be possible, the robot should be able to read the states of any switches on the classmate PC break out (FirstTouch I/O Module, CY8CKIT-003).

Imadapocalypse 09-01-2010 20:50

Re: Autonomous Program Switch
 
Quote:

Originally Posted by AcesJames (Post 895066)
Our team did just this in 2009. We had a physical switch on our robot that was used depending on the way we were positioned on the field. It had 2 settings, one being for the left, and one for the right sides of the field.

So to answer your question, yes, it is possible, and very helpful in some situations.

Just what we wanted to hear. I am assuming you could have 3 different settings on a given switch. Could you fill us in on how you were able to make the switch?

Enigma's puzzle 09-01-2010 22:40

Re: Autonomous Program Switch
 
You would wire the switch into the digital ports on the side of your onboard control board (cant think of the right word for the life of me).

apalrd 09-01-2010 22:48

Re: Autonomous Program Switch
 
If you want to use a toggle switch with two positions, you would connect the standard toggle switch between the two outer wire (GND, black and SIG, white or yellow) on a standard PWM cable and connect it to the Digital IO section on the Digital Sidecar. If the input is read as HIGH or 1, then the switch is off. IF the input is read as LOW or 0, the switch is on. If you need more positions, you could either add more switches to more digital inputs OR:

Wire several resistors with different values paralell to each other and fed by the +5 (center, red) wire on a PWM cable. Each would be connected to a different position on a multi-position rotary switch and the output of the switch would be fed to the SIG (white) wire on the PWM cable, which would be connected to a analog input on the analog breakout board of the cRio.

If you want to set an analog value, such as a wait delay, you could wire a pot with the outer wires to +5 and GND and the wiper to SIG and connect that to an analog input.

We have done all three of these, no problems. One thing to watch for is if you get a signal from the Driver Station during Auton, it might just send 0's for the joysticks and dig. io's when in auto so you can't drive in auton. In that case, you would have to put it on the robot.

Chris Fultz 10-01-2010 10:12

Re: Autonomous Program Switch
 
In 2009 we used two rotoray switches.

Switch one was a three position, to note our starting point on the field, and switch 2 was a 10 place selector to tell the robot what path to drive and each was adjusted as needed based on the input from switch 1.

They could be set when we placed the robot on the field.

Big Kid 10-01-2010 10:29

Re: Autonomous Program Switch
 
Last year, I was able to do this with ours with a few switches connected to the I/O of the Digi. Sidecar. It was somewhat simple, just setting up the programming for it was long. Besides that is works like a charm I think we had 8 possible auto. we only used 4 or 6 max.

PhilBot 10-01-2010 10:42

Re: Autonomous Program Switch
 
Quote:

Originally Posted by Big Kid (Post 895587)
Last year, I was able to do this with ours with a few switches connected to the I/O of the Digi. Sidecar. It was somewhat simple, just setting up the programming for it was long. Besides that is works like a charm I think we had 8 possible auto. we only used 4 or 6 max.

It's actually much more convinient to do it in software.

We used one of the Joystick buttons to step through auto mode options.
They only worked when the robot was disabled in auto mode.
It saved the auto mode number in a file on the cRIO, so it remembered it next time it powerd up.

It also displayed the name of the program on the LCD display, so it will still work with the new DS's.

The beauty of this method is that if you forget to set the mode when you position the robot, you can still change it up until the time you have to step away from the driver station.

I wrote a white paper last year....

http://www.chiefdelphi.com/media/papers/2209

Big Kid 10-01-2010 15:03

Re: Autonomous Program Switch
 
my thing with it was that we didn't know you could program the DS at the time, I didn't until comp. so it ended up being hardwired. Not to mention could you program the DS with LabVIEW? But besides the point that is. Still Auto. switches are possible

Greg McKaskle 10-01-2010 15:30

Re: Autonomous Program Switch
 
In addition to all of the approaches already listed, the new DS also supports virtual I/O. If you are running the DS without an I/O board attached, the Compatible/Simple I/O page actually lets you set the values of the analog and digitals using the mouse. The values are saved with the DS until you change them again or connect the I/O HW, and they are latched during auto-enabled. Hopefully this means you can have inputs to the autonomous without necessarily needing a soldering iron.

Be sure to update the DS SW before playing with this too much as it changed between the laptop version and the update version.

Greg McKaskle

jsasaki 10-01-2010 15:39

Re: Autonomous Program Switch
 
In 09 we had 2 SPST submini slide switches wired to the DSC with 2 PWM's and had 4 different autonomous programs (2 up, 2 down, left up right down, right up left down) accordingly to where we were placed in the field. So its very possible :D

See you in Arizona
Good luck teams!


All times are GMT -5. The time now is 12:30.

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