Archive for the ‘Music Gear’ Category


PA Cabinets

Monday, August 15th, 2005

Cost

  • 2lbs of Screws: free, already had them
  • Carpet: $25
  • “Cornbread”: $5
  • Metal boxes: $5
  • Paint: $2
  • Liquid Nails: free, left over from some construction
  • Chicken wire: free, friend had a roll
  • Wood: free, found behind a cabinet shop
  • Speakers: free to me, friend’s dad bought them for $8 from a thrift store
  • Crossovers: free, capacitors that were lying around

Total: $37

Time: two weeks

Dimensions

(These assume wood of 3/4″ thickness)

4pcs 23 1/8″ x 14 1/2″ (back/front)

4pcs 23 1/8″ x 11″ (sides)

4pcs 16″ x 11″ (top/bottom)

The tweeter is 4″ x 10″, with the center 5″ from the top of the front piece.

The woofer has a 12″ diameter and its center is 10″ from the bottom of the front piece.

It’s funny how these dimensions came out perfect. And I mean perfect. We simply drew them out on a large piece of MDF and luck saved us again and again. The chicken wire that went over the front, for example, was exactly as tall as the speakers. No matter how we chopped up the metal corners we used, there was not more than 2 inches of waste from each section I bought. The carpet from Home Depot could be evenly cut to cover the speakers with no waste. There is something godly, something universal in these dimensions. When a future Einstein publishes the Grand Unifying Theory it will no doubt come from careful study of these speaker cabinets. Until then, note that when the saw cuts, it will remove about a 1/16″ of wood. We left an 1/8″ gap between each section that would be cut out.

Remember to recess the front about half an inch so that the speaker surrounds do not interfere with the grill.

Crossover

In any serious discussion of crossover design you will have to have specs on the speakers you are using. For the 12″ woofers, I could not find anything. For the ‘68 Magnovox tweeters, I wasn’t going to find anything. Well, now those engineering classes have a chance to prove their use!

First you need to know the impedance of the speakers. The woofers were 8 ohm. I guessed that the tweeters would be between 8 and 16 ohms. I measured them with a VOM (which shouldn’t work too well… but the tweeters are so low powered compared to the woofers that they are almost negligible anyway) and it read 12 ohms. I just needed an approximate value to calculate the size of capicitor needed.

The crossover should make the output from the cabinets at all used frequencies flat. Another consideration: the woofer can handle any frequency given to it. The tweeter, however, distorts at lower frequencies. So it must have a high-pass filter before it. The tweeter, being lower powered, also needs to have the signal attenuated with a resistor. The circuit should have an impedance of 8 ohms since it is being powered by a home stereo, car audio uses 4ohm amplifiers. A car amp could power the speakers, the output will just be quieter than with 4 ohm speakers. Powering 4 ohm speakers with an 8ohm amp is not a good idea since it was designed to drive a lesser load and turning the volume up can kill the amp. I actually tried this. The car amp had an automatic shut off. When I played chords at high volumes, it would turn off as I plucked the chord, then turn back on. After a while it overheated and shut off. After repeating this abuse several times, it refused to turn back on again.

I wanted to see what the frequency response of the speakers was. I tied a microphone to my desk lamp (attached to my computer) and put the speakers below it. Then I hooked them up to my stereo (which is attached to my computer). I downloaded test tones from a site I found on Google. I played each test tone and watched the levels in SoundForge coming from the microphone. This test is not very good because the microphone does not have a flat response and the preamp in the sound card probably colors the input even more. The microphone also fell off the lamp when I switched from the woofer to the tweeter, so I could not tell how the levels varied between them. Later I learned that one can put a VOM on the speaker’s terminals and the measured voltage will be proportional to the volume.

Matlab graph of the results (available in text here)

The volume for both speakers, according to the computer, dropped off after 2khz. According to my ears, the tweeter worked just fine up to about 10khz. I guess the microphone or the sound card’s preamp cannot handle higher frequencies. Also, the tweeter distorted at 200hz and below.

What does this graph tell us? Well, there is enough overlap that we can safely cut out all frequencies below 1khz for the tweeter. Since I wasn’t sure about the actual impedance of the tweeter, I just chose 500hz as the cutoff frequency for the filter. Whether the impedance is 8,12, or 16 ohms the cutoff frequency will be safely above the 200hz that makes the tweeter distorts.

Fc=500hz R=12 –> Fc=1/RC –>

The tweeter is louder than the woofer for the same power. But since I couldn’t measure how much louder… I decided to listen to it when it was built and add a resistor then.

Finding the Parts

Besides being short on money, I wanted to reuse as much material as possible. I went to home depot and it looked like the wood alone (3/4″ plywood or MDF) would cost almost $100. Yet I know there is wood being thrown away everyday. So my friend Victor and I went on a bike tour of local dumpsters. Not surprisingly, we found quite a few construction sites. Most only had CDX plywood (containing knots and holes… not the kind of stuff you want to use for speakers). I did find enough of that and good 2×4s to build a small shed but… Then we took a car and hit up some cabinet shop’s dumpsters. There was more than enough MDF. We took a 4ft x 6ft piece.

All those knots are no good for cabinets… but you might find carpeting and other stuff

I had to give in and go buy carpeting. It cost $25, the single largest expenditure in the project. It really helps the boxes look professional thouogh. While I was there I bought black spray paint ($1/can). I also needed to find something to use as handles and to put the jack socket into. I found electrical boxes for $0.69 each. Flat plates to cover electrical boxes were $0.30. Works for me… You do not want to use handles that stick out. They get caught on things and they are not comfortable for carrying heavy speaker cabinets any distance.

Electrical box

Cover we used as a backplate

You can fill the electrical box with water after soldering it to make sure it does not leak

Doh! The electrical boxes wouldn’t go into the holes in the wood without chopping off the edges of the backplate.

Ben and I simply soldered the plates to the back side of the electrical boxes.

Corners were a problem. Door corners cost $3.15 for a pair and looked bad. With 8 corners per box… no way. I remember the metal edges that go over drywall. I had no idea what they are called. The clerk called it “cornbread” or something like that. I bought XXX ft.

Cutting the Wood

This step was the most time consuming and least fun. This is because all I had was a jigsaw and a rotary saw. Victor aided in this step of the construction. We killed his direct drive saw before I went home and got my worm-drive saw. It is hard to cut straight lines. We used a right angle and two clamps to hold a 2 x 4 to each piece of wood. Then, using the 2×4 as a guide, I would cut the wood. This took two days.

After it was all cut, we fit it together and… the lack of straight lines hurt. Some pieces were a little too long or short. We screwed the whole thing together and then it held but with some gaps. So we took the screws out and put Liquid Nails along all the edges. Then we screwed it back together again. A few cracks appeared around some screws but they were solid enough to jump on…

Liquid Nails is our savior

Ben, usually conservative before a camera, seems to be happy with how the cabinets are turning out

Painting

Why would you paint the boxes if they will be carpetted? Because if the carpetting rips you will have tan colored spots showing… Also the front will not be carpetted. You need one can per box. I did two coats.

All the rest of the construction

Now at Ben’s garage, we found the center of gravity of the boxes so we knew where to put the handles. Just put the boxes on a broomstick and see where they balance. It was right about in the middle of the boxes. With deeper boxes and bigger speakers it would be towards the front of the box. We carried the boxes around and decided to put the handles 3/4 of the way up the side. A drill and a jigsaw were used to cut the holes out. The plates with the jack for the speaker cable went in at the same height on the back. For these, we drilled holes big enough to fit a 1/8″ audio jack. Then we glued the jack with LockTite after tightening the nuts.

Adhesive will keep the jack from coming loose and also seal any gap.

Before putting the boxes in, we carpetted the box. We cut a piece that went from the bottom to the back to the top. The two other sides were cut out seperately. This was to keep the number of corners that had to be covered to a minimum. We used a staple gun to attach the carpet. The staples had to be hammered afterwards to hide them.

We wondered whether the speakers could blow a cable out through the jackhole. We calculated how much volume the woofers move and how much force would be exerted on the jack if that volume were to be pushed through the hole. The answer was a definite no. Also, as I mentioned above, if you make a hole just big enough for the electrical box to fit snugly, it won’t go in with the back plate on. So we used a cutting wheel to cut the plates down to size. After the boxes are in, they should be sealed to prevent any leaks.

Silicone tub and tile sealer! Hey, don’t sit on this stuff, it doesn’t want to wash out. RIP to a new pair of shorts I was wearing.

After that, it was time to hook up the wiring. We had to put capacitors in parallel to get the right values. And we still weren’t sure about the resistor, so we left it off. Yes, we’d get back to it right?

I keep burning myself with the soldering iron so Ben did the soldering himself

Now, an enclosed space will have a frequency at which it resonates. My living room, for example, would start to shake when I played a G3. The waves add constructively and soon the windows are rattling. The same will be true of the box. What is needed is some sort of dampening to keep the vibration from increasing. Batting is the solution. I used the insides of several old pillows.

Careful with the wiring while you put the batting in

After this step, the speakers went in. We painted the screws yellow earlier. You had better hope you made good fitting holes for the speakers otherwise your screws will have nothing to attach to or the speakers won’t fit inside. We put silicone sealant on the bottom sides of the speakers to keep them from rattling and to prevent air leaks. Luckily Ben had black silicone that matched with the color of the cabinet.

Just don’t get this stuff on the cones

Then it was time for the corners. We chopped the cornbread into sections of the right length. We put a screw in every other hole in the cornbread. The ends of the corners were sharp, so we cut them at 45 degree angles with tin snips on each side then filed and hammered them till they were round.

These corners are still problematic but better than nothing.

The rubber feet you see in the picture above are stoppers from discarded labware. We drilled holes halfway into them, then put a screw in the hole. They haven’t held up very well but they do keep the cabinets from scratching hardwood floors.

Before we finished with the corners, we cut chicken wire and placed it over the front. We stapled it on then put the remaining corners in place.

We tested the speakers out. Very loud, but too much treble. The resistors! Gah! Now that the box is all sealed how do we get inside to add them? It was midnight by now, we both wanted to go to sleep, so the solution was to turn the treble on EQ down and leave that for another day. That day has not yet arrived…

I wanted to put some sort of badge on the speakers. The only pair we found were these Darwin fish.

8 Input MIDI Drum Pad

Thursday, June 23rd, 2005

The project on a protoboard with a practice pad.

I needed a way to record drum tracks to go along with guitar, bass, and keyboards without the hassles of a real drum set (size, cost, volume). I went to Guitar Center and saw they had electronic drum sets. These use trigger pads and a trigger box/synthesizer and amp to simulate real drums. Many of the pads looked an awful lot like something else I’d seen… practice pads! While a real trigger pad costs around $100, I bought a practice pad for $12. They are round, plastic enclosures filled with foam and covered with a skin on the top. You can stick a piezo-electric sensor inside the foam of the pad, drill a hole in the bottom of the pad and wire the peizo to an RCA jack. Having already played with MIDI on the AVR 8535, I figured it would be trivial to filter the input from the piezo and generate MIDI events. This set up would lack a synthesizer but as I use a computer to record music I could just plug the drums into the sound card of the computer and use a software synthesizer (Cakewalk and Cubase work nicely and can be used to record the audio tracks as well).

The first step was to get the AVR to generate MIDI events. I chose to have it play a bass drum every second.

The wiring for the MIDI ports. Note that you only need the MIDI out for this project. I used an 74LS04N for the inverters (the things that look like triangles with a circle on the end) but they are not necessary if you haven’t got any on hand.

MIDI Message Format
Status Note Velocity
Specifies the type of message (NOTE_ON for example) and the MIDI channel The value of the note (E3 or G1 etc) How hard the note is pressed
The 4 MSB are the message type
The 4 LSB are the channel
NOTE_ON is 1001 or 0×9
0×00 to 0×7f From 0×00 to 0×7f

MIDI uses 3 byte words for each note. The drums are on channel 10 (0×9 in hex, since the first channel is 0). Each note plays a different drum. The velocity is how hard the drum is hit (determined by the AVR’s ADC). Only Status Bytes can have a 1 in the MSB so the range for the note and velocity are from 0 to 127. A velocity of 0 is used to turn a note off.

After this, the next step was to use the ADC to sample the input from the piezo to generate NOTE_ON events with different velocities. This was actually the most time consuming part of the project because I forgot to turn the pullup resistors off in the AVR (when I wasn’t hitting the “drum” and the piezo voltage was low, the AVR would source current from the input pin and the software would get wacky). After that, however, the development was straight forward.

Simply attaching the piezo to an input pin does not work. First, the voltage can get quite a bit higher than the maximum 5V. Since the piezo can be described as an AC voltage source, the voltage also goes negative (which makes the AVR misbehave). The latter problem is easily solved by placing a diode after the piezo. A potentiometer placed after the diode can be used to keep the voltage from exceeding 5V. This pot can also be adjusted for different sensitivity. Also the change in voltage on the input pin is so brief that the ADC will not often read it. The value on the pin must be held somehow, so I added a 100uF capacitor. However, without some way to leak current around the capacitor it will stay charged for a few seconds and trigger too many events. If you know how often the ADC samples each pin, you can find the right value of resistor by finding the time constant of the circuit. One last detail is that the AVR would generate events when I didn’t touch the piezo at all. I added a 1uF capacitor to filter out noise. All was good.

The circuit for each trigger input. The diode is need because the voltage between the piezo and the port is negative half of the time and we don’t want the input pins to source current. The potentiometer adjusts the sensitivity of the input. The 1uF capacitor is used to remove high frequency noise. The 100uF capacitor “holds” the input from the piezo long enough for the ADC to sample it. The 1M Ohm resistor leaks current to ground around the capacitor so that this value is not held too long. Other values can be substituted as long as the time constant remains the same. Replacing the 1M Ohm resistor with a higher value will result in multiple triggers for each event (without changes to the software) and lowering it may result in incorrect velocity values or missed events.

Connections for the ADC

Connecting a crystal to the AVR

The software is simple in concept. Just sample each of the 8 ADC inputs, one after the other. If the value exceeds a threshold, queue the appropriate MIDI bytes. The AVR has interrupts for ADC conversion finished and finished sending serial data. The program just needs to start one sample of the ADC, then the ISR for when the conversion finishes saves the value in a matrix and then goes on to the next pin and samples that. A loop in main() waits for the value in the matrix for each pin to exceed the threshold then queues the appropriate bytes. It also turns that channel off for however long you wish (I set it to 1/8 of a second). The queue code pops bytes off the queue and throws them into the serial data register, which automatically sends the byte. When it finishes, it triggers and ISR which I have coded to try and pop more data off the queue into the data register. After the 1/8th of a second expires, the main loop queues a NOTE_ON event with a value of 0×00 (you could use NOTE_OFF too). This it to keep the drum from play forever.

Further improvements would be to have an LCD display and buttons so that the user can adjust which drum each of the inputs is tied to, rather than having to reprogram the AVR. Settings and drum names can be saved in the AVR’s eeprom (quite a tight fit actually!). Since building this project I have gone ahead and planned these improvements out. They are described in “drum data.rtf” in the code zip file.

(Note, I can’t find this zip file anymore after moving hosting… sorry)