VU Bass lights opamp and lm3914 and square wave pwm input for arduino

 

lm324111ANOTHER WAY TO BIAS A MIC

A SIMPLE LOW PASS FILTER WITH A CUT OFF FREQUENCY (CORNER FREQUENCY) OF 159HZ WHICH WILL CUT OUT MID RANGE AND TREBLE FREQUENCIES, ONLY ALLOWING THE BASS FREQUENCIES THROUGH, WHEN CONNECTED TO THE LM3914 VOLTAGE LEVEL METER, THE 10 STEP LEDS WILL RESPOND MAINLY TO THE BASS  SOUND OF THE AUDIO.  SO IT ACTS LIKE A VOLTAGE UNIT (VU) METER WHICH REPRESENTS THE SIGNAL LEVELS .  THIS IS AN EXPERIMENTAL CIRCUIT AND VALUES MAY HAVE TO BE CHANGED TO SUIT EQUIPMENT USED.

PLEASE NOTE (LM324 OP-AMP NOT ON LED LABS BOARD) CAN BE USED ON BREADBOARD.

frequency-bands

 

 

 

rc1111

 

 

 

 

THE EQUATION IS AS SHOWN  ABOVE    FC = 1/6.28.R.C

WE WANT TO MAKE R THE SUBJECT OF THE FORMULA, IN ORDER TO WORK A VALUE OUT FOR THE RESISTOR.

SO RE-ARRANGING BY SWINGING THE R AND THE FC  ACROSS THE EQUALS GIVES    R = 1/6.28.FC.C

WE KNOW WHAT FC (CUT OFF FREQUENCY) IS 160HZ, LOOKING AT THE CHART ABOVE.   ALSO CHOOSING A VALUE FOR C, SAY 100NF.
R = 1/6.28 X 160 X .0000001 = 10K (NEARLY).  WHICH WHEN WORKED OUT WITH THESE VALUES, WITHOUT RE-ARRANGING THE EQUATION THE CUT OFF IS CLOSER TO 159.2HZ.
IN PRACTICE BECAUSE FILTERS ARE NOT PERFECT SOME OF THE LOWER MID RANGE WILL GET THROUGH, AT A LOWER AMPLITUDE, BECAUSE OF COMPONENT REACTION TIMES ETC, THIS CIRCUIT ROLLS OFF AT 20 Db A DECADE, THAT IS EVERY FACTOR OF 10 OF FREQUENCY ABOVE THE CUT OFF, THE AMPLITUDE DROPS AT 20Db TOO. AT THE CUT OFF FREQUENCY IT LOOSES -3Db WHICH IS ( 0.707 TIMES THE VOLTAGE) .AND IS NO LONGER GOING THROUGH A UNITY GAIN. TO GET A STEEPER ROLL OFF FOR SOME CRITICAL CIRCUITS, A 2ND TO ..NTH ORDER ARE USED, BY CASCADING, AND MAYBE ALSO MIXED WITH DIFFERENT TYPES OF FILTER DESIGN AND THEN THE RESULTING SIGNALS ARE SUMMED TOGETHER WHICH RESULTS IN HARMONIC CANCELLATION,TO ACHIEVE STEEPER ROLL OFF AND GOOD ATTENUATION OF THE FREQUENCIES NOT WANTED.

ANOTHER CIRCUIT, THIS TIME USING A 2 PIN ELECTRET MICROPHONE, THE BIASING ON THESE CAN BE DIFFICULT, AND EXPERIMENTAL WITHOUT ANY DATA SHEETS.
THIS WORKED OKAY FOR A MIC CHOSEN AFTER A BIT OF ADJUSTING VALUES. SEE ABOVE DIAGRAM, ALTHOUGH A 33K RESISTOR WILL BE BETTER IN THE MIC CIRCUIT THAN THE 39K AND VARIABLE USED, TO GIVE A BIT MORE SENSITIVITY TO THE OP-AMP CIRCUIT ALREADY CONFIGURED..
FIRSTLY IT REQUIRES BIASING TO CREATE A VOLTAGE DIVIDER, GENERALLY  BECAUSE THE MIC REQUIRES A POWER SOURCE, DC IS PRESENT ON THE SIGNAL SO THIS DC WILL APPEAR AT THE OUT PUT SO A DC BLOCKING CAPACITOR IS USUALLY USED IN SERIES WITH THE MICROPHONE TO BLOCK THE DC CONTENT AND ALLOW JUST THE AC. BUT NOT USED IN THIS CIRCUIT. THIS DC VOLTAGE THOUGH IN THIS CIRCUIT IS GOOD FOR THE COMPARATOR, SO IT GENERALLY RIDES ABOVE 2 VOLTS WITH THE AC MIC VOLTAGE RIDING ON THIS. SO VREF SET FOR JUST BELOW 2 VOLTS. ADD A LED AND 1K RESISTOR TO GROUND ON THE COMPARATOR OUTPUT, SO WHEN VREF IS ADJUSTED IT TURN ON AND OFF .  BLOWING THE MIC SHOULD SWITCH ON LED WHEN VREF ADJUSTED CORRECTLY . THE VREF IS A BIT JUMPY DUE TO RESOLUTION,AS IT SWINGS FROM 5V TO 0V A CURE FOR THIS, IS TO CREATE A SMALL WINDOW OF VOLTAGE, THESE WORK WELL, FOR ABOVE CIRCUIT, WIRE A 3K3 FROM POSITIVE, THROUGH THE 1K POTENTIAL DIVIDER OUTER CONNECTOR, TO A 1K5 THEN TO GROUND. THEN CONNECT WIPER OF 1K POTENTIOMETER  TO COMPARATOR. THIS ALLOWS THE POTENTIAL DIVIDER TO SWEEP APPROX 1V EITHER SIDE OF THE DESIRED AROUND 2VOLTS., INSTEAD OF SWEEPING THE FULL 5V TO 0V, THIS IMPROVES RESOLUTION.

AS A HIGH VALUE BIASING RESISTOR HAS BEEN USED 33K, A SMALLER VOLTAGE DROP IS REALISED ACROSS THE MIC AROUND 300MV, SO SOME GAIN IS LOST, DUE TO THE LOW VOLTAGE, BUT IS MADE UP FROM THE VOLTAGE GAIN OF THE OP-AMP, WHICH HAS A GAIN OF 10 WITH THE 9K1, OR 12 WITH A 12K, AS FOR NON INVERTING AMPLIFIER THE EQUATION IS GAIN=1+ RF/RIN.

IF A LOWER VALUE RESISTOR IS USED FOR MIC IT PLACES MORE VOLTAGE ON THE MIC AND THEN MAYBE ANOTHER OP AMP CONFIGURATION WOULD BE USED TO CATER FOR THIS. MOST SMALL ELECTRETS USE REQUIRE NO MORE THAN 500UA (MICRO-AMPS) SO FROM SPEC SHEETS  IF A MIC REQUIRES 2V AND 500uA TO RUN THE EQUATION VS (SUPPLY VOLTAGE) – MIC VOLTAGE/ MIC CURRENT EG 5-2/.0005 = R= 6K FOR THE RESISTOR. HOWEVER THEY CAN RUN AT A LOT LOWER CURRENT AND VOLTAGE THAN THIS, AS THE ABOVE SHOWS, IT IS WORKING ON 300MV FOR THE MIC VOLTAGE AND 159uA CURRENT WITH THE RESISTOR 30K OR THEREABOUTS, WHICH EVER METHOD  USED THE VOLTAGE FROM THESE MICS ARE SO SMALL MICRO VOLTS USUALLY

NO COUPLING CAPACITOR HAS BEEN USED AFTER THE MIC,  IN THIS CIRCUIT,   AS NOT REALLY REQUIRED FOR THIS.

This value of resistor 33k allows a small voltage drop across the mic which is around 200mv up to 350mv when blowing in to the mic,  a smaller value say 10k would bias the mic  to around 2+ volts, but this value of resistor suits the rest of the circuit as it has a voltage gain of 10 appearing at the output of op-amp 1. leds with a 1k resistor can be inserted to the outputs of each op-amp to ground, and would show the trigger points for bass. It can also be fine tuned more, by finding exactly the good sensitive point, for example if 33k, then replacing with a 30k resistor and a 4k7 to 5k variable, so it can swing from 30k to 35k, and makes the resolution easier to control. And similarly for vref of next op-amp wired as a comparator, example if 2.5v is required to force the comparator to snap positive, a potential divider with a large carbon track will be easier to control than a small preset because of the larger carbon track, so is easier to set with more resolution.  Sometimes multiturn potentiometers are used for fine control

WHEN USING A CAPACITOR A SUITABLE VALUE DUE TO THE LOW FREQUENCY WOULD NEED TO BE WORKED OUT AS EQUATION BELOW.

XC

 

 

 

 

THE GAIN OF THE OPAMP MAY NEED CHANGING TO SUIT LM3914, WHEN USING MIC AS INPUT SOURCE AND NOT SPK OUT OF LAPTOP.

 

RATHER THAN USING LM3914 TO START WITH, A SIMPLE LED SHOULD WORK WELL FOR SETTING THE CORRECT POINT SO IT JUST LIGHTS WHEN BASS  IS DETECTED. THEN IT CAN BE CONNECTED BACK TO LM3914.
IF THE OUTPUT WIRE IS REMOVED FROM THE LM3914, AND FED INTO THE 2ND OPAMP’S NON INVERTING INPUT, AND THEN A VOLTAGE REF GIVEN TO THE INVERTING INPUT SO IT BECOMES A COMPARATOR, A USEFUL 5V DIGITAL SIGNAL OR PWM OF THE SAME LOW FREQUENCY APPEARS AT THE OUTPUT, WHICH CAN BE USEFUL FOR THE ATIMEGA ON BOARD TO USE INSTEAD OF AN ANALOGUE READ, LM324 OP-AMP IS USED HERE.

 

lm324up
PWM SQUARE WAVE AT BASS FREQUENCIES