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.
Your filters are not correct. A Butterworth filter has a flat response then a drop off as sharp as the number of poles. Your filters are not Butterworth and have only two poles.

A second order filter has two poles and drops off at the rate of 12dB per octave.

Your lowpass filter has capacitor values ratio that causes a peak at about 400hz instead of a flat response. For an opamp with a gain of 1 the capacitor ratio should be 2:1 for a Butterworth flat response.

Your highpass filter has a droopy cutoff since its resistors do not have the 2:1 ratio needed for a Butterworth flat response. The 1uf capacitors are huge and expensive and could be smaller and less expensive if the resistors have higher values.

The TL084 has noise. The TL074 is low noise and costs the same. They have a minimum supply voltage of 7V so your 5V supply is too low.

You have two bias voltage circuits when only one is needed. The junction of the three 1M resistors should have a 1uF filter capacitor to ground. The resistir in the highpass filter must connect to the bias voltage, not to ground.

The input capacitor cuts frequencies below about 80Hz and should be 0.022uF (22nF).

Here is how the filters should be:
 

Attachments

  • guitar filters.PNG
    guitar filters.PNG
    5.6 KB · Views: 321
First of all thanks for your fixes.. they do feel like a slap in the face sometimes but if it helps me learn something then it's good...;)

So is my low-pass a second order unity gain filter? and with your mods it has a butterworth response? Is it a general rule to have the 2:1 ratio in butterworth? I thought the greater the ratio the flatter response and sharper curve at the end.

You mean to replace the 10nF named C5 to 22nF i assume? My circuit needs to analyze Drop D and Flat D tunings which should be closer to 50Hz. So I do not wanna block sub-80Hz frequencies. That's what you did refer to as input capacitor though right?

Should I bias with 3.5V now that I'm gonna be using TL074's? I have a vague memory that opamps referenced voltages of their own supplies? Will that be a better adjustment?

Why do I need to bias the high pass filter? Won't the amplified signal have enough input to drive the IC?
 
Last edited:
So is my low-pass a second order unity gain filter? and with your mods it has a butterworth response? Is it a general rule to have the 2:1 ratio in butterworth? I thought the greater the ratio the flatter response and sharper curve at the end.
The ratio of the capacitor values in an active filter determines the sharpness of its corner:
1) With equal values then it has a droopy cutoff. It has a Bessel response.
2) With 2:1 capacitor volues then the negative feedback boosts the corner and makes it a sharp Butterworth response. A Bessel filter (equal values) with a gain of 1.6 is the same.
3) With a ratio higher than 2:1 or a Bessel filter with a gain higher than 1.6 then there is a peak in the response. A Bessel filter oscillates at the peak if the gain is higher than 3.

You mean to replace the 10nF named C5 to 22nF i assume? My circuit needs to analyze Drop D and Flat D tunings which should be closer to 50Hz. So I do not wanna block sub-80Hz frequencies. That's what you did refer to as input capacitor though right?
Yes.
But my highpass filter has a cutoff frequency of 50Hz. Change its 220nF capacitors to 270nF for a 41Hz cutoff or to 330nF for a 33Hz cutoff.

Should I bias with 3.5V now that I'm gonna be using TL074's? I have a vague memory that opamps referenced voltages of their own supplies? Will that be a better adjustment?
Bias the inputs of the opamps at half the supply voltage. 7V is an unusual supply voltage so use 9V, 10V or 12V. A 9V battery will be above 7V for 1/5th of its life.

Why do I need to bias the high pass filter? Won't the amplified signal have enough input to drive the IC?
The input bias voltage of an opamp that has a single supply is half the supply voltage.
The minimum useable input voltage of most opamps is 2V to 3V when there is a single supply. Then the opamp works like a rectifier because its output cannot produce the negative-going swing of the signal.
 
Last edited:
Power Problem

I moved my circuit to a new protoboard (seems less noisy). I have a 5V rail driving the LCD/PIC and a 9V rail for the dual TL074 filter. Both rails are powered by an adjustable-voltage DC power source at 12V.

The 5V side of the protoboard functions as intended when plugged in alone, the LCD is bright and the menu is fully functional. But when I plug in the power to 9V rail as well I lose the display on the LCD, and can not be sure if the PIC is functioning properly without that interface.

Is it possible that the 9V side of the protoboard drawing so much current that the power source can not deliver?
 
I moved my circuit to a new protoboard (seems less noisy). I have a 5V rail driving the LCD/PIC and a 9V rail for the dual TL074 filter. Both rails are powered by an adjustable-voltage DC power source at 12V.

The 5V side of the protoboard functions as intended when plugged in alone, the LCD is bright and the menu is fully functional. But when I plug in the power to 9V rail as well I lose the display on the LCD, and can not be sure if the PIC is functioning properly without that interface.

Is it possible that the 9V side of the protoboard drawing so much current that the power source can not deliver?

hi,
What happens when you plug in the supply for the filters [9v] without the LCD [5v].

Have you checked for any shorts on the filter circuit.

Whats the current rating of the psu.?
 
The 9V side of the circuit board is still in test phase, so I can not guarantee that it works on its own without the 5V rail powered up.

I have not noticed any shorts yet, although it's always a possibility - the filter(9V) side is very chaotic and crowded. I do get a complete circuit beep when I check between the +/- of the 9V rail, but I thought that is probably because of the voltage dividers right? Or i should not get a complete circuit when I test them?

I don't know the current rating of the PSU yet, it might be low - it was inexpensive. I'll have check when I get home.

The thing is no matter how cheap the PSU is; if this circuit can not be fed enough witha wall plug-in psu, can it at all be possible to feed it with a 9V battery?

This project is still incomplete. I still have to add a controller for 6 microservos. Not that all of them will draw current at the same time but PIC+LCD+filters(quad opamp)+ high input impedance amp (1 opamp)+1 servo will have to be powered all at once through most of the process.

All my digital, analog and psu grounds are common as well - which I think is the right thing to do-, you think that could be a problem?
 
Last edited:
hi,
Some plug in psu's are of a low spec and unregulated

If you get a 12Vdc regulated wall plug, say current rated at 500mA to 1000mA that would cover most small projects.
They are not expensive.:)

Use linear regs, 7809 for the +9V
[ have you checked your circuit to see if a +12V would be OK, instead of +9V .?]
and say a 7805 for the +5V logic.
 
I'm already using LM7809 and LM7805 to regulate my power rails. The voltage dividers are for the bias voltage input to opamps.

The real question is would a 9V battery be able to support this circuit? If so, for how long?
 
I'm already using LM7809 and LM7805 to regulate my power rails. The voltage dividers are for the bias voltage input to opamps.

The real question is would a 9V battery be able to support this circuit? If so, for how long?

Thats a tough question.:)

As you know batteries have a specified AHr capacity, depending upon the battery type.
Not knowing the average current required by your circuit it would be hard to say.

Other factors are the battery voltage when its on load, maybe less than 9V.. you have to consider the overhead voltage required by the 7805 reg. Also how long at any one session the battery is being used will affect its life.

Batteries are not cheap and when you consider you may want to use this for a long time,
a mains psu would be a good investment.
 
Last edited:
But this is supposed to be implemented into the body of a guitar.. ::cry::

Damn.. I don't even have a fully functional circuit yet and already planning how to implement phantom power...

bummer:(
 
But this is supposed to be implemented into the body of a guitar.. ::cry::

Damn.. I don't even have a fully functional circuit yet and already planning how to implement phantom power...

bummer:(

hi
You could get a battery holder, for say 'AA' rechargeables, make up the required voltage.

Or get a bigger guitar....:D:rolleyes:

EDIT: read your PM.

The best way is use a DVM , on a current range and measure the actual current taken by the 9V.
You need to know this anyway for the battery question.
 
Last edited:
ok.. well, another question what's an easy software for creating PCB's? Something that has most of the IC models in the default library?
 
ok.. well, another question what's an easy software for creating PCB's? Something that has most of the IC models in the default library?

hi,

A lot of members use Eagle.



free lite version:
 
Last edited:
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.
 
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.
hi,
I dont use Eagle.

IIRC 3v0 and atomsoft are into Eagle, they may be your best advisors.:)
 
A 7809 has a supply current of typically 4.3mA or 8mA max.
A TL074 has a supply current of typically 5.6mA or 10mA max.
The total current is next to nothing.
You have something that is shorting the 9V supply.
 
I have not noticed any shorts yet, although it's always a possibility - the filter(9V) side is very chaotic and crowded. I do get a complete circuit beep when I check between the +/- of the 9V rail, but I thought that is probably because of the voltage dividers right? Or i should not get a complete circuit when I test them?

You're most probably right, i shouldn't get a bleeping sound there, right? (considering I'm using 1M resistors there - nothing close to a short circuit value)
 
Last edited:
woot!!

Can I get a "woot woot!" for the square wave output?

Now should I feed this into the PIC or should I use LM2907 to convert this to voltage then feed it to PIC's ADC?

btw the wave has 1.1 V amplitude.
 

Attachments

  • square-output.JPG
    square-output.JPG
    106.2 KB · Views: 341
Don't use an LM2907 inaccurate tachometer IC to convert frequency to a voltage. Use the micro-controller as an accurate frequency detector and indicator.

The output of the comparator should be 5V p-p not 1.1V.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top