02-12-2009 10:39 AM
We are in need of using a poteniometer on our FIRST Robotics 2009 robot.. We know the high and low limit values and we do not want to allow the pot to read beyond these values. We want to use the pot value as input to our code. How does one set-up using a pot to the analog module?
02-12-2009 12:08 PM
Hook it up as one of the resistors in a voltage divider circuit. For the details, wikipedia has a good article.
http://en.wikipedia.org/wiki/Voltage_divider
02-12-2009 12:43 PM
02-12-2009 02:40 PM
Hello ptveng,
What analog module are you planning on using here. Sorry, I don't know what was provided in your FIRST kits.
Typically what you'd do is just measure the voltage at the center with respect to ground. The fixed resistor has a known value (I'd recommend actually measuring it for better accuracy) and so does the voltage supply you are using. If you are worried about the supply you could use an additional channel to measure that. This gives you all the information you need to determine the position of the potentiometer.
If you care about what the voltages you read mean in terms of real units (radians or the like) you will have to do some experiments to map the values. Potentiometers can change in value either linearly or logarithmically depending on the one you have.
I'm not quite sure what you mean by not going full range? If you want to limit the measured potentiometer value for use in software you can use something like the in-range and coerce block.
02-13-2009 07:25 AM
02-13-2009 09:33 AM
Hi ptveng,
If you have questions regarding FIRST Robotics, you should go to www.ni.com/first. There is a discussion forum there that is specific to FIRST groups, and the people there will be more experienced with the FIRST hardware and projects.
Regards,
Stephen S.02-13-2009 10:00 AM