OCCRA
Go to Post Everyone is wrong! - Chris is me [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-06-2018, 01:55 PM
mrada6 mrada6 is offline
Registered User
FRC #5684
 
Join Date: Jan 2017
Location: New Jersey
Posts: 12
mrada6 is an unknown quantity at this point
Toggle Switch Wiring

My team is looking to install a couple toggle switches onto the robot this year to help us select which autonomous program we want to run. We were looking at getting these toggle switcheshttps://www.adafruit.com/product/3306 from Adafruit. . But we weren't sure that we would be able to wire them up with the robo rio. The directions they give are
Quote:
That means you have a few options for wiring:

If you want to use the switch to turn on/off something, you can use the toggle to connect and disconnect the two pins on the bottom
If you want the LED to always be on, provide 3-12V between the ground and headlamp pin
If you want the LED to be on only when the switch is connected, provide 3-12V on the (+) pin and connect ground to the ground pin.
I was wondering if we could just connect the 12V to the Voltage Regulator Module and then connect the other two pins to the ports on the roborio.

Any help would be greatly appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-06-2018, 02:07 PM
GeeTwo GeeTwo is offline
Somebody Else
AKA: Gus Michel II
no team
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 6,049
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Toggle Switch Wiring

The DIOs and Analog Inputs expect 0-5V - do NOT send 12V to the signal inputs.

The easiest and best way to wire these is as you would do with limit switches, one to each DIO. Wire one terminal pin to the 0V/ground pin, and the other to the signal/data pin. With the switch in the open position, you'll get a one when you poll the DIO. In the closed position you'll get a zero.

If you want the LEDs to work, you can power these off the 5V from the DIO pin, but check that you aren't drawing more than an amp on all the 5V pins on the RIO (including MXP). (see Maximum Current for +5.0V output on page 6 of http://www.ni.com/pdf/manuals/375275a.pdf). If you need more current than that, use a 5V output from the VRM.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
[Quoting brennonbrimhall]: We design a new robot every year, but we can't forget that we also design a new team every year as folks come and go.

Last edited by GeeTwo : 03-06-2018 at 02:20 PM.
Reply With Quote
  #3   Spotlight this post!  
Unread 03-06-2018, 02:19 PM
ARaulinaitis ARaulinaitis is offline
Registered User
FRC #4999 (Momentum Robotics)
Team Role: Mentor
 
Join Date: Jan 2018
Rookie Year: 2015
Location: Long Beach, CA
Posts: 146
ARaulinaitis is just really niceARaulinaitis is just really niceARaulinaitis is just really niceARaulinaitis is just really nice
Re: Toggle Switch Wiring

Not to be that guy, but can't you just put a selector in software and bring it up on the smart dashboard?
__________________
Don't limit others to the level of your own creativity.

Spec sheets are your friend.

A problem that you don't want to solve is an opportunity to better yourself.
Reply With Quote
  #4   Spotlight this post!  
Unread 03-06-2018, 02:27 PM
Brian Michell's Avatar
Brian Michell Brian Michell is offline
Registered User
FRC #1817 (Llano Estacado RoboRaiders)
Team Role: Mentor
 
Join Date: Aug 2015
Rookie Year: 2015
Location: Houston
Posts: 155
Brian Michell is just really niceBrian Michell is just really niceBrian Michell is just really niceBrian Michell is just really niceBrian Michell is just really nice
Re: Toggle Switch Wiring

I've seen this done on the operator console, but I can't say I've seen this done on the robot. Why did you decide to do it that way? What happens if the switch gets damaged in a match and malfunctions next match?

Quote:
Originally Posted by ARaulinaitis View Post
Not to be that guy, but can't you just put a selector in software and bring it up on the smart dashboard?
__________________


*Any views I express are my own and do not reflect those of any organization I am currently or formerly associated with unless stated.
5416
2015-2016: Programming, Drive Coach
6488
2017: Programming, Drive Mentor
1817
2018-?: Programming Mentor
Reply With Quote
  #5   Spotlight this post!  
Unread 03-06-2018, 02:28 PM
pkrishna3082's Avatar
pkrishna3082 pkrishna3082 is offline
love/hate relationship with swerve
AKA: Parthiv Krishna
FRC #3082 (Chicken Bot Pie) and FTC #13471 Mentor (Vortechs)
Team Role: Leadership
 
Join Date: Mar 2017
Rookie Year: 2016
Location: Minnetonka, MN, USA
Posts: 873
pkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond repute
Re: Toggle Switch Wiring

Quote:
Originally Posted by ARaulinaitis View Post
Not to be that guy, but can't you just put a selector in software and bring it up on the smart dashboard?
Dashboards can have issues (selector doesn't show up, doesn't send to robot for some reason, etc). Switches usually stay where you put them.
__________________

“Screws fall out all the time. The world is an imperfect place.”
2010-2011: FLL 11083, 13873 (Minnetonka Silver) - Programmer
2016-: FRC 3082 (Chicken Bot Pie) - Engineering Captain, Driver, Programming Lead
2017-: FTC 13471 (Minnetonka) - Founding Mentor
Reply With Quote
  #6   Spotlight this post!  
Unread 03-06-2018, 02:33 PM
Thayer McCollum's Avatar
Thayer McCollum Thayer McCollum is offline
Solidly Mediocre Individual
FRC #0159 (Alpine Robotics)
Team Role: Leadership
 
Join Date: Apr 2016
Rookie Year: 2015
Location: Fort Collins
Posts: 518
Thayer McCollum has a reputation beyond reputeThayer McCollum has a reputation beyond reputeThayer McCollum has a reputation beyond reputeThayer McCollum has a reputation beyond reputeThayer McCollum has a reputation beyond reputeThayer McCollum has a reputation beyond reputeThayer McCollum has a reputation beyond reputeThayer McCollum has a reputation beyond reputeThayer McCollum has a reputation beyond reputeThayer McCollum has a reputation beyond reputeThayer McCollum has a reputation beyond repute
Re: Toggle Switch Wiring

Quote:
Originally Posted by ARaulinaitis View Post
Not to be that guy, but can't you just put a selector in software and bring it up on the smart dashboard?
Not when SmartDashboard decides to never to send that data to your robot

RIP 159's Auto Selector

Seriously though, if anyone happens to be a SmartDash wizard we'd like your help or we'll end have to do this too. Not that it's a bad solution, just that we would like the one we've already got to work.
Reply With Quote
  #7   Spotlight this post!  
Unread 03-06-2018, 03:50 PM
Type's Avatar
Type Type is online now
Registered User
AKA: AJ
FRC #3452 (GreengineerZ)
Team Role: Mechanical
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Michigan
Posts: 497
Type has much to be proud ofType has much to be proud ofType has much to be proud ofType has much to be proud ofType has much to be proud ofType has much to be proud ofType has much to be proud ofType has much to be proud ofType has much to be proud of
Re: Toggle Switch Wiring

Quote:
Originally Posted by ARaulinaitis View Post
Not to be that guy, but can't you just put a selector in software and bring it up on the smart dashboard?
My team has used the smart dashboard for as long as we can remember but this year we purchased rotary analog selectors to select auto so if we have to switch laptops, something goes wrong with FMS or whatever, it's still protected. We have a manual over ride on the driverstation too still.
__________________
3452- Lead Builder/ Pit Boss




*My posts do not reflect the opinion of my team*
Reply With Quote
  #8   Spotlight this post!  
Unread 03-06-2018, 11:31 PM
mrada6 mrada6 is offline
Registered User
FRC #5684
 
Join Date: Jan 2017
Location: New Jersey
Posts: 12
mrada6 is an unknown quantity at this point
Re: Toggle Switch Wiring

Quote:
Originally Posted by pkrishna3082 View Post
Dashboards can have issues (selector doesn't show up, doesn't send to robot for some reason, etc). Switches usually stay where you put them.

This is the exact reason we are trying this solution. Last year we had to many close calls of the smart dashboard assigned to play a game of July want to show the autonomous actions or not
Reply With Quote
  #9   Spotlight this post!  
Unread 03-07-2018, 12:34 AM
BenBernard's Avatar
BenBernard BenBernard is offline
Programming and Controls Mentor
FRC #5687 (The Outliers)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Portland, ME
Posts: 129
BenBernard will become famous soon enoughBenBernard will become famous soon enough
Re: Toggle Switch Wiring

We also abandoned SmartDashboard for similar reasons 2 years ago and I can't see ever going back. We use three rotary switches wired with resistor ladders, each hooked to an analog input port, and have never had a problem with them. We do wire up a couple of spares in case they're damaged, but that's no more likely than any of the rest of the on-board electronics getting damaged.
Reply With Quote
  #10   Spotlight this post!  
Unread 03-07-2018, 02:18 AM
DPolkowski DPolkowski is offline
Registered User
FRC #4930 (Electric Mayhem)
Team Role: Mentor
 
Join Date: Jan 2017
Rookie Year: 2016
Location: Buffalo
Posts: 6
DPolkowski has a spectacular aura aboutDPolkowski has a spectacular aura about
Re: Toggle Switch Wiring

We are using a single switch this year and is attached to signal and ground on a DIO to the RIO. We also use two pots with 11 detents so we can set several hard presets depending on what the drive team wants at the start of each match.




You can use any switch you like. We use ones like these from Amazon ($7).


Reply With Quote
  #11   Spotlight this post!  
Unread 03-07-2018, 02:21 PM
DennisHoffman DennisHoffman is offline
Registered User
FRC #3777
 
Join Date: Feb 2017
Location: Lima, OH
Posts: 14
DennisHoffman will become famous soon enough
Re: Toggle Switch Wiring

Our team picked up two simple metal toggle switches from a local auto parts store, wired the switches' terminals across the DIO-0 (robot set on left) and DIO-1 (robot set on right) inputs (DIO has pull-up resistors), inverted the logic (switch on/low = true; so if wires got cut open, then the logic would read false), and with a little logic to compare with the gameData[0], thus they had very simple drive-forward (we don't know how to use a gyro, yet) autonomous setting to decide whether to dump the cube. (or both switches off if robot was in an open channel). Worked great in competition. (Team forgot to set the switches once -- and only once!)
Reply With Quote
Reply


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 11:42 AM.

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


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