Potentiometer with detent?
"Steamboat Ed" Haas
Posts: 29
·· --Howdy! I've been fiddling around with using a pot to·position a "servo". I'm using·the teeny weeny one from Parallax that needs to be turned with a screwdriver. The application is to drive one of those surplus windshield wiper motors; I'm using the PWM output to send signals to a Victor motor controller and this is working very well.
···--The trouble is determining, with certainty, that the motor is in "neutral", so to speak. What I'm trying to do is use the motor as a winch to move a small load up and down on an art car I'm building. The winch will position the load one way when the vehicle is in motion and in another when it's parked. Although it's tempting to use a DPDT switch,·I'd·prefer to control the rate of the load's position·change with a big, easy to grasp knob on a pot that could be·located a few feet from the BOE. What's needed is a tactile feedback of some kind so that I know when the motor is in "neutral", so that the·motor isn't creeping. Text and photos of project to date at: www.nmpproducts.com/artcar.htm.
···· --Any suggestions appreciated.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
························ Hacking the Trailing Edge!
················http://www.nmpproducts.com/intro.htm
················---Decks a-wash in a sea of words---
···--The trouble is determining, with certainty, that the motor is in "neutral", so to speak. What I'm trying to do is use the motor as a winch to move a small load up and down on an art car I'm building. The winch will position the load one way when the vehicle is in motion and in another when it's parked. Although it's tempting to use a DPDT switch,·I'd·prefer to control the rate of the load's position·change with a big, easy to grasp knob on a pot that could be·located a few feet from the BOE. What's needed is a tactile feedback of some kind so that I know when the motor is in "neutral", so that the·motor isn't creeping. Text and photos of project to date at: www.nmpproducts.com/artcar.htm.
···· --Any suggestions appreciated.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
························ Hacking the Trailing Edge!
················http://www.nmpproducts.com/intro.htm
················---Decks a-wash in a sea of words---
Comments
2. On your knob, mark the 'dead zone' as a small arc near the center of the knob movement.
3. Your program probably should only have a few speeds for the motor -- Up Fast, Up Slow, Off, Down Slow, Down Fast might be sufficient. This allows 5 quadrants for your knob, and reduces how picky your system will be about knob position, since a range of knob resistances will result in the same output of the motor.
http://www.encoderdevices.com/heavy_duty/heavy_duty.htmhttp://www.encoderdevices.com/heavy_duty/heavy_duty.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
" Hey! Why is there silicone on my hemostats?"
····· --Yes, writing program so that there's a "low" condition around neutral, to get motor turned off there, to save power and to keep it from overheating, good idea. Now all I gotta do is figure out how to state the problem in Pbasic! Lots of "IF THEN" statements I guess, yes? i.e.·I'm trying to splice this in to the program on page 158 of "What's A Microcontroller"; not even sure if I know *where* to put it, let alone *what*;· I figure it will be something like: if the value of time is more than 700·AND less than 788 then rcPin should be LOW. Any pointers appreciated.
···· --Re Burning Man; trying to find connections? Best bet would be to hang out at tribe.net and look for Burning Man related tribes in your area.
···· --Re: type of pot: I'm leaning towards a self-centering joystick, as they are cheap at the local electronics surplus outlet.
···· --PS I've upped the font size because the default (Veranda 2) is tiny!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
························ Hacking the Trailing Edge!
················http://www.nmpproducts.com/intro.htm
················---Decks a-wash in a sea of words---
' What's a Microcontroller - MotorTest.bs2
' Vary motor/servo speed/direction with a potentiometer.
' Read pot in RC-time circuit using RCTIME commannd
' Scale time by 0.745 and offset by 500 for motor/servo
' The if then stuff is attempt to create deadband around motor neutral
' {$STAMP BS2}
' {$PBASIC 2.5}
scaleFactor···· CON·· 192
offset········· CON·· 500
rcPin·········· CON·· 7
delay·········· CON·· 10
servoPin······· CON·· 14
time··········· VAR·· Word
DO
·HIGH rcPin
·PAUSE delay························ ' wait allows cap time to charge
·RCTIME rcPin, 1, time·············· ' Execute the RCTIME command
·time = time */ scaleFactor········· ' Scale by 0.745 (X 256 for */).
·time = time + offset··············· ' Offset by 500
·DEBUG HOME, DEC5 time·············· ' Display adjusted time value.
·GOSUB TEST
·PULSOUT servoPin, time············· ' Send pulse to servo
LOOP
TEST:
·IF time > 700 AND time < 800 THEN time = 750
RETURN
' DEBUG HOME, "time = ", DEC5 time· ' Store the time measurement in the time variable, display value
END
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
························ Hacking the Trailing Edge!
················http://www.nmpproducts.com/intro.htm
················---Decks a-wash in a sea of words---
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
························ Hacking the Trailing Edge!
················http://www.nmpproducts.com/intro.htm
················---Decks a-wash in a sea of words---
<edit> Ah I just found your pages on it, very cool, though It would have been cool to see some pics of your car in action (sign lit up etc) </edit>
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 10/7/2005 1:57:12 PM GMT