Light equalizer for the rear window of a car. Graphic seven-band rainbow equalizer on Arduino Nano and MSGEQ7 How a car equalizer works

The website presents to users of the electronic portal a seven-band graphic equalizer that is easy to assemble. Externally, the equalizer consists of seven columns (according to the number of bands) of LEDs different color arranged in order of the colors of the rainbow. Each column has 10 LEDs - 10 signal levels.

The schematic diagram of the device is shown above. The audio signal from the output of a music center, computer sound card or smartphone is fed to the input of a specialized MSGEQ7 microcircuit. This integrated circuit from Mixed Signal Integration is a 7-channel spectrum analyzer in a DIP-8 package with a current consumption of 1 mA, and is also a . MSGEQ7 is capable of extracting frequency bands of 63Hz, 160Hz, 400Hz, 1kHz, 2.5kHz, 6.25kHz and 16kHz from the input audio signal:

MSGEQ7 is controlled by two digital inputs Reset (pin 7) and Strobe (pin 4). After the Reset start pulse, it is enough to apply seven strobe pulses to the Strobe line, as a result of which, after each strobe pulse, a voltage proportional to the content of one of the seven frequency bands in the audio signal will appear at the Out output (pin 3).

The output of the MSGEQ7 chip is connected to the input of the LM3915 LED level indicator chip. This microcircuit has ten outputs, the state of which depends on the level of the input signal. The circuit is controlled by an ATMEGA328 microcontroller; I decided to use a ready-made Arduino Nano board. There are many projects on the network that use as many as seven LM3915 cases. I decided to use dynamic display and one LM3915 chip. The microcontroller generates a Reset signal for MSGEQ7 and then issues seven Strobe signals. At the same time, it turns on one of the transistor switches of the columns of our indicator and this column displays the signal level from LM3915, which is connected to the lines of our indicator.

I used seven colors of LEDs (red, orange, yellow, warm white, green, blue and pink-violet) to display all seven frequency bands. Since LEDs different colors different supply voltage, different current and different brightness, in order to get the same luminous flux when operating our screen, I used the ability of the LM3915 chip to set the output current. Each time a column is switched, the microcontroller, depending on the column number, using PWM (PWM) and a simple RC filter, generates a voltage at pins 6 and 7 of the LM3915 corresponding to the required brightness of the column. This solves the problem of uneven brightness different types LEDs. The only thing required for this was to raise the Arduino PWM frequency from the default 500Hz to 64kHz (the first two lines in the setup section of the sketch).

As far as I know, sometimes you come across not very high-quality copies of MSGEQ7. Their output noise characterizes them even with a grounded input. Those. even in the absence of a signal, chaotic emissions will be visible on the screen. Apparently I came across just such a microcircuit. Therefore, I additionally send a signal from the Out output to the ADC of the microcontroller (A7). With a few lines of code, the microcontroller analyzes the input signal and suppresses display noise by simply not turning on the column key.

The sketch for the microcontroller is shown below:

#define STROBE_PIN 11 // MSGEQ7 PIN 4
#define RESET_PIN 12 // MSGEQ7 PIN 7
#define PWM_PIN 10 // BRIGHTNESS CONTROL
#define SOUND_PIN A7 // SIGNAL LEVEL ANALYSIS

byte band_pins=(2,3,5,6,7,8,9); // COLUMN PORTS
byte band_bright=(40,100,0,180,230,130,10); // BRIGHTNESS LEVELS FOR EACH COLOR
byte band_analys; // ARRAY FOR ANALYZING LEVELS
byte band_counter;

void setup())(
TCCR1B&=~7; // SET THE PWM FREQUENCY 64 kHz
TCCR1B|=2; // ...
for(int i=2; i<13; i++) pinMode(i,OUTPUT);
pinMode(SOUND_PIN,INPUT);
}

void loop()
MSGEQ7();
}

void MSGEQ7())(
digitalWrite(RESET_PIN,HIGH);
delayMicroseconds(1);
digitalWrite(RESET_PIN,LOW);
delayMicroseconds(72);
for (int i=0; i<7; i++)
{
band_counter=0;
analogWrite(PWM_PIN, band_bright[i]);
digitalWrite(STROBE_PIN,LOW);
delayMicroseconds(36);
band_analys[i]=map(analogRead(SOUND_PIN),5,1023,0,255);
if (band_analys[i]>4)
{
for (int j=0; j<7; j++)
if ((j!=i) && (band_analys[j]>4)) band_counter++;
}
if (band_counter>2) digitalWrite(band_pins[i],LOW);
delayMicroseconds(1600);
digitalWrite(band_pins[i],HIGH);
digitalWrite(STROBE_PIN,HIGH);
delayMicroseconds(36);
}
}

As noted above, I used an Arduino Nano board - the only thing I had to “modify” was to remove the USB power protection diode and replace it with a jumper. The voltage dropped on it and the circuit was unstable. Also for power supply there is an electrolytic capacitor with a capacity of at least 1000 microfarads so that at moments when almost all the LEDs on the screen are lit, the voltage on the USB bus does not drop. It is also worth noting that when powering the circuit from a USB computer, it is better to use a USB hub with external power, this will minimize interference on the USB bus. For equalizer printed circuit board was not developed, the entire structure was assembled on two breadboards. In the video below you can see the equalizer in action.

Schematic diagram of the graphic equalizer and code for the microcontroller are available at

Many car owners try to give their car special parameters that are not similar to others. Some try to improve specifications of your car, in some cases bringing the performance serial car almost to the characteristics sports cars. Others are trying to increase the cross-country ability of already good SUVs. Such modifications relate to tuning, and a large number of car enthusiasts “suffer” from them - from those who have just received driver's license to “respectable successful guys.”

But such a trend as facelifting, which for some reason is also classified as tuning, is more characteristic of young people. They try to externally give individuality to their car by replacing bumpers, attaching spoilers, body kits, applying vinyl or airbrushing, and equipping the car with high-quality acoustics.

A special place in facelifting is occupied by equipping the car with additional lighting equipment. In addition to replacing standard optics with more “advanced” and modern ones, the car is often equipped with additional lighting equipment. – now the phenomenon is not so rare.

Recently, another type of car lighting equipment has appeared, which appealed to those who like to add features to their car - equalizers.

Features of equalizers

Blue equalizer on the rear window

This equipment creates a luminous equalizer image on the car window, which pulsates depending on the frequency of the music. Essentially, this is the same equalizer that every car radio usually has on its display, but only significantly increased in size. In itself, this equipment does not have any positive function; it simply translates the sound of music into a light indication, which... Therefore, do not be confused this type equipment with an equalizer that fine-tune the sound of music.

The image shape of such an equalizer may be different. The most common are the columns responsible for a specific sound frequency. The coloring of such equipment can be of the same type - they all have the same color; during operation, such equalizers display only single-color columns increasing or decreasing in height, divided into segments.

There are also multi-colored equalizers. Each column has several types of segment colors, each color is responsible for a certain range of sound frequencies. For example, a low frequency sound is colored red, a medium frequency sound is green, and a high frequency sound is blue.

Some expensive equalizer models may include several types of light images, for example, there are round multi-colored light indicators on the sides and columns in the center.

Equalizer sizes can also be different. Some are small in size and suitable even for use on side windows, while others are quite large and can cover rear window fully.

The most convenient place to install such equipment is the rear window. His dimensions allow you to equip your car with large-sized lighting equipment. Some also install equalizers on side windows rear doors, but this is not always justified.

How a car equalizer works

Equalizers for the rear window of a car have a relatively simple design. There is a tape on which LEDs are attached, forming segments of columns or circles. Moreover, the tape and the LEDs attached to it are usually transparent, so they do not interfere with the visibility of the car during the day. The number of segments that light up depends on the voltage that the control unit supplies to them. The unit itself is equipped with a very sensitive microphone that picks up sound in the cabin.

Setting the equalizer

This microphone regulates the voltage, which is then supplied to the LEDs. When certain frequencies sound weak, the voltage is applied small, which is why only the lower segments of the columns glow. As the sound frequency increases, the microphone begins to transmit more voltage, causing more segments to light up.

The entire design of this equipment consists of a strip with LEDs attached to it, wiring, a control unit equipped with a power button and adjustment of the sound sensitivity of the microphone, as well as an adapter for connecting to on-board network auto. This is the peculiarity of the equalizer design. It does not require connection to the car radio; its operation depends on the volume of music in the cabin.

Installing an equalizer does not require special knowledge, so anyone can do it.

The LED strip around the perimeter is equipped with an adhesive strip closed protective film. To install this tape, just remove the film around the perimeter and lean it against the rear window of the car with inside so that the adhesive strip sets. If you couldn’t glue it straight away right away, you can carefully peel off the tape and stick it again.

Then this tape is connected to the control unit. The wire coming from the unit is long enough to hide it around the cabin when installing it to avoid damage. The wiring must be laid so that the control unit is within reach of the driver. The best option is a storage box between the front seats. There this block will not interfere. There should be enough wiring to place this unit between the seats.

Typically, this equipment is powered from the cigarette lighter socket. For this purpose, an adapter for connection is included with the equipment. One end of this adapter is connected to the control unit, and the other - with a special adapter into the cigarette lighter socket.

This is the entire connection sequence. All that remains is to check the functionality and adjust the sensitivity of the microphone. To do this, you need to connect the equalizer to the on-board network and turn on the power to the control unit. Then you should turn on the music on the radio and use the adjustment wheel to select the microphone sensitivity.

Installing this equipment is not difficult, and given that LEDs are used as light elements, there will be no significant voltage drop in the car’s network.

The light equalizer on glass certainly looks beautiful. But keep in mind that this is common lighting equipment, which only works well in dark time days. Therefore, if the car is rarely used at night, and the owner himself is not a music lover and does not like loud music in the cabin, then an equalizer, in fact, is not needed.

Finally, it is worth mentioning the legality of using light equalizers on a car. In the rules traffic There is no clause prohibiting the use of this equipment, therefore there is no fine for it, although it is quite possible that one will appear soon.

However, an accident may indicate that the equipment has become a distraction and this condition already provides for a fine. But here, too, it is still necessary to prove that it was the equalizer that caused the accident.


For those who remember the 1980s, this project will undoubtedly bring back fond memories when every piece of audio equipment was replete with LED indicators, especially the Graphic EQ.

This project uses the MSGEQ7 IC, on the basis of which we will create a 2-channel graphic equalizer (in reality a simple spectrum analyzer). I will also be using the Arduino Uno R3, the Arduino development environment, and programming in "C" for the first time in ten years.

To make the above device you will need a certain tool, basic knowledge of electronics and the following components/libraries:

1. 3 wires with male/female connectors as shown in the image above (red, black and green) to connect the light sensitive resistor (LDR).
2. 5-wire male/female connector, also shown in the image above (red, black, blue, green and yellow) to connect the 8x8 LED matrix.
3. 2 LED matrices 8x8.
4. 1 resistor with a nominal value of 22 kOhm.
5. 1 Arduino Uno controller.
6. 1 Spectrum Shield.
7. Arduino LedControl library from the Git Hub resource. github.com/wayoda/LedControl/releases

The circuit is designed to display the left and right audio channel. The seven columns of each 8x8 matrix represent a scaled analogue of the following frequency components present in the audio signal track at any transient state in time.
16 kHz, 6.26 kHz, 2.5 kHz, 1 kHz, 400 Hz, 160 Hz and 63 Hz.

The last column represents the running average of all frequency components.

Audio is fed to the Spectrum Shield through 3.5mm jacks on the board, and other jacks are used to transmit this audio to the speaker.

The schematic diagram for the Spectrum Shield can be found

The LDR is used to programmatically dim the 8x8 LED matrix when ambient light levels drop to produce a higher contrast image.

Step 1: Detailed design


The above image shows how to connect the remaining circuit components to the Spectrum Shield and two 8x8 LED arrays. I have a copy Arduino sketch, used to control the display. The sketch is attached below.

Step 2: Installing Components on the Universal Development Board


This procedure will require some experience in electronics and special tools, such as soldering iron, pliers, scissors, etc.
Now, I connected the developed program with a circuit and a breadboard, which was exactly located above the Arduino Uno and the Spectrum Shield.
Finally, I bent the leads on the 8x8 LED arrays so that they were perpendicular to the board and could fit into the pin holes on the PCB.
Detailed image shown above.

Step 3: Final Assembly

I may not be a huge Justin Timberlake fan like the author of this tutorial, but I couldn't help but notice the stunning graphics in his music video for LoveStoned. This tutorial will teach you how to create a similar effect using just good old Photoshop.

This is what we will achieve:

Lesson materials:

Step 1. Create new document size 1024x768 px, background color - black.

Step 2. Open the equalizer image. I selected the black background of the image using the Magic wand(Magic Wand Tool) and deleted it by clicking Delete, despite the fact that black matches our main background. Now, click on the area surrounding the equalizer and invert (Ctrl+Shift+I) the selection so that only rectangular shapes,constituting the equalizer image were selected. Select blue (80D2FC) as the main color and fill our selection by pressing Ctrl+Backspace. Finally, duplicate this layer and go to Edit > Transform > Rotate 180degrees(Edit > Transform > Rotate 180 degrees) then move the copy as shown below.

Step 3. In the layers panel, select both layers with equalizer and click Ctrl+ Shift+ E to merge them into one. Now let's rotate the resulting layer 90 degrees - go to Edit > Transform > Rotate 90 degrees clockwise(Edit>Transform>Rotate 90 CW). Now copy the layer several times (Ctrl+J) and place the equalizers one below the other. Once done, merge the original layer with all the duplicates.

After making all these adjustments, make a copy of the resulting blue path from the equalizers, we will need it later. Hide it for now.

Step 4. Duplicate this entire track and click Ctrl+ T- we switched to mode Free Transformation. At the top right of the screen you can see the transformation panel. We need to move our row of equalizers to the right - to do this, we increase the number in the X column, click OK - and our track has moved to the right:

Step 5. Interesting move, is not it? Using the same commands, make five identical columns as shown below. Once done, merge it all into one layer.

Step 6. Have you merged all the equalizer layers? Now let's go in Edit > Transform > Perspective(Edit>Transform>Perspective) and drag one of the top edges towards the center. If necessary, make the bottom edges wider. Click OK. We ended up with this path:

Step 7 Add a layer mask. This can be done by clicking on the “Add Vector Mask” icon in the layers panel, or in the menu Layers > Vector Mask > Show All(Layer > Add Layer Mask > Reveal All). Now, using a black brush with soft edges, we will go over the lower part of our “path”.

Step 8 Create a new layer (Ctrl+Shift+N) and with a large white brush, again with soft edges, paint a few white spots on the “path”. Change blending mode(Blend Mode) on Overlap(Overplay) for a subtle lighting effect.

Step 9 Now select your EQ layer and apply the Outer Glow settings for the layer shown below. Now reduce the Opacity of the layer to approximately 50%.

Step 10 Now duplicate your equalizers layer, and move the duplicate below the original. Apply Filter > Blur > Gaussian Blur(Filter > Blur > Gaussian Blur), and then set Blend Mode(Blend Mode)layer on Hard Light(Hard Light) and reduce the Opacity to approximately 30%.

Step 11 Clamping Ctrl and clicking LMB on the mask of the original layer with equalizers, select it. Now, having made the blur layer active, let’s create the same mask on it. To do this, simply click the Vector Mask icon in the layers menu (F7).

Step 12 Now create a new layer at the very top. Select black as the main color and fill this layer by clicking Ctrl+ Backspace. Now go to Filter > Render > Clouds(Filter>Render>Clouds). Put Blend Mode(Blend Mode) layer on Lightening Basics(Color Dodge).

Step 13 Duplicate your clouds layer. We should get a more intense effect. Select your layer with equalizers and instrument Magic wand(Magic Wand Tool) click on the black area. Now invert your selection so that the "path" is selected. Go back to your second cloud layer and press Delete, then reduce the Opacity to 10%. We got some extra fog on the edges of the EQs.

Step 14 Create a new layer. Now select the brush big size with 0% Hardness and 100% Opacity. Choose a light blue color (eg 77D1FF). Make several large spots. Reduce the Opacity of this layer to 30%.

Step 15 Now duplicate your original cloud layer and move it above your big brushes layer. Blend Mode leave Lightening Basics. Now reduce the Opacity of the brushes layer to 20%, and the clouds layer to 45%. We’ll also apply a 200px Gaussian Blur on the layer with the brushes to somewhat “smear” the effect ( Filter > Blur > Gaussian Blur(Filter> Blur> Gaussian Blur)).

Step 16 Now insert a picture of a person in the center of your image. The person is on a white background, so it is very easy to highlight him by clicking Magic Wand on a white background, invert the selection (Ctrl+Shift+I). Copy the person (Ctrl+C), go to our document, paste the person (Ctrl+V). A man should be on the top layer! Now change Blend Mode(Blend Mode) layer on Soft light(Soft Light) and use the tool Eraser(Eraser) to erase his legs, allowing him to subtly blend into the EQ.

Step 17 Now duplicate your person layer and change Blend Mode(Blend Mode) for the duplicate on Normal(Normal). Now, using any method known to you, select the light parts of the photo, in this case the face and shirt. Copy this area to a new layer (Ctrl+J), and copy the previous layer (the whole person and Normal Mode Overlays) hide or delete. Let's return to the light areas - we don't need a tie (it's dark). We delete it Eraser. Be careful not to snag your shirt!

Step 18 Now for the layer with light areas we go to Image > Adjustments > Desaturate(Image> Adjustment> Desaturation). Then, in the same menu, select Color Balance(Color Balance) and apply these settings:

Step 19 Now the fun begins! Remember, I asked you to save one of the paths. We need him now. Move it to the very top and adjust the size so that its height is equal to the height of the person. Reduce the Opacity of the layer a little (to about 80%). Make two copies of this layer and hide.
Return to the original path. Put him right in front of the man, go to Edit > Transform > Warp(Edit>Transform>Warp) and make something like a wave (see the screenshot below). Make one duplicate visible, place it on the left and do the same with it, but on this layer, where there is a narrowing in the center, there should be an expansion. I just can’t imagine how to explain it differently, just look at the screenshot. Having made the first duplicate wavy, move on to the second one and, placing it on the right, make it look like the screenshot below.

Step 20. Now merge all your duplicate EQ layers together, and go to Image>Adjustments>Brightness/Contrast(Image>Adjustment>Brigthness/Contrast) and set your Brightness to -100 and Contrast to +100 to make your image black. We need to add sharpness to the layer, for this we go to Filter > Sharpness > Sharpness+ (Filter> Sharpen> Sharpen More). The edges become sharper and then we use the tool Magic Wand with a tolerance of 50 by clicking somewhere outside of our equalizers.
Now invert the selection (Ctrl+Shift+I) and hide our equalizers layer. We got a selection of all three deformed equalizers. Let's go back to our highlight layer. However, if we now just press Delete, then too much will be removed. Let's take it Eraser(E) with soft edges and Opacity about 20% and carefully remove only those parts that you consider necessary. IMPORTANT: do not overdo your face! Without removing the selection, go to the layer with the black parts and work Eraser there.

From the translator: of course, my role here is not great - I am just a translator. But here's my opinion - the effect on the clothes is not too similar to the one in the video. To achieve the best results, I advise you to use not an equalizer image, but to create some lines yourself and only then, copying them, remove parts of the clothing.

Step 21 Now create a new top layer and use your tool Feather(Pen Tool) to draw a line near your person. Make sure your current brush is 1px in size, 100% hardness, and the foreground color is B6FEFE. After drawing an outline with the Pen, right-click on it and select Stroke a Path(Stroke Path). If your line does not suit you in some way, you can always change its shape using Free Transformation(Ctrl+T). Finally we duplicate this layer and move the duplicate a little lower than the original. I reduce the width of the second layer so that the lines are slightly different from each other.

Step 22 Merge both line layers together and apply Layer Style(Layer Style). In settings Outer Glow We expose what is shown below. Take a small soft one Eraser(E) and erase the edges of the lines a little. Now reduce the Opacity of the layer to 80%.

Step 23 Let's go to Edit > Transform > Scaling(Edit > Transform > Scale) to move our lines a little closer to each other. Now Eraser Let's delete parts of the lines that go in front of the person's feet. Now create a new layer above all the others and use round white brushes. Gradually reduce the Opacity of the brush to create the effect of the edges of the white lines gradually disappearing. Now we just put Blend Mode this layer on Overlap(Overlay), giving the lines a cool lighting effect.