For a product we currently use an COTS "valve head", which is a geared motor driving a rack, and that rack drives a valve up and down to regulate water flow. That valve head is expensive (~£500) considering it's just an AC motor, some plastic gears and a small amount of electronics!
Replacing it therefore would be nice!
There are other options for COTS positioners that are cheaper, down to around half that price, but i've not tested them, but i'd like to look at a completely DIY solution. It's relatively trivial to drive a geared DC motor via an H bridge and to mechanically actuate the valve itself, however the position sensing is harder. The COTS valve head uses what looks to be inductive coupling, two coils around the valve stem, where the mutual inductance (coupling) changes as the valve position changes, in effect a variable transformer type arrangement.
That is one option we could just copy, but i also wondered about using a inductor driven oscillator, where the oscillation frequency changes with the inductance of the measuring coil (iw how much of the metal valve stem is in the coil. This ought to be pretty robust, and easy to implement, but requires some electromechanical design and test (coils wound etc)
One other option that looks quite nice is to use a pcb "coil" against a target:
https://www.fierceelectronics.com/components/how-to-sense-lateral-movement-using-inductance-to-digital-converterThat would be very cheap to implement.
In all cases, i don't really care about absolute accuracy or position. The logic would be power on, wind valve to the end stops and record the up/down positions, so that the valve can then be pre-positioned across it's travel via the position sensor measurement. Previously we have set the end stops by just putting a current limit on the motor driver, that is high enough to land the valve fully on the end stop, but then trips the driver off when it hits that current limit (during end stop adaption, we only move the valvehead slowly (apply min duty cycle until we see it moving) so it doesn't whack into the end hard)
But i would like to have at least around 100 "steps" in valve position between min and max. Travel is about 20mm, so 100 steps is 0.2mm, so that drives an absolute positional resolution or 0.1mm or better really.
So, after all that waffle

has anyone done this before, any experiences or traps for young players?