Jan 31, 2012

One Year Anniversary

Yesterday was the official 1 year anniversary of To the Rails. I just want to say thanks to all of my regular readers, and I hope someone out there has taken something away from my ramblings in 2011.

My goal is to make this blog far more all-encompassing as I move into 2012. I think I can provide a new perspective on topics that I once thought had been done to the death. I read a lot online about areas of electronics that I care about and I have come to find that many articles lack a big picture focus or leave out critical details that allow consumers or the lay person to come to their own understanding. While I hope to never lose the hobby electronics spirit that created this blog, I do think there is more out there to look at then servo motors and LEDs (as cool as those things are).

As part of my 1 year celebration I want to look back. That is why I have gone back through all of my old entries to provide you with some stats. Some are based on Bloggers automated view count tracking system, while others are of my own creation. This blog was never created to generate large view counts, but I am impressed with how far it has come in only a year. Thanks again to everyone who has supported this blog and I look forward to a new year, new topics, and a new logo!


To the Rails Statistical Breakdown
Number of times I promised to do a blog explaining something: 15

Number of times I kept my promise: 5 (suckers)

Number of times Apple was mentioned with hate: 4

Number of Simpsons references: 5

Most Viewed Post: The 7-Segment Display (1,298 views)

Least Viewed Post: Happy Birthday, Tesla (5 views)

Highest Number of Views in 1 month: 908 (December 2011)


Blogger Stats


Jan 24, 2012

Just an Epic Tesla Comic

I found this online today and thought it was just too amazing not to post. Enjoy Mac fanboys.


Jan 19, 2012

New Header Designs

Okay, I have put this off long enough. Today is the day I debut my ideas for the future look of To the Rails. Below I have laid out five separate headers that I have designed in the last month or so, all of which are styled differently from the rest -- though admittedly there is a liberal use of lightening and circuit boards throughout. Let me be the first to say, I am not an artist and all of these are pretty uncomplicated designs with little to no artistic flair. Still, I would like to spruce things up around here and I think one of these designs would do the trick.

First, a couple of quick notes on my efforts: 
  • All of these headers were designed in GIMP, which I recommend to anyone looking for a somewhat powerful, free image editing software.
  • I am well aware that 00 (yes, binary for the extra geek factor) and 11 look very similar. I couldn’t decide which one I liked more so I put up both.
  • I am open to creating something new from elements of these first attempts. Let me know in the comments which parts you like among the five (color, font, etc.)  and maybe I will combine them into something new for the blog. Also let me know if I need to scrap the lot and start over (I don't have feelings and this isn't my area)
  • The color scheme for 10 is different than the rest because I designed it when I was first learning the software and was just playing around. I liked it enough to keep it in the bunch for this trial run.
  • Lastly, if you think these are bad you should’ve seen the rejects. I will search my trash can to see if I can find them for a parody post after we pick a new header.

Make sure to vote in the poll I have created in the upper right (above the entry history). I figure any anonymous readers out there might be more likely to contribute to the voting this way as opposed to leaving comments. I look forward to hearing what you all think.

HEADER 00.











HEADER 01.


HEADER 10.

HEADER 11. 

HEADER 100.











Polls close on January 30th at 11:59pm so get those votes in soon!

Jan 16, 2012

Voltage Divider Quiz Solution

I was lucky enough to get a few responses on my quiz question this time around. While there were many failed attempts at finding the answer among my friends, someone did come through and restore my faith in humanity. Let’s look at how he did it -- or at least how I assume it was done.


Step 1: Since I told you in the hints that this was a comparator circuit, you should remember that a comparator compares two input voltages and outputs a high or low signal if one is above the other, which can be controlled via the circuit configuration. Since this opamp has a relatively high input impedance, you can ignore any loading effects and solve the two voltage dividers very easily.


Step 2: Find the reference voltage going into the inverting input (-) of the comparator using the voltage divider equation. At this point you are only concerned with the bold portion of the circuit in the picture above so the equation should look like:

The units cancel on the ohms range and your answer ends up in volts. You now know that the LED will turn on when the input voltage on the non-inverting input (+) goes above 3 volts.



Step 3: Apply the voltage divider equation again to the 4.7kΩ  and ??? Ω resistor network in bold in the picture above. This time you must rearrange the terms to solve for the mystery resistance using a known voltage. The equation should now look like:
 
This equation requires a few more steps to solve, but it is not complicated if you know basic algebra. Dividing both sides by 5 volts you end up with:
 
Now get rid of the denominator by multiplying both sides by its value (4.7kΩ + ???Ω) and end up with:
Therefore, the LED should turn on when the mystery resistance is above 7.05kΩ because it will cause the output of the comparator to go high.


Step 4: Here on To the Rails we care about numbers as much as the end result so I decided to build this circuit and do some comparisons between our predicted outcome and the practical implementation. I used a variable resistor known as a potentiometer (the blue thing) to vary the resistance around the point that turns on the LED. Without knowing the resistance, I turned the pot to a point where the LED barely turns on in order to get the most accurate resistance reading possible. Once I felt I was as close as I could get to the resistance that causes the LED to turn on, I removed the pot from the circuit and measured its value. **NOTE** It is very important to remove the pot to measure the value. Leaving it in will cause you to measure the resistance seen by the pot within the circuit itself. And as always, NEVER MEASURE THE RESISTANCE OF A LIVE CIRCUIT!!

As you can see from the pictures, even with all the uncertainties associated with the manufacturing of the resistors, the accuracy of the potentiometer, and the voltage of the power supply, we still managed to get a reading of 7.09kΩ as our observed answer. For those keeping score at home, that makes our percent error only 0.57%...not bad.

Jan 10, 2012

To the Rails in 2012

The new year has brought some big changes for me in only a few short weeks and my blog production has trailed off a bit. Since I don’t have anything concrete to offer you in this post, I thought I would share some ideas I had for the future of this blog in 2012 as well as some projects I am currently working on that should find their way onto these pages very soon. I started this blog in early 2011 and with a year of experience under my belt I definitely want to make some upgrades to my presentation.


Back in the News
Some readers may have noticed that my Empires of Light entries have disappeared in recent months. These are entries where I look at four stories from the world of electric power/electronics from the previous month and classify them as important, frivolous, noble, or idiotic. Look back at the entry where I dreamed up this concept to see why.

I have been distracted with the holidays and working more on my own projects recently so those entries sort of fell by the wayside. While I like the idea of having a regular segment on this blog, I am not sure how much longer this one will stick around. I am still experimenting with formats, and I don’t want to make too many regular segments because it would leave little room for the entries about my projects, EE fundamentals, circuit concepts, and whatever the hell else I feel like writing about.

One of my newer ideas for a regular segment is to start posting EE trivia every week. My thought right now is just to post a few sentences of trivia related to something in electrical engineering, electronics, and/or technology each week.


Happy Birthday to Me
As part of the one year anniversary (Jan 30) here on To the Rails, I am currently working on a few new header designs for the blog. Homer has served me well these past 11 ½  months, but I feel it’s time to move on to something more dramatically stated rather than continue with a banner I threw together in paint one night. Originally, I wasn’t going to change anything else about the blog, but now I am considering changing the background and the circuit picture above my entry history. Either way, my plan for the header remains the same: the readers get to choose. About a week from now, I am going to post 4-5 headers I have designed in the past month for you to vote on. The one with the most votes will become the new logo banner for To the Rails. Get excited people.


DIY ‘til the World Ends
What does 2012 have in store for me personally when it comes to my DIY electronics projects? Well, when I first started this blog I came up with a number of projects that I wanted to complete and document for everyone to see. Since that time I have only made it through roughly 1/10th of the list and I am adding more and more each day it seems. Right now I have 4 circuits I am working on as well as trying to build a couple of custom frames for my dual monitors and mocking up sample circuits every now and then for demos. I want to show my work on all of these over the next few months with time permitting. ***SPOILER ALERT*** I am getting into building my own test equipment so expect to see the results of my labors in that area very soon.


Making My Way in the World Today
I don’t talk much about my job on this blog because, frankly, my personal contributions are not all that interesting. Secondly, what I am allowed to divulge is extremely limited because I am frequently exposed to proprietary design information that various electronics companies don’t want getting out. I can tell you that I contribute to establishing energy efficiency standards for consumer products in the United States via the Department of Energy and the EPA’s ENERGY STAR program. Going forward I want to look more into energy consumption in the US through a series of experiments as well as explain how the energy standards process works for consumer products (i.e. TVs, set-top boxes, game consoles, external power supplies, etc.). This blog has mostly been about circuit level design up until now, but I am interested in expanding the scope to include some analysis of product energy consumption. The entire reason I became an electrical engineer was to try and help reduce our global demand for coal-fired energy by improving efficiency and finding alternative resources to fill in the gaps. While I have touched on these topics somewhat in the past, I really want to explore these areas more down the road.

Dec 31, 2011

Cosview MV200UM Digital Microscope Test Pics

Christmas has passed and I was lucky enough to receive some new test gear and a couple other items that will eventually find their way to this blog. It’s looking like 2012 will be an exciting year on To the Rails. For this post I decided to put up some test pictures from my new Cosview MV200UM digital microscope (featured in my Christmas Wish List). Check ‘em out.

This first picture is a little calibration photo I took using my new Neiko Digital Calipers. The software that comes with the Cosview microscope allows you to measure distances/radii based on your photos. You have to run a little calibration to begin with and enter your magnification scale manually in the process.
 







This picture is a close up (57x) of one of the random PCB solder practice boards I have lying around my bench. The large metal squares are the connecting pads for surface mount resistors/capacitors while the copper circles are vias that connect signal traces between different layers on the PCB. Just about any PCB with any level of sophistication has these all over the board.
 





Here is a shot of an IC wafer I got from Electronics Goldmine some time ago. I am still trying to figure out how to take decent pictures so this one didn’t turn out as well as I was hoping, but you can make out the etched traces of each individual IC on the wafer. We will go into IC manufacturing at some point in 2012.
 







Pretty standard still frame of a populated PCB here. This is the sort of image I expect to take a lot of going forward. I mainly wanted this microscope camera so that I can check for solder bridges and short circuits so if I find anything interesting or worth showing I will definitely post it. Eventually, I want to incorporate some teardowns on this blog so I am hoping to master these circuit close ups.





In my last test image you can see another IC die. This one is different from the first because it zoomed in on the traces of a single IC rather than looking at wafer, which contains many complete IC etchings. If you don’t know or don’t care to know what any of that means then just stare at the pretty colors for awhile. The blue dot in the center is a mark to indicate that the IC is defective in some way.

Dec 27, 2011

EE Fundamentals: Voltage Divider Quiz

There are a couple things you need to remember to be able to do this quiz. Luckily, everything you need we have covered in this blog.

First: This circuit is a simple comparator, which I have done a whole entry on in the past. The comparator will output a high voltage when the non-inverting(+) input voltage is higher than the inverting(-) input. When the output goes high, the LED will turn on.

Second: There are two voltage dividers setting the voltages on both input pins of the comparator.

Third: If you watched the video on schematics I posted, please realize that wires only intersect in a schematic where you see a dot. For instance, the voltage divider setting the voltage on the non-inverting pin is not connected to the inverting pin in any way even though there is a wire going from the 4.7k resistor to the mystery resistor that passes over the negative input.



Quiz Question: What is the minimum resistance necessary on the ??? resistor to turn on the LED? In other words, what is the lowest value resistor you can place in the ??? spot to make the non-inverting input voltage higher than the inverting input voltage?

Good Luck!

Dec 26, 2011

EE Fundamentals: The Voltage Divider

After a long hiatus I think it’s about time to get back into some circuits concepts with these EE Fundamentals posts. Today’s topic is voltage dividers/voltage division. I know last time I promised to go over RC circuits (“next time, we solve RC circuits”), but when I started writing that entry I realized this one would make more sense to put first. We will start easy since we are just getting back into circuits stuff.

Voltage dividers are not so much a special type of circuit but more a property of voltage itself. In any closed loop circuit, the sum of the voltage drops around the loop must equal the voltage being supplied by the voltage source. For example, if your circuit contains a 10V source and two resistors in series, the voltage drops across the two resistors will be equal to 10 volts. Knowing this is a helpful tool for quick circuit analysis because it lets you determine the voltages, and subsequently the currents, at every point along the closed loop. As it turns out, voltage tends to split up according to predictable ratios based on the impedance of the elements in the circuit under analysis. Engineers use the simple equation below to determine the voltage across multiple series circuit elements:
where Vx is the voltage, Vs is the source voltage, Rx is the impedance of the element in question, and the denominator is the sum of the all the impedances in the circuit. For reference, let’s look at the circuit in Figure 1 to delve into this concept a little deeper.

 Figure 1. Sample series circuit

The circuit above shows a 10V source in series with a 2 kohm and 1 kohm resistor, making the total series resistance 3 kohms. If we want to find the voltage across the 2 kohm resistor, we use the equation and find that it is equal to:
You could apply the same process to find the voltage on the 1 kohm resistor or subtract the voltage on the 2 kohm resistor from the source voltage and arrive at the same answer. You could also scale these resistors in any direction and end up with the same voltage on each provided that the ratio between the two remains the same. In other words, there would still be 6.67 volts across a 200k resistor provided the other resistor is 100k, but the current through the circuit would be 100 times lower (Ohm’s Law).

In case you still are not convinced, I built this circuit to show the voltage split between the resistors. As you can see in picture below, a 10V source places 6.65 volts on the 2 kohm resistor and 3.351 volts on the 1 kohm resistor. Yes, these numbers are slightly different from the predicted values, but the reason for that is a combination of the voltage source not being exactly at 10V, the resistors not being precision values, and the measurement error of the multimeter I am using. For all practical purposes, however, voltage division can be easily proven.

************************************

So how do circuit designers making use of voltage dividers? Often times you will see voltage dividers used to set reference voltages or create DC bias conditions in various places throughout a schematic, like in Figure 2.


 Figure 2. Voltage divider setting comparator input voltage

Conceptually, the voltage divider resistor network is very simple and easy to implement. When put into practice though these sorts of voltage references often suffer from excess power loss and can drift out of spec with temperature variations. Still, they are widely used and offer hobbyists an easy way to create a specific voltage for their circuit.

But voltage divider circuits can only be used as references provided that the load using the reference has a significantly higher impedance than the divider itself. I believe this is one of the least talked about subjects in electronics education, but it has a huge impact on the functionality of analog circuitry and introduces the concept of loading/attenuation.

Look back at the circuit in Figure 2. Knowing nothing else about electronics other than what has been discussed in these EE Fundamentals posts, you would probably expect the voltage applied to the input terminals of the comparator to be 3.33 volts. While I am not disputing this assumption, I want to point out that there are other issues to consider. First, think back to what happens to a circuit when two resistors are put in parallel: the equivalent resistance drops to a value lower than either of the original two resistors. If that is true, then consider Figure 3.

Figure 3. Voltage divider with low impedance load

This new circuit is virtually identical the divider used as a reference input to the comparator. However, instead of the high impedance of the comparator in parallel with the 1kohm resistor, we have now put a 10 ohm load instead. Without this load attached to the voltage divider, we would see roughly 3.33 volts on the output, but with the 10 ohm load attached the output drops to about 0.05 volts. The higher the load resistance on the divider, the less change we should see in the expected value. This, my friends, is an example of loading down a circuit and I am going to show you how.

************************************

Above is a picture of my build of the circuit from Figure 3. I have placed a 10 ohm resistor in parallel with 1 kohm resistor. As you can tell from the measurements, the voltage across the 1 kohm resistor is significantly lower than it was in the previous tests. This is because we have loaded down the circuit with the 10 ohm load resistor and made the voltage divider equation:

 
There is clearly a strong correlation between the expected value and measured result on the 1kohm resistor. The voltage across the 2 kohm resistor is equal to the source voltage (10V) minus the measured value (0.05V), or roughly 9.95 volts with measurement error.

Conversely, placing a 1megaohm resistor in parallel with the 1kohm resistor does not significantly affect the equivalent resistance because it is three orders of magnitude greater than the 1 kohm resistor. For reference, I measured the effects of this new load resistance. You can see them in the picture below.

************************************

This demonstration has attempted to make clear two distinct and often undervalued concepts: loading and attenuation. I “loaded” the circuit when I placed an additional load resistor onto the output of the circuit such that it had a significant impact on the circuit behavior. When the circuit was loaded down with the 10 ohm resistor, the output voltage decreased severely compared to the intended output of the voltage divider, which we call attenuation. Hence, when you hear someone say the signal is being "attenuated", it means that there is a loss of fidelity at some point along the circuit resulting in a loss of information or signal strength. This same concept applies to AC waveforms like music streams. If, for instance, you loaded an amplifier circuit with a resistance too small for its output impedance, it would result in a weaker signal and thus a quieter song in your ear.


Pop Quiz
I am going to post the quiz for this subject in a separate entry because this one has run a little long and I want to mock up my quiz circuit to make sure it does what I think it should. This quiz is all my own and it requires knowledge from my previous entry level tutorials to figure out. Look for the question before the end of the year.

Dec 21, 2011

A To the Rails Christmas

It’s holiday time so I have put together a sample of things that made my Christmas list this year. Given the theme of this blog, all the items are in some way related to hobby electronics. In my noob days I often looked through personal blogs to find out what kind of equipment they owned for doing electronics work. For any aspiring DIYers out there, I hope my list gives you some new places to go for test gear and inspiration.

I first found out about this microscope from the YouTube video review posted on the website (all items are hyperlinked to their online purchasing sites). It lets you get close up images and video of circuit components and solder connections with minimum hassle. I have a standard microscope that I have used a few times for checking solder bridges on smaller components, but getting a compatible camera will cost around $150. This one seems to do the job just fine and I can use it for blog photos. Win, win.





This is a relatively cheap ($153) function generator from Instek that is capable of generating sine, square, and triangle waves. The triangle wave function is limited to 1MHz, but the sine wave and square wave functions can go as high as 3MHz with a peak-to-peak voltage of 10V at 1% resolution. This particular piece of equipment generates the waveforms digitally, which means with a high enough sampling rate you should be able to see the step changes in the output waveforms on an oscilloscope. If I can get my hands on this it will make demos far easier in addition to adding some firepower to my test equipment arsenal for doing filter testing.



A friend/artist once told me that LEDs were my medium considering my tendency to do LED-centric projects. Admittedly, I do think of LED projects before anything else, but that is mostly because they can be appreciated by anyone regardless of background. This meter is not something I consider essential to any home workbench, but I do like experimenting with LEDs and have plans to do some custom lighting designs in the future. I think this meter could help me out. I also want to test batches of LEDs for brightness using a standard test current to see if I get a Gaussian curve similar to Dave Jones’s recent resistor tests.



You might remember that I did a whole breakdown on my new BK Precision 2709B Multimeter a few months back. So why would I want another multimeter? Well the simple answer is that you can never have too many multimeters. The reality is that I would like to be able to measure input voltage and current as well as output voltage and current on certain power electronics to test for efficiency. I could do this with two meters by switching the connections, but ultimately I would like to get four meters so I won’t have to put in the effort. Plus, this meter is only about $60 and won Dave Jones’s $50 multimeter shootout.



My recent failure with my Halloween project pointed out to me how little I actually understand about wireless communication. From what I have read online Zigbee is a good protocol to start with if you are trying to learn wireless data transfer. They are a bit on the expensive side so I haven’t had the nerve to buy them for myself. Look for some blog entries on my experiments with these radios if they find their way into my lab.

Dec 14, 2011

Halloween Build Part 5: Bill of Materials

In this final installment of my build log for my Halloween LED Flasher project, we will look at the BOM tables for this build. When I first started out in electronics, I often used BOMs from others online to get a sense of how the circuit worked as well as a feel for what are considered “jellybean” parts. If you don’t know that means, it basically refers to parts that have become the defacto standard when you are trying to create a particular piece of your circuit that is well researched and has been perfected over the years. For instance, switch-mode power supplies often use the TL431 programmable shunt regulator as a replacement for an op-amp in their feedback paths. The part gives you all the functionality of an op-amp with lower power consumption and, in most cases, faster transient response. It is widely recognized among power electronics engineers as a necessity in voltage-mode feedback power supplies.

My hope is that with this last piece I will have given enough information for someone to easily reconstruct this project to meet their own needs. I have tried to give out every piece of information I could think of related to my build, but leave comments if you are looking for more (type of solder??). Now…the final tally…

Bill of Materials
ITEM BASE PRICE QTY TOTAL PRICE LOCATION      
Large Craft Pumpkins $4.00 4 $16.00 Oriental Trading
Plastic Art Containers (LED Diffusers) $1.00 4 $4.00
Artifical Pumpkin Carving Kit $4.00 1 $4.00
0.33uF Electrolytic Capacitors $0.26 4 $1.04 Allied Electronics
LT1121CZ-5 Voltage Regulator  $2.60 4 $10.40 Digi-Key
JST Connectors $0.75 4 $3.00 Adafruit
PCBs $2.19 2 $4.38 Radio Shack
SPST Switches $3.19 2 $6.38 Radio Shack
Papers Bowls $1.98 1 $1.98 Walmart
Matte Black Paint $0.97 1 $0.97 Home Depot
9V battery holders $1.19 2 $2.38 Radio Shack
Machine Screws (#6-32) $0.47 2 $0.94 Home Depot
Nuts for #6 machine screw $0.48 1 $0.48 Home Depot
Enercell 9V battery $11.00 1 $11.00 Radio Shack
1/4W Resistors $0.64 2 $1.28 Parts Express
Various Colored LEDs $0.89 12 $10.68 Evil Mad Scientist Labs
20-pin IC socket $0.59 4 $2.36 Radio Shack
Microchip PIC16F690 $1.19 4 $4.76 Microchip
Heavy Duty 9V Snap Connectors $3.00 1 $3.00 Radio Shack









TOTAL PROJECT COST:      $89.03


A few notes on this BOM before we wrap this project up completely. First and foremost, notice that I have listed two different prices for each of the elements in this design. The first is the cost of the package to get the components regardless of the number I used. For instance, I put 1 for the ENERCELL batteries because I got four 9V batteries in 1 pack. Therefore the cost associated with that pack is for four batteries instead of one. Likewise, I listed the total price of two packs of ¼W resistors even though I only used one full pack and two from another pack. I was only able to buy the resistors in sets so the unused parts still contributed to my overall project cost. In the past I have ignored these kinds of costs and just used the “per component” cost in my BOMs. From now on I am going to list the total cost to procure each item regardless of the quantity they are sold in.

Secondly, you can save a fair bit of money by switching to the MCP1702 voltage regulator from Microchip instead of the one I used here. With that regulator the total project cost drops to $80.55, just under 10% lower than the current BOM estimates.

Be prepared to spend some money on shipping if you decide to tackle a similar project. I did not include shipping costs or tax in my BOM because a lot of it varies based on location and method. Plus, I am way too lazy to look back and figure out how much I paid for shipping on each item. My personal feeling is just that it doesn’t make sense to include shipping costs in these sorts of things.

That’s all folks. I have taken this project from an idea to a tangible piece that I can improve on and build from in the future. I think we can finally put Halloween behind us at To The Rails and move on. Cheers to the next step…