Cheap Dirty Servo Position Sensor
Hey All,
I needed to know if a servo made it to its destination for a prototype. I came up with this out of parts in my "bin". Its' a ratshack Trim Pot glued to the center of the servo horn. Below it is a ratshack Pot knob glued in place to hold it from spinning. To my complete surprise it has held up for over a year now of about 75-50 cycles a day. Just throw in a capacitor and read the value with RCTIME. You get a pretty decent resolution, and the better the pot, the more stable the result. Sorry about the poor picture, but it should be enough to get the point.
Post Edited (skynugget) : 11/20/2008 8:21:32 AM GMT
I needed to know if a servo made it to its destination for a prototype. I came up with this out of parts in my "bin". Its' a ratshack Trim Pot glued to the center of the servo horn. Below it is a ratshack Pot knob glued in place to hold it from spinning. To my complete surprise it has held up for over a year now of about 75-50 cycles a day. Just throw in a capacitor and read the value with RCTIME. You get a pretty decent resolution, and the better the pot, the more stable the result. Sorry about the poor picture, but it should be enough to get the point.
Post Edited (skynugget) : 11/20/2008 8:21:32 AM GMT
Comments
What a GREAT idea! I realize you already apologized for the picture, but is there any chance of taking one which shows how the stationary part of the trimpot is mounted? Perhaps the new picture could have a bit more clarity.
Thanks for sharing this feedback method. I've been looking for something like this for quite some time. The beauty of it for my application is the compact size and no PCB real estate is expended. I suppose two more advantages are: the price, and decent resolution.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When all else fails, try inserting a new battery.
Post Edited (Bruce Bates) : 11/20/2008 9:16:39 AM GMT
You should check this thread out.· Although it was done with the Propeller, the same concept could be applied to any of the BS1,BS2, or SX.
http://forums.parallax.com/showthread.php?p=582447
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Here are some slightly better pics Bruce.
Great pictures. Now I can easily see how it's attached.
Thanks!
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When all else fails, try inserting a new battery.
but I can't grasp the concept.
Did I misunderstand or am I just missing something?
skynugget: That's awesome [noparse]:)[/noparse] What is the project for?
its the prototype for a wicked rfid door access system I'm working on. Basically my door doesn't always shut the whole way sometimes, so i needed to poll the servo to make sure the deadbolt actually went the whole way through the strike plate and locked.
there is a technical term for it
it is called leader/follower
either way you put it , it is awsome
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax posesses power beyond belief.
Believe in it.
"Beau: I can't understand how this would work with a modified servo... the thread you linked to seemed to suggest it but I can't grasp the concept." - The only modification it seems that skynugget has done to the servo, is to mechanically mount a pot to the servo horn. In the "leader/follower" example, the concept is simple.... Sweep a valid pulse to a servo, only don't provide an adequate amount of current to the servo that would cause the servo to·move. If you monitor the servo current while sweeping a valid pulse signal, you will see a dip in current when the signal that you are sending it matches the position of the servo. Based on that information you can determine the position of a servo without a hardware modification to the servo.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
later!
kenjj
·
"How do you mean,"sweep a pulse"? What equipment are you using?" - This can be done right from the Stamp, SX, or Propeller.
·
The servo expects a positioning pulse that ranges from 1ms to 2ms... you just create a loop in software that sends a valid servo pulse that you would normally move the servo position with, only the servo doesn't move because your not giving it enough power to actually drive the servo motor.· When the pulse that you are sending the servo equals the position that the servo should be in,· you will see a dip in the current from the servo, because the servo electronics will no longer·attempt to engage the servo motor.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
kenjj