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.

A Wearable Sound-to-light Display

Status
Not open for further replies.
Hi there,

Someone has posted it online, but I need to explain it more clearly.
Take a look in the circuit,
wearable_sound_led_blink.jpg

1. First stage of the amplifier looks non inverting inputs are getting voltage drop, using divider R2 and R4, while inverting input is connected with same voltage source droping at R1, but what C1 and R3 is doing here? does it responsible for MIC filtering?

2. First stage also cover negative feedback ?

3. Second stage amplifier is connected with an RC filer to its non inverting input, and driving a transistor for LED. Can you find a current source here?


Could you kindly explain it more ?
 
Last edited:
The first stage is a non-inverting AC amplifier. The R2/R4 divider is there to provide 1/2 of the supply voltage (4.5V) to the non-inverting input. This ensures that the AC output signal is centered 1/2 way between ground and power, so there is room for the signal to move higher and lower by up to about +/-4 volts. Without the ability to go up and down in voltage, you would get clipping - or some of the audio signal cut off - which would sound lousy. A general idea of an op amp is the output goes where ever it needs to to try to make the two inputs balanced. That's not a big technical theory, but it sort-of works out that way and I find it an easy way to understand op amps. In this case, the output will go up and down with the incoming audio in an effort to keep the two inputs balanced as the audio signal changes.

The first stage indeed does have negative feedback. That is entirely necessary and normal for an op amp that without some gain control might have gains of hundreds of thousands. In effect, even a slight voltage offset of the input (which is typical for op amps), could be amplified to the point that an op amp without negative feedback would simply drive itself to either the positive output limit or the negative output limit, what is called "going to the rails".

The second stage is as you said, connected with an RC filter. It is somewhat a by-product of the technology. The capacitor is there to ensure the signal from the first stage gets through but the DC bias of 4.5 volts does not get thru to screw-up the second stage's bias voltages. Because it is going to the non-inverting input, the input has a nearly infinitely small load on the signal. This second stage (which you may notice also has the required negative feedback), also needs to be biased but in this case only one side of the audio signal is needed because the output LED will only conduct one-way anyways, and putting the high resistance to the + input does that. So the two parts - the resistor and the capacitor - are needed, and almost by coincidence form a low-pass filter. Not a problem though, because the input draws such an extremely small amount of power, very little current is absorbed, so even an affordable 100nF capacitor in combination with a 47,000 resistor will have a very low cutoff frequency (the point where the bass drops off 3dB, a just audible amount). The cuttoff frequency of the low-pass filter is greatly affected by the input's need for current. A 2nd stage with a larger current draw would need a much larger capacitor value to retain the same cutoff frequency.

Not sure what current source you are looking for ... there should be current everywhere if there is a good battery! But maybe you are asking about the current to drive the LEDs to light. That current comes from the battery, thru the LEDs, and then thru the transistor to ground thru a current-limiting resistor. The transistor is driven from the 2nd op amp stage, so the current in the LED path is controlled by the transistor and it varies according to the level of amplified audio. That is where the negative feedback is taken for the 2nd stage. It also serves the purpose of including the transistor in the feedback path, so any odd non-linearities of the transistor is reduced. That means almost any general-purpose NPN transistor could do a good job here. Of course there is hardly a chance that anybody would notice a non-linearity between the volume in the microphone and the LED brightness - they will only see flashing lights when they talk, sneeze, screem, burp, clap, or generate a "trouser cough".

That help?
 
That depends entirely on the microphone. Many microphone elements don't even specify the polarity.
But I think it's not important. In audio, it's a guarantee that the temporary air pressure change will rebound to the exact opposite. If it didn't, then the air pressure around you would either continue to increase or decrease. Either way, you wouldn't be alive to worry about it....the point is that you can generally assume that any pressure increase will be followed with an equal and opposite decrease, usually within tiny fractions of a second - milliseconds.

In the final analysis, it will always center around the "zero" or DC level.
Pretty much every audio level meter ever made (LED, vacuum flourescent, or moving needle) takes the signal and slices it in half - rectifying it - before presenting it to the output device. Otherwise they would likely move so fast we'd never see them move.
Like a speaker - except for the lowest bass frequencies, you never see it move. And it always returns back to center. If it didn't, you would have a voice coil and cone shooting out of every new speaker.
 
Dear Sir Rich,

Nice, fabulous, mind blowing and reasonable explanation for sure. Undoubtedly, you are knowledgeable.
Sign of expert !
Thank you very much for taking part in this circuit.
Even I have spend almost 10 years in studying Electronics circuits, seems like all my concepts are confusing.
But, I love to study circuits, even thousand time I fail to understand. People hired me as an Electronic Engineer that does not mean I understand circuits!

Let me draw points on your comments,

T
The first stage is a non-inverting AC amplifier.
Ac signals are being amplified, do you mean the source of AC signal is from MIC? Is it fluctuating dc type AC?
Dont you think, this idea is better to reduce the effects of finite "input offset voltage."
In that case it may be preferable to omit the capacitor and trim the offset voltage to zero, large capacitor has chosen.


The R2/R4 divider is there to provide 1/2 of the supply voltage (4.5V) to the non-inverting input. This ensures that the AC output signal is centered 1/2 way between ground and power, so there is room for the signal to move higher and lower by up to about +/-4 volts. Without the ability to go up and down in voltage, you would get clipping - or some of the audio signal cut off - which would sound lousy.
Yes, this non inverting amplifier is not an ideal one. The way the AC signals are allowing can understandable, the frequency at which the impedance of the capacitor is taking part. As we are dealing with audio output, case is more sensitive!


A general idea of an op amp is the output goes where ever it needs to to try to make the two inputs balanced. That's not a big technical theory, but it sort-of works out that way and I find it an easy way to understand op amps. In this case, the output will go up and down with the incoming audio in an effort to keep the two inputs balanced as the audio signal changes.

A crucial point raised here, that is input balancing. Very basic building block may be, "the op-amp voltage gain is so high that a fraction of a millivolt between the input terminals will swing the output over its full range", can we ignore the voltage difference? Input draw no current?

The first stage indeed does have negative feedback. That is entirely necessary and normal for an op amp that without some gain control might have gains of hundreds of thousands. In effect, even a slight voltage offset of the input (which is typical for op amps), could be amplified to the point that an op amp without negative feedback would simply drive itself to either the positive output limit or the negative output limit, what is called "going to the rails".

Like some other stupid, some time I feel that the negative feedback is effect of reducing the amplifier's gain. But people says "True, it does lower the gain, but in exchange it also improves other characteristics, most notably freedom from distortion and nonlinearity, flatness of response (or conformity to some desired frequency response), and predictability." You are right in this case as you are talking input and output limiting.


The second stage is as you said, connected with an RC filter. It is somewhat a by-product of the technology. The capacitor is there to ensure the signal from the first stage gets through but the DC bias of 4.5 volts does not get thru to screw-up the second stage's bias voltages. Because it is going to the non-inverting input, the input has a nearly infinitely small load on the signal.
Yes, meaning full, that means this RC filter is making a bridge in this 2 stage, eaither for small load on signal or DC bias for second stage.


This second stage (which you may notice also has the required negative feedback), also needs to be biased but in this case only one side of the audio signal is needed because the output LED will only conduct one-way anyways, and putting the high resistance to the + input does that. So the two parts - the resistor and the capacitor - are needed, and almost by coincidence form a low-pass filter. Not a problem though, because the input draws such an extremely small amount of power, very little current is absorbed, so even an affordable 100nF capacitor in combination with a 47,000 resistor will have a very low cutoff frequency (the point where the bass drops off 3dB, a just audible amount). The cuttoff frequency of the low-pass filter is greatly affected by the input's need for current. A 2nd stage with a larger current draw would need a much larger capacitor value to retain the same cutoff frequency.

This explanation is for sure important, as second stage is performing for small amount of power. Need negative feedback. To set the cutt off frequency of the audio signal RC values are fixed for 3db gain. Only one side of audio signal might play a vital role to glow the LEDs, but does R7 is limiting base current or biasing the transistor Q1? Otherwise, transistor need to be turned on for making a paths from battery to ground for driving the LEDs. At this point, the purpose of transistor is very measurable, because amplified audio signal need to be well controlled.


Not sure what current source you are looking for ... there should be current everywhere if there is a good battery! But maybe you are asking about the current to drive the LEDs to light. That current comes from the battery, thru the LEDs, and then thru the transistor to ground thru a current-limiting resistor. The transistor is driven from the 2nd op amp stage, so the current in the LED path is controlled by the transistor and it varies according to the level of amplified audio. That is where the negative feedback is taken for the 2nd stage. It also serves the purpose of including the transistor in the feedback path, so any odd non-linearities of the transistor is reduced. That means almost any general-purpose NPN transistor could do a good job here. Of course there is hardly a chance that anybody would notice a non-linearity between the volume in the microphone and the LED brightness - they will only see flashing lights when they talk, sneeze, screem, burp, clap, or generate a "trouser cough".

Excellent! I wont thought about non linearities of transistor. can imagine the disadvantage that the control input floating, 100ohm has taken to ground underneath the negative feedback, that you said "ground thru a current-limiting resistor" I was thinking "Current source with grounded load"
 
That depends entirely on the microphone. Many microphone elements don't even specify the polarity.
But I think it's not important. In audio, it's a guarantee that the temporary air pressure change will rebound to the exact opposite. If it didn't, then the air pressure around you would either continue to increase or decrease. Either way, you wouldn't be alive to worry about it....the point is that you can generally assume that any pressure increase will be followed with an equal and opposite decrease, usually within tiny fractions of a second - milliseconds.

In the final analysis, it will always center around the "zero" or DC level.
Pretty much every audio level meter ever made (LED, vacuum flourescent, or moving needle) takes the signal and slices it in half - rectifying it - before presenting it to the output device. Otherwise they would likely move so fast we'd never see them move.
Like a speaker - except for the lowest bass frequencies, you never see it move. And it always returns back to center. If it didn't, you would have a voice coil and cone shooting out of every new speaker.

Let me think it more, looks an interesting points.
 
Never mind the polarity of sound pressure.

The opamp types (inverting and non-inverting) are backwards.
The first opamp is INVERTING with a low input impedance that loads down the output level of the fairly high impedance electret mic. It should be non-inverting then it can have a higher input impedance so it does not load down the signal then its gain can be reduced and the value of its input coupling capacitor C1 can also be reduced.

The input of the second opamp is being destroyed by negative inputs it receives from C-blank (the 100nF capacitor) because the second opamp is non-inverting when it should be inverting. If it is inverting then its input would never go negative.

I think the LED will look more effective if it is driven with a peak detector.
 
Never mind the polarity of sound pressure.
you do not nevermind anything -- in this case the cause was an "uncommon" placement of inverting and non inverting terminals on a source schematic -- the sign error and it's population is one of the basic . . . . *← . . . . . that may //// ←* using the sound pressure's polarity example here and defining "inversions" derived from it's voluntarily assigned sign //// -- means the picked sign may determine whether some equations have a solution or cancel off to something like : 0=0 , 0=Const , or another uncertainty

Mr. Cheney's amazing "sign control" example -- which is absolutely amazing if it's not a pre-written speech -- illustrates here the actual extremely faint balance between consistent and erroneous

in the sound to light circuit the second stage is a weird beast coz it's input dc offset depending on input from the first stage ? how ? i speculate the minor draw from op amps input PNP as a component rectifying input to second stage . . . i wouldn't volunteer to go explaining it's operation by just glancing at the schematic

**broken link removed**
the first stage description :: https://hands.com/~lkcl/eoma/kde_tablet/Lab3b_new.pdf

(i hate this job) here were i get this stable // method = fuzzy logic error reduction (some of the staff may be relics from the process) // op amp model = custom wrong LM324 transistor model // 1kHz test (using speculative varying resistance electret model)

the added Random_601-2mp.png has a complex current limiting for leds - - - it is likely better to feed the leds in parallel from current limit(s)
 

Attachments

  • Random_601.png
    Random_601.png
    53.1 KB · Views: 321
  • LM324J.png
    LM324J.png
    20.1 KB · Views: 327
  • Random_601-2mp.png
    Random_601-2mp.png
    69.9 KB · Views: 320
Last edited:
Never mind the polarity of sound pressure.

The opamp types (inverting and non-inverting) are backwards.
The first opamp is INVERTING with a low input impedance that loads down the output level of the fairly high impedance electret mic. It should be non-inverting then it can have a higher input impedance so it does not load down the signal then its gain can be reduced and the value of its input coupling capacitor C1 can also be reduced.

The input of the second opamp is being destroyed by negative inputs it receives from C-blank (the 100nF capacitor) because the second opamp is non-inverting when it should be inverting. If it is inverting then its input would never go negative.

I think the LED will look more effective if it is driven with a peak detector.[/QUOTE]
you do not nevermind anything -- in this case the cause was an "uncommon" placement of inverting and non inverting terminals on a source schematic -- the sign error and it's population is one of the basic . . . . *← . . . . . that may //// ←* using the sound pressure's polarity example here and defining "inversions" derived from it's voluntarily assigned sign //// -- means the picked sign may determine whether some equations have a solution or cancel off to something like : 0=0 , 0=Const , or another uncertainty

Mr. Cheney's amazing "sign control" example -- which is absolutely amazing if it's not a pre-written speech -- illustrates here the actual extremely faint balance between consistent and erroneous

in the sound to light circuit the second stage is a weird beast coz it's input dc offset depending on input from the first stage ? how ? i speculate the minor draw from op amps input PNP as a component rectifying input to second stage . . . i wouldn't volunteer to go explaining it's operation by just glancing at the schematic

**broken link removed**
the first stage description :: https://hands.com/~lkcl/eoma/kde_tablet/Lab3b_new.pdf

(i hate this job) here were i get this stable // method = fuzzy logic error reduction (some of the staff may be relics from the process) // op amp model = custom wrong LM324 transistor model // 1kHz test (using speculative varying resistance electret model)




Yes, let me analyse what you are saying. Thank you for this design.
 
The datasheet for the LM358 opamp used here says that its maximum allowed negative input is -0.3V but the input of the second opamp is driven to damaging -4.5V if the input sound level is high. If this second opamp is changed to be inverting then its input safely stays at 0V and never goes negative.
 
I think the LED will look more effective if it is driven with a peak detector.
i was currently busy getting the second stage stable (and kept it never mind what the intended output originally was)
however as you say and what it sees the second stage along with transistor seem to follow the "rectified" positive half cycles of the first OUTP . . . there is no difference as Rich D. kindly explained in #4 and the peak detector would just average/interpolate over the pos./neg. HC-s
--- the point here is -- either using your peak detector or some other method the described output can be achieved here in more stable manners than with the current circuit
 
While the fragile collector-base junction of the PNP input transistor on the non-inverting opamp is conducting and is being destroyed by the voltage driving it from the coupling capacitor going negative then the capacitor is charged in reverse which would cause the LEDs to light almost continuously when there is a fluctuating input signal.

The circuit should be changed like I said and the damaged opamp should be replaced.
 
i cracked the circuit -- the peak detector seems causing a low pass with still sharp ramp ups (fig.1)
-- using any other averaging filter does the same and i guess does destroy the fancy light effect . . .
the (fig.2) utilizes a full wave rectifier and mentioned current limit -- both (fig.-s) are not fully analyzed
however the mic. with the first stage seems to pick up any "supply events" thus i guess it should replaced with a "balanced differential" input pre-amp and also all functional blocks should have their power source decoupled from each other's
 

Attachments

  • Random_602.png
    Random_602.png
    57.4 KB · Views: 323
  • Random_604.png
    Random_604.png
    64.2 KB · Views: 330
Sorry ci139, I do not know why your circuits have so many parts for this simple project.
 
these are experimental Spice Bullsh¡t×88% the shown current limit - for example - won't work in practice coz the regulating PNP won't react that sharply + all the biasing resistors need a critical revision before tiling it up in real - so many parts is a fast compensation rather than matching correct control currents with fewer parts while the ciruit is under mesh of probes
 
The datasheet for the LM358 opamp used here says that its maximum allowed negative input is -0.3V but the input of the second opamp is driven to damaging -4.5V if the input sound level is high. If this second opamp is changed to be inverting then its input safely stays at 0V and never goes negative.
Could you recommend any solution?
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top