Wednesday, July 30, 2014

Experiment 11 Part 2 (Chapter 11) -- Less Drastic Voltage Changes

While I was turning the trimmer for the circuit I wired up for Experiment 11 Part 1, there was a large jump between negative and positive voltage on my multimeter. As the book described, I saw this jump appear somewhere in the middle of the range of the trimmer. (I also substituted a 1k for the 5k resistor the schematic called for...)

Using the concept of negative feedback on pin 6 of the LM741, I was able to reduce this large jump to a set of smaller incremental jumps in voltage that you can see in the video below. I'm still working on a more solid grasp of this concept of negative feedback, and going back a few chapters to examine the inner workings of the LM741 and pondering what's actually going on inside... it's starting to come together.

FYI -- I'm taking next week off to spend some time with my boys before their schools starts. I should be able to finish all of Chapter 11 this week, but I don't anticipate putting up any posts next week. Once school starts (the following week), I'll return with Experiment 12.

Experiment 11 Part 2 video below.

Monday, July 28, 2014

Experiment 11 Part 1 (Chapter 11) -- Voltage Readings For Op-Amps

Chapter 11 is off to an interesting start. First, this early circuit is done so that I can use a multimeter to read DC voltage, not AC as in earlier experiments. The circuit from Chapter 10 is stripped down... no LED, no electret. Just a trimmer and two pair of matching resistors (2k and 100k). The LM741 chip is still in play, and the schematic in Figure 11.1 is really easy to understand if you flip back to page 64 and really understand the pinouts of the LM741 and what it's doing in this new circuit. I think when I'm done with Chapter 11 I'm going to go back and re-read Chapters 10 and 11 again... this info really needs to sink in and I'm just now starting to figure it out, especially the volt dividers.

Finding a pair of 2.2k resistors with identical values (2.19 on my meter) was easy... found two matches in the first five tests on a string of 100 resistors. Those go in and replace the earlier 100k pair at the top of the breadboard -- the chapter recommends trimming them down (the leads) so that they are less susceptible to electromagnetic interference, so I did just that... and on the 100k pair.

Notice anything missing?
 When I first tested the circuit, I was getting a steady voltage reading. I knew something was wrong, so I rechecked my wiring. Don't do as I did and forget to add a jumper wire between the 2.2k resistors! I had a green jumper going between them to pin 2 on the LM741 but dummy-me forgot to make the final connection from 9V to GND across the breadboard. Oops.

Once that correction was made, I started seeing the results I wanted. Charles wasn't kidding when he says there's a point in the middle where the voltage jumps fast from negative to positive. Turning the 1k trimmer (I couldn't find my 5k) allowed me to watch the voltage go back and forth between positive and negative. now I've just got to figure out why the high end voltage is +4 and the low end is around -2.6. Probably something with the resistor pairs and them still having a slight variation in value... maybe?

 Up next, I'll be dealing with negative feedback as opposed to the earlier experiment that used positive feedback. The circuit is almost identical, but Figure 11-4 has a few extras inserted -- a 10k and 1M resistor.

Video for Experiment 11 Part 1 is below...

Wednesday, July 23, 2014

Experiment 10 (Chapter 10) -- Let There Be Light

Experiment 10 takes the circuit built for Experiment 9 and just adds in an LED, a transistor, and a few resistors. It's still using the LM741 chip for amplification of the voltage, so the idea here is that the electret can be used to light up an LED with sound.

I had no problems getting my LED to light up, but it did require tapping on the electret. The electret I'm using just doesn't appear to be as sensitive as the one used in the book... or I may have a wiring issue. Capacitors and resistors are all unique, so it's quite possible I just have a combination of components that isn't helping increase the sensitivity of the electret. Tapping on the electret, however, does yield results as you'll see in the video.

What I'm taking from Experiments 9 and 10 are an understanding of the concepts of a split voltage supply, amplification, and the function of the LM741. The experiment may not behave exactly as desired, but I understand what I'm supposed to see when this circuit is powered up.

Up next is Chapter 11 and Experiment 11 -- the chapter is somewhat involved and lengthy, and I'm only one read into it... I'm going to read it again and try to tackle all the parts involved over the coming week. There's a LOT to learn and absorb, so if you're heading towards Chapter 11... prepare for some good stuff.

Video for Experiment 10 below...

Thursday, July 17, 2014

Experiment 9 (Chapter 9) -- Baby Steps with an Op-Amp

Anyone familiar with an electric guitar has probably heard the term 'amp' used for amplifier. I don't know the inner workings of a guitar amp, but I understand what it does. It increases the volume of a plucked string. The mechanism and components in a guitar amp are probably much different than the op-amp discussed in Chapter 9, but at least I now have a better understanding of how the process works. In this case, I'm still dealing with the electret (microphone), but the idea is the same... how to convert a low voltage signal to a higher voltage one. That's what happens with a mic, right? You speak into it and your voice is amplified through speakers so a large room of people can more easily here you.

Experiment 9 is going to give you the visual you need to better understand this concept. In the previous experiment, I was taking simple readings of the voltage between the electret and GND, and the reading was definitely in the millivolt range. Not much voltage.

But insert this LM741 op-amp hip and all of a sudden I'm seeing the millivolts converted to volts. The book calls it gain, and my results are amazing. In a quiet room (probably some background noise in there such as an AC running or just the movements of my chair or my handling of the camera) I was able to get the reading down to 0.007 volts. 7 millivolts in a quiet room. Just my voice alone talking in the video was causing an increase in voltage between 1 and 2 volts. Tapping on the electret (not recommended) would give a large jump... sometimes up to around 8v!

The discussion on how DC voltage is blocked with the coupling capacitors... very interesting! I don't recall that discussion from Make: Electronics, but I'm beginning to understand what's happening. I thought it was a pretty slick solution to pair two 100k resistors between 9V and GND and then use the midpoint as the Reference Voltage on pin 2 of the LM741 and then use that final coupling capacitor so that a valid voltage reading (with respect to GND) could be made. Pin 6 is the output for the LM741, btw.

You'll also need to understand the importance of finding matching pairs of resistors. I was fortunate to have a string of 100 resistors in the 100k value range and it only took about a dozen or so reads to find two pair of matching resistors. If I understand the experiment correctly, unless you can get those pairs to be very close in value, you might not get good results from this experiment. Fortunately, resistors are dirt cheap and 100k resistors always seem to be in demand, so grab yourself a package of them if you can find them.

Experiment 10 looks fun... I've already read over it, so I know what's coming. When I'm done, I think I'm going to take Experiment 10 and transfer it (with a 9V battery) to a box and make a little toy for my boys. (Think the old school favorite "Quiet Game" and you may have a hint.)

Here's the video:

Tuesday, July 15, 2014

Experiment 8 (Chapter 8) -- Fun With Electrets

It's a strange name, but Charles explains in Chapter 8 that an electret is a mix of "ELECTrostatically" and "magNET" -- it's a small sensor that reacts to sound saves. Experiment 8 is super simple to wire up, and as you can see in the following photo, it's just a few wires, a single resistor, and 9V of power. I could have used a 9V battery, but my variable power adapter goes from 3V to 12V, so I'm able to just switch it to 9V and go.

Two wires on right (red + black) are for Voltage readings
Wired in with a 4.7k resistor, I discovered that the electret isn't really all that sensitive. The chapter tells you its best not to tap on the small microphone, but that's about the only way I could get it to register any fluctuation in voltage (AC) on the multimeter. You'll see this in the video.

Charles was also correct about identifying the GND and +V terminals on the bottom of the electret. After flipping it over, the three little "fingers" were easily visible. I used a Sharpie marker to label them on the outer edge of the component, and I didn't have to solder on any leads as my electret came with two leads already added on.

Three "fingers" (tiny tracings) on right indicate GND lead
Once everything was wired up, I discovered the round shape of the electret made it hard to insert a separate wire to take voltage readings. A simple adjustment of moving the LED to a separate row on the breadboard allowed me to insert a wire so I could take an AC voltage reading between the positive lead on the electret and GND. Again, the electret doesn't seem all that sensitive, and my talking in the video didn't even register on the multimeter. I ordered a spare and got the same results with that one. Once I'm done with the electret in any upcoming experiments, I'll probably try and break one open to see what's inside. If I do, I'll post pictures in a follow-up.

Before moving on to Experiment 9, be sure to read over the last section of Chapter 8 that talks about a split power supply. Charles' solution is a good one, although you need to understand why he's recommending a very low value of paired resistors if using this method. If you don't understand why splitting the voltage at the 4.5VDC will make it more difficult to obtain accurate voltage readings, read it again... it hit home for me on the second read once I thought about what was actually going to be involved in taking readings of the output voltages.

And here's the Experiment 8 video:

Experiment 7 Part 2 (Chapter 7) -- Hard To Find Components

I had this same issue when I worked through Make: Electronics -- sometimes, no matter how hard you look, you just can't find a component when you need it. I'm not talking about waiting for shipping... I'm talking about a part completely out of stock and on back-order. (See image -- Amazon has them, but $10 for part and $10 for shipping? No thanks.)

That's the situation I'm facing for Experiment 7 -- this 3VDC latching relay is becoming a real problem. I have a 5VDC, but the book is pretty clear that the voltage of the circuit won't be enough to ensure the 5VDC relay works properly. I've ordered the relay from Mouser, but it's on back order and not expected to ship until September. Yeah, September.

My local supplier (ACK) doesn't have them, and I couldn't find it on a few other parts suppliers' websites. It's a very specific component (Panasonic) and although I'm certain there are latching relays out there that could be used as a substitute, these things are NOT cheap. I'd really rather not spend $7 or $10 on a specialty relay (plus shipping costs) to discover it's not a good match.


I'm going to use this post as a placeholder for Experiment 7 -- it's going to be empty. Don't let that bother you. It's just so I can try and keep the experiments in a somewhat logical order for anyone finding this blog at a later time. The plan is to come back and finish Experiment 7 and document it here by updating this post. I'm fortunate that I already have all the components I need to finish Experiments 8 to 15, so rather than stop and wait for the latching relay, I'm going to plow forward with Experiment 8. My apologies, but as soon as that relay arrives I'll circle back and update this post.

Saturday, July 12, 2014

Off-Topic: Getting Organized

Lately it's been driving me a bit crazy having to hunt for resistors, capacitors, and other components that I know I have somewhere in my electronics collection. The real problem is that the "collection" is really more of a disorganized mess consisting of about 4 or 5 large boxes with no real method for determining what goes in a certain box. It's very haphazard, and I've had enough. If you're like me and you really enjoy working with electronics and plan on doing so in the future, you'd probably prefer a more organized collection for future projects.

$12 plus free shipping -- 2500 resistors
I'm tackling it a bit at a time. First up, my resistor collection. For about $12 and free shipping, I purchased a mega collection of resistors not too long back in a variety of values. Each value came as a string of 100 resistors each as you can see in one of the photos. It was a great buy, and probably way more resistors than I'll use in a decade or more, but again... $12 for 2500 resistors and free shipping.

I'm one of those who prefers to be a bit mobile when I'm working on any projects, not just electronics. So I'm always looking for smaller toolboxes and ways to organize visually while also keeping things portable. I know some hobbyists who keep their resistors separated by values in small drawer/trays that are labeled and inserted into a box or wall-mounted system. It's a great system, but not that portable. My solution uses nothing but a few small boxes and some card stock for separators with the value at the top. It takes two boxes to keep them all, but as I continue to work through projects I'm finding that I always reach for certain values and those values are slowly but surely getting moved to a single box, with lesser used values going in the other box. At a glance, I can see the value, reach down and grab the plastic bag, and pull out the quantity I need. Here's a photo.

One habit that I'm trying to develop is that after pulling apart a circuit I immediately put the resistors back in their proper bag. For those times when I don't do this, I've got a small Altoids tin where they go for me to one day (ONE DAY...!) pull out the multimeter and take a reading and file them properly.

Friday, July 11, 2014

Experiment 7 Part 1 (Chapter 7) -- The Sun Goes Down...

The first circuit for Experiment 7 is fairly easy to wire up -- it's the one found in Figure 7-1 and consists of a 555 timer, LM339 comparator, a phototransistor, and a collection of capacitors and resistors. One thing this circuit does also call for is a 7806 6V voltage regulator -- I didn't have one, but fortunately I did have a variable adapter that lets me select the voltage using a switch on the front. I set it to 6V, disabled the 5V regulated power near the top of my breadboard (basically removing the wires connecting it all to GND and power supply lines), and verified with the multimeter that it was providing 6V. Everything is good.

I must be getting better at translating schematics to a breadboard because this one worked the first time I powered it up. My wiring method is simply working from the top down... and when I encounter a chip, I work counterclockwise and double-check all wires going into and out of the pins. Finally, when the circuit is finished, I count the number of connections to power and the number of connections to GND and verify I have matching numbers on my breadboard.

With this circuit, the idea is that when the phototransistor detects a drop in the light, the LM339 (comparator) is able to cause a drop in voltage on the Trigger pin of the 555... the 555's mix of capacitors and resistors is designed to provide a 1 second (give or take) pulse. This pulse will be used later in the chapter when a small battery-powered alarm clock is added to the mix along with a latching relay. (It's a pretty specific relay, so I may have to order one if I can't find it local. Argh.)

In the video below, you'll see that when I shine the flashlight on the PT, the LED stays dark. It's not yet received a pulse from the 555. But as soon as I turn off the flashlight, I get the LED lighting up for about 1 second. You'll have to play around with the 500k trimmer until you're happy with the results. Decreasing the resistance on the Trimmer means it will take a lower amount of light to trigger the LED (if I'm understanding the circuit correctly).

Variable voltage adapter - set to 6V
It works... so now I need to move forward and integrate the latching relay, part # DS1E-SL2-DC3V or equivalent. And trust me -- grab that relay wherever you can find it... it's been very difficult to track one down.

I'm making a note to myself here that once I've got the latching relay in my possession (silly thing is back-ordered through Mouser), I'll need to place it closer to the bottom of the breadboard to allow for the final placement of a second 555 timer shown in Figure 7-12. I'm still trying to decide if I want to "finish" the experiment by wiring in an actual lamp with a 12VDC from AC Adapter -- I may skip that part if I'm satisfied with the final circuit and understand how it works.

Monday, July 7, 2014

Experiment 6 Part 2 (Chapter 6) -- Can I Get Some Feedback?

I've upgraded my breadboard from the previous post to include the second 500k trimmer. This new circuit is all about helping you understand positive feedback and how it can be used to eliminate "hunting." You'll also get a really good understanding of hysteresis (I also broke down and went on the hunt for the proper pronunciation -- Hiss-Ter-eesis ), that sticky type behavior that we see all the time in our daily activities but never think twice about -- why doesn't the air conditioner or heater constantly turn on and off with minor fluctuations in the surrounding temperature, for example?

It took me a couple reads of Chapter 6 to really REALLY understand all the concepts in this chapter, but I get it. I'm also quite happy with the explanation of how the LM339 comparator works -- of course there would have to be some sort of transistor tucked inside! (Actually, more than one!) It's a lot to absorb, so I'll probably have to come back and reference this section again one day. The good news is that I understand how and why this inexpensive chip can be so useful to circuit builders...

Don't skip over Charles' explanation for how these inexpensive circuits can be used in place of a microcontroller... like an Arduino. I love microcontrollers, and I've got a lot of experience with the Arduino, but at $20+ each, any kind of permanent project you are building may have a lot of wasted money inside if you go the microcontroller route. I really like how Charles is explaining why the old school methods of finding the right components (and the lowest priced version to suit your need) is so important. Not only do you avoid the programming aspect of dealing with microcontrollers, but with simple trimmers you get some manual control that may be all that's needed to fine-tune a small DIY device.

Here's my video showing the new 500k trimmer installed. As expected, the positive feedback is preventing me from intentionally triggering the "hunting" performed by the comparator and the flicker of the LED. I played with this circuit for some time, trying to get a flicker... and I couldn't do it. No amount of tuning either or both of the 500k trimmers would let me get a flicker. The LED was either On or Off. Cool!

I've read ahead a bit into Chapter 7... I'm going to have to go on the hunt for a cheap, inexpensive digital clock that runs on only 3V (two AA batteries) and not AC. Chapter 7 looks like it's going to be fun... a lot of circuits to build and some hands-on with a cheap clock, but still... fun. Once again I'll have to break Experiment 7 up into parts, so go ahead and read Chapter 7 so you'll be familiar with the next two or three parts that I will be writing up.

Note: By the way... in the "try to learn something new everyday" category, put me down as just learning that there is an upgrade to the 7805 voltage regulator that puts out a standard 5V to your breadboard. It's the 7806... and guess what voltage it's designed to provide? 6V. And here I thought so many of these numbers were just made up and not really useful... are there 7807 or 7808 versions? Yep and yep. and 7809, 7810, 7812, 7815... the list goes on.

Thursday, July 3, 2014

Experiment 6 Part 1 (Chapter 6) -- Fun With Comparators

Experiment 6 won't take you any time to wire up -- a fairly simple circuit, it's got the inexpensive LM339 chip that cost me about $0.35 each (bought a bunch at once from Jameco a month ago, along with other components to get me up to Experiment 15) and as Charles points out later in the chapter, LM339s are definitely old school. Yes, microcontrollers (like an Arduino) are often used to do comparisons these days, but it's still fun to see how a simple and cheap IC can be wired up to acknowledge whether a specific voltage meets a threshold.

For Experiment 6, the familiar phototransistor is part of the circuit. As the light on the phototransistor  changes, so does the voltage value felt on pin 5 of the ML339. A 5k trimmer (potentiometer) is used to "dial in" a test voltage (called the Reference Voltage) that is felt on pin 4. If the voltage on pin 5 is greater than the voltage on pin 4, the output pin (2) provides enough voltage to an LED to light up. Pretty cool!

Here's the video...

After you've built the circuit, you can tweak the 5k trimmer a bit until you get some flickering of the LED. You really need to see this in action, because it will help cement your understanding of the "hunting" that the comparator is doing... and the next discussion in Chapter 6 that shows how to prevent this type of thing. What's happening is that with very subtle changes in the light on the phototransistor, the comparator is turning on and off the LED quickly because the tiny changes in voltage are above and below the Reference Voltage. There's your flickering of the LED.

In the next post, I'll share the new circuit with some additional components that will remove this flickering/hunting effect.

Tuesday, July 1, 2014

Experiment 5 (Chapter 5) -- Red Alert!

I really liked this project. Combining two 555 timer chips really helped cement how this little chip works. I had forgotten much about the pins and how the 555 functioned, so wiring up this circuit was very helpful. I highly recommend that as you wire up each 555 timer chip, you examine carefully the wires that connect to each pin and try to understand exactly what is happening at each pin.

You'll probably find as I did that there's a LOT going on in this circuit in terms of components -- resistors, capacitors, phototransistor, speaker, and the two 555s. Check and double-check your wiring because it's a mess. I must be getting better at checking myself because the first time I applied power to this circuit, it worked. That doesn't happen often!

I'm including two videos here; the only difference between the two is the substitution of a 1 microfarad capacitor for a 10 microfarad. All other components were left alone. I did make a mistake in the video by stating I had the 100kohm and 50kohm resistors in series for the 150kohm called for, but I actually had to put two 85kohm in series for a total of 170kohms. That probably did affect the frequency of the alarm a bit since this value affects the pulse length for the 2nd 555 chip (the one that feeds into the 555 connected to the speaker). The change was probably negligible, though. I did make certain all capacitor values were the ones specified in the schematic on page 28. Here's the first video with the 10 microfarad capacitor inserted first:

I'd be curious to see any videos you might have if you attempt any of the variations specified on pages 28-29. Charles includes a bunch of substitute chips for the 555 that could be tried out -- these include 7555, 4047B, 74HC221, and a bunch more. But his explanation of why the 555 is still favored makes sense... you begin to work with a chip so much you just know its pinouts and its quirks. That said, the 556 sounds interesting -- two 555s on one chip, although he says its becoming difficult to find. I might try to hunt one down and retry this circuit a bit later.

Here's the short second video where I substituted the 1 microfarad capacitor for the 10 microfarad: