Go to Post Successful FIRST team members know they always can improve themselves, not just as a FIRST team, but as people who can offer something of value to society. - [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 10-01-2016, 23:31
MAXOFLIFE's Avatar
MAXOFLIFE MAXOFLIFE is offline
Bolton Bear Bots Member
AKA: Maxwell Huffman
FRC #3666 (Bolton Bear Bots)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2013
Location: Alexandria Louisiana
Posts: 24
MAXOFLIFE is an unknown quantity at this point
How to wire Digital Inputs and Outputs and Analog Inputs? (SOLVED)

Hello! Thank you for taking the time to read my post and hopefully help me!

I almost completely understand how to take the values from a digital input/analog input and utilize them within our team's code, but I have no idea on where to even begin on the roboRIO itself.

For example, if I wanted this simple switch mounted on the robot to control whether the robot ran our autonomous code or did not run our autonomous code, how would I wire it to the roboRIO DIO so that I could call for it's T/F value in LabView?



The same question applies to this potentiometer, except for analog values rather than T/F.



This is a very rudimentary question that you can probably answer in minutes, but I just wanted to ask the you guys first so that I don't accidentally hurt the board. I couldn't find my answer after using google for an hour because I don't know the proper terms. Thank you for your help!

Bonus Question: What would a potentiometer that has specific values be named? Specifically one that has at least 4 distinct analog value outputs.

Last edited by MAXOFLIFE : 11-01-2016 at 06:56.
  #2   Spotlight this post!  
Unread 11-01-2016, 00:32
lethc's Avatar
lethc lethc is offline
#gkccurse
AKA: Becker Lethcoe
FRC #1806 (S.W.A.T.)
Team Role: Alumni
 
Join Date: Nov 2012
Rookie Year: 2013
Location: Smithville, MO
Posts: 118
lethc will become famous soon enough
Re: How to wire Digital Inputs and Outputs and Analog Inputs?

The switch that you posted is a SPDT switch (single pull double throw). It outputs high to whichever side the switch is moved to. I'd use it as a SPST (single pull single throw) switch, because you're just looking to alternate between on and off. This means wiring one side (the 'on' side) to a signal pin of a DIO port. The middle of the switch should be wired to ground.

A potentiometer is a variable resistor. Here is a resource on how to wire a potentiometer. Wire the output wire to the signal pin on the RoboRIO.
__________________
2016: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Semifinalists, IRI Quarterfinalists
2015: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Quarterfinalists, IRI Winners
2014: Central Illinois Regional Quarterfinalists, Greater Kansas City Regional Finalists, Newton Semifinalists
2013: Greater Kansas City Regional Winners, Oklahoma Regional Winners, Galileo Quarterfinalists
  #3   Spotlight this post!  
Unread 11-01-2016, 06:05
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,136
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: How to wire Digital Inputs and Outputs and Analog Inputs?

Wire the outsides to Ground and +, and the middle to Signal.

For the Switch, the Signal wire will either be connected to Ground (0) or + (1).

For the Pot, the Signal wire will read the distance the pot is rotated.

You will want to adopt a convention on which side is Ground vs +.

I believe the Ports on the Robo Rio are: Ground, +, Signal. With + always in the middle, you don't damage your equipment if you accidentally plug in the connector backwards.

BTW: An easier way to control Autonomous is the Smart Dashboard. Put a field on the screen that the Driver can change. Read the value at the beginning of Autonomous.

Last edited by rich2202 : 11-01-2016 at 06:11.
  #4   Spotlight this post!  
Unread 11-01-2016, 06:55
MAXOFLIFE's Avatar
MAXOFLIFE MAXOFLIFE is offline
Bolton Bear Bots Member
AKA: Maxwell Huffman
FRC #3666 (Bolton Bear Bots)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2013
Location: Alexandria Louisiana
Posts: 24
MAXOFLIFE is an unknown quantity at this point
Re: How to wire Digital Inputs and Outputs and Analog Inputs?

Quote:
Originally Posted by lethc View Post
The switch that you posted is a SPDT switch (single pull double throw). It outputs high to whichever side the switch is moved to. I'd use it as a SPST (single pull single throw) switch, because you're just looking to alternate between on and off. This means wiring one side (the 'on' side) to a signal pin of a DIO port. The middle of the switch should be wired to ground.

A potentiometer is a variable resistor. Here is a resource on how to wire a potentiometer. Wire the output wire to the signal pin on the RoboRIO.
Quote:
Originally Posted by rich2202 View Post
Wire the outsides to Ground and +, and the middle to Signal.

For the Switch, the Signal wire will either be connected to Ground (0) or + (1).

For the Pot, the Signal wire will read the distance the pot is rotated.

You will want to adopt a convention on which side is Ground vs +.

I believe the Ports on the Robo Rio are: Ground, +, Signal. With + always in the middle, you don't damage your equipment if you accidentally plug in the connector backwards.

BTW: An easier way to control Autonomous is the Smart Dashboard. Put a field on the screen that the Driver can change. Read the value at the beginning of Autonomous.
Thank you both for your help!
  #5   Spotlight this post!  
Unread 14-01-2016, 08:23
CryptoStorm's Avatar
CryptoStorm CryptoStorm is offline
EIC Tech
AKA: Joshua Stilwell
FRC #5056 (MegaHurtz)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2004
Location: Buchanan MI
Posts: 26
CryptoStorm is an unknown quantity at this point
Re: How to wire Digital Inputs and Outputs and Analog Inputs?

Quote:
Originally Posted by rich2202 View Post
I believe the Ports on the Robo Rio are: Ground, +, Signal. With + always in the middle, you don't damage your equipment if you accidentally plug in the connector backwards.
The signal wire should go to the pot wiper (center tap) the + and - to either side. If you put the + to the center tap you're creating a direct short when the wiper is all the way toward the -

Last edited by CryptoStorm : 14-01-2016 at 08:36.
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 18:46.

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