In our case, however, the averaging circuit by itself produces a very slow varying signal which is band limited in very low frequencies (some Hz), much less than the half of the sampling frequency. This is due to the need for band limiting of the input signal at less than the half of the sampling frequency. It is a common rule that conversions from analog to digital with an ADC (Analog to Digital Converter) always require an anti-aliasing filter. By implementing these stages on hardware, we save enough computing power (the microcontroller runs in reduced speed), the microcontroller needs less power and makes use of less memory but in this way, we also eliminate the need of use of an additional anti-aliasing filter. However, mainly for simplicity, we prefer these stages to be implemented with external hardware. The rectifier and the averaging detector could be implemented digitally within the dsPIC by utilizing the digital signal processing capabilities of the specific controller. The fourth stage is the CPU of the microcontroller and the fifth stage is the display device (LED bar or screen). The third stage is an analog to digital (A/D) converter, located inside the microcontroller. The second stage is an averaging detector circuit. The first stage is a precision rectifier. For stereo or for any other polyphonic version, the above block has to be repeated.Īccording to figure 1, the VU-meter consists of 5 stages. The presented block diagram is for a monaural VU-meter (there is only one audio input - one channel). The general concept of a digital VU-meter with an analog inputįigure 1 presents the general concept of a digital VU-meter with an analog input. Before we analyze in detail how these numbers came about, let's first look at the block diagram of our digital VU-meter: Figure 1. The more essential reason of choosing dsPIC30F2012 is due to its 12bit analog to digital (A/D), which gives a 72db dynamic range, compared to 60db that we would theoretically have with a 10 bit A/D. b) Its a relatively low cost device and has a lot of input-output (I/O) pins and c) just happened to be in stock in our lab. The choice of dsPIC30F2012 instead of any simple microcontroller was made because: a) it has a 12bit A/D converter module unlike most common microcontrollers that have 10bit A/D converter. We only use the CPU of the dsPIC30F2012 as in the case of being just a simple microcontroller. However, we do not use any of these capabilities in our project. This microcontroller belongs to the Microchip dsPic family and has fast digital signal processing capabilities. We use the dsPIC30F2012 microcontroller from Microchip. Actually, we present some fresh ideas and not just construction details. Our VU-meter uses LED bars but the basic idea presented here could be used for building meters to use any kind of digital display. The idea of using a microcontroller to display audio signals level in real time is quite simple but there are several details and limitations that we will deal with. It rather has analog inputs, and therefore can be easily embedded in any common audio device (amplifier, mixer, musical instrument, etc.). Although being a digital one, it does not use any digital interface in its inputs. Our digital VU meter is based on a microcontroller and it is able to display a stereo bar graph on two LED bars. Int groundPin = įor(int i=0 i0 || ledArray.g>0 || ledArray.Here we will deal with the construction of a digital sound level indicator (Voltage Unit meter). Int ledCount = 9 //# of RGB commone cathode LEDs Int greenPin = 10 //pwm analog out for all green LEDs Int bluePin = 9 //pwm analog out for all blue LEDs Int redPin = 8 //pwm analog out for all red LEDs I think my biggest problem will be finding a running min/max from the analog read so my VU meter will utilize all LEDs? (music -> LPF/HPF-> op amp -> envelop detector) I will be adding 2 analog reads that are measuring music volume at 2 frequencies You don't have to write the code, just give me some tips on how to incorporate the VU effect. I, also, would love advice on how to add the VU meter effect ( fade between changes). This is the start of my code, and I wanted to make sure this is an acceptable method to multiplex.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |