×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Reverse engineer inductance

Reverse engineer inductance

Reverse engineer inductance

(OP)
Hi Guys,

I am trying to build a PIC based controller for the trim tabs on my boat.



I bought the sensors for the tab position indicators without the electronics and I am trying to figure out how to interface these to a PIC. As seen in the picture the sensor is made up of a steel rod and a coil. There are only two wires coming from the sensor. I have no other information about these. Anyone have any suggestions about how I can figure out what the inductance of this sensor is? Could this be a half-bridge LVDT? The sensor is used to indicate position based on the lenght of rod in the coil.

Kind thanks for any pointers.

Serge

RE: Reverse engineer inductance

Hello ssozonoff, I don't see how it can be an LVDT if there are only two wires.  Four are needed, or three if it has built-in electronics.

Maybe it is a simple inductive sensor.  Of course there are instruments that directly measure the inductance, as for measuring it approximately with simple apparatus I'd have to think about that.  You are most likely going to need a low frequency sine-wave oscillator.

RE: Reverse engineer inductance

(OP)
Hi Pete,

Thanks, I don't think its and LVDT either!! I was just hoping it was winky smile (would have been more accurate I think) I also could have used a simple chip like the AD698 to get a nice anlog signal for my PIC. sigh....

I do have a sine-wave generator built into my Picoscope but I am not sure what the frequency range is. I found a link here which suggests a way of measuring the inductance but I have not tried it.
http://www.sxlist.com/techref/inductor/measure.htm

What do you think?

Thanks,
Serge

RE: Reverse engineer inductance

Serge, sorry about the delay in replying (haven't had my computer on as I'm heavily commited to watching the world cup).

Having looked at the link, yes the method is absolutely correct, though is it easy to automate?  At each sample time, the oscillator has to be varied until the correct voltage is found.  Maybe it could be made simpler - if you feed it with a convenient fixed frequency, you should be able to determine a relationship between voltage (across either the series resistor or the inductor) and displacement.  It probably won't be linear and it may not have great resolution, but it may do the job.  All you need then is an analogue to digital converter for the PIC to read from.

Incidentally, is there a permanent magnet fitted within the sensor you bought?  I ask the question as there is a type of displacement sensor that uses a fixed permanent magnet and a variable airgap (or moving rod, in your case) to provide a varying magnetic flux that causes a variation in the permeability of the core.  A coil is wound around this core, and it's inductance is used to give a position signal.  Not sure about it's advantages over the simple inductance device though.

RE: Reverse engineer inductance

(OP)
Hi Pete,

No worries, I have been following as well. Yesterday was France-Switzerland and living in Switzerland I had to watch, but it was a pretty lousy game I thought.

With regards to my problem at hand. At the moment I am not trying to build the circuit yet to convert the movement into a voltage between 0 and 5v. Below was an idea given to me from on another forum for doing this.

So the idea is: experimentally find the inductance then calculate a sqaure wave output to satisfy .5(period of wave) < di/dt. Then you can use the inductor formula v= L(di/dt) and a full wave rectifier to find an analog voltage that corresponds to the position of the inductor. Find the smallest inductancs of the coil, which would be the inductance without the rod. But that's the hard part.

If I use this idea then my first step is to calculate the actual inductance of the coil without the iron rod. I am also checking with a friend to see if he has access to an LRC meter which might be more accurate and easier than the method mentioned in my previous email.

I don't think there is a permanent magnet fitted inside, but as you can see by the picture I don't have access to much either... I do however keep asking myself why they did not use an LVDT concept which in my opinion would have been more accruate!

Also there are actually 3 wires coming from the sensor but one of them seems to be the shield!

Thanks,
Serge




RE: Reverse engineer inductance

Just a thought.... Why don't you just calibrate the system yourself and not worry about the inductance ie. provide signal, measure, note position(s) of transducer and create a table in you PIC?

RE: Reverse engineer inductance

(OP)
Hi,

Surely I need to do some basic calculations first.
You mention the correct concept but no detail.
I need to figure out the ideal signal to use.
In turn I need to produce a signal which is easy to measure, ideally a volateg in the range 0-5v.

At the moment I don't have anything but the inductor and an iron rod.

Thanks,
Serge

RE: Reverse engineer inductance

If you have visited the link suggested, then you have the basic concept of arriving at an inductance.  You can use the same method to determine linear position.  Apply the frequency to the resistor and inductor and measure the voltage across the resistor while you vary the position of the core of the inductor.

RE: Reverse engineer inductance

(OP)
Hi Clyde,

Agreed and that is the plan of action. The only difference being that to connect to the AD converter of my PIC I need a DC voltage within the range of 0-5v.

Thanks for the input,
Serge

RE: Reverse engineer inductance

Serge,
You can rectify and filter the voltage.  Of course you will pay in accuracy, but you will be "calibrating" the system so it shouldn't be and issue.
Best regards,
Clyde

RE: Reverse engineer inductance

(OP)
Hi Guys,

I did some testing tonight and I am not really sure what I am seeing on the oscilloscope. This does not look exatcly like what I should be seeing according to the reading I have been doing. I have attached 3 pictures showing the inductor without the rod, with the rod inserted 50% and with the rod fully inserted.

Any thoughts?

Thanks,
Serge



RE: Reverse engineer inductance

It looks like a simple inductive device - that's for sure. And you can very easily measure inductivity without using any conversion at all. Arrange a series resistor and a switch transistor - you may even use a 24 mA output on the PIC, if it is available.

Then connect an input to the point where resistor and coil meet. Switch and watch the voltage rise (or fall). It will reach the Vth of the input (usually somewhere between 1 and 2 V) and it is then a simple task to measure the time between switching and threshold. You can do that twice - once switching on and once switching off - and take the mean value of the two. That usually makes things more linear and also reduces temperature sensitivity. The latter is not a big problem with most PICs, the threshold voltage is quite constant with temperature.

Do not forget the free-wheeling diode to avoid inductive kickbacks.

BTW, IKEA land will kill the beer-guzzlers.

Gunnar Englund
www.gke.org

RE: Reverse engineer inductance

(OP)
Hi Gunnar,

Thanks! Thats an interesting idea I had not thought about. Basically I can simply supply 5v DC to the inductor via the transistor, use an output on the PIC to trigger the switch transistor and then measure the time to reach the threshold which I presume I have measured and dialed in before hand.

How would you rate the accuracy of this method vs others?

Basically if I want to make continuous measurements of the position of the rod I need to program a tight loop which repeates the cycle over and over again, right?

Thanks,
Serge

RE: Reverse engineer inductance

(OP)
Gunnar,

One more thing that I don't understand when looking at the scope traces I did. I don't see a consistent threshold voltage reached for each of the three cases. The first one is clear an peaks at just under 300mV but the other never reach that which makes things kind of hard to measure? Also the time of the voltage drop seems to be 1ms for all of them?

Sorry for these newbie questions if I am missing the obvious.

Thanks,
Serge

RE: Reverse engineer inductance

Germany kicked us out of the game...

Anyhow, your circuit: I do not know what signal you are driving your coil with in the pictures shown. It doesn't look like a TTL signal to me, perhaps you are using a 10:1 probe without saying so?

I do not see a 1 ms "voltage drop time". I see three distinctly different time constants. One being around 0.05 ms when rod is out of the coil, one about 0.3 ms when rod half-way in and one around 0,6 (maybe more) when rod fully in.

You have to read up on time constants and inductivity. Then you will understand how to do the measurement.

Gunnar Englund
www.gke.org

RE: Reverse engineer inductance

(OP)
Hi Gunnar,

Yeah and we might get kicked out this evening by Ukraine...

I drove the circuit with a 5v square wave. I think the probe was on 10x by mistake for this measurement...

I have now done some more reading on LR time constants. Basically you are refering to the 1st time constant. You mention in your first post "Vth of the input" because there are 5 time constants. Now I get it.

Instead of the transistor switch I can use an ouput pin on the PIC so supply the signal, right?

With regards to the diodes, what would be a good diode to use for this, or does it not make much difference.

Since I need to ultimately calculate the travel of the rod within the inductive sleeve, will the time to reach the 1st time constant voltage vary linearly with regards to the amount of rod in the core?

In the next couple of days I will attempt to make the circuit and write some code to see if I can get some results. Thanks very much for your input, it has been most useful!

Serge

RE: Reverse engineer inductance

Hi again, Ukraine did that to you? Or not?

The time it takes to get from zero to any voltage is proportional to the time constant - and it looks like your L/R (time constant) is fairly linear with rod position.

You can probably use the PIC output. It depends on what current the coil draws. If it is too much, you need to use a transistor. You can use any small diode (like the 1N4148, aka 914 type).

Gunnar Englund
www.gke.org

RE: Reverse engineer inductance

(OP)
Hi,

Yes, we did get kicked out in the end during the penality kicks. I must say we did a rather poor job getting the ball in the goal!!

Anyway thanks for the info. My last worry is will the A/D on my PIC be quick enough to measure a voltage rise when we are talking about 0.05ms. My understanding is that the A/D's can be a little slow to produce a result? Maybe some PIC's are better than others?

Thanks,
Serge

RE: Reverse engineer inductance

No, you didn't get it!

Use no A/D at all. Count the time from releasing the pulse to the time it crosses the input threshold voltage. Then you will have a very good resolution at no cost at all. If you use a dual polarity technique (letting the pulse go high, measure, then letting it go low and measure) and add the two results, you will get almost no temperature influence.

Gunnar Englund
www.gke.org

RE: Reverse engineer inductance

(OP)
Hmmm, no I guess I am not yet getting it.

Are you saying that I could use a simple input pin on the PIC to measure at which point the pulse reaches the threshold voltage?

This would not work with a Schmitt Trigger input using 5v since the point at which the pin registers as high would be around 4v?

I guess using a non-Schmitt Trigger input the high should be around 2v?

Hmmmm .. off to do some more reading.

Thanks,
Serge

RE: Reverse engineer inductance

It works. I have used that technique in several appliances. Have been measuring thermistors using a simple capacitor. Relative humidity also. And location of core in simple coils as well as inductivity change in magnetostrictive material - makes a very simple and robust force transducer.

Typical cost for adding temperature and humidity "intelligence" to a bath-room fan is something like 10 cents in 1k+ volume (not counting thermistor and RH transducer).
You may have to do some homework before you apply this technique.

Gunnar Englund
www.gke.org

RE: Reverse engineer inductance

(OP)
Hi Gunnar,

I believe you and definately like the simplicity of the solution (KIS), thats why I am quizzing the heck out of you. I am simply very new to all this and trying to learn as much as possible.

So are you using a standard pic input or what?

I am definately trying to do my homework. With a lot of help from people like you of course.

Thanks,
Serge

RE: Reverse engineer inductance

OK, I will try and show you some measurements taken on an actual fan.

The circuit is a PIC output pin driving a capacitance via a thermistor, an RH transducer and a reference resistor. The waveforms look like this:


Maetpuls = measuring pulse.

Sorry, we are already wasting band-width. You have to do some tests on the bench now. Or simulate it.

Gunnar Englund
www.gke.org

RE: Reverse engineer inductance

(OP)
OK,

Thanks for your time and effort.

Serge

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close