Two-channel peak VU meter on ATmega8. Dual-channel peak VU meter on ATmega8 Let's move on to the design

The project uses ATMega32 and a 16x2 LCD indicator connected via a 4-bit bus. The device itself, by and large, plays the role of a two-channel voltmeter, only the information output is organized not in a linear relationship, but in a logarithmic one. This is due to our anatomical feature of sound perception.

When assembled, the operation of the device looks like this:

The signal is input to the first two channels of the ADC (PA0 and PA1). In order not to catch debris from outside, it is necessary to press the ports to the ground with resistors with a resistance of 10k. Depending on the voltage value at the input, the indicator LCD is filled with filled symbols (in the memory of the LCD controller, the symbol number is 255).

Stereo signal level indicator circuit:

I did not use filters and an operational amplifier at the input, I sent the signal directly to the microcontroller. As it turned out, in such projects, when it is necessary to quickly update information on the display, it is better to use a standard 8-bit connection. Otherwise, the display may not have time to display information and the image will flicker noticeably. You can download the project files (~150kb) from the link.


This diagram is also often viewed:

Signal strength indicator 2 x 20 LED on ATMEGA8.

On one of the foreign sites I found material on assembling a signal level indicator built on the Atmel AVR ATmega8A microcontroller or the older Atmega8 or Atmega8L. There is no point in translating the article verbatim, because the author assembled the circuit on a breadboard, but nevertheless, you can watch the indicator in action in the video that you will find in the archive. The indicator has 20 LED divisions on each channel. The display range is from -34 to +4 dB. As indicator LEDs, you can use monolithic poles such as DC20/20GGGWA; it was for these LED matrices that I drew the circuit board. To begin with, here is a schematic diagram of a signal level indicator:

When implementing the circuit, you can also use two lines of 20 ordinary LEDs. Resistors R1 ... R4 determine the current and therefore the brightness of the LEDs. The left and right channel signals are connected to the analog-to-digital converter inputs ADC0 and ADC1. The fall time (attenuation) of the scale is about 600 ms. The device has a function for displaying peak signal levels; it can be activated by closing the “IM” (Indicator of Maximum) jumper; instead of the jumper, you can install a latching ON/OFF button.

The type of LED assembly and its dimensions are shown in the images below:

View of the LED signal level indicator board in LAY6 format:

You will find the microcontroller firmware in the archive (file with hex extension). Setting the configuration bits in PonyProg is shown in the following image.
(Hexadecimal values: Low Fuse: A4, High Fuse: D9.)

Warning!!! I have not tested the circuit in hardware.

The size of the archive with materials on the signal level indicator on the AVR Atmega8A 2 x 20 LED is 4.8 Mb.

If you find errors or have suggestions, do not hesitate to write comments.

I present to you another simple stereo audio level meter for an amplifier or other audio equipment. The indicator has 2 columns of 20 LEDs and the ability to indicate the maximum level. It is controlled by microcontroller IO1 - Atmel AVR ATmega8A or older ATmega8 or ATmega8L. This is the only integrated circuit in the device that provides indication of both audio channels.

The indicator has 20 LED divisions on each channel, 1 division corresponds to 2 dB. Display range -34 to +4 dB. When the audio signal level exceeds 0 dB (18th LED), overload occurs. You can use monolithic columns (lines of LEDs) or individual LEDs as indication LEDs. The LEDs are controlled in a multiplex manner in 10 steps, 4 LEDs in each step, the multiplexing frequency is about 100 Hz. Resistors R1 ... R4 determine the current and therefore the brightness of the LEDs. The left and right channel signals are connected to the analog-to-digital converter inputs ADC0 and ADC1. The fall time (attenuation) of the scale is about 600 ms.

The device is also equipped with a peak level indication, which can be activated using a jumper on the board labeled IM (Indicator of Maximum). The audio level meter is powered by a 5V power supply, and the consumption of all LEDs is about 45mA. Capacitors C1 and C2 should be located as close as possible to the microcontroller IO1.

Archive for the article "Audio signal level indicator 2x20 LEDs on Atmega8"
Description: Source code (Assembler), microcontroller firmware file
File size: 2.64 KB Number of downloads: 798

I present to you a simple project for an audio signal indicator. The distinctive feature of this project from others is that in the circuit I used 32 LEDs for each channel, which turned out to be a long line. The device is based on an AVR ATmega8535 microcontroller, ULN2803 - an 8-channel Darlington switch, in addition, an operational amplifier is used, I think its purpose is also clear. The sensitivity of the indicator is adjusted by resistors R32 and R33, for each channel separately. This project is my thesis work, which I did a couple of years ago, I came across the diagram while rummaging through folders on my PC, and decided to send it to the site.

The diagram is quite voluminous, I did not abbreviate the designation of the LEDs, you can see the diagram below:

As for LEDs, it is convenient to replace them with special LED strips, and they will look better.

The entire device was assembled on a breadboard; I did not draw a printed circuit board; anyone who liked the project can draw a printed circuit board and send it to the forum. All radio components in the circuit can be replaced with similar ones, the values ​​of resistors and capacitors can be set to similar values. Transistors can be replaced with any other similar ones. The crystal oscillator can be set to 14-16 MHz, not critical. Photos of the device below:

When programming a microcontroller, there is no need to set fuses, i.e. select the controller we need in the program, open the firmware and click flash. If the device is assembled without errors, the circuit will work immediately.

List of radioelements

Designation Type Denomination Quantity NoteShopMy notepad
IC1 MK AVR 8-bit

ATmega8535

1 To notepad
IC2, IC3 Composite transistor

ULN2803

2 To notepad
IC4A, IC4B Operational amplifier

LM358

1 To notepad
Q1-Q4 Bipolar transistor

BD140

4 To notepad
Q5 Quartz resonator16 MHz1 To notepad
C1-C4, C11, C14 Capacitor100 nF6 To notepad
C5-C8 Capacitor10 nF4 To notepad
C9, C10, C15, C16 Capacitor220 nF4 To notepad
C12, C13 Electrolytic capacitor10 µF2 To notepad
S17, S18 Capacitor22 pF2 To notepad
R1-R16 Resistor

68 ohm

16 To notepad
R17-R20, R23, R24, R30, R31, R36, R37 Resistor

1 kOhm

10 To notepad
R21, R22, R29 Resistor

1.5 kOhm

3 To notepad
R25, R26, R34, R35 Resistor

47 kOhm

4 To notepad
R27 Trimmer resistor100 Ohm1 To notepad
R28 Resistor

470 Ohm

1 To notepad
R32, R33 Trimmer resistor20 kOhm2

Continuing the theme of “Adjustable LED” and pursuing the goal of trying out a smart LED strip based on W.S.2812 B(NeoPixels) a new device was born - Adjustystrip— advanced level indicator!

The store provided me with the tape for testing. If you like the device and want to repeat it, then the tape in Ukraine can be purchased in the same store - link to feeds. For Russia, it can be purchased from another of my partners, TIXER.RU (they promised to replenish the range in the near future).


Let's move on to the design.

The circuit is elementary - just a few parts and ATtyni13. I hope you know how to write firmware to the MK? No? Then you.

The default ribbon length is 30 pixels. The number of display pixels can be changed by specifying in the source the value of the constant “Number_Pixels” equal to the real number of pixels (the effects will be automatically recalculated to the new value).

Despite the simple design, the level indicator turned out to be interesting! With a large selection of ruler display options. The device uses a special palette stylized as a flame. Accordingly, each level value will have its own color from the palette:


Device
– visually displays on the tape input level. This is a kind of large LED column.

The indicator can work in 9 input level display modes. To cycle through modes, press the “ Mode" The selected mode is stored in non-volatile memory and will be automatically activated when the device is restarted.

Modes:
0 – Off – tape is turned off
1 – Simple – regular one-color stripe
2 – Bar – ruler from blue to white according to the palette
3 – Inv_Bar – ruler from white to blue according to the palette
4 – Color – the entire line is highlighted in one color depending on the length
5 – Point – colored dot indicating the level
6 – Solid_Color – all pixels light up in a color depending on the level value
7 – Fire – stylized fire – the higher the level, the larger the flame
8 – Chaos – chaotic pixel illumination (varies depending on the level)
9 – Scroll – level shift along the strip

The device, in addition to displaying the input signal level, can also operate in automatic mode. To do this, you need to close the “Demo” switch to ground. In Demo mode, the device level changes randomly automatically.

Since the device is elementary, to demonstrate its capabilities I assembled it on a breadboard in a couple of minutes:

And this is what happened:



Materials for assembling the device:
- Materials for assembling the device

Scope of application of the level indicatorAdjustystrip:

— The first thing that comes to mind is music visualization.
— Also, I think it would look great if they were used to illuminate the tachometer in a car (depending on the speed, the illumination will change color).
— Next is the illumination of the level control knobs.
— Also creating original lamps for autonomous operation in demo mode (the fire mode looks very impressive even on its own).
— Visualization of temperature (for example, you can use a cheap analog thermometer LM35) ...


Update 2016
viktor001 did a great job connecting the audio to the device. It turned out great. The firmware has also been slightly changed - see the archive.


The circuit for the indicator turned out to be incredibly simple and actually corresponds to the task at hand - prostate, easily accessible components and 100 percent repeatability. When assembled correctly it works immediately. The whole setup comes down to setting the compression levels and microphone amplifier output. The main and only requirement is not to set the gain to the maximum. The presence of a compressor is not a cure-all, and when working from a microphone it still has its own regulation limits. You can, of course, “pinch” the signal with a compression regulator, but then the mobility of the display suffers. The best remedy is the provided gain control Ku on the first op-amp of the low-pass filter. When operating from a linear input, the compressor copes remarkably well without additional adjustments.

With power supply, the circuits are even simpler. The choice of power supply was based on the requirements of the WS2812B tape, more precisely on current consumption, plus a small margin. We get 10 volts through a DC/DC converter.

The circuit for the indicator turned out to be incredibly simple and actually corresponds to the task at hand - prostate, easily accessible components and 100 percent repeatability. When assembled correctly it works immediately. The whole setup comes down to setting the compression levels and microphone amplifier output. The main and only requirement is not to set the gain to the maximum. The presence of a compressor is not a cure-all, and when working from a microphone it still has its own regulation limits. You can, of course, “pinch” the signal with a compression regulator, but then the mobility of the display suffers. The best remedy is the provided gain control Ku on the first op-amp of the low-pass filter. When operating from a linear input, the compressor copes remarkably well without additional adjustments. Powering the circuit is even simpler. The choice of power supply was based on the requirements of the WS2812B tape, more precisely on current consumption, plus a small margin. We get 10 volts through a DC/DC converter.

By the way, so that the first pixels do not glow during the pause between tracks, a resistor of 100k relative to ground must be placed at the input of the MK. I missed this point when I was drawing the diagram.


There are amplifier seals in the archive. I did not indicate the location of the microphone amplifier parts. Therefore, I am attaching the MU board as a separate unit. Everything is indicated on it. Pay attention to the jumpers.


(Visited 21 101 times, 1 visits today)