24 pointsby userbinator3 days ago5 comments
  • msds4 hours ago
    LVDTs are fun! I bought one for a project a few years ago (since abandoned), and have been slowly designing my own readout electronics for them. Three revisions later, and the performance is very good - to the point that I've bought more increasingly precise measurement gear to benchmark how it's performing. Currently, I'm testing it against some good glass scale linear encoders, and a capacitive gauge with a single-digit nm noise floor.

    So many don't buy an LVDT, I guess.

  • mikewarot10 hours ago
    I've always been intrigued by LVDTs since I learned that they can be used to measure millionths of an inch displacements. With the advent of cheap computing with good A/D, perhaps it's time to add a DIY LVDT to my project list.
    • HeyLaughingBoy8 hours ago
      You can find pretty cheap resolvers on eBay (I have a couple of Singer units that I paid $30 for). I'm sure you can also find LVDTs. Resolvers & LVDTs only differ by motion type: resolvers are rotary and LVDTs are translational.

      At least that way you don't have to do the "annoying" part of the project, which is likely to be the mechanical aspects of winding and placing the coils.

      I built a product that basically simulates the process: it takes an analog or digital input and outputs sine & cosine signals that look like position information for a motion controller that expects an LVDT or resolver.

  • peter_d_sherman8 hours ago
    >"Infinite Resolution

    Since an LVDT operates on electromagnetic coupling principles in a friction-free structure, it can measure infinitesimally small changes in core position. This infinite resolution capability is limited only by the noise in an LVDT signal conditioner and the output display's resolution. These same factors also give an LVDT its outstanding repeatability."

    Related: https://en.wikipedia.org/wiki/Linear_variable_differential_t...

    >"A counterpart to this device that is used for measuring rotary displacement is called a rotary variable differential transformer (RVDT)." (https://en.wikipedia.org/wiki/Rotary_variable_differential_t...)

  • K0balt11 hours ago
    lol. Interesting stuff but here I was thinking this was about the new transformer architecture.

    Differential Transformer https://arxiv.org/abs/2410.05258

    • userbinator4 hours ago
      Why do you think I submitted this ;-)
    • topspin11 hours ago
      Likewise. I was pleased to find this instead.
      • Onavo5 hours ago
        This is your grand papa's transformer :D
  • kragen9 hours ago
    I've been thinking about using the magnetic and mechanical design of an LVDT in a different application: a high-reliability keyboard with a four-dimensional scan matrix to reduce the number of electrical lines required.

    For a conventional keyswitch-matrix multiplexed keyboard with 81 keys, you need 18 GPIO lines, 9 row lines and 9 column lines. Even with Charlieplexing, I believe you need 13 GPIO lines to get to 81 keys. (½(14·13) = 91.) Keyswitch matrices are also mechanically and chemically delicate; a spill of solvent, battery acid, or sometimes even saltwater can damage the keyswitches, and they do not work underwater unless the keyboard is hermetically sealed. Such seals have to be flexible and are regularly flexed during usage, so they usually fail after only a few years. Some keyswitch contacts were often made of metal, which suffers oxidation over time resulting in keyswitch failure; many current keyswitches instead use contacts made of graphite-filled rubber, which doesn't form a solid oxide surface layer. (Keyswitches also generally require debouncing, though I suspect this is less of a problem with the graphite-filled rubber contacts.)

    Capacitive keys avoid contact bounce and oxidation, but tend to suffer even worse from submersion because of the high electrical permittivity of water. They are also more sensitive to electrical noise.

    By contrast, a differential-transformer key mechanism would permit an 81-key keyboard with only 12 GPIOs, high EMI immunity, and extreme mechanical robustness.

    Each key contains a differential transformer, similar to an LVDT but without any attention given to linearity. When the key is not depressed, the core in the differential transformer is at its nulled position, where a pulse of current through the primary will produce exactly canceling voltages across the two opposing secondaries. But when the key is depressed, the core is substantially displaced, so that the net voltage pulse induced across the two opposing secondaries is significant.

    Submersion poses no problem for the mechanism, because the magnetic permeability of water is basically the same as air or vacuum, so water filling the tube around the core is not a problem. As the TE page explains, the same is true of things like high-pressure hydraulic oil and even low-temperature molten metals. The mechanism would not work if you submerged it in a ferrofluid, or if you heated the core past its Curie point, but that is not much of a problem in most practical environments.

    The four-dimensional multiplexing works as follows. There is a 3×3 primary-winding matrix and a 3×3 differential secondary-winding matrix. Each of the 9 primary-winding-matrix cells has the primary windings of 9 different keys in it, each of which belongs to a different cell of the secondary-winding matrix. These 9 primary windings in a single primary-winding-matrix cell are preferably in parallel. By pulling one of the three row lines of the primary-winding matrix high and pulsing one of its three column lines low, while maintaining the other 4 row and column lines tristated, you send a pulse of current through those 9 primary windings.

    Similarly, each of the 9 secondary-winding matrix cells contains the 9 opposing-series-wound secondary-winding coils, in parallel, one for each of the 9 primary-winding-matrix cells. So each of the 81 keys represents a unique combination of a primary-matrix cell and a secondary-matrix cell.

    I'm not yet entirely clear on how to scan the secondary-coil matrix for a given primary cell. It would be fairly straightforward if you had an electromechanical relay for each row, a diode on the anti-series secondaries of each key, and a sense resistor to ground on each column: the voltage induced on a depressed key connected to an open-circuited row would not be able to draw any current from its open-circuited row, so it would drive no current through its column's sense resistor, which would therefore remain at ground, and the open-circuited row line would be driven below ground. But if you close the relay to select its row, connecting the row to ground, then the voltage induced across the anti-series secondaries would drive current from the row to the column and through the column's pulldown resistor, raising the column voltage up to an easily detectable level.

    The part I'm not entirely clear about is how to do this with regular CMOS GPIOs, which have clamping diodes to prevent them from going above Vcc or below ground. So an induced secondary voltage that attempts to drive a tristated CMOS GPIO below ground will only drive it to a diode drop below ground, at which point it will start to source current enthusiastically to protect the chip, looking very much like a GPIO being driven low. I suspect there's a simple solution to this problem, but I'm just a beginner in the art of electronics; undoubtedly it would be obvious to one skilled in the art.

    However, for keyboards of ordinary sizes, the four-dimensional keyboard matrix is an aspect of only minor, marginal benefit compared to the mechanical robustness and reliability of the keyboard mechanism. A three-dimensional matrix or a conventional two-dimensional matrix is easily realizable.

    One way to do a conventional two-dimensional matrix is to connect all the secondary-coil pairs in parallel, each with a series diode, and scan the primary matrix as above to get a pulse on the single output line shared across all secondaries only when you happened to scan across a key being depressed. This would require 18 tristate output lines and one input line. This variant of the system permits independent analog measurement of each core's position.

    Another way would be to connect each primary between one of 9 primary row lines and Vcc, driving one of them low at a time while tristating the others, and to connect each secondary between one of 9 secondary column lines and Vcc. This would require 9 tristate output lines and 9 input lines with pullup resistors; it's closely analogous to a conventional keyswitch matrix. (Of course you can interchange the polarities as desired.)

    A three-dimensional matrix could be realized by, for example, combining the two above setups: dividing up to 100 keys among a 5×5 matrix of primary cells, with up to 4 keys in each cell, each with its secondary connected to a different secondary column line. Activating one of the 25 primary cells by pulling its row line high and its column line low would induce currents through secondaries that drive low some subset of the 4 column lines. This requires 10 tristate output lines and 4 input lines with pullup resistors. Again, polarities can be interchanged as desired.

    I suspect you can play various charlieplexing-like tricks with diodes to reduce the number of required lines further.

    Back to the issue of mechanical and corrosion robustness. If the cores are encapsulated in glass, porcelain, or teflon, and similarly for the tubes they slide within, the keyboard should be able to survive even fairly aggressive environments such as extended immersion in boiling sulfuric acid, unless the insulation on the coils is degraded by the high temperature. Exposed key return springs that are subject to mechanical fatigue and chemical attack might be able to be made of long ceramic flexure blades, or if high-temperature resistance is not required, they could be replaced with repulsion between small rare-earth magnets which are themselves encapsulated in corrosion-resistant housings.

    • HeyLaughingBoy8 hours ago
      In any practical application, the number of GPIOs simply wouldn't be an issue. Transistors are as cheap as sand.

      What would you foresee as the application for a keyboard like this? It sounds like Hall-Effect switches would work just as well and cost significantly less.

      • kragen4 hours ago
        Thinking about it a bit more, if it were true that "in any practical application, the number of GPIOs simply wouldn't be an issue. Transistors are as cheap as sand," nobody would multiplex keyboards or LEDs at all. And it's true that it's feasible at this point to put a driver chip on every LED; the WS2812 is a common chip that you can hook up into long daisy-chains into which you shift a bunch of digital binary data to tell them how to drive one RGB LED each. And you can do the same thing with keys on a keyboard, putting one microcontroller on every key and connecting them all to a common bus or a token-ring-like bucket brigade.

        But people still do multiplex lots of LED matrices and keyboard matrices.

      • kragen8 hours ago
        You may be right.