Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Modulating LED light with sound?

  1. Mar 17, 2012 #1
    I'm trying to make an LED light to carry sound, in a simple blink-it-like-it-arrives way.

    The problem is, on the receiving end the sound arrives with a lot of distortions, most apparent in the lower notes.
    Single tones are reproduced faithfully, but anything more complex sounds like 8kbps mp3 with applause.

    For the transmitter, i connect the LED to the amplifier output, and use a resistor to keep it lit, so that the actual sound signal is between about half lit and 100% lit.

    The kind of amplifier does not seem to matter (capacitor at the output is a part of the amplifier).
    Attaching a speaker in place of an LED produces a nicely sounding speaker, so something goes wrong in the light part.

    Here is the whole receiver part:
    Also tried different kinds of amplifiers, but all on the left of the 1k resistor stays the same.
    Not sure if it is to blame - it reproduces various blinking lights like 1kHz of LED flashlight rather faithfully.

    What am i doing wrong?
    How to do this properly?
    Help please.
  2. jcsd
  3. Mar 17, 2012 #2
    1 The photodiode should be connected through a resistor to the positive side of the battery.
    2 The value of that resistor should be approximately equal to that of the photodiode so that the voltage at the junction is about 3 V.
    3 There should be a resistor between the junction of the photodiode and resistor, and pin 2 of the op amp. Try 1k to start.
    4 Pin 3 of the first op amp should not be connected to ground but to the junction of a voltage divider with a value of 3 V. It would be better if both resistors of the voltage divider were about the same value of the resistor connected between the photodiode and +6V.
    5 Remove the 1k resistor connected to pin 8 of the first op amp and connect the +6 V directly to pin 8.
    6 Keep the 10 uF and 100 uF capacitors where they are but use the same circuit (minus the photodiode and its resistor) for the second op amp.
    7 Post the revised circuit.
  4. Mar 18, 2012 #3
    Here is what i understood out of it:

    Any resistor between the PD and the +6V makes the whole thing very quiet, i tried ones from 1k to 50k. Above that the difference start to disappear. What does "approximately equal to that of the photodiode" refer to?

    There seems to be some small improvement this way - with no resistor mentioned above the sound is slightly better. The bigger the resistors going to the pin 3, the less of improvement it is.
    Still a lot of distortions any way.

    Tried adding a resistor between pin 3 of the second amp and it's input, no noticeable effect.
  5. Mar 18, 2012 #4


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    The LED is a pretty non-linear device. To transmit a good, linear signal you can use Pulse-width modulation of a high frequency carrier (a few hundred kHz, say), which will give much better results. The LED is either on or off and the amount of light received over several cycles of the carrier can be made proportional to the Audio signal.

    Does it sound like overkill? Not when you compare the results and it's really straightforward. There are many PWM circuits available for constructors.
  6. Mar 18, 2012 #5


    User Avatar
    Science Advisor
    Gold Member

    Do a search on this forum. You will find at least one thread that talks about sending audio over light with decent fidelity.
  7. Mar 18, 2012 #6


    User Avatar
    Science Advisor

    You could try removing the connection from pin 2 of the 386 to ground. This is shorting the base resistor of a PNP transistor internally in the 386, so it can't be a good thing to do.

    There is also no decoupling between the two stages, and the 386 can draw quite a lot of current.
    This means that if you get a loud "popping" noise, you need to add a couple of components, as follows:

    Put 10 uF from pin 8 of the 358.
    Remove the wire between pin 8 of the 358 and pin 6 of the 386. Substitute a 1 K resistor.

    Just a couple of checks:
    The output of the 386 (pin 5) should be at about +3 volts relative to ground.
    Pin 3 of the 358 should be at half the voltage at pin 8 of the 358
    Last edited: Mar 18, 2012
  8. Mar 18, 2012 #7

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    VK6 is right, there's somethng not quite right.
    Check 386 datasheet paragraph "Biasing"

    both inputs should see similar DC resistance to common.
    10K's from both 2&3 to common , or a cap betwen 2 & common...

    Speaking of biasing - shouldn't that 1K between PD and lm358pin2 include a DC blocking cap ?

    And as others suggested you can use PWM or frequency modulation. This is a natural for LM567's but they (and I ) are obsolete..
  9. Mar 18, 2012 #8
    Artlav, I modified the circuit a little from what I described earlier. Please see attachment. A low impedance speaker will kill the audio output so I added a transistor buffer.

    Attached Files:

  10. Mar 18, 2012 #9


    User Avatar
    Science Advisor

    The LM386 is an audio amplifier intended to drive a speaker with minimum external components.

    So, unlike an opamp, it is OK (and desirable) to leave unused inputs open circuit or to just bypass them with a suitable capacitor.

    With the capacitor between pins 1 and 8 it has a gain of 50, which is enough for the present application.
    The gain of 2500 (50 * 50) may cause oscillation due to feedback along the power supply rail unless decoupling as described earlier is used.

    Considering the non linear behaviour of LEDs and photodiodes, it might be good to make the voltage at pin 3 of the LM358 variable by using a pot to develop the voltage. This will give a way of optimising the result.
  11. Mar 18, 2012 #10
    Good call vk6kro. It always pays to read the spec. sheet. (http://www.ti.com/lit/ds/symlink/lm384.pdf) and this advice applies to the OP as well as it does to me.

    The output does not need to be buffered, the output was designed to drive 8 ohms. However, the minimum supply voltage is 12V so the 6V battery won't work.

    In contrast to SophieCentaur, Jim Hardy and vk6kro, I see this circuit as the receiver of the light communications system. Am I wrong?
  12. Mar 18, 2012 #11


    User Avatar
    Science Advisor

    No, you are right. The transmitter is the first circuit in the original post.

    The data sheet for the LM386 I have gives the supply voltage as 4 volts to 12 volts, so 6 volts would be OK, although the power output increases substantially above this.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook