Shop OBEX P1 Docs P2 Docs Learn Events
potentiometer reading - calibration — Parallax Forums

potentiometer reading - calibration

sjogansjogan Posts: 17
edited 2009-07-11 13:23 in BASIC Stamp
Ok Guys, here is my question.

When you are reading a potentiometer and need to calibrate it,how do you do it?

When I have a reading, say right now of 214 and I push the pot all the way to the max and then return it to center, my new reading is not exactly the same. (say 223 this time)

How much slop do I put in? How can my code adjust for say weaker batteries or (once I PCB my circuit) a slightly different value of what my reading is.

Or is this just one of those things you have to play with until you feel it's right?


(I'm using RCTIME with 10K pot and C = 0.1 uf. and a state = 1 (pull up) I am using a joystick with 2 pots, with spring return.)

Thank you

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-11 13:23
    The largest "slop" factor is due to the mechanics of the pot itself. You'll just have to do a bunch of readings and figure out the variation. The pot should be connected to the regulated +5V and normally this is fairly well regulated. If the batteries are very weak so their voltage is below the "drop-out" voltage, the regulator will stop regulating, but their voltage will continue to drop fairly rapidly at that point and soon won't work at all.
Sign In or Register to comment.