Linear Logrithmic voltage to Frequency

In summary: Glad to hear it's working well for you. :thumbsup:It's always fun to work on that "aha" project that solves a problem that's been bugging you for a while. :cool:In summary, the conversation is about a person seeking help with improving and speeding up the calibration time for a circuit they designed to fix the scaling drift on 1970's synthesizers. They have a system that works by sending out an increasing voltage and measuring the audio frequency until it finds a predetermined frequency, and then rescaling the voltages using a linear calculation. They are now trying to find an equation that will calculate the necessary DAC value to achieve a specified frequency, using only two sample values they have collected.
  • #1
MM2758
5
0
hi everyone

My first post here and I'm hoping someone might be able to help me. Unfortunately my Math skills are pretty bad having not had much of an education some 45 years ago. But hey I'm trying to change that …better late than never.

I'm trying to keep this short you can skip the next bit if you want

I have designed and electrical circuit (also learning) to help rectify the scaling drift on 1970's synthesizers.
These synthesizers were controlled on the principal of sending a voltage to them to control the pitch. The standard being 1 volt per octave. So each note up would be an increase of 0.083 volts. The system I have designed rectifies for when components and circuits were not so accurate and some synthesizers might be let's say 1.023 volts per octave. This is commonly referred to as the "scaling is out". Anyway I have a system that works fine. Basically it sends out an increasing voltage (using a Digital to Analog Converter DAC) and measures the audio frequency from the synthesizer till it finds a predetermined frequency (55 hz) it then stores the value from the DAC. It then keeps on increasing the voltage till it finds a DAC value for another predetermined frequency (1760 hz). and then stores its value. With these 2 values its a pretty simple linear calculation to rescale the voltages. and then using a system called MIDI have the circuit redefine a new voltage based on the new scale thus putting the synthesizer in tune.

I'm trying to improve and speed up the calibration time by instead of increasing the voltage , send out a voltage via the DAC let's say DAC = 18000 = 2.69v and then take a frequency reading which on the attached example chart is 143.35 hz
Then do the same again let's say DAC = 27000 = 4.06v and then take a frequency reading which on the attached example chart is 371.50 hz

What i want to be able to do is have a equation that will calculate for example what value on the DAC is required to get a frequency reading of let's say 100 hz , using only the two sample values i have collected DAC = 18000 = 143.35hz and DAC = 27000 = 371.50hz. I know the frequency is logarithmic compared to the DAC value. And I know that for this synthesizer each 1000 increase in the DAC equates to a frequency rise of about 11.172 % , but for the life of me I have no idea or direction on how to work out the DAC value for a specified frequency, and I'm hoping some one might spare the time to point me in the right direction.

If you got this far thanks for reading

I have attached the chart

thank you

ps sorry my english is pretty bad as well
 

Attachments

  • chart.jpg
    chart.jpg
    30.7 KB · Views: 754
Mathematics news on Phys.org
  • #2
Welcome to the PF.

(Your English is fine, BTW) :smile:

Check your PMs -- send me an e-mail with the source Excel file so I can take a quick look at it.

BTW, is the function from DAC code to voltage output pretty precise? Do you already have an equation for that part of the conversion?
 
  • #3
I got the Excel file. The output voltage appears pretty linear with DAC code, and the frequency is exponential with DAC code. So taking the log(Freq) gives a pretty linear relationship with the DAC code.

I'll try to spend a little time this afternoon figuring out the equation that relates the DAC code to the frequency -- it should be a pretty simple equation.
 
  • #4
So the DAC output is pretty linear with a zero offset (the top graph in the attachment), so the equation is simply:

[tex]V_{out} = \frac{6.65V}{44000} * CODE[/tex]

Where CODE is the DAC Value.

And the log of the frequency output is linear with the DAC CODE (the bottom graph), with a non-zero frequency when the DAC CODE = 0. Since the plot is linear, it can be expressed in the format y = mx + b, where m is the slope of the line, and b is the "y-intercept" of the line.

So in terms of your variables:

[tex]log(Freq) = f(CODE) = m * CODE + b[/tex]

[tex]log(Freq) = f(CODE) = \frac{P_{1y}-P_{2y}}{P_{1x}-P_{2x}} * CODE + b[/tex]

Where P_1x = 44000, P_2x = 9000

And P_1y = log(Freq_P1), P_2y = log(Freq_P2)

I'll need to get back to you with the y-intercept formula, unless somebody else wants to post it, or you can figure it out. I need to get back to my regular work for a bit...

Hope this is helping. :smile:
 

Attachments

  • DAC to Freq Plots.pdf
    338.5 KB · Views: 253
  • #6
BTW, if you output zero volts from your DAC (DAC CODE = 0), does that give you the y-intercept frequency? That is, does the linear CODE-to-log(Freq) relationship hold all the way to 0V? That may be the easiest way for you to get the value of b for the equation.

If log(Freq) is not linear all the way down to 0V, then we still need to calculate b.
 
  • #7
yes the relationship holds all the way to 0v as the circuit inside the synth is linear.

getting on well here got it working in the arduino just crunching the data and testing various scenarios ....thank you
 
  • #8
Sweet! :smile:
 

1. What is linear logarithmic voltage to frequency conversion?

Linear logarithmic voltage to frequency conversion is a method used to convert a linear voltage signal into a frequency signal that increases logarithmically. This conversion is often used in electronic circuits and instruments to measure and control the frequency of a signal.

2. How does linear logarithmic voltage to frequency conversion work?

In this conversion, the input voltage signal is first passed through a logarithmic amplifier, which compresses the linear voltage signal into a logarithmic scale. This logarithmic signal is then used to control the frequency of a voltage-controlled oscillator (VCO), which produces an output signal with a frequency that varies logarithmically with the input voltage.

3. What is the purpose of using linear logarithmic voltage to frequency conversion?

The main purpose of using this conversion is to accurately measure and control the frequency of a signal that is too high or too low to be directly measured. By converting the linear voltage signal into a logarithmic frequency signal, a wider range of frequencies can be measured and controlled with higher precision.

4. What are the advantages of using linear logarithmic voltage to frequency conversion?

One of the main advantages of this conversion is that it allows for a wider range of frequencies to be measured and controlled with high accuracy. It also eliminates the need for complex and expensive frequency measurement equipment, making it a cost-effective solution for frequency measurement and control.

5. Are there any limitations to using linear logarithmic voltage to frequency conversion?

One limitation of this conversion is that it is not suitable for measuring or controlling signals with very low frequencies or DC signals. Additionally, the accuracy of the conversion may be affected by external factors such as temperature and noise, so proper calibration and shielding may be necessary for optimal performance.

Similar threads

  • Electrical Engineering
Replies
1
Views
474
  • Electrical Engineering
Replies
7
Views
3K
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
898
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Electrical Engineering
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
0
Views
523
Replies
1
Views
1K
Back
Top