Life Song

by ErickG36 in Circuits > LEDs

1440 Views, 6 Favorites, 0 Comments

Life Song

FXJLOU2J20PGTXR.MEDIUM.jpg
FHG6NVLJ20PGXCI.MEDIUM.jpg
FN7R1GKJ20PGXAM.MEDIUM.jpg
F1QURDFJ20PGX7B.MEDIUM.jpg
Li-Fi + Song + Arduino + MP3

Amo la luz, la física, la óptica, la electrónica, la robótica y todo lo relacionado con la ciencia. Empecé a trabajar con transferencia de datos y quería probar el método Li-Fi, algo innovador y que está creciendo.

I know about the high data transfer speeds achieved by the Li-Fi, so I wanted to work something related to this and come up with something useful. In this project, I thought of making it economical and interesting, so I decided to use something that everyone likes, music. At first I thought it would be something expensive but as everything worked in digital it turned out to be incredibly cheap to perform. With the ease of arduino I can generate frequencies to produce sounds, the project is to code a song and leave everything ready so that people can code other songs and sending data through LED without having connected the horn directly to the Arduino.1.

Design

Li-Fi + Song + Arduino + mp3 _2

We can observe that the project was carried out in a protoboard, since tests are being carried out and soon amplifiers will be added to improve the signal. Something that I observed is that the horn signal is very low therefore I must amplify the signal before connecting to the horn.1.

What You Will Nedd

F7IOYOCJ20PH2AU.MEDIUM.jpg
F7ZQ7KEJ20PH28F.MEDIUM.jpg
FIP9M25J20PH2AR.MEDIUM.jpg
FKLNJT3J20PH29L.MEDIUM.jpg
FOZFPBIJ20PH278.MEDIUM.jpg
FRTOYRMJ20PH0Q4.MEDIUM.jpg
FRTRAO5J20PH279.MEDIUM.jpg
FSQK8BHJ20PH2BZ.MEDIUM.jpg
FT11BNVJ20PH0O8.MEDIUM.jpg
FU0XLBEJ20PH2AS.MEDIUM.jpg
FWNGZCUJ20PH0O9.MEDIUM.jpg

Tools and equipment:

  • Multimeter: At least you need to check the voltage, polarity, resistance and continuity for troubleshooting.
  • Cautín.
  • Pasta.
  • Welding
  • Lighter.
  • Cutting pliers.

Electronics:

  • Jack: We can recycle many audio objects, in this case I found one that was used to connect to non-functioning speakers.
  • Arduino: We can use any arduino, for this purpose I used an arduino one.
  • LED: I recommend an LED that generates white light, since it did not have white light LED I used a RGB LED taking in always the 3 colors to generate white light (Important: With red LED, green LED and blue LED will not work ours circuit).
  • Resistor: If you use RGB LED I recommend using 1k Ohms resistors, and if you use a White LED you can use 330 Ohm resistors.
  • Battery: Preferably it is 9V.
  • Connector for 9V battery.
  • Cable: To facilitate the cuts and connections I used JUMPERS.
  • Photoresistor(solar cell)

How the Circuit / Diagram Works

FGLZIIPJ20PH3BC.MEDIUM.jpg
FWZ8Z03J20PH38L.MEDIUM.jpg

Here's how the system works:

Since the human eye can not see the light in some intervals of spectrum, using the light emitted by the LEDs we can send signals by means of interruptions in the frequency. It's like turning the light on and off (like Smoke signals).The circuit runs on a 9V battery that powers our entire circuit.

Audio Cabling

FSUM6KOJ20PH3Y2.MEDIUM.jpg
F04PSDWJ20PH3Y5.MEDIUM.jpg
F1HEOJMJ20PH40I.MEDIUM.jpg
FHYTBJWJ20PH42V.MEDIUM.jpg
FMTTJ8VJ20PH440.MEDIUM.jpg
FQH59UWJ20PH45G.MEDIUM.jpg

When cutting the Jack we can check with our multimeter continuity to know which cables corresponds to ground and signal, there are jack with 2 cables (ground and signal) and others with 3 cables (ground, right signal, left signal). In this case when cutting the cable I obtained a silver cable, a white cable and a red cable. With the multimeter I could identify that the silver cable corresponds to ground and by conclusion the red and white are the signal. To make the cable stronger, what I did is to divide the cable 50% -50% and I will twist it so I would have 2 wires of the same polarity stronger and again the twine (This is to strengthen the cable and I do not know Break easily).

Audio Wiring (Continued)

Since the cable is very thin and with the cutting tool is very easy to break, I recommend using fire, in this case a lighter was used.

Simply ignite the tip of the cable with fire and when burning you must remove with the fingers or some instrument the cable while it is hot (What we are removing is plastic that covers the cable).Now let's put the white and red wire in a node.

Photoresistor

FX6WQJMJ20PH4QG.MEDIUM.jpg
F5XTZE8J20PH4TN.MEDIUM.jpg

In this case I used a solar panel to cover a larger area, for this cell simply welded jumper cables on the positive and negative terminals.

To know if our cell is in operation by means of the voltmeter we can know the voltage that provides if we put it in the light of the sun (I recommend that it is in 2V ± 0.5)

Construction LED Circuit

FFSUJ5SJ20PH5R8.MEDIUM.jpg
FFBFL72J20PH5BU.MEDIUM.jpg
FE2J9HQJ20PH5K3.MEDIUM.jpg
FYVIIWLJ20PH5O8.MEDIUM.jpg
FN6RJ3XJ20PH5L1.MEDIUM.jpg
FPYTQ68J20PH5GI.MEDIUM.jpg

Using RGB LED and with resistance of 1k ohms we can obtain the white color, for the circuit in the protoboard we will perform what is shown in the diagram where we will have the battery of 9V feeding the LED positive and the earth is connected to the signal that sends Our player (music signal). The jackpot ground is connected to the negative side of the LEDs.

Being experimenting I wanted to try another type of color to observe what happened and did not get results with red, green and blue LED.

Theory to Get the Frequency of Notes

FS102G2J20PH63E.MEDIUM.jpg
FPBVBMXJ20PH63F.MEDIUM.jpg
FWG4GCVJ20PH64Z.MEDIUM.jpg
FWUHXDFJ20PH66G.MEDIUM.jpg

A sound is nothing more than a vibration of the air that a sensor can pick up, in our case the ear. A sound with a certain pitch is dependent on the frequency at which the air vibrates.

The music is divided into the possible frequencies in portions that we call "octaves" and each octave in 12 portions that we call musical notes. Each note of an octave has exactly half the frequency of the same note in the upper octave. Sound waves closely resemble the waves that occur on the surface of the water when we throw an object, the difference is that the sound waves vibrate the air in all directions from its origin unless an obstacle causes a shock and Distorts it. In general, a note "n" (n = 1 for Do, n = 2 for Do # ... n = 12 for Yes) of the octave "o" (from 0 to 10) has a frequency f (n, O) that we can calculate in this way(Image)

Arduino Programming

F4DDGU3J20PH6Y9.MEDIUM.jpg
FJW5JIYJ20PH6XD.MEDIUM.jpg

For programming we will simply take a song and we will go selecting the type of note, something important are the times to consider. First, in the program is defined the output of our speaker as pin 11, then follow the float values corresponding to each note we are going to use with its frequency value. We have to define the notes since the times between note type is different, in the code we can observe the main notes, we have a time bpm to increase or decrease the speed. You will find some comments in the code so that they can be guided.

Connection Diagram

FCTFAPHJ20PH9NE.MEDIUM.jpg
FCWWR4UJ20PH9OO.MEDIUM.jpg
F1GGXPVJ20PH9R0.MEDIUM.jpg
FFI9Q5WJ20PH9VT.MEDIUM.jpg
FPOKBGDJ20PH9PK.MEDIUM.jpg
FQ69W0OJ20PH9ZO.MEDIUM.jpg
FR0DEO9J20PH9V1.MEDIUM.jpg
FY4T5GBJ20PHA1S.MEDIUM.jpg
FZ5E68EJ20PH9YG.MEDIUM.jpg

Let's connect the arduino earth to the ground of our Jack cable and the positive to the positive 9V battery. The signal will come out of the pin 11 that will be connected to the negative of the battery.

Music01

Li-Fi + Song + Arduino _ Fur Elise

Music02

Li-Fi + Song + Arduino + MP3_03

In the horn the sound will be very reduced so I recommend adding a circuit to amplify the signal. When programming the song that each one wants, it should take into account the waiting time and patience since we will have to tune the ear a lot for incredible results.

Mecatronica LATAM