## Thursday, January 14, 2010

### Chapter 2 - Exercise 8

Exercise 8 is going to have you build the circuit from Exercise 7 but with a slight modification to how the pushbutton is wired up... the wiring of this circuit was a little frustrating, so rather than rebuild it, I elected to wire it up using the breadboarding skills that this chapter provides.

I shot a video of the circuit shown on page 60 in Figure 2-53 - it's using my breadboard, so no gator clips or patch cables. If you listen to the video, that sharp buzz sound is the relay opening and closing 50+ times per second (according to the book)... it's not only an annoying sound, but not good for the relay if you hold the button down for more than a second or two.

So, enter the breadboard. I've been wanting to learn how to use one of these for a long time... I always thought they were complicated (look at all those holes and rows and columns!) - what a pleasant surprise to find out that this thing isn't all that difficult to use.

Be sure to read over the sections on the fundamentals of capacitors/capacitance - as well as the warnings about attaching certain capacitors to the breadboard incorrectly. It's good stuff, but we all want to get our hands on the breadboard, right? Thankfully the author isn't going to have us tear apart a breadboard - they're not cheap!

So, after examining the circuit a few more times and comparing it to the drawing on page 66, I definitely understand how the breadboard facilitates building this circuit. I took all the components, inserted them into the breadboard, supplied some power, pressed the button... and.... nothing.

Zip.

So, here's where some patience and common sense comes in. First, we know this circuit works, right? Without using the breadboard, I was able to build this circuit using clips, so it's got to be something I'm not wiring up correctly. So...

1. I checked that my two LEDs were inserted properly - long wire to positive side of circuit. Check.

2. I checked that the resistor was a 1k resistor. Check.

3. I checked the polarity of my capacitor - long wire to positive side. Check.

4. I verified all the wires were inserted into the proper rows/columns that matched up to the relay's 8 pins. Check.

5. I verified that the voltage to the circuit was being supplied by that small jumper wire and that the jumper wire was in the right column where I had the positive voltage (from the AC adapter) inserted - there are two columns, so check this. No problem there.

6. I did the same with the negative voltage side... jumper wire, resistor, and AC Adapter negative wire all on the same column on my breadboard.

Plug it in again... nothing.

Then begins the troubleshooting... I replaced both LEDs (just in case one or both were burned out), I replaced the resistor, and double and triple checked all wiring.

Plug it in again... nothing.

So, if you've jumped ahead and watched my two videos, you know I got it working... and you're probably saying "Okay, Jim... enough! Tell us what the problem was!"

It was the pushbutton. Take a close look at the momentary pushbutton in the photo I've supplied here. Notice that it has four little metal feet. All it took was rotating the push button 90 degrees and reinserting and the problem was fixed. That was my problem all along.

Still, I learned to trust my wiring skills... after double and triple checking so many things, I was left with the only component that I had NOT checked.

Note: You may notice in yesterday's video that I'm using a slightly different pushbutton (with a red button)... that one doesn't have the proper ends to insert into the breadboard but it does have only two connectors. But I was determined to wire this thing up using nothing but the breadboard - no components hanging off by wire and gator clips (other than the AC Adapter).

So, if you've got a similar pushbutton and your circuit's not working - rotate the pushbutton and try again.

That concludes Exercise 8... I'm going to be "out of the office" Friday to Sunday - if I'm not able to post Exercise 9 by tomorrow, I'll be back on Monday with Exercise 9 and possibly 10. Have a great weekend, everyone. Videos below - first one is without the capacitor... second one has the capacitor inserted.

1. I did the exact same thing with my momentary switch when I built this!

2. I'm still stuck on getting 4 to work right. Hopefully I'll be able to catch up to you some this weekend. :)

3. I started with the breadboard early too; the circuit looked to fussy to build with the alligator clips.

Also, this lesson was where I discovered the importance of wire strippers. I was just using wire cutters to score around the insulation of the wires and then yank off the last half-inch of it, to create hookup wires.

But doing that, the wire cutters can bite into the metal part of the wire and weaken it. Then when you stick it in the breadboard and later try to pull it out, the tip breaks off. I had a heck of a time getting that little wire end out of the hole.

4. The lesson I learned with this one is ensuring that your diodes are inserted in the correct direction. I had one of them (the green one in the pictures above) backwards. The effect was that the relay would flip once, and the green one would stay on while the other one (red in my case) flickered dimly.

I also wasn't aware that the four-pin switch was an SPST. I'll definitely switch (har) to using that with the breadboard.

5. Can anyone help me out? I wired this up as shown in the diagrams, but when I push the button, both LEDs turn on. When I remove the capacitor the relay buzzes like it says it should. when I add the capacitor back, and hit the button both lights come on again. I tried a new capacitor and same thing. Could it be the relay, maybe I buzzed it to death?

6. Not sure, but it doesn't sound like your relay is the issue with the buzzing, right?

7. Thanks for the response! Yeah, the relay was working fine. It took a couple of times re-wiring the whole circuit, but I finally got it to work. I spent some time trying to recreate both LEDs coming on and staying on, but no success, so I'm not sure where I went wrong initially.