I am designing an inductance meter using the LC oscillator concept. The circuit uses an Arduino Uno to measure the pulse duration output from a comparator connected to the LC circuit. The measured frequency is then used to calculate the inductance.
I have two key questions:
Input Pulse Parameters:
I use a digital pulse to excite the oscillations in the LC circuit. Initially, I chose the duty cycle and frequency such that the pulse allows the LC circuit to fully discharge (pulse = LOW) before starting a new oscillation (pulse = HIGH). However, the results were inaccurate. When I used the pulse duration specified in this reference:
the results improved significantly. Could someone explain why this specific pulse duration yields better results? What should be the criteria for choosing the input pulse parameters (duty cycle and frequency)?
2. ADC Sampling Rate Issue:
The Arduino Uno's ADC sampling rate is about 10,000 samples per second, but the shortest pulse duration I need to measure is approximately 41.24 microseconds (4.12425E-05 s). While it does not give me an exact value, the accuracy is good enough for my application. How can the Arduino measure such a short duration without undersampling, or do I misunderstand the process?
pulse = pulseIn(8, HIGH, 5000);
Any insights or suggestions would be greatly appreciated!
Thank you!
Thanks, but i still did not get my questions answered: Input Pulse Parameters:
I use a digital pulse to excite the oscillations in the LC circuit. Initially, I chose the duty cycle and frequency such that the pulse allows the LC circuit to fully discharge (pulse = LOW) before starting a new oscillation (pulse = HIGH). However, the results were inaccurate. When I used the pulse duration specified in this reference I got better results:
digitalWrite(3, HIGH);
delay(5);
digitalWrite(3, LOW);
delayMicroseconds(100);
ADC Sampling Rate Issue:
The Arduino Uno's ADC sampling rate is about 10,000 samples per second, but the shortest pulse duration I need to measure is approximately 41.24 microseconds (4.12425E-05 s). This duration is shorter than the ADC sampling interval. How is the Arduino able to measure such a short duration without undersampling, or do I misunderstand the process?
Did you consider your exciting pulse contains an infinite number of odd multiples of the pulse rate. That is what makes a digital pulse have sharp, square corners.
Many thanks for pointing this out.
Do you have any idea about this:
I use a digital pulse to excite the oscillations in the LC circuit. Initially, I chose the duty cycle and frequency such that the pulse allows the LC circuit to fully discharge (pulse = LOW) before starting a new oscillation (pulse = HIGH). However, the results were inaccurate. When I used the pulse duration specified in this reference I got better results:
The best choice of pulse timing depends on the value of the L and C in the circuit. The design of this inductance meter is not the best, and it will work well only over certain ranges of L and C values.