how to represent a speaker?

I need help representing a speaker, I am trying this circuit:

http://www.eleccircuit.com/wp-content/uploads/2008/12/light-to-sound-wave-receiver-using-ic-741.jpg

I used the 9 V battery for the +9 and -9 sources and a BJT, even if I think that there is actually a diode?

Please send me to the right direction...how would I represent a speaker, and is the rest right or should I use something different for the voltage source and what should I use for the transistor?

by anasarap
April 16, 2012

Sorry to say but that looks like a very poor design.

Just about everything is quite a bit off-- the .1 uF working into 1000 ohms is going to pass very little audio signal. Same thing with the 4.7uF going to the speaker. Not to mention that the 741 can only put out about 10 milliamps, about 2 milliwatts of audio.

This is like one of those ransom notes made from random words cut out of a magazine. It just doesn't make much sense.

A plain audio amplifier made with a LM386 or similar jellybean audio amp will work MUCH better:

http:///7ed4nhc

Just hook the photodiode and resistor to the input.

by arduinohacker
April 16, 2012

Hi @anasarap and @arduinohacker,

@arduinohacker makes some very good points. The circuit could certainly be improved, and @anasarap if you are looking for good audio amplification you probably want to do some reading and build the amp that is best for what you need.

This circuit still presents some really neat learning opportunities for everyone and I think its worth it to answer the questions that were posed.

I have gone ahead and built the circuit in circuitlab here: so you can see what I did.

A simple resistor is a pretty good model for a speaker unless you are looking to get really precise. The typical impedance of a speaker is around 8ohms (notice that the circuit you linked to even had an 8ohm right next to it) so thats what I used when recreating the circuit.

The transistor on the left is actually a phototransistor. You can find a whole lot of info about them online if you are curious, what they basically do is draw a current proportional to the amount of light hitting them. In order to model that effect here I just used an ideal current signal. If you built this circuit in real life your phototransistor would get bombarded by light at all sorts of different frequencies. The point of this circuit is to amplify the frequencies in the audible range that are hitting it.

Open up the circuit and play around with it. Here are a few things to think about:

How does the input signal (the current source) relate to the output signal (the voltage across your speaker?

What is going to happen to the output signal if the magnitude of the input signal (amount of ambient light) increases or decreases?

If you understand what a frequency analysis is, run the frequency analysis and observe the gain. At which frequencies do you get the most gain? Does it make sense that the most gain happens at those frequencies in this application?

The point that @arduinohacker made about the output capability of the 741 is very relevant. The amplifier does have a limited amount of current it can source, and if you are putting that into a tiny load like the simple speaker, you are probably not going to hear much.

I hope that gave you some insight as to what is happening in the circuit, and hopefully you will be now better equipped to model and analyze circuits like these in circuitlab!

by hevans
April 16, 2012

Just to clarify a point that @hevans made:

"your phototransistor would get bombarded by light at all sorts of different frequencies. The point of this circuit is to amplify the frequencies in the audible range that are hitting it."

Strictly that should be:

"your phototransistor would get bombarded by light whose intensity is modulated by, i.e. fluctuating at all sorts of different frequencies. The point of this circuit is to amplify the desired modulation frequencies in the audible range that are hitting it."

Also as @hevans alluded to your phototransistor can be swamped by a high background light level so even though your desired modulation signal may be small enough to not saturate the phototransistor, the background or ambient light level may saturate it. This is like having a small signal superimposed on a DC level. Make the DC level large enough and the amplifier will saturate. AC coupling after the phototransistor is no help because you cannot decouple the ambient (DC component) from the wanted (AC component) light before it reaches the phototransistor and once it has reached the transistor, it is too late to decouple it.

If your input light source is in the infrared then an infrared filter in front of the photodetector is one way of filtering most of the unwanted background visible light. That's what the little black window is on some IR remote controls and on the Wiimote.

by signality
April 17, 2012

thank you everyone! you have been very helpful. @arduinohacker, the reason why I'm building this is because I have been asked to in my Electronic Lab class to see how it works. I just wanted to play with it in circuitlab, to see what to expect once is built. :) I appreciate your comments, they all helped a lot!

by anasarap
April 17, 2012

Hmm, well unfortunately that circuit is not ever going to fly... Just about everything is wrong with it. Now it's just possible the teacher did this intentionally, and you're supposed to find and fix the problems. But that is only going to happen if you have a solid foundation in electrical engineering. The main issue are: (1) The photodiode works best as a current source. This circuit is using it as a voltage source.

(2) The input coupling capacitor that someone chose is not going to pass much audio. It's at least 100 times too small. Perhaps this circuit was originally intended to pass optical signals from a remote control? Those are high-freq signals that will go through a 0.1uF capacitor.

(3) A 741 can only put out about 0.01 amps. By the basic power law: Watts = current-squared times R, that's 0.01 times 0.01 times 8, or 0.0008 watts. That's a very, very faint signal, maybe just barely audible if the room is quiet and you have your ear to the speaker.

(4) The output coupling capacitor is way too small. Perhaps the original circuit had this going into a high-impedance input, where the capacitor would be about the right size. going into an 8-ohm speaker, the capacitor is not going to pass much signal.

In other words, the whole thing is bollixed. Maybe it's intentionally goofed up and you're supposed to find and fix it. Maybe the teacher is not quite up to speed and they unintentionally pointed you to a bad design. Or maybe you found this circuit through an internet search and were unlucky. There are many sites with very weak info, "EHow" is another one where the info is very, very shallow.

I suggest you talk this over with the teacher. There's not going to be a whole lot of success with this circuit, unless that's the point.

by arduinohacker
April 18, 2012

"(1) The photodiode works best as a current source. This circuit is using it as a voltage source."

The way it's used here does at least decouple the DC level in the photodiode current caused by ambient light from the opamp and so stop it being saturated.

It is much harder to remove the background light current from a direct coupled transimpedance amplifier (a.k.a. TIA or transamp) type of circuit.

For low frequency applications (audio and remote controls) the bandwidth of the photodiode circuit used this way is adequate.

Transamps are usually only needed for faster datacomms and linear RF applications where one end of the photodetector is tied to ground (or a rail at AC ground) and the other is connected to a virtual ground at the transamp input. That way the voltage swing across the detector is minimised (theoretically the swing is zero but a real virtual earth (that's a virtual earth in a real circuit if you see what I mean) isn't perfect).

:)

by signality
April 18, 2012

Good point, I spent too much time trying to get infrared networks running with transimpedance amplifers. Talk about flogging a dead horse.

by arduinohacker
April 20, 2012

Hi @arduinohacker, @signality, and everyone else reading: you are of course invited to try to modify the original circuit, try to address all of the problems you've mentioned (strange input/output coupling, possible phototransistor saturation, ...), and show using the frequency-domain simulation or time-domain simulation how yours works and why it's better.

(Also, who knows whether this ends up driving a real 8 ohm speaker, vs. just going into tiny high-impedance headphones, or the line-in of an amplified speaker set.)

Bonus points if you can use the same or similar parts so their class can build and listen to both in their lab -- you may be able to teach something cool to a lot of people who are just entering the electronics world!

I'll leave you with a video called What You See is What You Hear, which goes around Times Square with audio input only from a photodiode-to-audio circuit. (Warning: turn down your speakers before you press play -- it's a loud video!) It's neat to "hear" how different neon lights (3:15) sound from PWM-modulated LEDs (2:00), blinking car turn signals (3:40)...

by mrobbins
April 20, 2012

Okay, I've managed to get the simulated circuit perking a lot better, with just a few changes.

Changes:

(1) Make the capacitors bigger, 10uF each is good.

(2) Add a $2.69 Radio Shack output transformer, that's the only way to get significant power out of the 741 op amp and into a speaker.

( We could have gotten by cheaper by adding a transistor as a power booster, but that would strain the 9V batteries a bit much ).

Now it simulates nicely, with 60dB of gain and a few dozen milliwatts of audio out.

by arduinohacker
April 23, 2012

Post a Reply

Please sign in or create an account to comment.