Go to Post Fame is a funny thing, you can do nothing and get it, and do everything and get none. For me, it's not fame, but infamy that follows me. - Joe Matt [more]
Home
Go Back   Chief Delphi > Technical > Electrical
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 27-01-2011, 08:31
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Toggle switches to Analog board?

I know it is not a traditional use of the analog breakout board to attach toggle switches, as most people use potentiometers or some other sensors, but this year we have used up the 14 inputs on our Digital Sidecar. I have 4 questions before trying this and a search on here didn't pop up a solution.

1) Instead of adding a whole sidecar for the other 3 switches our current design needs, I was wondering if I could wire them to the Analog Breakout board instead? (I have to have an analog board for the battery jumper so I should go ahead and use it as much as possible and save some weight and failure points)

2) Do I need to have a resistor in the line between my switch and analog board, or can I strictly wire my switch to the analog breakout like I do the digital board, with just the white and black wire?

3) Has anyone done this before, if so what issues did you have?

4) Bonus question: Can I do the switch to the analog input on the driver station cypress chip as well, using the same method that I would hook it up to the robot analog breakout board?
  #2   Spotlight this post!  
Unread 27-01-2011, 08:38
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
Re: Toggle switches to Analog board?

we did this last year with the cypress, was a little annoying to program but aside from that i didn't notice any issues with it.
  #3   Spotlight this post!  
Unread 27-01-2011, 08:44
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,284
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: Toggle switches to Analog board?

You can definitely do this, you are probably going to want (need?) a pull up resistor. Solder a resistor from signal to pwr and wire the switch from signal to ground, flipping the switch will toggle between the power voltage and 0v.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
  #4   Spotlight this post!  
Unread 27-01-2011, 08:48
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Toggle switches to Analog board?

I think the easiest way to make it work is to add a pullup resistor (10k or so) from signal to +5 volts, and connect the switch from signal to ground. You'll read 5v when the switch is off, and 0v when the switch is on.

You could even use a half dozen or so resistors to make a rudimentary D-to-A conversion circuit, which would let you connect all three of your switches to a single analog input, but that's probably a bit fancier than you need to get.
  #5   Spotlight this post!  
Unread 27-01-2011, 08:56
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Toggle switches to Analog board?

Darren,
Teams do this all the time. There are a variety of applications. A simple single throw, single pole switch can be used tied to a 10 k resistor which has one end connected to a 5 volt supply. One side of the switch is tied to power common and the other side to the resistor. The switch when open allows a 5 volt input to the analog module and when closed, provides a zero volt signal. A double throw switch can be wired for three states, a multi pole switch can be wired for even more. We use an modified Radio Shack switch to provide 11 different positions for selecting different modes or auto programs in this way, either at the robot or on the driver's station. 9.1k resistors are tied between each contact and the switch then provides 12 levels of voltage between 5 volts and zero volts.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #6   Spotlight this post!  
Unread 27-01-2011, 12:49
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Toggle switches to Analog board?

Thank you everyone! This was the information I needed. This helps me keep our controls to one digital sidecar. I don't think we will have a weight problem, but on our team we always look for any weight savings throughout the entire build so we don't have a problem at the end. Using the existing, mandated analog board saves us 1.2 lbs between the additional sidecar, big cable and cRio module.

I am the programming mentor so I know how to tweak the settings on that side, I wasn't sure of how to wire it correctly. I don't like to test theories on expensive robot components when a quick question gets me an answer from teams that have already solved the problem.
  #7   Spotlight this post!  
Unread 03-02-2011, 20:29
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Toggle switches to Analog board?

I just want to make sure I understand this wiring, we are at the point we are about to use the analog to digital trick. I assume this is how I wire it from you guy's instructions?

Code:
   ---/Switch/---------
   |               |   |
   |               |   10k Resistor
   |               |   |
   |               |   |
   B              W   R
Where B is the black wire, W is white wire, and R is red wire on a standard PWM cable. Basically tie the white wire and the red wire through a resistor onto one side of the switch and the black wire on the other?
  #8   Spotlight this post!  
Unread 03-02-2011, 20:50
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Toggle switches to Analog board?

Yes. That is the circuit. And that 10k resistor can be anything from 1k to like 100k without too much issue, if you can't find a 10k easily.
  #9   Spotlight this post!  
Unread 03-02-2011, 21:05
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 675
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Toggle switches to Analog board?

Al is probably referring to this type of configurations.
Attached Thumbnails
Click image for larger version

Name:	MultiStateSwitches.jpg
Views:	19
Size:	14.9 KB
ID:	9962  
__________________

Last edited by mikets : 04-02-2011 at 14:03.
  #10   Spotlight this post!  
Unread 04-02-2011, 08:28
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Toggle switches to Analog board?

It should look like this...
Attached Thumbnails
Click image for larger version

Name:	switch.jpg
Views:	34
Size:	12.6 KB
ID:	9957  
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #11   Spotlight this post!  
Unread 04-02-2011, 09:21
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Toggle switches to Analog board?

Quote:
Originally Posted by Al Skierkiewicz View Post
It should look like this...
If I am looking at this correctly, does this mean I can't use a SPST switch to do what I want to do? I need a SPDT?
  #12   Spotlight this post!  
Unread 04-02-2011, 09:58
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Toggle switches to Analog board?

If you are going to the analog board, it does not have pull up resistors so you have to use the SPDT to switch between +5 and zero volts. If you use a digital input, the pullup would allow you to simply open or close a connection to the common to give two states.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #13   Spotlight this post!  
Unread 04-02-2011, 10:11
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Toggle switches to Analog board?

Quote:
Originally Posted by Al Skierkiewicz View Post
If you are going to the analog board, it does not have pull up resistors so you have to use the SPDT to switch between +5 and zero volts. If you use a digital input, the pullup would allow you to simply open or close a connection to the common to give two states.
Sorry, Al, but I have to disagree. If you put a 10k pullup resistor between the analog signal and +5 power pins, a simple SPST switch between signal and ground will give the desired results. The schematic Darren posted is exactly how I would do it.

Last edited by Alan Anderson : 04-02-2011 at 10:28. Reason: fixed name
  #14   Spotlight this post!  
Unread 04-02-2011, 10:16
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,284
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: Toggle switches to Analog board?

Quote:
Originally Posted by Al Skierkiewicz View Post
If you are going to the analog board, it does not have pull up resistors so you have to use the SPDT to switch between +5 and zero volts. If you use a digital input, the pullup would allow you to simply open or close a connection to the common to give two states.
Attached is a picture for SPST (Al, please correct me if I am wrong but this should give him two states (Closed =0v Open=~5v) using a Single Pole Single throw switch on the Analog inputs which seems to be what he wants to do.
Attached Thumbnails
Click image for larger version

Name:	Pull_up.JPG
Views:	27
Size:	15.0 KB
ID:	9958  
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
  #15   Spotlight this post!  
Unread 04-02-2011, 11:11
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Toggle switches to Analog board?

Yes, You guys are right. I have to stop answering these questions while I am working on interfaces here. Alan, can you add something about programming so that switch bounce doesn't confuse the readings?
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
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 20:49.

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