Lab 3: Diode Circuits (Part 1 – LC resonant circuit, 1/2 wave rectifier, full wave bridge rectifier

Did these a while ago, but didn’t get a chance to post them.

Not much to say about them, other than, again, paying attention to impedance matching and loading is key.  10:1, for this low frequency stuff.  Can’t impedance match 1:1 like I’m used to with radio stuff.

3L.1.1 The LC resonant circuit worked as predicted, but I didn’t get any photos.  A 0.01uF capacitor and 10mH inductor predicted a resonant frequency of 5kHz and the actual measured frequency was 4.85kHz.  That’s 3% error, well within the 10% capacitor tolerances.

3L.1.2 The f3db values were found to be 5.18 and 4.59kHz, for an average delta-f of .3 kHz, giving a Q of 15.3.

3L.1.6 To get the ringing I had to change the current limit resistor from 100k to 10k.  Otherwise, there just didn’t seem to be enough current to do this exercise well.  Using the decay ringing to estimate Q I found about 3 cycles before the voltage dropped below 6%, for a Q value of 19.  Probably close enough to the 15.3 above.

3L.2 The half-wave rectifier worked as expected.  Vpeak was 10V, meaning the transformer was a little high (the rated 6.3Vrms of the transformer should have given me 8.9Vpeak).

3L.3 Full wave bridge rectifier was assembled on a breadboard, and, as predicted, I blew a pair of diodes before I got it right.  I begin to dislike solderless bread boards more and more.  But can’t exactly roll a custom PCB for each project. Once it was built right, it behaved as expected:

The full wave rectifier gave me a 9.3Vpeak, exactly consistent with one extra voltage drop.

3L.3.1 The ripple amplitude without filtering was the full 9.3V at 120Hz.  Once a 15uF capacitor was added, it settled down to 1.52Vpp.  Calculated ripple should have been 2.24Vpp.  Not sure why that much discrepancy.  Maybe stray capacitance in the breadboard?  Stray inductance in the leads?

3L.3.2 To design a filter for 1Vpp ripple at 20mA current, I found I needed an R of 465Ohm and a C of 160uF.  Built up, this system worked too well – actual ripple was about 840mV.

This makes sense, since the design rests on Assumptions 1 and 2 which err on the side of less ripple.

Lab 2: RC Circuits (Part 3 – “high” voltage experiments)

With the transformer box complete, I was able to finish Lab 2.  The last exercise required one to combine a 10kHz signal from a signal generator with the 60Hz output of the transformer, and then use filters to isolate one or the other.

Once again, this was an exercise in understanding impedance.  The lab mentions that the signal generator has a 50R output impedance.  Great, I thought!  I know they suggest that input impedance of the next stage (filter) should be 10x time the output impedance of the previous stage, so I’ll set the resistor (impedance of an RC filter is just the resistance of the R component) to 500R!

Except, of course, that there was also a 1k resistor in-line with the signal generator (to limit current).  So my output impedance was actually 1050R.

Additionally, I set my cutoff frequency poorly in earlier attempts.  Trying to separate 60Hz from 10kHz, I set the f3db frequency of the filter at 1kHz.  This didn’t provide nearly enough attenuation.

After some help from the awesome folks at the eevblog forum, I made it work.  An R value of 10k solved the impedance issues, and cutoff frequencies of about 5.3kHz (C=3nF) for the high-pass and 636Hz (c=25nF) for the low-pass got the signals relatively clean.

Lab 2: RC Circuits (Part 2 – transformer box)

Lab 2L.2.3 and 2L.2.4 (as well as some exercises in Lab 3) called for using a transformer to step mains voltage (115V) down to 6.3Vrms and then do various stuff with that voltage.  The parts list simply called out a transformer part number (https://www.mouser.com/ProductDetail/546-266JB6) , which arrived with bare wires:

I wasn’t about to stick the bare wires into the socket, and even just soldering on a power cord seemed unsafe.  I wanted a proper enclosure and a fuse.  So I decided to build one.  This proved a bit more of a saga then I expected.

The first thing I wanted was an entry module.  Following advice in the AoE, I didn’t want to roll my own, but rather purchase one that took a standard IEC 320-C14 cable (the standard “computer” power cable), had a fuse holder and a switch, as well as safety features like making it impossible to open the fuse compartment while the cable was plugged in.

After poking around on Digi-Key, I settled on the TE Connectivity PS0S0S000 unit.  The basic line is available with all sorts of features like noise filters, but I didn’t want that, since the noise was part of the lab.  The module required more work than I expected,  The three basic parts of the module – the receptacle, switch, and fuse holder – weren’t connected, I had to make up a bunch of jumpers.

The module uses automotive-style quick connect tabs in a less-common .187″ x .032″ size (.25″ is much more common).  I found some at a local AutoZone, but they were meant for 16-14 gauge wires, whereas I was working with 20 and 22 gauge (the transformer leads were 22 gauge, so I saw no reason to go any thicker than 20).  Fortunately, there’s a trick where you can use a larger crimp terminal to hold a thinner wire plus a stub to make up the thickness:

Using a good crimper is a must.  Forget the cheap sheet metal ones that come in kits with the crimp connectors.  Get a good ratcheting one.  I don’t recall where I got mine, but something like this one from Amazon will work great.  Or you can get a kit with a bunch of jaws.

The next challenge presented by this entry module was figuring out the fuse.  The datasheet says “1 or 2 fuses 1/4″ x 1-1/4″ or 5 x 20mm”.  As far as I can tell, the “two fuses” are only meant for 220V setups, so I opted for one.  I had trouble finding a 1/4″ x 1-1/4″ fuse that I liked (I wanted ceramic, not glass), so I bought a 5x20mm kit from Amazon.  What I didn’t realize is that the metric fuse was much smaller, and it took a bit of experimentation to get it into the fuse holder just right.

The datasheet didn’t help much, but Digi-Key had a video on how to replace the fuse in these modules, and between that and some probing with a continuity tester I was able to figure it out.  The fuse holder can go in two ways, depending on whether you use it for 110V or 220V.  Unlike the one in the video, mine didn’t labels.  The important aspects were that the smaller fuse has to go into the bottom (towards the “feet”) part of the holder, and the clip (the bit with the blue pen on it) goes on the other side.  Note the orientation of the power rails in the photos.  I ended up labeling the top to make it clear in the future:

Jumpers had to be run from the plug terminals, to the switch (which is DPST, disconnecting both sides of the line, important in case of an improperly wired outlet), to the fuse holder.  Be careful of the switch orientation – it’s rotated 90 degrees to the other parts – use a continuity checker.  (Note:  I added heat shrink to the jumpers later on, for extra safety)

Wiring the transformer came next.  The primary coil had two ways to be wired, one for 115V the other for 220V, and that was fine.  For the secondary coil, the included instructions offered “parallel” and “series”, with no further info.  A google search found their website which showed that I wanted the series connection.

To house the whole thing, I chose an aluminum project box I found at Digi-Key –  at 6″x4″ it was the perfect size, and it came with perforated side and top panels, which meant I didn’t have to worry about the transformer overheating.

To make this work, I needed to make a rectangular opening for the entry module, plus some holes for the binding posts, transformer hold-down screws, and a grounding lug.

Holes are easy – best way to make them in something like this is a step drill, available at most hardware or building supplies stores.  This one goes up to 1/2″, which is perfect.:

To make the rectangular opening for the entry module, I scribed some lines based on the datasheet, drilled a starter hole, and then used a nibbler to cut to the lines.  The nibbler was a cheap one from Amazon. There are definitely better ones out there, but this one worked ok.  Jammed on a bit of waste occasionally, but was easy enough to clear.

To get the clearance to use the nibbler from the “inside”, I had to unbend the box.  The aluminum looks like it can (and did) take a single incident of being unbent and rebent at each bend, but I wouldn’t do it twice.  Hint:  Unbend the side you want to nibble, not the opposite side (the way I did initially).  Much easier that way.

The transformer flange had two mounting holes.  Two holes in the bottom of the box, plus some generic bolts and nuts, secured it next to the output box:

I should probably add some stick-on vinyl feet or something, since right now the box rests on the two screws.

For the output, I set up binding posts.  I wanted paired ones, so that a standard double-banana plug could go in, and didn’t want to rely on getting the distance just right, so I got a dual set made by Pomona.  Unfortunately, I could only find double binding posts in red and black – not really right for AC.

To provide isolation from the chassis, the holes had to be 1/2″ in diameter, so that the plastic bushings engaged.  The step drill worked great for this.

The secondary coil of the transformer were crimped to some ring terminals  (correct gauge this time, 22-16, found at a local Ace Hardware store) and then attached to the binding posts with the provided nuts.  The two halves of the coil were connected together with a crimp-on butt splice.

Finally, a ground lug and jumper were made, to tie mains safety ground to the chassis.  This is an important safety measure – if the hot wire should come loose on the inside, it could electrify the case, presenting a serious shock hazard.  By grounding the case, such a failure would short the hot wire to ground, blowing the fuse or popping the circuit breaker rather than shocking the user.

The grounding bolt is also brought to the outside, in case one wants to tie the rest of the project to mains ground, though this is rarely a good idea – one of the advantages of using a transformer like this is to provide galvanic isolation from the mains.

That’s about it.  I added heat-shrink tubing over the crimp connectors to everything not protected by the fuse, printed on some labels, and closed up the box:

The project works flawlessly, in that I was able to get the correct AC voltage across the binding posts and complete the rest of the lab.  More on that in Part 3.

(While I have a pretty good metal shop with all sorts of measuring and marking tools, it’s currently in storage.  So this project was done without them, and it shows – nothing is square to the box.  Really should have gotten a machinist’s square or something before doing this.  Oh well).

Lab 2: RC Circuits (Part 1 – low voltage experiments)

Exercise 2L.1.1 calls for figuring out the RC constant, and then R and C of an RC low-pass filter.  In their lab, the authors hand the students a “wrapped” R and C pair.  Since I didn’t have that option, I had to improvise.  I had a pair of Elenco Resistor and Capacitor Substitution Boxes.  I pulled off the knobs, spun them in my hands, and then reinstalled them and spun the boxes to random settings.  Instant mystery filter.  (Of course I then had to use a DMM and an LCR meter to reinstall the knobs correctly…)

Despite the book’s careful explanation, I initially set the oscilloscope time base too short, and struggled to get correct values.  Eventually, I figured it out….

Exercises 2L.2.3 and 2L.2.4 gave me real pause and stopped me for quite a while.  They called for using a transformer to examine noise on the 115V electric mains.  While the transformer was one of the items on the parts list, it came as a bare transformer with some wires.  I wasn’t about to stick the bare leads into the socket.  Just soldering on an extension cord also seemed unsafe.  So a more elaborate safety enclosure seemed in order.  Details in Part 2.

Lab 1: DC Circuits

Lab 1 was very basic – using the breadboard, Ohm’s law, mostly things I already new.  However, this lab helped me internalize one critical thing – output impedance.  I’d read about it, but I didn’t really understand, on an instinctive level, why you want low output impedance and high input impedance in circuits.  This was something that needed to be played with.

Exercise 1L4 was very satisfying – it involved measuring I and V through a diode and plotting the results.  The resulting plot, done in Excel, matched exactly the expected diode curve.  The science worked!  See linear and log graphs – perfect straight line on the log graph, as predicted:

Exercise 1L3 required a little bit of work.  The lab called for using a bare meter movement to do some of the experiments.  Unfortunately, no movement was listed in the parts list.  I ended up buying an uxcell 0-100uA ammeter from Amazon:

Worked well.

The lab guide called for soldering a pair of 1N4004 across the movement, one in each direction, to protect it from excess voltage.  I did just that, as can be seen in the pictures:

The lab was otherwise uneventful.

Learning Electronics

I recently decided to learn more about electronics, and to do so in a more systematic manner.  I’ve tinkered with electronics for decades, but my actual knowledge base is very catch-as-catch-can – bits learned for specific projects, online tutorials, half-remembered college physics, etc.  So, thanks to recommendations on the eevblog forum, I picked up two books.

The first is “The Art of Electronics” (AoE) by Horowitz and Hill.  It’s a textbook that purports to teach electronics “without all the math”.  I find it does so to a degree.  It’s certainly lower math than most EE classes on the topic would use, but there’s still tons of it.  The math doesn’t really bother me, but it does assume at least some knowledge of integral and differential calculus.  Regardless, the book is very good even if I’m not retaining 100% of all of the material on the first pass.  I’m about 80% through the book at present.

I’ve also supplemented it with other sources, when I had trouble following something.  Some of the videos from Khan Academy‘s Electrical Engineering program have been great.  I watched a lot of their Amplifier and Semiconductor Devices videos.   The other site I used a lot is the online textbook from All About Circuits.  Frequently, by combining these sources, I’ve been able to figure out something I couldn’t from any one of them.

But all of the above is theory.  I also wanted to build things.  In comes “Learning the Art of Electronics: A Hands-On Lab Course” (LtAoE) by Hayes and Horowitz.  This is the lab “manual” companion to AoE.  It breaks the theory down even more, and presents real lab problems to do.  I’m slowly working my way through the projects.

The biggest “flaw”, if one were to call it that, of LtAoE is that it’s meant for students taking the authors’ class, live, at Harvard where they teach.  Which means it assumes access to parts and equipment that not everyone has.  The book’s website helpfully provides a parts list, but it’s not quite complete.  A few items are missing, but, more importantly, some of the items can’t be used as-bought.  They need assembly or modification that are not necessarily obvious.  In some cases these modifications are described in the book, but not always.

My plan is to write about my adventures with LtAoE in this blog.  Specifically, I’m going to write about the things I had to do to make things work, as they might help the next student.  No specific schedule is planned – this is a hobby, and my available time is very inconsistent.  My current plan is to work through the Analog part of the book.  Once that’s complete, I’ll decide if I want to do the Digital labs.