Go to Post That's one of the saddest stories I've ever heard. When your green isn't neon enough, you are in big trouble in FIRST. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Spotlight this post!  
Unread 15-05-2004, 12:02
MikeDubreuil's Avatar
MikeDubreuil MikeDubreuil is offline
Carpe diem
FRC #0125 (Nu-Trons)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Boston, MA
Posts: 967
MikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond repute
Send a message via AIM to MikeDubreuil
Re: Making a Sensor Board

Quote:
Originally Posted by SilverStar
For example if a rotatable device is connected to the potentiometer, as the device rotates the resistance and the input value would change.
What is important to remember is that the Operator Interface and Robot controller don't read resistance, they read voltage. So when connecting a potentiometer you are really reading the voltage drop between the the wiper and the terminals A or B.

Ascii Art time:
Code:
|~~~~~~~~|~~~~~~~~~~|
A        W          B
You would connect positive to A and Ground to B. The input to the controller would be the Wiper (W).

You can turn the pot's wiper, sometimes called the slider and vary the resistance between point A and W. To calculate the voltage drop you use Kirchoff's Voltage Law.

R1 = Resistance between A and W in Ohms
R2 = Resistance between W and B in Ohms
V = 5V, which is supplied by the OI or RC
X = voltage drop across A and W

X = V * (R1/(R1+R2))

Example:
You are using a 100K potentiometer and it is turned about 3/4 of a turn. Let's assume it is a single turn 360 degree pot. You whip out your multimeter and read 75K across A and W and 25K across
W and B. Using Kirchoff's Voltage law the equation would be (X=5*(75K/(25K+75K))) which would equal 3.75 volts.

What does this mean to the programmers?
That voltage is sent through an ADC or Analog to Digital converter. The ADC has a resolutiuon of 10 bits (2^10 = 1024). That 5 volt signal is represented as a number from 0 to 1024. So what would our 3.75V potentiometer read like in your program?

V = input voltage
x = digital value in base 10

x = (V * 1024)/5

So for our 3.75V example: (x = (3.75 * 1024)/5), which equals 614. Your program would read 614 as the input if your 100K potentiometer was at 3/4 of a turn.
__________________
"FIRST is like bling bling for the brain." - Woodie Flowers
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making your robot drive easier ufa_mike Control System 32 28-04-2004 21:35
Making .Hex files dddriveman Programming 4 11-03-2004 13:47
Wiring Diagram for making a Joystick Nick Fury Control System 0 10-02-2004 23:10
Rules on making spare parts fyi DougHogg General Forum 0 02-04-2003 16:18
Making a Dongle - Pin 1 help DanL Electrical 6 05-03-2003 16:58


All times are GMT -5. The time now is 13:01.

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