Introduction: VU Meter - LED Noise-o-Meter for Classrooms
I built this a short while ago as an idea to use in a primary classroom setting. Poster displays are often used by primary teachers wanting to control the noise levels in their classrooms but I wanted to add technology to make it dynamic and responsive. The motivation for this came after seeing the Adafruit Digital NeoPixel LED Strip online and realising its potential as part of a VU meter. Everything else developed from this.
Things I used:
- MDF (sheet wood)
- Adafruit Digital NeoPixel LED Strip (1metre)
- Arduino Mega/Uno (In the images you see UNO, but that’s because the Mega hadn’t arrived at this point – I needed the Mega for more 5V and Ground pins)
- Adafruit Electret Microphone Amplifier
- Jumper wires
- 9V battery holder
- Sparkfun Serial 7-Segment Display – RED (optional) Sparkfun Serial 7-Segment Display – YELLOW (optional)
- Right angled break away headers M3 stand-off
For the painting
Step 1: Design and Build
I bought a large sheet (1830mm x 610mm x 12mm thick) of MDF (Medium Density Fibreboard) from a hardware store and got them to cut two thin batons off one side (approx. 1cm wide) - they offered a cutting service and as these are thin batons it made sense to have an industrial-size precision saw make the cuts instead of struggling with it at home. The batons will form a channel to feed the LED strip down and to hide all the wires behind. My channel is roughly 90cm long which accommodates 32 LEDs.
I positioned the channel somewhere in the middle of the MDF sheet, then cut the surplus parts from the top and bottom being mindful of what additional components I needed to accommodate on the board (see design picture). Using the surplus MDF I fashioned two ends for the channel, hollowing it out from behind, again to fit the wires behind.
Step 2: Fixing Together and Initial Test
Once happy I fixed the batons and end pieces in place from behind with screws then wired the LED strip and Adafruit Electret Microphone Amplifier to an Arduino UNO (again, later I use a MEGA but at this testing stage I only had a UNO to hand). The process for attaching this altogether and running the code is very well documented by user erin_cuneo in this instructable so I refer you there for now.
As I intented this to be used in classrooms I had to decide how to divide the meter levels, so opted for Expected, Louder and Too Loud. It occurred to me when designing this that each of these could correspond to Red, Amber and Green (typical VU meter colours in audio equipment). These colours are also often used in schools for zone boards - to monitor good and bad behaviour (green, good - red, bad) so I decided to couple the two - making this dual purpose - VU meter and zone board.
I used an Adobe Illustrator and an A3 printer to create, what will later be, the stencils and fixed them temporarily in place on the board making sure the desired number of LEDs per zone/level were contained by each stencil.
Step 3: Adding Some Counter Displays
You can stop at Step Two, just position and fix everything in place as desired, however I saw the Sparkfun Serial 7-Segment Display and wondered whether I could incorporate this into the project as a way to track where the levels had peaked (in which zone). I could have opted for Adafruit displays but the Sparkfun tutorials here seemed easier to follow. Listed in the 'things I used' at the top of this instructable are right-angled headers, this is because the displays came unsoldered and the right-angled ones would sit better on the board - so I proceeded to solder these in place.
I followed the SPI method explained in the Sparkfun tutorial which required me to splice wires to connect the two SCK and SDI pins together. I then used an example ‘cycles’ program and adapted it to my needs. I attach some example code below (example_counter_code.ino), detailed in the code are the pins I connected to.
Step 4: Incorporating Counters Into VU Meter Code
I combined the counter code from Step 3 with the VU meter code from Step 2 but had to calculate the input values so they would correspond with the amber and red LEDs. There may have been an easier way to achieve this, but I’m no programmer so had to experiment and implement it based on my understanding and ability. Anyway, after a lot of tweaking I got it ‘counting’ at just the right points. Attached to this instructable is the Arduino sketch I used - if there are any viewers more adept with C/C++ please paste your modifications in the comments below.
Here is video of it working. I play some audio (just a tone) holding the mic to the speaker and increasing the volume gradually. The video shows the counters increment by 1 whenever the meter peaks in the red and amber zone (green is not included as this in the expected level and is therefore okay). The sample rate in this video is set quite high; this could be altered however in the code.
Step 5: Fixing Together, Again
With everything working I proceeded to fix everything in place to make sure it was all properly aligned - better to make sure now. For the displays I used M3 stand-offs and cut a slit behind where the displays would eventually sit, this is to feed the wires through so they are hidden behind the board. I then fed them back in through the channel from Step 1 down to the Arduino that will sit at the bottom. Considering all the wiring, the space in that channel is quite busy. For now I've left the wires quite long - they will be cut to size later.
Step 6: Stripping Back Down
Now confident that everything was in the correct place I stripped it all apart leaving just the MDF board with the channel in the middle, gave it a quick sanding then applied roughly 3 coats of white paint. Most of this paint will act as a primer but some will show through to act as an edging border.
Step 7: Stencilling and Spraying
With the canvas set, I printed out my templates onto the backing paper of the Frisket Masking Film - reversing it as appropriate so when it's stuck down it's the correct way up. Using a sharp scalpel knife I cut around the stencils, remembering to keep the counters (the inner sections of letters - the circle in the centre of a letter 'o', for example). I then positioned the film in place. This is fairly tricky so perseverance is required - the beauty of Frisket film is that you can pull it off and re-fix it easily but yet it retains its adhesion well.
The Frisket film takes care of the finer zone/level areas but I used masking paper for the outer parts and frog tape for the central channel (see pictures). I then began spraying taking each zone in turn, working from light dusting to full covering over around 3 coats. It's important to do this in a well ventilated area, yet sheltered from the wind - I used the shed. I had a breathing mask on and was in there for no more that 3mins at a time - those fumes are quite overwhelming so take care.
After completing all the sections, leaving 15-20mins between each spray, masking the previous section before moving to the next, then leaving 4hrs-ish for the whole lot to set, here comes the fun part - peeling back the stencils. I was nervous that the paint may have bled through but as you can see from the pictures it left the perfect straight edge - well done Frisket!
For the blue outer part I masked the inner zone section in the same way that I've already discussed (but leaving about 24hrs for the inner part to fully dry) then sprayed, again working from light dusting to full covering. This part used most of 1 spray can.
Step 8: Assembly
Putting it all back together - this felt like a long time coming. I screwed everything back in place, cut the jumper wires to length and crimped their ends with Dupont connectors. For protection, and to improve the look, I bought a transparent case to house the Arduino, then for portability I attached a 9v battery holder. All done!