Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Guitar Audio Filter For Frequency Detection

Status
Not open for further replies.
I'm checking it out, it looks a little confusing though.. when you auto-route does it actually know how to connect the power and ground to ICs 'cause in the schematic phase there are no power connection options.

I just sampled with 2 tl074's, when I auto-routed, it automatically connected both IC's grounds and VCCs together but did not connect them to the power supply.

In the schematic, you need to click the "Invoke" button, then click the IC symbol in question. You will then get a popup asking you to specify the gates you wish to add. Select "Power". This should give you a small symbol representing the Vcc and GND for the part which you can place as you like. Don't worry that it is not visibly connected to the part on the schematic; Eagle knows what is going on and it'll be connected properly in the board editor.

Make sense?


Torben
 
PIC Basic Pro

Here is the latest version of the filter. As of now my Vpp of output signal is 1.1V . Any ideas as to why? Is there a problem with the design or my actual circuit? Will 1.1Vpp adversely affect my PIC from reading in the frequency?

Can anyone help me out with timer and RTI modules for a PIC controller (I will need RTI for frequency detection, right?) using PIC Basic Pro? I'm using a 16F877 to detect rising edges of my square wave output, start a count with first edge detected and stop on the 5th and reverse the average period to get fundamental frequency.

How do you set the timer and rti modules in PIC Basic? How do you read the timer and rti modules?

Some .bas code examples or pseudo code will be greatly appreciated.

Thanks in advance,
 

Attachments

  • Fundamental Frequency Square Wave Generator.jpg
    Fundamental Frequency Square Wave Generator.jpg
    80.2 KB · Views: 876
Here is the latest version of the filter. As of now my Vpp of output signal is 1.1V . Any ideas as to why? Is there a problem with the design or my actual circuit? Will 1.1Vpp adversely affect my PIC from reading in the frequency?

hi,
With no signal on the input, what dc voltage level is measured on the output.?
 
Floating Input => VDC of Output = 2.54V
Floating Input => VAC of Output = 2.35V

Grounded Input => VDC of Output = 1.54V
Grounded Input => VAC of Output = 0V
 
Floating Input => VDC of Output = 2.54V
Floating Input => VAC of Output = 2.35V

Grounded Input => VDC of Output = 1.54V
Grounded Input => VAC of Output = 0V


hi,
The grounded input, giving those output values seems odd.!
Are you sure the system isnt unstable ie; oscillating.?

Is the 1.1Vpk signal you posted earlier superimposed on the 2.54Vdc.?

You should have the Vinput connected, with the Vin set to zero, when you take these measurements...
Remember its a high input impedance opa.
 
Last edited:
I think the circuit is on a breadboard with long wires all over the place acting like antennas to pickup mains hum.
And/or the input cable is not shielded audio cable.

When the input is shorted then the output is normally low (or if the input offset voltage was different then it would be normally high at about 7.8V). The output should switch from 1.4V to 7.8V when there is a signal. it needs to be attenuated so its max voltage is 5V.
 
First of all, here is how I am testing my circuit:
I'm using a software oscilloscope with coaxial cables running as scopes.

I'm using a repeating strum of low E string as my testing input recorded and played through the same computer.

Secondly, odd stuff:
When I connect the scope directly to the recording, the oscilloscope shows a close-to-square wave presentation of the sound.

I can not get the proper square wave anymore, every time string is plucked i get twice the frequency (at the beginning of each strum, this could be normal and be eliminated through software)

When there is nothing connected to the input, here is the output I get. (shifting/moving)

When the cable from the pc is connected to the input but nothing is played through the soundcard, here is the output I get.(shifting/moving)

Is the 1.1Vpk signal you posted earlier superimposed on the 2.54Vdc.?
What do you mean by superimposed?

You should have the Vinput connected, with the Vin set to zero, when you take these measurements...
Remember its a high input impedance opa.
You mean Vin set to 0 on oscilloscope settings?

I think the circuit is on a breadboard with long wires all over the place acting like antennas to pickup mains hum.
And/or the input cable is not shielded audio cable.

Yes, the circuit is on a brand new noiseless breadboard.
Yes, there are a lot of wires running over the breadboard, the longest is about 13cm.
Input cable is coaxial.

When the input is shorted then the output is normally low (or if the input offset voltage was different then it would be normally high at about 7.8V). The output should switch from 1.4V to 7.8V when there is a signal. it needs to be attenuated so its max voltage is 5V.

I do not understand very clearly what you mean here. Can you expand on it?
 

Attachments

  • no input.JPG
    no input.JPG
    106.4 KB · Views: 369
  • static input.JPG
    static input.JPG
    106.4 KB · Views: 282
I think the circuit oscillates without an input because the 9V battery does not have a big (1000uF) bypass capacitor to keep the voltage fairly constant.

If the battery is brand new then the voltage is 9.0V and the max output (unloaded) from the TL074 is 7.8V. The minimum voltage is about 1.4V.

The frequency is doubled probably because the signal exceeds the negative common-mode input voltage range of the TL074 at about 2.5V. Then the output suddently inverts. It is called opamp phase inversion and it happesns with older FET-input opamps.
 

Attachments

  • opamp phase inversion.PNG
    opamp phase inversion.PNG
    15.3 KB · Views: 240
One source of feedback is the Vcc/2 supply at R6 and R7. You have a spare stage of TL074, use one of them to create a low impedance reference.
 
I also don't like to see the high impedance bias circuit.
Instead of an opamp I think R6 and R7 should be 3.3k and C8 should be 330uF.
 
I also don't like to see the high impedance bias circuit.
Instead of an opamp I think R6 and R7 should be 3.3k and C8 should be 330uF.

What's the reason for these specific values? Will the bias circuit have any filtering effect?:eek: Wouldn't just lower resistance dividers and a higher value bypass capacitor do fine? Is there a final value that I should achieve here or a ratio between the dividers and the bypass?
 
What's the reason for these specific values? Will the bias circuit have any filtering effect?:eek: Wouldn't just lower resistance dividers and a higher value bypass capacitor do fine? Is there a final value that I should achieve here or a ratio between the dividers and the bypass?
hi,

'agu' is referring to the 1MΩ's R6/7.
Change them to 3K3.
The purpose of the two equal resistors is divide the +Vsupply, so the opa's are biassed to give a 'static' output from the opa's of Vsupply/2.

This in theory should enable the opa's outputs to swing symmetrically about Vsupply/2.

Do you follow OK.?:)

EDIT: If as 'agu' states the minimum voltage of the TL074 is +1.4V, this is not suitable to connect to a PIC's digital pin also
the positive swing of +7.8V is too high for the PIC input
 
Last edited:
hi,

'agu' is referring to the 1MΩ's R6/7.
Change them to 3K3.
The purpose of the two equal resistors is divide the +Vsupply, so the opa's are biassed to give a 'static' output from the opa's of Vsupply/2.

This in theory should enable the opa's outputs to swing symmetrically about Vsupply/2.

Do you follow OK.?:)

Yeah, I do know that part.. I meant to ask if there is a R*C or R/C value that I am supposed to keep constant.

For example what if i used, 2k2's and 2uF?

And it doesn't make sense to me either how I could have VDC of output at 1.54V when I have a grounded input and I'm pulling up the signal with 4.5V...

I think the circuit oscillates without an input because the 9V battery does not have a big (1000uF) bypass capacitor to keep the voltage fairly constant.

If the battery is brand new then the voltage is 9.0V and the max output (unloaded) from the TL074 is 7.8V. The minimum voltage is about 1.4V.

The frequency is doubled probably because the signal exceeds the negative common-mode input voltage range of the TL074 at about 2.5V. Then the output suddently inverts. It is called opamp phase inversion and it happesns with older FET-input opamps.

I'm using a 12VDC power supply regulated to 9V. here is the regulator i use. srry, dont have the LM7809 pspice model...

I had a clean square wave before, why am i getting phase inversion now? what's a practical way to fix this problem?
 

Attachments

  • Regulator.jpg
    Regulator.jpg
    23.5 KB · Views: 363
Last edited:
Yeah, I do know that part.. I meant to ask if there is a R*C or R/C value that I am supposed to keep constant.

For example what if i used, 2k2's and 2uF?
Thats OK, The time constant isnt that critical, the cap is for decoupling

And it doesn't make sense to me either how I could have VDC of output at 1.54V when I have a grounded input and I'm pulling up the signal with 4.5V...
Its a limitation of the TL074

btw here is the regulator i use. srry, dont have the LM7809 pspice model...

hi,
I dont use Spice.:eek:

What voltage source is driving the 7809.?
 
Last edited:
hi,
Is this what you asked for in the PM.?
 

Attachments

  • esp02 Jul. 22.gif
    esp02 Jul. 22.gif
    4 KB · Views: 250
I guess that makes my regulator setup pretty futile...

this setup might help me get rid of the oscillations.. (I'm guessing due to the higher number of capacitors)

thanks eric
 
Last edited:
The original bias divider was two 1M resistors (500k in parallel) with a 1uF filter. Its time constant was 0.5 seconds which makes it a good filter if it wasn't loaded.

I calculated two 3.3k resistors in series which draw 1.4mA the same as an opamp and I selected 330uF as a filter cap which creates a time constant of 0.54 seconds.

The output of the TL074 has phase inversion when its input voltage drops to less than about 2.5V because the input signal level is too high.
Try an LM324 quad opamp (same pin numbers). It doesn't have phase inversion.
 
The reason I suggested the buffered reference is that the power supply was 9V. That often means that the power source is a 9V battery, and current drain might be important.
 
The reason I suggested the buffered reference is that the power supply was 9V. That often means that the power source is a 9V battery, and current drain might be important.
My suggestion of using two 3.3k resistors and a 330uf filter does the same.
 
LM324 Noise

Is LM324 low noise though? The advantage is that this IC has no phase inversion, will there be a disadvantage when replacing it for the TL074?
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top