Here is a straightforward, reliable design that uses standard, inexpensive components.
Instead of sending a complex digital signal, we will use an analog approach. The transmitter will keep an LED turned on at exactly 50% brightness. When the audio signal (the music) fluctuates, it will push the LED's brightness up and down. The receiver will catch these fluctuations in light intensity and translate them directly back into voltage fluctuations to drive a speaker.
We need a circuit that combines a steady DC voltage (to turn the LED on) with the AC voltage from an audio source (to modulate the brightness). A single NPN transistor handles this perfectly.
Components Needed:
Audio Source: Anything with a headphone jack (or a microcontroller like a BBC micro:bit programmed to output tones).
Power: 9V Battery.
Transistor: 2N3904 or 2N2222 (standard NPN).
LED: A high-brightness visible LED (Red works well for plastic fiber) or an IR LED.
Resistors: 1x 330Ω (LED current limiting), 1x 100kΩ Potentiometer (for DC biasing).
Capacitor: 1x 10µF electrolytic.
The Circuit Wiring:
Audio Input: Connect the tip (left or right channel) of an aux cable to the positive leg of the 10µF capacitor. Connect the sleeve (ground) of the aux cable to the circuit's ground.
The Base: Connect the negative leg of the capacitor to the Base (middle pin) of the NPN transistor. The capacitor acts as a filter, allowing the audio signal to pass while blocking the DC voltage from feeding backward and damaging your audio device.
DC Bias: Connect the 100kΩ Potentiometer between the 9V positive rail and the Base of the transistor. You will adjust this later to keep the LED halfway illuminated.
The Output (Collector): Connect the Collector of the transistor to the negative leg (cathode) of the LED. Connect the positive leg (anode) of the LED through the 330Ω resistor to the 9V positive rail.
Ground: Connect the Emitter of the transistor straight to ground.
While a phototransistor works well, using a small solar cell is practically foolproof, entirely passive, and yields surprisingly clear audio.
Components Needed:
Sensor: A small 3V to 5V solar cell (the kind found in cheap garden lights or calculators).
Amplifier: A set of standard powered PC speakers, or an LM386 audio amplifier module.
Jack: A female 3.5mm audio jack.
The Circuit Wiring:
Direct Connection: Solder the positive lead of the solar cell to the tip/ring connections of the female audio jack. Solder the negative lead to the sleeve (ground).
Plug and Play: Plug your powered speakers directly into the jack.
Why this works: A solar cell generates a voltage directly proportional to the amount of light hitting it. Because the LED is flickering at audio frequencies, the solar cell generates an identical AC audio waveform. The powered speakers amplify that weak signal into audible music.
To connect the two systems, you can use standard Plastic Optical Fiber (POF) or even a length of clear acrylic tubing or fishing line for a raw prototype.
Coupling: The trickiest part is coupling the light. Drill a small hole in a piece of opaque plastic or wood that exactly fits the diameter of your LED and your fiber optic cable.
Alignment: Press the LED into one side of the hole and the fiber into the other so they are flush against each other. Wrap the junction in black electrical tape or heat shrink tubing to prevent ambient light from washing out the signal.
Reception: Do the same on the receiver side, pointing the end of the fiber optic cable directly at the surface of the solar cell. Keep it as close as possible and shroud it in a small cardboard or 3D-printed enclosure to block out the room lights.
Turn on the 9V power to the transmitter.
Without playing music, carefully adjust the 100kΩ Potentiometer until the LED is at roughly 50% of its maximum brightness. (If it's fully off, the bottom half of the audio wave is cut off; if it's fully on, the top half is clipped).
Turn on your powered speakers connected to the solar cell.
Start playing music or a continuous tone from your audio source. You should immediately hear the audio transmitted across the light beam.
Below: Alexander Graham Bell's Photophone, 1880: