|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#11
|
|||||
|
|||||
|
Re: Making a Sensor Board
Quote:
Ascii Art time: Code:
|~~~~~~~~|~~~~~~~~~~| A W B 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. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |