Monday, September 29, 2014

Experiment 16 Part 1 (Chapter 16) -- Invasion of the Wires!

I'm almost done with Experiment 16, but will need another day or so to finish it. In the meantime, I wanted to share some photos of the process of wiring this monster up. Charles always does a great job of keeping his wiring clean and presentable. Me? Not so much. I should probably invest the time (or money) in some of the small pre-bent connector wires that take less space on a breadboard. But not today.

I've got a HUGE box of jumper wire and I'm determined to get my money's worth from it! As you can see in the photos below, I did have a method to my madness. After inserting the five chips, I began with wiring up the 5V and GND connections. Red wires on the right, black wires to the left.

After that, I used colors for each of the buttons -- orange for A0, green for A1, yellow for B0, and blue for B1. White wires were used to make connections between leads on the chips. Even with the colors, it's a mess. Sorry.

Up next is the LEDs, resistors (220ohm) and testing. Do I expect it to work right on the first try? I hope so! I was pretty careful about checking my wiring, and using the colored wires for each button helped me keep track of all the connections. That said, it's a lot of wires, and I'm sure my tired eyes missed a connection or two. I'll work on that later today and hopefully post the results tomorrow.








Wednesday, September 17, 2014

Experiment 15 (Chapter 15) -- Pure Logic

I have always enjoyed building circuits with logic chips. I took a class 20+ years ago in college that had us optimizing logic circuits -- I both hated and loved that class. I loved the mental exercise of it... I hated the fact my grade depended upon successful reductions of large circuits. This stuff comes a little easier to me than other aspects of electronics, and I really enjoyed reading Chapter 15 and revisiting logic chips and wiring up this simple little circuit.

I've read ahead four or five chapters, so I know what's coming... I tell you this so you'll just pay attention to what you read in Chapter 15 and don't worry about modifying the circuit. You'll have plenty of chances ahead to improve this circuit and learn about reducing the number of chips you need. It's good stuff and as long as you examine and understand Charles' method for showing open/closed and 1/0 input and outputs... you shouldn't find Experiment 15 too troublesome.

If I had any issues with this circuit, it was dealing with these annoying little pushbuttons and the proper orientation for inserting into the breadboard. Insert them the wrong way, and they're basically always on (Closed or Pushed) and the LED stays lit. Once I figured out what was going on, I turned the buttons 90 degrees and everything was fine. (I used my multimeter and the continuity setting to check how the buttons worked and to verify I had the orientation wrong.)

As you can see from the photo, I'm once again back to 5V DC regulated. I used my meter to verify the voltage on the rails of the breadboard before moving forward with the experiment -- don't risk burning out your chips by applying to much voltage.

The video below pretty much speaks for itself and shows you how the circuit works (and how a player could cheat):




Friday, September 12, 2014

Experiment 14 (Chapter 14) -- The Joy of Wiring!

First, I'd like to say for anyone following along that I'm sorry for the delay in getting a new experiment posted. I'm teaching an after-school science project club at my sons' school and have spent the last few weeks getting equipment, supplies, and instructions together along with fine-tuning the projects. The club has kicked off and is going fine, and things have calmed down a bit... now I can get back to Make: More Electronics.

Experiment 14. Wow. A good project to really dive into and think about what's happening in the circuit, but also... a lot of wiring! You're going to really want to pay attention and double and triple-check all your work. I thought for certain I'd done everything right after a double-check, but after applying power it still wouldn't work properly... no amplification and no LED lighting up. Another check was done and sure enough... I'd made a bad connection on one of the 555 chips. Finally, success... but more on that in a minute.

I wanted to share a bunch of photo with this experiment that detailed my building of this circuit. The reason I did this was not only to point out a few key differences between the layout of the components on my breadboard and Charles' breadboard, but also to talk about how I go about assembling a circuit. I don't always follow this method... but most of the time it works for me.

First, I inserted all the chips, LEDs, and the electret. Based on the schematic, I guessed at the best spacing of the components. Charles managed to get the entire circuit on half of his breadboard, but I spread it out over the entire breadboard. If I wanted to transition this circuit to a perfboard for a more permanent boxed project, I'd probably continue to close up my circuit and reduce the spacing and such. I did cut almost all of the leads of the resistors, but not the capacitors because I have a limited quantity and I never know where I wish those leads to stretch.

After placing the first wave of components, I took an inventory of the resistors in the circuit (including the 1M variable resistor). I keep all my resistors in little baggies and I really only want to pull them out one time. Therefore, when I pulled out the 1K back, for example, I pulled out three of them and clipped and placed them as necessary. A few times I realized I would need to move or relocate a resistor, but it was rare.

Speaking of resistors, take a look at Figure 14-1 that holds the schematics for Experiment 14. Look carefully where the 1M variable resistor (pot) is located and how it wires into the LM741. Now look at Figure 14-3 that shows Charles' wiring. Notice anything different? Yep -- he's flipped his pot upside down... the tip-off is that brown wire running from the top lead to Pin 2 on the LM741.  Notice the green wire running from the bottom lead (on the pot) to Pin 6 on the chip? Not a big deal, but if you try to wire up your pot to match the schematic, don't try to compare your final result to Figure 14-3. I was trying to figure out what was so strange about the pot, and then I realized it the middle pin was jumpered to the top pin (in Figure 14-3) with a teeny-tiny brown wire. Look close... it's there. Again... not a big deal. I wired it up my way and got the circuit working. But just be careful. Charles wires up things in a very efficient manner that also lends itself to photographing the final circuit. Because of this, you'll occasionally find workarounds that he uses that don't match exactly to his schematic.


Sometimes, however, you've got to come up with your own workarounds. Example? In the schematic, each of the 555 chips has a single 150k resistor coming on Pin 8. I didn't have any 150k resistors, but I did have 100k and 47k resistors. If you look at a close-up photo I took, I just used a 47k as a jumper to connect Pin 7 to Pin 6. The 100k jumps Pin 8 to 7... and 47k jumps Pin 7 to Pin 6. And then a small capacitor makes the final connection to Ground. If you look at Charles' circuit in Figure 14-3, you'll see his solution which is much more elegant and clean. I didn't have 150ks, so I had to improvise. Pin 7 to Pin 6 has to be jumpered anyway, and that 47k will be felt whether it's part of a 150k single resistor or a two resistors in series as I've done.

Testing continued to be a slight problem for me as I've never been able to get good results from these electrets. I probably should have purchased some new ones, but I got enough valid results from the circuit to understand what was happening. (Of course, I got a finger burned good by using the wrong speaker... won't make that mistake again.)

Below is the video of my test. As you'll see, the electret picked up the scraping of the pin and the input was amplified with the speaker. But once I stopped the input, the circuit began to cycle for some reason. I've played around with it a bit more to see if I can figure out how to break that loop, but no solution yet.

These sound circuits have been fun, but I'm really ready to keep moving forward and see what comes next. I've already read the next few chapters, and I've always enjoyed working with logic chips... so I'm looking forward to the next handful of builds.

Video below, along with some additional photos:






Thursday, August 28, 2014

Experiment 13 Part 2 (Chapter 13) -- Making Mistakes

I'm going to wrap up Chapter 13 with a couple of videos and some photos. Unfortunately, one of the videos you might be expecting is NOT here. I synched my phone and downloaded photos and videos, but the video for the circuit shown in Figure 13-7 (page 96) has disappeared. Poof. It's frustrating because although it wasn't a tricky circuit to wire up, it did take some time. My wiring wasn't as pretty as Charles' (no big surprise), but the circuit did work -- a suitable level of volume (tapping on the electret) got the 555 timer chip started and the 3" loudspeaker to making an awful noise. It would definitely make someone stop talking loud, but I'd probably prefer a higher voice volume than the pitch coming out of that speaker.

Where are you, video!??
Here's a photo of the missing video's circuit. I didn't vary much from Charles' diagram with but a few exceptions -- instead of the 33K (near the bottom of the schematic) I used a 47K... no 33K in my batch and I didn't feel it would be detrimental to the circuit to avoid putting two 15Ks in series. Also, I didn't have a 0.068microfarad capacitor, so I substituted a 0.1microfarad. Again, the circuit worked, so these substitutions didn't seem to have a negative effect.

You can't see the speaker, but you can see the two wires exiting the bottom of the breadboard... it's about a three foot length of wire. Lots of popping and static, but it worked.

Note to self: Find a small baggie of mixed capacitors in all values and buy it! I have a good assortment, but I continue to find values I don't have in my capacitor collection.

After completing the larger circuit, I went back a few pages to a small experiment Charles described that uses two 2N2222 transistors and a handful of 1K and 10K resistors. Depending on the wiring of these resistors, you'll gain a better understanding of the subject of Emitter Follower that Charles introduces on page 94. Voltage at the Emitter (E) is directly related to the voltage at the Base (B). It took me a few reads and then performing the experiment with a meter to grasp what was happening, but it does follow the most basic understanding of a 2N2222... and it pulls in the concept of voltage division once again. Very cool!

Note: You can perform these experiments with a single 2N2222 but it goes faster if you have a pair. Even better, if you have four 2N2222s, wire them up following Figures 13-5 and 13-6 and knock all four tests out on one breadboard.

The chapter does round out with a discussion on some of the problems that Charles encountered with his circuit. I was providing a solid 9V using an AC Adapter with a selector for voltage... whereas it appears that Charles was using a 9V battery more often. Some of the technical issues he encountered seem to be related to that fact. If you're using a 9V battery, definitely read some of the suggestions (on page 98) for fixing the circuit if you're having issues with it.

Up next? Experiment 14! Videos below... Part 1 at top, Part 2 on bottom.






Monday, August 25, 2014

Off-Topic: Lasers!

My apologies for delays in getting new posts up, but I've had a few work-related items drop in my lap as well as a special project come up where I couldn't say no.  I write non-fiction (technology) books for a living, and part of that requires me to create proposals for new books. I'm "down" right now -- meaning I have no books to write. I usually try to be finishing a book as I'm starting a new one, but that doesn't always work out. Last week I was working on a new book proposal that required a LOT of my time...



The other item that stole my time last week was a chance to assemble a laser cutter. Two, actually. I traveled to my parents' house to meet a good friend of mine, Patrick Hood-Daniel. Patrick owns BuildYourCNC.com, where he sells DIY CNC machines, 3D printers, and... laser cutters. Patrick and I wrote a book together years ago called Build Your Own CNC Machine and then followed it up with a Build Your Own 3D Printer book. Patrick has since designed a new laser cutter called BlackTooth, and he came to Florida to help my dad and I each build our own laser cutter. It was a good learning experience as well as a great time to catch up and visit.



Building a laser cutter was definitely interesting. The shell of the laser cutter is made of MDO (medium density overlay), and while it looks like wood, it's resistant to moisture and it resists burning (flare-ups after the material is cut by the laser are unlikely to set it on fire). This is a 40W, so not super powerful -- it can cut 1/4" plywood but slowly. It's got an exhaust fan where I'll be able to vent the fumes from cutting plastics/acrylics.  A water pump circulates water to cool the laser and a small air pump blows air out at the point of the cut to further help prevent flare-ups. This one works like a CNC machine, with two motors controlling X and Y axes... there is no Z axis, however, since the laser controls depth of cut by modifying the power to the laser as well as the time the laser is turned on.

Wiring it up was tricky... and not tricky. It follows a fairly straight forward path, with a power supply providing power to both motors and the laser as well as the fan and water and air pumps. Tubes and wires have to be carefully routed because you've got moving parts inside, and that's where Patrick's help was invaluable. A lot of people have built this laser cutter all on their own, but I have to admit it was nice having the designer there to double-check everything.

Anywa... I'm back in Atlanta now, so I'll be trying to catch up this week on some new posts now that I've got the proposal completed AND the laser cutters assembled.



Monday, August 18, 2014

Experiment 13 Part 1 (Chapter 13) -- Noisy Circuit

I'm breaking Experiment 13 into parts... and there's no video for this first part, sorry to say. The first half of this experiment involved replacing some of the components in the Experiment 12 circuit, namely the 100K resistor with a 1M potentiometer and the 10k pot with a flat 10k resistor. I left the 10k pot in and just cranked it to its maximum value (and checked it with my meter). The 1M pot allows for some tweaking, but I found in my experiments I had to dial it down quite a bit to the lower range (around 200-230k).

Before diving into the experiment, however, I want to address one of the goals of this chapter -- designing a circuit. Charles opens the chapter with an example description of the final circuit (an alarm will sound if the input -- your voice or other noise -- exceeds a threshold) and then proceeds to ask the question - how do you go about designing a circuit knowing the end result you desire?

The key statement IMO is "so long as a circuit can be broken down into sections, and you can make them communicate reliably with each other, and you can test them one at a time, the design process doesn't have to be too difficult."

I've built a few circuits over the past few years where I stole a piece from here and another piece from there... I wasn't designing the schematic and circuit from scratch, but instead using pre-existing circuits that I understood. And that's what's going on here... Charles is pulling bits and pieces from earlier experiments to create one final circuit... and it's pretty slick and easy to follow if you take your time.

For the first part, I just wanted to recreate the input half of the circuit -- the electret must receive input and an increase in voltage needed to be detected from the LM741 with a meter. Figure 13.1 provides four different locations in the circuit to take some readings... I'm including my results below:


These values won't mean much to you if you haven't read pages 91-93 in the book. The takeaway was to notice an increase in the input voltage reading (AC)...  my tapping on the electret with a specific metal pen (voice wouldn't cut it) was providing 0.004V (40mV) and the LM741 was outputing 2.1V at Point C in the circuit (and AC voltage -- remember, the op-amp outputs AC). Point D in the circuit, however, is where the second half of the experiment will continue, and it needed to be at least 2.5V (AC) to trigger the eventual 2N2222 transistor that will be added (in Part 2 of my Experiment 12 post).  I was getting 2.6... so everything is good.

One troubling part to me is the sensitivity of the electret. My voice just doesn't trigger it... even when I'm speaking right into it. Only tapping on the shell with metal pen would get me the upper voltage I needed. I had to practice a bit to get a consistent tap strength, too.

But... it works. I'm getting over 2.5V at point D in the circuit (referencing Figure 13.1) and am now ready to move on to the next half of the circuit...


Wednesday, August 13, 2014

Experiment 12 (Chapter 12) -

Preamp and poweramp... both are found in the simple circuit for Experiment 12. I actually had an LM386 in my collection of parts, but it had a mangled pin. Thankfully this is a fairly common component, and Radio Shack sells them for $2.00... so no waiting.

The experiment does explain how to bump up the gain from the basic 20:1 to 200:1, but I'm going to stay with the default setting for now. If anyone attempts the upgrade and has a video, let me know and I'll be happy to share here with an update.

For my circuit, I did have to make just three modifications. Obtaining two matching 68k resistors was easy (for the middle voltage), but I didn't have a .68 microfarad... in goes a 105 or 1microfarad. I had to substitute a .1 for the .047 microfarad, and I took Charles' advice to add a very large capacitor between + and GND... a 1000microfarad... that helped cut the noise substantially!

I did have the 10microfarad capacitors (x2) and the 330microfarad. After adding in the electret and the 50ohm speaker, you can see my final circuit below.




Initial tests were horrible... lots of static and hissing. Only after replacing the wires to the speaker with a 3' length of braided wire did I get some great results as you'll see in the video. The troubleshooting section is valuable... if you're having static and popping, there's probably a fix.





Friday, August 1, 2014

Experiment 11 Part 3 Final (Chapter 11) -- Data Data Data

I really enjoyed this last part of Chapter 11, but not initially. Remember back from an earlier post that I had mentioned using a 1k trimmer in place of the 5k? Well, I switched it out to a 10K so I could at least mirror the values I was seeing in Charles' data... and then I began running the final phases that start on Page 78. And my data wasn't making any sense! (At least at the time... now I think it might actually make sense once I figured out a very important step that I overlooked... more on that in a moment.)

So, back to the start. I couldn't find a small 5k trimmer like the one used by Charles and I wasn't willing to wait a few days to order one. So, I dug and dug and found an old-style dial-type potentiometer and used jumper wires to wire it into the circuit. This turned out to be a good decision as I was able to dial in more accurate resistances than with a screwdriver on the tiny tiny 10k trimmer.


My first (failed?) test with the 10k trimmer was tracked in my Maker's Notebook with a pen. For the updated test with the new 5k, I switched to an Excel spreadsheet so I could let it do the calculations for me. What was great was that my data was coming in pretty close to Charles' data seen in the chart on page 78. My "op-amp output relative to A voltage divider" data was looking matching up closely.

Now, here's where I think I made my initial mistake. This last part of Chapter 11 is broken into four phases, and I felt good about my results (for the 10k) for Phase 1, but in Phase 2 you start calculating some specific voltage values and such... and on Step 7 is where I got in trouble. My values for Vi (Voltage Differential) were not only larger than Charles' values, but they were flipped. I was getting negative values for the third column (for those of you following along in the book and the chart on page 78) where Charles had positive values and vice-versa. Needless to say, this will most definitely affect the line graph you'll be making for Phase 3. I scrapped it all at that point, figuring I'd done something wrong... and then went on the hunt for the 5k potentiometer. (I'm getting to my error... just stay with me a bit longer.)


Okay, with the 5k, I was able to increment the potentiometer in 250 ohm steps... dialing in was easy with the larger dial on the 5k. (Because I was originally using the 10k, I made my jumps in 1000ohm steps instead of the 250ohm Charles used.)

Phase 1 will have you setting the potentiometer to a variety of values between 1500 and 3750ohms in 250 ohm increments. This means you'll be making 10 readings of the Op-am output voltage (relative to point A in Figure 11.4). The data I collected is shown below:




This concluded the data collection for Phase 1.

For Phase 2, I needed to take measurements of the full resistance offered by the 5k pot as well as the two matching 100k resistors that would be labeled Rl and Rr (left and right, respectively, depending on their position relative to the 5k's connections on the breadboard). I also needed to take the full voltage available from my power supply -- Vcc = 9190 millivolts.

Carefully read and understand how the R1 and R2 values are calculated for the circuit. It all hangs on the resistance dialed in to the 5K plus the full values of the Rl and Rr resistors. The equations for R1 and R2 can be found on page 80, and here's the data from my spreadsheet for those two values with respect to the dialed in resistance of the 5k:



Using R1 and R2 values along with Vcc, Step 6 will have you calculating Vm (voltage at center of voltage divider) using another formula on page 80. Here's my updated spreadsheet with that value:


Finally, to move on to Phase 3 and the required graphs, you need to calculate what's called the Voltage Differential, and this is where I got into trouble on my first run with the 10k potentiometer. The formula is fairly straightforward, and I just created it in the spreadsheet and got the following values:



Comparing my data to the third column on page 78, my data appeared reversed. The +45 and -55 extreme values were close enough to Charles' data that I figured I'd just done something wrong in my calculations... but all the spreadsheet formulas were good after a few double-checks. So what gives?

I re-read Step 7 for Phase 2 and there it was -- "Just divide Vcc by 2, then subtract Vm, and that's the difference between he two inputs. It is properly called the voltage differential, and should be a negative number, so remember to include the minus sign."

Derp. Multiplying all the results in column F by -1 fixed the issue. This isn't an error in the book, but just a misunderstanding in viewing the data. Some of my values WERE negative in value, so I figured  only those negative values were related to the voltage differential. Wrong. (What's probably needed is simply putting a -1* in front of the Vi equation.)

After figuring that issue out, my 10k data maybe DOES make sense. But at this point I was deep enough into the 5k test to keep going. Below you'll find my final spreadsheet:




Now on to Phase 3 and graphing the data. Page 81 shows two different graphs. One is taking the first column for horizontal and second column for vertical. The other graph uses first column against sixth column (F in my image above). Here's what I came up with...






Pretty close to straight lines, huh? The first graph has those irregular ends but most of the line does follow a fairly straight path, so I'm going to run with it... Charles also strips out only the straight portion of his data.

Now to calculate the gain for Phase 4. I'll use from 2 volts to 3.5 volts as my two sections to use for calculating the slope.

Slope = rise over run or V / H. Because both charts are using the 1.5 to 3.75 volts range for the horizontal, the runs for both graphs will cancel out, leaving me Gain = V1/V2.

V1 = 6149 (3770 + 2379)
V2 = 67.6 (44.59+22.97)

Gain = 6149 / 67.6 = 91.05

Let's just round that to 90. Hey, that matches what Charles' got! Be sure to read the section on page 82 and understand how Charles checked his math with the original resistor values! The theoretical Gain should be about 100, but hey... I'll take 90! Remember... components aren't always exactly what you measure!

Finally grasping how this little circuit works is a good feeling. It also made the final section in Chapter 11 more enjoyable as Charles explains these very simple op-amp circuit schematics that all of a sudden just make sense.

Closing out Chapter 11, Figure 11-15 is just cool. A voltage split using a 9V battery. I've often wondered how folks made those little 9V battery-powered amplifiers for headphone jacks and such, and now I know. And understand! I even have all the components to make one if I should choose to do so.

Up next is Chapter 12, but that's going to have to wait a week. As I stated in an earlier post, I'll be taking next week off to spend with my two boys before they start school. If I find time in the evenings to tackle Experiment 12, I'll do it... but probably not :)

Back soon...


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.

So...

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:




Monday, June 30, 2014

Experiment 4 Part 2 (Chapter 4) -- Revisiting 555

If you've read and/or worked your way through Make: Electronics, then you'll probably remember how well the 555 timer chip was covered. That said, it's been a few years since I really dug deep into the chip. I went ahead and re-read Chapter 4 that covers the 555, and I highly recommend it -- you'll be reminded of things about the 555 such as:

* pin numbers on chips start from top-left and go counter-clockwise
* dimple/dot/notch goes at the top
* you can read the pulses by measuring voltage from pin 4 and GND
* negative voltage is always applied to pin 1, positive voltage to pin 8
* 555 is triggered by a drop in voltage on pin 2
* 555 output (pin 3) emits pulse when trigger drops below 1/3 voltage value
* when pin 4 is grounded, output (pin 3) shuts off immediately

To reacquaint myself with the 555 behaviors, I wired up a circuit like the one in Figure 4-3 (page 23) and selected some capacitors and resistors that would give me a somewhat easy to monitor pulse length. Referring back to page 157 of Make: Electronics, there's a chart that provides both resistor values and capacitor values so you can fine tune the pulse length you desire. I chose 10 microfarad capacitor for pin 6 (R1) and 470k resistor for pin 7 (C1) on page 23 for an approximate pulse length of 5.2 seconds. The text tells you to use a 0.1 microfarad capacitor between pin 5 and GND. I put an LED into the mix along with a small On/Off button. To the right is a photo of my setup.

The video will show the circuit in action, but let me tell you what I'm doing in the video that's a bit hard to see. I don't have a simple pushbutton handy, so I'm toggling a SPDT switch on and off with my finger. When it's turned on, the LED lights up. But once I start applying power, I begin counting... 1, 2, 3, 4, 5, 6... somewhere between 1 and 5, I turn off the switch. No matter when in the count I turn off power, the LED will stay lit until somewhere between 5 and 6 seconds. Even a quick flick on and off of the switch will keep the LED lit for the full count. That's the pulse length. My counting isn't perfect, but I am getting a pulse length of around 5 seconds that matches the resistor and capacitor values I picked for R1 and C1. Cool!

Here's the video...and on to Experiment 5.





Wednesday, June 25, 2014

Off-Topic: Beginning Electronics and Robot Building

Last week, I had the opportunity to host a camp for 21 kids, ages 8 to 12. The camp was called Beginning Electronics and Robot Building... or BERB. To say it was a success is an understatement. It was a great group of kids who all wanted to be there to learn some new skills and have a few new experiences.

I worked for almost six months on the camp's itinerary and, of course, immediately tossed about 25% of it out the window once camp began to roll on Monday morning. Honestly, I had just too much planned, and even with two assistants, we had our hands full making sure every camper was on equal footing. (Next summer, I'm cutting the camp down to a maximum of 16 campers.) So, what did we do and learn?

My goal with the camp wasn't to send home 21 new electronics experts and robot gurus... all I wanted to do was plant a seed. I wanted the campers to just get a glimpse of what a more in-depth knowledge of electronics and robots could provide, and I think I succeeded. Throughout the week-long camp, I constantly introduced the kids to small gizmos and gadgets, let them examine them, and tried to explain how they worked (staying within their working knowledge of batteries, voltage, etc.) They loved the Kaleidoscope Goggles, and some small LED kits (such as a POV - Persistence of Vision -- kit) and my Arcade Control... but what REALLY won them over was my 3D Printer... more on that in a moment.
Launching rockets with a 9V and wire.

So, what did we do during the week? We built rockets. Yeah, rockets. Why? Because to launch them, we had to create a closed circuit with a 9V battery. My goal was originally to have them solder up a small hand-made launcher on perf board, but that went out the window when we were pushed for time... goggles on, fifty feet of wire, and a 9V battery and he had 21 successful launches. Not 21 successful landings -- I gave the kids the opportunity to glue on the rocket tip so they'd get a nice big bang... about half chose the destructive route. (It was also about 95 degrees on the baseball field where we launched... HOT day!)

Campers also each got a soldering iron and some solder and anti-solder wick, and we practiced soldering solid core wire to perf board. Out of 21 kids, only two got burned (on their fingers). Not bad! And the two that got burned weren't all that upset and understood their mistake. The campers also got to solder up their Blinky Pins from the MakerShed. That said, I think I'm going to reduce the amount of time we spend on soldering in future camps and increase the hands-on activities that are less risky.

The robot each camper built (and took home) was an Arduino-based robot that consisted of two motors, a battery pack, and a bunch of jumper wire inserted into a breadboard. They really got some experience using a breadboard, and enjoyed building their own robots. Again, don't think they're going home as Arduino experts, but they got just enough hands-on combined with my explanations of components and such that those who really want to dig deeper will feel confident to do so.

Twenty-one robots... all working!
I've been asked to teach the camp again in four weeks. Perfect. I'm going to continue to refine the camp and iron out the wrinkles that remain. My hope is that next summer I'll be able to teach two or more of the same camp and have things go even smoother. (I've also been asked by a few other area schools to consider bringing the camp to their door, and I'm seriously considering doing so... I could fill my entire summer with 8 weeks of camp. Well, maybe 6 or 7... it's tiring!)



I had 21 smiling kids leaving the classroom on Friday afternoon -- I also invited their parents to come for the last day to watch us tinker with our robots. When camp ended, I saw 21+ parents also leaving the room with a smile... when the kids are happy, the parents are, too.

As for that 3D printer -- that was a HUGE hit on Friday. When the kids arrived Friday morning (camp ran 8am to 1pm) I had the Printrbot Simple Metal already half way through a print job. I figured we'd spend about 30 minutes watching it and answering questions, but it actually pushed to almost an hour and a half! Those kids had some great questions! And then when the parents arrived, they were quite taken with it as well. (I created a website for the camp for parents to view photos and links to books, websites, videos, etc, and the 3DP was one of the most requested links to add to the page -- sorry, the website is private and the school will not let me share photos of the kids or access to the private site.)

If you're feeling confident in your electronics skills after working through Make: Electronics, consider whether you might be able to offer a summer camp to teach kids the same experiments... the book could serve as a guide if you're not comfortable creating a course on your own. Kids are so open to this kind of training, and you'd be surprised at how open schools are as well.

Okay, back to Experiment 4...