Do you want to build a Magnetostrictive Position Sensor as described in: https://de.wikipedia.org/wiki/Magnetostriktiver_Wegaufnehmer
Working principle
In short: A current pulse will initiate a torsion wave along a magnetostrictive wire at the position of a moving cursor magnet. The travelling torsion wave generates a signal in a receiver coil. From the time between current pulse and the signal pulse the position of the magnet (the distance between receiver coil and magnet) can be determined.
Resources
On Thingiverse is a set of parts to build a Magnetostrictive Position Sensor. With this sensor you can measure the position of a magnet sliding along a PVC tube surrounding a magnetostrictive Nickel wire. You can use it to build a linear servo with a DC motor. The sensor is scalable as working range depends on the length.
The proposed 3D fittins are compatible with fischertechnik construction system. It consists of following parts:
- Magnet Holder for Ring magnet
- End clamps (you need 4 pieces)
- Coil body
- Connector block for coil
- Wire guide (print it upright with 0.1mm resolution, supports from build plate and large brim)
- Coil holder block for Fsichertechnik (part that can be used to mount coild to the Fischertechnik system if no tube is used)
To build this sensor followng additional parts and components are needed:
- Nickel or NiFe wire (for heating applications) , Diameter: 0.8mm, Length: 60cm (for a 50cm sensor, but longer wires should be possible)
- Nd Ring Magnet: Outer diameter: 12 mm, inner diameter, 8.5 mm, height: 4mm (I used: fix-o-moll Neodym Magnete Ringe 12mm silber )
- PVC housing tube, Outer diameter: 7mm, Inner diameter: 5mm, Length 50cm (You can chose your desired length; It might be possible to use Aluminium tubes)
- 12 x M3-Screws with sink head:, Length 10-15mm
- Power Supply for excitation puilse: 10-20V
- Separate Power Supply for analog electronics: 5-10V (Deriving Voltage from excitation power supply with an additional regulator should be possible)
- Cu-Wire: 0.1-0.3 mm, for 800 Windings
- Exciter-Circuit with a good Power-Mosfet (*)
- Analog Circuit (*)
- Gate Circuit
- Selector-Circuit
- Arduino Uno (*)
- Arduino Software
*: The princible and the sensor electronics is described in ft-pedia 2024/4: https://ftcommunity.de/ftpedia/2024/2024-4/ftpedia-2024-4.pdf
FreeCAD-File to adjust the fittings and an experimental Arduino-Sketch are included
Receiver Coil
Wind 700-800 Windings of Cu-Wire onto the Coil holder. Snap and glue the Connector block onto the coil body. Place 2 blank solid wires (diameter 0.4-0.5mm) through the connector holes and solder the Coil wire onto it. The solid wires will make a clamp connection to the 2.5mm mini-banana plugs. It is e a good idea to secure the tiny wire with hot glue.
In the Coil holder is a bore in which you can cut a M3 thread for a worm screw to fixate Coil holder on the PVC tube.
End clamping blocks
The end blocks clamp the Nickel wire and the PVC rod. 4 clamping blocks are needed: 2 Lower and 2 Upper blocks. Cut M3 threads for the 2 Lower Blocks and drill l 3mm holes in the other 2 Upper blocks.
Nickel-Wire Installation
Straighten the Nickel wire as good as possible. The wire should not have contact with the interior of the PVC tube. The Nickel wire has to be fed through the PVC tube and will be clamped in the End blocks. The End blocks will not clamp the wire directly. There is deliberately a gap to put some material in between to achieve different effects:
For damping connection: (receiver coil side) Clamp Nickel wire by surrounding with paper tissue (e.g. toilet paper) or wrap a thin rubber band around the wire and clamp it between upper and lower part of the end blocks. Before mounting place a drop of hot glue at the wire just after the clamp. The glue drop should slide into the PVC tube.
Note: if you provide damping connections at both ends you will get a pretty good single or doublet signal. The first peak will give you the position. Bud you cannot use it in the vicinity ( <8cm ) of the receiver coil because the signal is burried in the excitation response.
For reflective connection: (other side) Clamp the wire between two metal wires. A hard metal clamp will enable reflection of torsion waves at the opposite end. The software can evaluate the position from the reflected signal in the vicinity of the receiver coil.
Magnet holder
Snap ring magnet onto the magnet holder and put magnet holder over the pvc tube.
Wire Guide
Wire guides can be placed into the PVC rod to guide the wire in the center. For long rods (>25cm) the wire can be attracted to one side by the ring magnet such that it contacts with the wall. This can lead to erroronious signals. Wire guides keep the wire in the center of the rod. The best way to mount the wire guides is to stick it over the wire outside the rod and push it with a thinner hollow tube into place. For a 50cm rod one wire guide in the center is sufficient.
Exciter Circuit
The Exciter is triggered by the Arduino and generates a defined current pulse through the magnetostrictive wire. It makes use of a Monoflop and a Power-Mosfet. The current pulse through the wire will cause torsion waves generated at the position of the magnet. These waves travel with a speed of approximately 3000 m/s and will when traveling through the receiver coil induce voltage peaks that can be amplified and registered.
Exciter and Arduino are on different power sources. The Arduino signal is fed in via an Opto coupler.
For short pulse of 2.5us use c3=400pF!
Analog Circuit
The Analog Circuit is a 3 stage Operational Amplifier (OP07) that amplifies the the signal from the receiver coil by a factor of 49 x 10 x 3. This signal is "digitized" by means of a LM311 comparator. For connection of the coil to the amplifier is highly recommended to use shielded cable and connect its shield with the Arduino Ground.
The first amplifier stage is coupled via a small capacitor (175pF) followed by a 10k resistor to GND. This circuit is powered with 10V power supply. Virtual Ground is connected to Arduino-Ground.
To block oscillations of the LM311-Comparator you can use R23=20k and connect a 64k Resistor between Pin 7 and 2
Gate Circuit
The Gate Circuit contains a delay to reject signals direct after excitation pulse and feeds the digitized signal pulses to the Interrupt Capture Pin D8 of the Arduino Uno. I am using a delay of 40us is used. (Originally I tried to generate the delay with the Arduino. However I was getting a significant jitter. Therefor I decided to create delay with a Monostable) The circuit is powered wiht the 5V rail of the Arduino-UNO and Ground is connected to virtual ground of amplifier / comparator circuit. (Nand gates are 74LS00, And gate 74LS08, but CMOS- gates should work too)
Selector Circuit (optional)
For 2D channel operation: a simple digital multiplexer to select the digitized signal. The signals SIG 0 and SIG 1 are the signal outputs from the previous comparator circuit. The Channel can be selected via Arduino-Pin D9 (CHSEL)
Measurement with Arduino
The Arduino-Uno controls the measurement. It triggers an excitation pulse and measures the time of digitized pulses with the Interrupt Capture feature of Timer 1. The digitized times are analyzed to calculate the position of the magnet.
Quartet Signal Analysis
Another possibility to analyze the signal is by using hard clamping at both ends.
The hard clamp at the coil will create a reflection that creates a doublet with the non reflected signal. If proper adjusted a quartet of signals consisting of 2 doublets is generated.
The spacing between the doublets peaks is constant DT and the doublets move towards each other when moving the magnet away from the coil. The second and the third peak in the quartet have relation: T2 = 2 * TM - T3, where TM denotes the propagation time between the clamps. Keeping track of the moving doublets allows for good signal recognition. Please note that if clamping is not perfect some of the signals can vanish. However this can be compensated by the software and due to the redundant information missing peaks can be reconstructed.
The Arduino-Sketch for this is included in the file Magnetostrictive_Quartet_Analyzer.ino
Hints
- Excitation Voltage (good value: 18V)
- Excitation Pulse Duration (too long will cause ringing, too short will give too small signal)
- Capacitive coupling between first and second amplifier stage 175pF followed by 10K to GND
- Permanent Magnetization of the Nickel wire in the neighborhood of the receiver coil can occur and deteriorate signal recovery. Clean by moving a strong magnet along the wire
- Contact of the wire with the tube wall should be avoided. Contacts can damp the signal or create errornious signals
- Wire should be straight without bends and knicks
- Gate circuit: Sufficient delay between excitation pulse and first signal (e.g. 40us)
- LM311 Comparator can generate ringing oscillations. Pull-Up-Resistor must not be too small. 10k or 20k are ok.
- Comparator ringing can be reduced by feeding back output signal to positive input of the comparator. This will create a hysteresis. (I used 65k between Pin 2 and 7)
- Some switching power supplies inject a significant noise floor such that no reliable measurement is possible.
- Some PWM driven Motors can also give rise to false signals. proper shielding helps.