Author Topic: Measuring and Testing a Variable Reluctance sensor?  (Read 1707 times)

0 Members and 1 Guest are viewing this topic.

Offline synfinaticTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Measuring and Testing a Variable Reluctance sensor?
« on: September 23, 2022, 12:45:29 am »
I have a pair of variable reluctance sensors at a known precise distance apart to be used to measure the velocity of an object passing by both of them (not the more typical single sensor where the object spins near the sensor).

My goal is two parts:

1. Measure the velocity using a micro-controller like an ESP32 by detecting the two signals and measure the time between them to calculate the speed
2. Since testing it in the "real world" is challenging, Id like to be able to test/validate my circuit and code via purely electronic means (ie: I don't want to devise a way to accurately pass an object past the two sensors so I can measure it). 

Digging through various options and considering price, part availability and circuit complexity, it seems something like an LM139 comparator would be excellent for detecting the voltage cross 0V which should correspond with the object directly above the sensor.  Looking at the data sheet: https://www.st.com/content/ccc/resource/technical/document/datasheet/bf/7e/d7/a4/67/86/4e/89/CD00000460.pdf/files/CD00000460.pdf/jcr:content/translations/en.CD00000460.pdf

I see two sample circuits which might work?  Figure 16 & 20.  The latter seems "more correct" since the input is an AC waveform which more correctly corresponds to a VR waveform?  That said, it seems to require both positive and negative voltage rails which I'm not really sure of a good way to generate (device is battery operated and I'll have both +5 and +3.3V available).

So guess my first question is "Figure 16. Zero crossing detector (single power supply)" viable for this use case or do I need to come up with a negative voltage rail for "Figure 20. Zero crossing detector"

If I need the negative voltage rail... any simple/cheap suggestions?


Lastly, I'd like a way of testing the accuracy of my circuit & code doing the measuring.  Testing it in the real world will be challenging so I was thinking it might be useful to generate a pair of digital pulses with a known time between them to simulate the VR sensor using a 2nd micro-controllers digital outputs.  At least I can think of no good way to generate an accurate VR waveform?  The closest I can come up with is something like this which I'm not at all convinced is any more useful:

 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3036
  • Country: us
Re: Measuring and Testing a Variable Reluctance sensor?
« Reply #1 on: September 23, 2022, 02:53:39 am »
Does this web page describe the signal you'll be processing?

http://logansmith.org/2014/02/a-practical-overview-of-variable-reluctance-sensors-and-associated-hardware/

It suggests using a MAX9924 which is designed for measuring the output of a VR sensor.

MAX9924 datasheet: https://datasheets.maximintegrated.com/en/ds/MAX9924-MAX9927.pdf

Quote
I see two sample circuits which might work?  Figure 16 & 20.  The latter seems "more correct" since the input is an AC waveform which more correctly corresponds to a VR waveform? ...

Fig. 20 requires a negative supply. Fig. 16 avoids this by biasing the signal at around 0.45V. Both operate on the same idea -- the comparator is set to trigger when the input rises a little above 0V.

The 20M resistor in Fig 16. implements hysteresis - something you probably won't have to worry about.

The diode is to prevent the inverting input from going negative when the input signal goes negative. In Fig. 20 it is assumed that the input signal will never go below the negative supply voltage and that's why there is no equivalent protection circuitry.
« Last Edit: September 23, 2022, 03:18:27 am by ledtester »
 

Offline synfinaticTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Re: Measuring and Testing a Variable Reluctance sensor?
« Reply #2 on: September 24, 2022, 01:11:04 am »
Does this web page describe the signal you'll be processing?

http://logansmith.org/2014/02/a-practical-overview-of-variable-reluctance-sensors-and-associated-hardware/


Yes, that's exactly it other than of course I have two VR sensor circuits.



Fig. 20 requires a negative supply. Fig. 16 avoids this by biasing the signal at around 0.45V. Both operate on the same idea -- the comparator is set to trigger when the input rises a little above 0V.

The 20M resistor in Fig 16. implements hysteresis - something you probably won't have to worry about.

The diode is to prevent the inverting input from going negative when the input signal goes negative. In Fig. 20 it is assumed that the input signal will never go below the negative supply voltage and that's why there is no equivalent protection circuitry.


I didn't realize that 20 the input of the VR waveform was assumed to never go below the negative value... I have no idea if that would be true in the real world (still need to go "out into the field" and attach my oscilloscope to measure real world data).  I found a simple charge pump circuit for negative voltages using PWM or a 555 timer, so that would probably limit me to +/-5V on the power.

Since I'm using a pair of VR sensors and calculating a relative time between the two and not trying to perform timing via a single sensor, the bias to trigger at +0.45V should work for me.  I also have to deal with running a wire 3-6ft for the sensor so may have to deal with noise so that might help.

Thank you!  this was helpful!
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3036
  • Country: us
Re: Measuring and Testing a Variable Reluctance sensor?
« Reply #3 on: September 24, 2022, 01:46:35 am »
Giving it some thought, it is quite likely a chip like the MAX9924 is the best way to go. I suspect the VR signal is going to be very weak -- both in the sense of amplitude and also having a high output impedance, and that's something the MAX9924 would be able to handle.

 

Offline synfinaticTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Re: Measuring and Testing a Variable Reluctance sensor?
« Reply #4 on: September 24, 2022, 10:28:27 pm »
Giving it some thought, it is quite likely a chip like the MAX9924 is the best way to go. I suspect the VR signal is going to be very weak -- both in the sense of amplitude and also having a high output impedance, and that's something the MAX9924 would be able to handle.

Well the amplitude should be a function of the speed of the object passing the VR sensor right?  In that case, I'm not worried.  The impedance is another thing and I'm honestly not sure. 

The thing that is driving me nuts right now is when I attach my oscilloscope to the sensor and just using my hand to quickly run a screwdriver past the sensor I can only get the scope to detect (and/or trigger) if I connect it "backwards". Ie, rather than the signal rising and then passing through zero towards a negative voltage, it only will show a change in voltage if I connect it so it starts with a negative voltage before swinging back up.



If I reverse one (or both) of the channels to be "correct" I'll never see any change in that channel.  For a while I thought I was doing something wrong and it was my fault, but I've done enough testing now and consistently reproduced the issue that I've come to the conclusion that it's not me.

To be fair, I don't know exactly what if any additional components exist in the "sensor".  It's a commercial unit and opening it up would destroy it. At least for my purposes it shouldn't really matter since both VR sensors trigger a positive voltage, but I'm not sure if something like the MAX9924 is expecting a "correct" wave form.


 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3036
  • Country: us
Re: Measuring and Testing a Variable Reluctance sensor?
« Reply #5 on: September 24, 2022, 10:45:15 pm »
Do you have a datasheet for your sensor? From the web page I referenced it seems that the VR signal is a differential signal.
 

Offline synfinaticTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Re: Measuring and Testing a Variable Reluctance sensor?
« Reply #6 on: September 24, 2022, 11:21:59 pm »
Do you have a datasheet for your sensor? From the web page I referenced it seems that the VR signal is a differential signal.

I do not.

The longer story is that the sensor also comes with a microcontroller display/data logger unit which kinda sucks.  So I'm designing a new display/logger which uses/connects to the same sensor.  The sensor just uses a standard 3.5mm TRS audio jack to connect to the display.  Based on the wave form and the fact that all 3 taps show continuity with each other tells me it's a pair of VR sensors with a common ground.

Just when I measure, I only get a signal which matches the "inverted polarity" as described here:

http://mcs.woodward.com/content/motohawk/Documentation/MotoHawk2015bSP0/HTML/MotoHawk_topics/VRInterfacing.html
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3036
  • Country: us
Re: Measuring and Testing a Variable Reluctance sensor?
« Reply #7 on: September 25, 2022, 02:56:25 am »
Quote
If I reverse one (or both) of the channels to be "correct" I'll never see any change in that channel.

By "reversing" the channel do you mean you swap where you attach the ground clip and scope probe?

How is your sensor powered?
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: Measuring and Testing a Variable Reluctance sensor?
« Reply #8 on: September 25, 2022, 11:06:31 am »
If I reverse one (or both) of the channels to be "correct" I'll never see any change in that channel.

When you say "reverse", are you changing the edge polarity in the trigger menu of your scope?
 

Offline synfinaticTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Re: Measuring and Testing a Variable Reluctance sensor?
« Reply #9 on: September 25, 2022, 04:41:08 pm »
Quote
If I reverse one (or both) of the channels to be "correct" I'll never see any change in that channel.

By "reversing" the channel do you mean you swap where you attach the ground clip and scope probe?

How is your sensor powered?


Yes, swap which wires the scope probes are connected to.

Unlike a hall sensor, there is no power- only two wires: GND and Vout.

I'm triggering on the rise.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf