Feb 25 2010

amp attenuator

What is that? It’s what I call the Amp Can. It goes between my guitar amp’s output and the speaker to cut the signal’s volume. Why? Because tube amps sound better loud, but that means that, well, it has to be loud. Stick the Amp Can in there and you get all the benefits of cranking the amp without the hearing loss! How does it work?

It’s really pretty simple. It’s just an in jack, 4 resistors (big 20w resistors), and an out jack. This web site has a little more info on the specifics. I built the bridged-T resistive circuit since it is supposed to be better. Resistive designs are not as good as fancier designs because they tend to affect the tone a bit, especially at higher levels of attenuation, but I was only doing a little bit of volume cutting, so it’s not noticeable. You could also build one that’s adjustable, but I can’t buy the parts for that at RadioShack, so I went with a fixed one. It cuts the volume by 6 dB.

Now if only I had a lid for the can…


Feb 12 2010

BYOC Large Beaver custom guitar pedal

Finally finished my Big Muff clone. It’s based on the schematic from the BYOC Large Beaver, which is in turn based on the original Big Muff pedal used by Hendrix, The Rolling Stones, The Smashing Pumpkins, and numerous others. At least, mine is based on the original. They also provide schematics for later versions, but I chose to go with what I thought would sound best. And boy does it sound gooooood.

It took me all week to get it working. With both my previous BYOC builds, like the OD2 I built a while back, I used a PCB and enclosure from BYOC. This time, I decided to lay it out on perfboard and make my own enclosure. It was very aggravating, but also very satisfying once it worked. The biggest problem I had was that several of my connections were wrong when I made the layout, so I put it together wrong. Luckily, BYOC has a helpful community of pedal builders that can look things over for me and tell me I’m an idiot.

I salvaged the enclosure from an old printer selector box I had lying around. I have no idea why I had it lying around, but there it was… It’s a very sturdy box, which also means that it’s a big pain to drill holes in, but at least it’s not going to break.

front view

I’ve changed that knob to something else. Originally, there was to be a selector knob there, but I ended up going a different route and put the original selector knob back.

back view

I decided to keep the printer ports on instead of having big holes. This way I can confuse people, too.

gut shot

That big thing in the back right corner is the original selector switch used with the printer ports. Every single pin on the ports had to be connected to it, so it’s a little intense. Those white wires are the places I messed up the layout and had to redo a couple connections. It’s not quite as neat this way, but it works, so whatever. On the right, you can see a smaller daughterboard that I’m using in place of the selector knob. It works just like the jumpers on the back of a hard drive. The jumpers specify what the EQ curve is going to look like. The three stock options, as you can see on the board, are mid scoop, flat, and mid boost. The fourth stock option is bypass, which is useful for when you are running a bass through the pedal and don’t want to loose so much bass. However, my jumpers provide a fifth option, though I’m not exactly sure what the EQ curve would look like. Somewhere between flat and mid boost, I guess. UPDATE: Turns out that if I add in a fourth jumper, I should theoretically be able to have both the bypass and the tone circuit active at the same time, meaning I would be able to have the un-EQed signal and the EQed signal coming out at the same time. Could be interesting for bass when I want more low end.

The only things left are to stick in a battery holder in case I ever need to use a battery and to put velcro on the bottom so it stays on my pedalboard.

I also put a true bypass switch in my wah pedal (finally), but I don’t think I’m going to bother posting pictures because it’s basically just the original pedal with a different switch. Not very exciting. Projects still left: Billm mods for my Blues Jr. (when I finally get the kit) and improving my doorbell alert system with a real opto-isolator.


Jan 19 2010

doorbell alert with Arduino


My brother and sister-in-law were generous enough to get me an Arduino kit for Christmas. It took me some time to think up a good starting project, but, while I was waiting for a package, it occurred to me that it would be nice to be able to hang out in the basement playing guitar and not have to worry about missing the doorbell when the UPS guy rings. It’s nearly impossible to hear the bell from the basement and I have missed more than one signature-required package just because I couldn’t hear it. While there isn’t an extra doorbell chime in the basement, I do have a computer down there, so I thought this would be a great opportunity to test out my Arduino skills.

Materials (as seen above):

  • Arduino (any version should do)
  • LED (any LED, but have the specs handy)
  • Photoresistor
  • Some resistors
  • Diode (I used a 1N4001; just make sure yours can handle your doorbell’s voltage)
  • A foam earplug
  • Electrical tape (black is probably best)
  • Something to put the circuit on (PCB, breadboard, protoshield, whatever)

(As a bonus, most of the materials, except a resistor, can be found in the Advanced Arduino Starter Kit I got)

The idea behind this project is to have an extender for the current doorbell system. While it would be fairly simple to replace the doorbell altogether (just wire a button to the Arduino), I wouldn’t to add on to the current system without interrupting it. For that, I had to do a little research. Doorbell circuits, as it turns out, use alternating current (AC) coming from the house, at least here in the US, which would be problematic with the Arduino. Whereas direct current (DC) sends a constant signal, AC alternates between positive and negative voltage. Remember sine waves from math class? That’s what AC looks like. If you try to hook that to an Arduino pin, it will read the signal as constantly switching between on and off many times a second. With DC, the Arduino only sees “on” when there is voltage and “off” when there isn’t, so it is much more convenient. It’s fairly simple to convert AC to DC using a diode, but it doesn’t eliminate the on/off problem, at least not the way I did it. A diode only allows positive current to flow, so when you run AC through it, it chops off the bottom half of the sine wave (it’s known as a half-wave rectifier). Unfortunately, that still leaves a bunch of humps on top that the Arduino will read the same as if you hadn’t done anything to the AC signal. You can use a couple more diodes to create a full-wave rectifier, which, while not perfect, would be good enough for our purposes; however, we only really need a half-wave rectifier for the circuit I created. It’s entirely possible to achieve the same results using a full-wave rectifier and a voltage divider, but I think my solution is a little simpler. You can read more about rectifiers on Wikipedia if you want to go that route.

After asking around on the Arduino forums, someone suggested I try an opto-isolator instead. That sounds pretty complicated, but an opto-isolator is really nothing more than an LED and a photoresistor in one package (they make up the “opto” part of the name, short for “optical”). When the LED lights, it triggers the photoresistor. The idea behind an opto-isolator is that you can have two separate circuits interact with one another without interfering with one another (hence “isolator”). In our case, we don’t want to take too much current from the doorbell circuit or it won’t ring very well. We also don’t want to overload the Arduino and we don’t want to have to deal with AC any more than we have to. Unfortunately, an opto-isolator isn’t something I have lying around and RadioShack doesn’t seem to sell them, so I thought I’d test my knowledge and build one myself. Like I said, it’s really nothing more than an LED and a photoresistor, both of which I do have, so I just need something to put them in. I decided to use a foam earplug, which turned out to be more of a pain than I had hoped, but it does a good job of blocking out external light. You’ll probably want to cut a little off the end to shorten it, but it will need to fit both the LED and the photoresistor (not the leads, just the main part). After that, stand it up and squish it down, like this:

We want to poke a big enough hole in the middle to fit our components in. I first tried an awl, but the hole kept closing up when the earplug puffed up, so I needed something bigger. I decided to use the end of a pen, though you could probably use a piece of tubing or a straw. You’ll need to hammer it to push it all the way through, so make sure whatever you use is sturdy.

Clear the gunk out of the hole and wait for the earplug to puff up again. Now that you’ve got a hole, start by shoving the LED into it. It’s kind of a pain to get it in there, but it should go most of the way in. Leave some room on the other side for the photoresistor.

You’re now going to shove the photoresistor into the other side of the earplug. It’s an even bigger pain than the LED was, but you want it to be right up against the LED so that the LED’s light output is the only thing effecting the photoresistor. When you’re done, you should have this goofy looking contraption:
Spider plug!
Just to make sure no extra light gets in anywhere, wrap it with the electrical tape so that it looks even more ghetto.
You should probably just buy a real one.
Is it elegant? Hell no! But it does exactly what I want it to do. What we’re going to do with our DIY opto-isolator is attach the LED side to the doorbell circuit and the photoresistor side to the Arduino. When someone pushes the doorbell, the LED will light. The Arduino, through the photoresistor, will detect the change and send a signal to the computer. You might remember earlier that I said we would be just fine with a half-wave rectifier. If you’ve read through Getting Started With Arduino, then you might remember reading about pulse width modulation (PWM). Using PWM, you can change the brightness of an LED by changing how fast on and off signals are sent to it. The same thing applies to our little circuit. While we are still sending only half of the AC sine wave, the signal switches so fast that the LED appears to remain lit (it may actually stay lit, for all I know, but you’ll want to look that up), so neither we nor the photoresistor can tell the difference. That means that when the photoresistor triggers the Arduino, the Arduino is only seeing one consistent on signal. Pretty neat, huh?

Before we hook anything up, you’ll need to see how much voltage your doorbell’s transformer is putting out. Take the cover off your doorbell’s chime and notice what a simple circuit it is. If you have a simple chime bell like I do, it is nothing more than an electromagnet and some rods. When you send current, it creates a magnet that slams the rod into a piece of metal, creating one chime sound (ding!). When you let go of the button, there is no electricity to create a magnet, so the rod goes back to it’s normal position, overshooting a bit on its way and smacking the other metal plate (dong!). For more on that, read this article. Anyway, the important thing here is to figure out what each of the terminals are connected to. On my chime, there are 3 terminals: front, transformer, and rear. Front is connected to the doorbell (front of the house), transformer connects back to the transformer, and rear would connect to a second doorbell if I had one. Set your multimeter to measure AC voltage and put the positive poker thing on the terminal connected to the doorbell and the negative poker on the terminal connected to the transformer. Have someone push (and hold) the doorbell while you look at your multimeter. My doorbell puts out around 10v, but yours might be different. Use the voltage you get to figure out the size resistor you will need for your LED. Look at your LED’s specifications and see what voltage and current it is rated for. Mine was a Vishay LED that could take a maximum of 3v and somewhere around 30 mA. I decided to play it safe and go with 2.5v and 20 mA. Using Ohm’s Law (voltage = current x resistance), I discovered I needed a 375 ohm resistor, which, as it just so happens, doesn’t exist. You want to play it safe and go higher rather than lower, so the next closest value is a 470 ohm resistor. Using a higher value than necessary will make the LED glow dimmer, but it really makes no difference for my circuit, so 470 is just fine.

Now, how are we actually going to hook it up? The LED needs to be hooked up a specific way or it will break. The longer lead of the LED is the positive lead and will connect to the doorbell side of the chime. Well, not directly. Since the purpose of the resistor is to limit current before it hits the LED, we want to connect the resistor to the terminal and the LED to the resistor. The other side of the LED will connect to the transformer terminal of the chime circuit. But remember that we still haven’t converted the voltage to DC yet, so we will need to add one more thing to our circuit: the diode. Connect the diode before the resistor; that is, it should connect to the terminal, the resistor to the diode, and the LED to the resistor. Like the LED, the diode also needs to be connected a certain way (the resistor does not). On one end of the diode, you should see a colored band (silver on mine) that runs around the body of the diode. That end should connect to the resistor. Think of it like an arrow with the point being the band; current will flow only toward the point and not in the other direction, so we want to point the arrow in the direction we want current to flow.

Now we get to connect it all to the Arduino. You’ll need to use a breadboard or a protoshield for this part (you can use it for the other part, too). Connect one end of the photoresistor to +5v on the Arduino and the other end to a spot on the breadboard. Connect a 10k resistor from ground to the same row on the breadboard, then connect a jumper wire from that row to analog pin 0 on the Arduino. The resistor keeps the Arduino from getting a bunch of wonky signals that would throw of its readings. That’s it! The completed circuit will look something like this (the two loose wires will connect to the doorbell circuit):
Yup, still kinda ugly.
Here’s a schematic of the same circuit:
Not nearly as ugly as the real thing.
Time to program the Arduino. The code is pretty simple; all you need to do is tell the Arduino which pin the photoresistor is connected to and tell it what to do when the photoresistor reacts to the LED (i.e. when the doorbell rings). I decided to have it print a little message (“ding dong!”) over the serial port. The important part of the code is here:

if ((lightLevel >= 500) && (oldLevel < 500)) {
Serial.println("ding dong!"); }

In English, that says that if the photoresistor detects light, print the message to the serial port (and if you watch the serial monitor, you will see the message). I wrote some test code to determine the light levels read by the photoresistor when the LED was on and off. It read about 0 when the LED was off and above 600 (usually closer to 700) when it was on. Since there is plenty of wiggle room in between those extremes, I decided to give myself a little space and use 500 as the sweet spot. The code says that if it reads a value greater than or equal to 500 from the photoresistor AND the value taken before the current reading was less than 500, then it should print the message. That little trick means that it will only print the message the first time the button is pressed instead of printing it over and over again when the button is held down (when the button is held, both values will be above 500). It also means that when the button is released (current value less than 500, old value greater than 500) or not being pressed (both below 500), it won't print the message. You can download the code here. Upload it to your Arduino. You may want to test it with a simple button setup like those illustrated in Getting Started With Arduino before you hook it up to the doorbell. Here's what my final doorbell test looked like:
Probably not the safest way to do it.
It works! If your doorbell is as crappy as mine, you may find that it doesn't always work perfectly. You may need to play with the light level threshold (in the "if" statement) to match your opto-isolator setup or change the delay time. The delay is in there mostly as a debounce precaution, but you may find that you need more or less for your doorbell.

Improvements, had I the money and skill to implement them:

  • Shrink it down and make it permanent. If I were going to keep this installed, I would probably use a Nano and solder everything onto a PCB so it would fit in the chime housing
  • Make it wireless. It isn't that useful if you have to be sitting next to it with a USB cable to use it. Adding an XBee unit or using a bluetooth Arduino would make it much more practical.
  • Add useful alerts. No one wants to sit there with the serial monitor open all day. Having a Growl plugin to notify you when the doorbell rings would be ideal.

If you can think of any other improvements, feel free to share. You could also, as stated earlier, simply replace the whole doorbell circuit with an Arduino. You could hook up a camera or have it send Twitter alerts (or both). I leave the rest up to you.


Aug 14 2009

iPod car mount

Today I finished my extremely ghetto car mount for my new iPod Nano:

iPod car mount

Yes, that’s right, it’s bright orange and mounted with wires. It matches the outside of my car. It’s also about the only color paint I had lying around. And yes, that is a sticker from Wal-Mart.

I got sick of the vent-mounted holder I had before always falling off, so I wanted something a little more secure (while still being non-permanent). I made the actual holder out of a soft wood I had lying around by routing it with my Dremil. Routing is a real pain, so if you want to try something like this, I recommend routing very thin layers at a time to avoid frustration. The connector is attached with a zip tie, which serves the second purpose of holding in the tabs that would normally lock the iPod in place. As for attaching it to the vent, I went with the simplest solution: cut two strips of solid wire that would keep its shape and wrap it around some screws on the holder. It works pretty well, though I suspect it will bounce around a bit on the road. As long as it doesn’t fall off, I don’t care.

Retrospective look at the project:

  • I hate routing, but it isn’t as bad if I work in thin layers.
  • Because I tried routing a lot at once, I ended up with some rather rough areas that required me to cut the opening larger than I would have liked to fix my mistakes.
  • Poking holes with an awl is a stupid idea with thin, soft wood. The wood started splitting, but hopefully the paint and clear coat will help keep it together.
  • The mount is a very single-purpose project. Anyone with a different iPod can’t even use the connector.
  • Had I been less lazy, I probably would have gutted an old car outlet plug (so it doesn’t actually use up the car battery) and attached the holder to that somehow.

Luckily for me, I won’t need my car for much longer, so it really doesn’t matter how crappy the mount is as long as it works.


Mar 12 2009

overdrive pedal build

Having finished my pedalboard, I got a little antsy for a new project and decided on another guitar pedal. This time I decided I was going to paint it and make it look good. My original idea was to just paint it bright orange, but I tried labeling it with permanent marker and messed up, so I had to sand it down. It looked cool partially sanded, so I repainted it and went with the “distressed” look. I still have to paint the bottom, but I think it came out pretty well. I used a waterslide decal for the top to make sure I didn’t mess up the labelling again. The decal is a little crooked, but you’d never know by looking at it now.

Painted EnclosureThis is a shot of the enclosure after beign painted and sanded down. I believe there is a layer of clear finish on it, too.

Gut ShotAfter painting, the next step was to build the inside. I made it a lot harder than it had to be by buying all the parts separately instead of just ordering a kit, so I kept getting the wrong ones and having to make new orders. Putting it all in the enclosure is a pain, too, because you have to keep putting it in and taking it out to solder things on. But now it’s done.

Finished ODAnd here is the finished pedal (except for painting the bottom). It looks pretty spiffy, if I do say so myself. If you want to hear how it sounds (hint: awesome), check out “Now That We’re Home” on my band’s web site. The distorted guitars (which are most noticeable during the chorus) are all using this pedal going through my Fender amp.


Feb 17 2009

pedalboard, part 3

I finally got my pedalboard finished, though I haven’t gotten around to actually attaching the pedals yet. I need to go buy some velcro before I can do that…

After all the paint dried, I glued some carpet onto the top. The point of the carpet is that my pedals need something to stick to and the velcro+carpet idea allows me to move them around fairly easily if I want to.

full carpet

While I was waiting for that to dry, I put together my input/output box. For that, I just screwed two 1/4″ jacks into a small project enclosure from RadioShack and then soldered cables to the jacks and ran them out the other side. This picture isn’t totally accurate, though, as I wound up attaching the jacks to the longer side on the bottom of the picture. There wasn’t enough room for them the way they are in the photo. I used some glue to keep the cables from pulling on the jacks when they get moved around.

cable box

Once the carpet glue dried, I stapled the edges down, just in case, and did some more cutting. I also stapled around the holes I cut because I really don’t trust the glue. You probably can’t tell from the picture, but there are quite a lot of staples holding that carpet down. Carpet, by the way, is really annoying to cut. What I wound up doing was starting the cut on the bottom with a razor blade, then flipping the board over and finishing the cut on top. Carpet seems to cut better from the top, but I couldn’t see the holes through the carpet, so I needed some guidelines.

cut carpet

You can also see that I used some zip ties to keep my power bricks in place. I wanted to make sure that I wouldn’t be losing power in the middle of a show because an adapter fell off. The final step was to attach the input/output box. I did that just with some glue, so hopefully that will hold it. It isn’t flush against the corner because the metal corner brace is in the way, but I think it still works fine where it is.

finished side

And there you have it! I was originally going to put sides and a bottom on it, but I decided against those. The sides were going to make it harder to pick up and carry, and the bottom ended up being unnecessary. The original point of the bottom was to give myself a flat surface to attach rubber feet to, but I found a big roll of that stuff they sell to keep your gadgets in place on your dashboard and that works pretty well as a mat that I can just carry with the pedalboard and lay out under it.


Feb 10 2009

pedalboard, part 2

Ok, I managed to get my Dremil to cut the rest of that hole, so I got everything cut and sanded down. Here you can see that I also screwed some braces on to attach the rear support thing. Really, I should’ve put glue in between the boards, too, but the board was warped, so I was going to push it out when I put in the last support in the middle (and glue would have made that harder). Oh well, it’s pretty secure.

bottom view

Then I attached a power strip to the back, which wasn’t really very smart because I just had to take it off again to paint. I thought about all the different places I could put it, and the back seemed to be the best place, so that’s where it’s staying.

power strip

And now, here it is all painted up:

painted

I still have the last couple steps left, which are to put something on the bottom so it has a flat surface that I can put rubber feet on so it doesn’t slip around on stage, then put some panel board on the sides, then wire input and output jacks on one of the sides. Oh, and I have to put something on the top to attach pedals to–probably carpet, but I haven’t totally decided yet.


Feb 9 2009

pedalboard, part 1

I started building a new pedalboard for all my guitar effect pedals the other day. It might be a while before it’s finished, though… Here’s where I’m at so far:

the plan

That’s the plan I drew out for it. I wanted to figure out what the angles were going to need to be to get the support in back to be at a right angle to the ground. Then I went to the store to get some materials and started drawing the pattern on the wood:

pattern

The Xs are the places I don’t want to cut. I wanted a grid pattern so that I could move pedals around and add more later, but still be able to route all the cables underneath. I based the idea on an SKB board I saw online (Stagefive, I think). Here’s what it looks like with most of the cutting done (the jigsaw crapped out on me after this point):

most cuts done

And that’s where I’m at right now. I want to put some bypass switches on the bottom and input and output connectors on the side with a signal buffer on the output, but I need to figure out how to do all of that first. So far, so good!


Dec 1 2008

tremolo update

The kit comes with all the pieces in a baggy. I had to do a little internet research to figure out how I was supposed to attach everything, but I started with the confidence booster kit that came with my order so I wouldn’t mess anything up in the actual pedal. I learned that I was doing my soldering all wrong, but eventually I figured it out and started on my pedal:

resistors in place

After that, I mostly had to get on to wire cables together. I really hate doing that, but I got it all set up:

lots o' wires

Then I just had to put the back on and test it out! I was a little worried after my first test because I was just getting some nasty noise, but I think I was just using the wrong power adapter. My other pedals seem to all have different power requirements… but it works!


Nov 18 2008

tremolo pedal kit

As part of my Capstone project for school, I’m going to be building an guitar effect pedal. I got a kit from the Build Your Own Clone web site. I wanted to start with the tremolo because it seems to be less complicated than the others and I haven’t done a lot of electronics building before. Well, not that requires soldering, anyway. I’ll try to put up pictures as I go and audio samples when I’m done. I’ll probably get started on it next week.

Unfortunately, I don’t get to keep the pedal… it was purchased using my lab fee, so the school gets to hang onto it when I’m done. Oh well.