Dumb ? - Measure linear movement 0-5"

How can I determine ammount a item has moved from 0-5"?
I'm really tired and dumb right now... I can consider maybe a carbon rod with electrodes on "0" and "5".

It is a steel bolt within a slightly larger steel sleeve actuated by a servo and armatures. I want to confirm position of bolt.

Not really enough information.
Different ones will put forward suggestions and will be just a stab in the dark.
For one, a pot mounted with it's moving shaft connected to your inner bolt or whichever moves.(indeterminate there also)

If you just want to know if the bolt is fully open or fully closed then I suggest using a microswitch at each end of the motion.

...R

How accurately do You want to know? Asking for nanometer precision You will need a very fat wallet…...

You can wind a solenoid of magnet wire on a form that the bolt will slide through. Then build an oscillator with the coil as part of the resonating circuit. Measure the frequency with the bolt fully in the coil and measure as the bolt is moved out of the coil. The resulting frequency change will give a very accurate indication of the bolt position.

Paul

Any reason to not trust your servo?
You could add a current sensor on your servo's supply. If the bolt gets stuck the current increases as the servo stalls.

wvmarle:
Any reason to not trust your servo?
You could add a current sensor on your servo's supply. If the bolt gets stuck the current increases as the servo stalls.

Good idea. It's door security so paranoid... I think I'll trust servos own sensors but add a current sensor. There's two servos, low bolt and high bolt. Armatures are break away wood in case of emergency.

Good thing you don't live in the United States. Your plan would get you arrested here for cruelty and probably other charges, like false imprisonment.
Paul

Really dumb... I'm in pain. Sorry.

How would I "convert" /DC/ current to voltage so I can have MCU read it thru it's ADC? it isn't end of world if it isn't implemented, there are two per door. Just to say " hey my door has electronically controlled and stall monitoring servo actuated position sensed steel bolts".

I always assume these projects are lawful - like for protecting one's own front door.

Usually door locks are made with a solenoid that has to be kept in place, unlocking the door upon power outage for safety reasons. This way you don't lock yourself in when the power is out.

Of course if this is the door to a vault, you may want it to work the other way around :slight_smile:

wvmarle:
I always assume these projects are lawful - like for protecting one's own front door.

Usually door locks are made with a solenoid that has to be kept in place, unlocking the door upon power outage for safety reasons. This way you don't lock yourself in when the power is out.

Of course if this is the door to a vault, you may want it to work the other way around :slight_smile:

Getting out is made way by yanking on marked pull chains that are connected to bolts, they snap the servo links and pull out bolt. Alarm sounds of course.

Ingress during grid fail is a problem for me... Since my thing is servo not solenoid (no solenoid does 3") it can't unlock at moment of outage. Or should it?! That could be an attempt to force entry. I think a hidden pull chain may be best answer, careful and bend back a piece of siding and route thru pull chain... Grid failures are rare though.

I'm stuck on the access control theory now. Users, credentials, and permission... Bleh

Back-up battery. Have it last for an hour or so, should be enough in that kind of situations. Allows regular lock/unlock while mains power is out; unlocks when battery runs out.

mattlogue:
I'm stuck on the access control theory now. Users, credentials, and permission... Bleh

That's likely going to be the weak link - after all, humans are involved at this point.

I was thinking of getting a few of these... a lot of wire, drop-down VR to 5v, charger circuit, relays, fuses, two MCUs, CTs, voltage readers... what do u think?

Cheap, bulky, heavy, reliable. A good old lead/acid battery.