Code Monkey home page Code Monkey logo

apenam7 / synchronizing-music-to-a-led Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 4 KB

The project shows how to synchronize music to a LED, designing and building a low-power audio amplifier/speaker driver based on a LM386N, a LM358 low-power dual Op-Amp, and a 2N3904 NPN Bipolar Junction Transistor. The LM386 is a low power amplifier. Its default voltage gain is 20, which can be vary by placing an RC circuit between pins 8 and 1. Its gain can be vary to any value between 20 and 200. LM386 is biased by an external DC power source so it provides power to the AC signal and hence enhance the AC signal. That why its output signal is greater than its input signal. The voltage rating of power supply must be between 4 – 12 volts and current rating greater than 100mA for its proper working. We can control the gain and also remove the noise from the signal. It can be used in ultrasonic drivers, portable audio players, in TV sound systems, servo drivers, line drivers, in radio amplifiers, especially in AM and FM, and power converter. Building a summing amplifier around the LM358, we are combining several inputs into a common output signal and bringing clearness to the sound. Audio speakers convert electrical signals into mechanical motion. The electric signal is passed through a coil of wire (the “voice” coil), which is suspended a strong magnetic field provided by a permanent magnet. A time-varying current in the coil leads to a mechanical deflection relative to the magnet. Placing the 2N3904 we are amplifying the power as well, since is a general-purpose transistor, and act as another filter to bring clearness to the sound. At the output a LED is placed with a 6ohms resistance, in order to synchronize the tone frequency with light. For sound input an Arduino Uno is used generating a melody at different frequencies to create the flash in the output LED. For programming this Arduino, a MATLAB application is used with the code attached.

License: MIT License

MATLAB 100.00%

synchronizing-music-to-a-led's Introduction

Synchronizing-Music-to-a-LED

The project shows how to synchronize music to a LED, designing and building a low-power audio amplifier/speaker driver based on a LM386N, a LM358 low-power dual Op-Amp, and a 2N3904 NPN Bipolar Junction Transistor.
The LM386 is a low power amplifier. Its default voltage gain is 20, which can be vary by placing an RC circuit between pins 8 and 1. Its gain can be vary to any value between 20 and 200. LM386 is biased by an external DC power source so it provides power to the AC signal and hence enhance the AC signal. That why its output signal is greater than its input signal. The voltage rating of power supply must be between 4 – 12 volts and current rating greater than 100mA for its proper working. We can control the gain and also remove the noise from the signal. It can be used in ultrasonic drivers, portable audio players, in TV sound systems, servo drivers, line drivers, in radio amplifiers, especially in AM and FM, and power converter. Building a summing amplifier around the LM358, we are combining several inputs into a common output signal and bringing clearness to the sound. Audio speakers convert electrical signals into mechanical motion. The electric signal is passed through a coil of wire (the “voice” coil), which is suspended a strong magnetic field provided by a permanent magnet. A time-varying current in the coil leads to a mechanical deflection relative to the magnet.
Placing the 2N3904 we are amplifying the power as well, since is a general-purpose transistor, and act as another filter to bring clearness to the sound. At the output a LED is placed with a 6ohms resistance, in order to synchronize the tone frequency with light. For sound input an Arduino Uno is used generating a melody at different frequencies to create the flash in the output LED. For programming this Arduino, a MATLAB application is used with the code attached.

synchronizing-music-to-a-led's People

Contributors

apenam7 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.