Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   How to wire Digital Inputs and Outputs and Analog Inputs? (http://www.chiefdelphi.com/forums/showthread.php?t=141408)

MAXOFLIFE 10-01-2016 23:31

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.

lethc 11-01-2016 00:32

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.

rich2202 11-01-2016 06:05

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.

MAXOFLIFE 11-01-2016 06:55

Re: How to wire Digital Inputs and Outputs and Analog Inputs?
 
Quote:

Originally Posted by lethc (Post 1520806)
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 (Post 1520890)
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!

CryptoStorm 14-01-2016 08:23

Re: How to wire Digital Inputs and Outputs and Analog Inputs?
 
Quote:

Originally Posted by rich2202 (Post 1520890)
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 -


All times are GMT -5. The time now is 18:46.

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