On the Master PCB schematic you can locate the hardware portion of the VU meter around IC9 (LM386N-1). Photo #1 is a close up of the VU meter part of the schematic, all of the components there allow us to read the ambient sound intensity around the beer pong table. Instead of soldering an electret mic onto the Master PCB, I soldered a 2-pin wired connector to the electret mics positive and negative pads and then plugged an electret microphone into the connector. Either way works fine, just be sure to have an electret microphone connected up to the master PCB before trying to use the VU meter feature! I may have have forgot to do that at first. ;)You will notice that there are three potentiometers within the amplifier circuit. Each of their purposes are listed below, as well as in photo #1.This potentiometer will adjust the gain of the amplifier. If we have a higher resistance across the potentiometer, we will have less gain in the amplifier and vice versa. If we have too much gain we will pick up noise in the circuit but if we have too little gain we won't pick up much audio around the table. It may take a little bit of trial and error to figure out what resistance works best but it shouldn't be too critical. We can also filter out some of the noise in the software too by offsetting the received ADC value. A 1kΩ resistance works well here.This will adjust the sensitivity of the microphone. I found that this doesn't make all that much of a difference, if you put in a 10kΩ fixed resistor instead of a potentiometer it will work fine.This will adjust the damping of the signal. If we set the resistance real low, we will receive a lot of jittery ADC values. By setting this to a higher resistance, the DC converted audio signal feeding into the PIC will be much more stable. I find that keeping this from 5kΩ to 10kΩ works the best.There are three main VU meter functions included in the source code and they all follow the same coding format. We read in the audio ADC value from analog channel AN2 with the Read_VU(void) function, we cap the ADC value at a maximum value of 31 which gives us 32 different audio intensities to work with (0 - 31). We can then program the beer pong table to modify any feature on the table at any of those 32 intensity levels. We can also increase or decrease the amount of intensity levels from the ADC value if we need to. Before we start calibrating the VU meter, take a multimeter and set the potentiometers near the values that I stated above. If VR3 is ever set to 0Ω, you sure won't be seeing an audio signal from the amplifier as it will be shorting to ground!In order to get the desired operation from the VU meter, we will have to filter off any unwanted noise that is on the ADC line. Whether it is completely quiet in the room or extremely loud, there will always be a bit of voltage on the signal line that feeds into the ADC module. We don't want the beer pong table to interpret this voltage as audible noise so we must offset the ADC value.If you go into the LED_Graphics.h file which contains the function prototypes for the VU meter functions, you will see two constants called VU_SENSITIVITY and VU_OFFSET. Follow the steps below to calibrate the VU meter:Start up the MPLAB IDE and load up the source code. Go into the main function and comment out all of the current code.Add the VU_Meter_Bar() function into the main loop (This should be the only code running in the main loop). Build the code and program the PIC on the Master PCB.Make sure that the room is completely silent and look at the beer pong table. If any of the LED rows are on it is because the VU meter is picking up noise from the circuit.If all of the LED rows were on while the room was completely silent, increase the VU_SENSITIVITY constant by 1. Rebuild the code and reprogram the PIC. Continue doing this until there are less than 32 LED rows lit up when it is silent in the room.Now that there are less than 32 rows lit up on the LED grid, get a rough count of how many of the rows are still lit up. Go to the VU_OFFSET constant and set its value equal to the amount of rows that are lit up. Rebuild and reprogram the code.It should be calibrated now and if you turn some music on or make noise you should see the VU meter respond very well to bass and low frequencies. If you still have a few rows that are lighting up when the room is silent, just increase the value of VU_OFFSET until the grid is completely cleared when it is silent and you'll be good to go!If you can't get any response from the VU meter, make sure to check the resistance across VR1, VR2 and VR3 on the Master PCB and set them close to the values that I posted above. If you start up the VU_Meter_Bar() function and no LED rows are lit up when it is silent, you can keep decreasing the VU_SENSITIVITY and VU_OFFSET values until you see some noise, then backtrack one step until there is no more noise. This will ensure that the VU meter is at its optimal sensitivity. The three main VU meter animations are listed below.This function will light up each row of the LED grid (32 rows) independently according to the sound intensity of the music. If the audio level is within values 0 and 26, the color of the RGB pods will be green. If the audio level is above 26 and below 31, the color of the RGB pods will be yellow. When the audio level maxes out at 31 the color of the RGB pods will be red and the LED rings on the table will also be turned on.This function will draw a circle in the middle of the LED grid and the radius of the circle is determined by the audio level from the ADC module. The radius of the circle expands as the audio level increases and is calculated as (audio level / 2). If the sound level is within values 0 and 26, the color of the RGB pods will be green. If the sound intensity is above 26 and below 31, the color of the RGB pods will be yellow. When the audio level maxes out at 31 the color of the RGB pods will be red and the LED rings on the table will also be turned on.This function will adjust the color of the RGB pods in relation to the audio intensity. If there is no sound, the RGB pods will be dimly lit as blue. As the audio intensity increases, the red channel will get brighter and overtake the dimly lit blue channel on the pods, giving off a reddish/pink color. When the audio level maxes out at 31 the LED rings on the table will also be turned on.Remove all of the code from the main() while loop, type in one of these animations and program it to test it out! All three of these functions can be seen in the video below.