|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Potentiometer
Hello,
Sorry to bug you again, but we are trying to use a potentiometer to set the speed of a motor, but for visualizing what is happening, we are temporarily using a servo in it's place. We wired a 10 turn pot to the analog module on the crio with the signal wire going to the sweeper pin on the pot. When we move the pot it sets the servo to one of two positions, either fully rotated one way, or fully rotated the other, and it happens after a fraction of a turn from one endpoint on the pot. So if we are fully CCW on the pot the servo is in one position, if we move the pot about 1/16 of a rotation the servo moves to the opposite end. We tried two different pots to make sure it wasn't the pot, and they are both 10k ohms. I don't think I need to wire a resistor in series or anything like that, do I? I tried using both the GetValue and the GetVoltage functions and have the same issue. Here is the code: Code:
AnalogChannel *MainPot; float PotValue; int Temp; MainPot= new AnalogChannel(1); PotValue=Temp=0; Temp=MainPot->GetValue(); PotValue=Temp; PotValue=PotValue/1000; Servo6->Set(PotValue); |
|
#2
|
|||||
|
|||||
|
Re: Potentiometer
What are the other two pins on the potentiometer connected to?
|
|
#3
|
||||
|
||||
|
Re: Potentiometer
they are connected to the analog breakout as well
|
|
#4
|
|||||
|
|||||
|
Re: Potentiometer
What is the voltage on the "sweeper pin" (?) as you turn the potentiometer?
|
|
#5
|
||||
|
||||
|
Re: Potentiometer
It does read 0-5v, but we noticed that the breakout gets hot when the pot is plugged in (both pots, and both breakouts we have, since we have a spare). My mind goes to some sort of short, but we double checked our power to the breaker, and the pot wiring, and it's good. Ideas?
|
|
#6
|
|||||
|
|||||
|
Re: Potentiometer
What manufacturer and part number is the pot, and what is its value? Can you post a clear picture of how you have the wiring connected to it?
|
|
#7
|
||||
|
||||
|
Re: Potentiometer
We just decided to clean up the crio and cards, and after cleaning everything up it worked again. Not sure what exactly caused it, but I guess we should try to keep a cleaner environment...
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|