RL circuit parameters.

I am trying to measure unknown inductance using arduino and series RL circuit by sending a square wave. I am confused if I keep the same frequency and resistance constant, there will some potential difference across inductor irrespective of its value, I intend to use that potential difference (irrespective of the circuit is resonating or not) to find the value of inductor, will that inductance and potential difference across it vary linearly? how precise can the values be? can it vary by some factor I am not taking into consideration due to which I won't be able to calculate the value of inductance?

I have not drawn out a circuit out till now just trying to learn a few concepts using experimenting
The most widely used way I found to measure inductance using arduino was using a LC circuit, but I am trying to find it using RL circuit which I feel can be more promising,
So the probable ways to measure are

  1. regulate frequency so that we measure potential difference across resistor until it becomes equal to potential difference across inductor so the circuit resonates and we find precise time constant with further mathematics figuring out inductance
  2. the second was to regulate resistance to find the circuit resonating
    3)So, if we keep both of them (frequency and resistance) constant, will inductance and potential difference across inductor vary linearly?
  3. also there is one more way of passing a constant high and measuring time constant directly using hall sensor, but I am not sure if that can work either?

Is sine wave compulsory in such circuit where inductor is used?
Are there any chances that a series resistive and inductive load respectively between arduino pin and ground may damage the arduino, due to inductive kickback or something? (I guess we can manage inductive kickback by maintaining off period of the cycle, right?)
Are there other ways to measure unknown inductance using arduino?

The characteristic voltage response of an RL circuit is described and plotted under "Time Domain Characteristics" here. One could monitor the voltage vs time across the inductor relative to a voltage step and calculate the value of the inductor. The range of useful inductance values that can be measured is probably limited in practice.

The inductor will produce a negative voltage spike on the falling edge of the input square wave so any circuitry connected there would have to either tolerate that or be protected by a flyback diode.

Here's a simulation of the RL circuit without flyback diode. The red trace is a 5V square wave and the green trace is the voltage across the inductor:

The equation for an inductor is e = L (di/dt) which is linear.
You will want to measure the voltage across the series (current
sensing) resistor so as not to influence the value of the inductor.
Any resonance in an LR circuit is the self resonance of the
inductor and is of no use to you.
Herb

You can use the arduino analog inputs in differential mode.
A0 = signal input to RL circuit
A1 = bottom of 10k resistor where it connects to inductor

Measure A0 store as variable
Measure A1 store as variable
Voltage = (A0-A1) store as measurement. (this can be done later after collecting data or before next
measurement)

MEASURING INDUCTANCE

MEASURING INDUCTANCE-2

Yes you have the problem that a square wave form contains a lot of harmonics ( 1/3, 1/5 etc) , so the resulting voltage drop is not easy to interpret .
You need a sine wave or a different method .

Bear in mind too that any inductor won’t be “ ideal” and may have significant resistance.

hammy:
Yes you have the problem that a square wave form contains a lot of harmonics ( 1/3, 1/5 etc) , so the resulting voltage drop is not easy to interpret .
You need a sine wave or a different method .

Bear in mind too that any inductor won’t be “ ideal” and may have significant resistance.

Why is a common exponential function difficult to interpret? If I was determined to do it this way, I would just calculate the time between the square wave transition, and the time when the inductor voltage has reached some convenient threshold. The rest is just math, and we have a microprocessor to do that.

RL circuits don't resonate unless there's significant stray capacitance involved. All inductors have significant resistance too, which you will have to correct for at lower frequencies.

Inductors are non-linear, so you have to be consistance about the voltage or current level when comparing
inductors. Many inductors vary markedly with frequency and temperature and DC offset too.

Precision is conditional upon these effects.

Can’t seem to do quote from my phone , but anyway .

aarg : yes you could do that -I may have interpreted it wrongly when the IP mentioned using a “square wave” .