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…

Dec 4, 2011

Halloween Build Part 4: Board Layout

Are we still talking about Halloween? The tryptophan from Thanksgiving has worn off and Christmas is right around the corner yet this blog seems to be stuck in October. I am not one to live in the past so let’s wrap this project up and move on to bigger and better things. Two more entries on my Halloween project and then it’s on to RC circuits like I promised back in September.

If I had any confidence in my printed circuit design abilities, I would have a custom PCB fabricated through SeedStudio or BatchPCB like the one pictured to the right. Despite having written tutorials on how to use Eagle software for PCB design, I actually have limited experience when it comes to generating boards. I have played around with programs like Eagle, DesignSpark, Altium Designer, and DipTrace in the past, but haven’t ever taken the time to learn one thoroughly (my EAGLE tutorials were pretty lacking). Instead, I go to Radio Shack each time and pick up some overpriced protoboard to solder all my components together. This project alone is enough to make me want to avoid doing that ever again. My next goal is now to design and fabricate my first solo PCB.

From my previous posts, you know by now that there aren’t that many functional pieces to this circuit. There is power, shown in the red box in the picture, the PIC microcontroller, in blue, and the LEDs in orange. For some circuit designers, they like to layout schematics the way their board will eventually be laid out. Others prefer having all their inputs on one side and all the outputs on the other. Personally, I don’t see a benefit with either approach because outside of simple boards your final board design won’t look much like the schematic even if you try. In my case I did try and follow the schematic pretty closely in terms of the layout, but things never turn out quite how you expect when it comes to these projects. 



It’s one thing to draw connecting lines on a schematic and know how the circuit should function, but it’s quite another to realize a physical design. For instance, I wanted to be able to replace the battery easily when it died so I soldered a heavy duty 9V snap to a JST connector and mounted the female end to the board (highlighted in purple in the picture). JST connectors are really nice for easily disconnecting batteries from the system and you can find them a lot in RC car designs and similar battery powered toys. The downside is that the heads of the connector are only two terminals, which means anything that needs to be tied directly to power or ground has to end up connected to the JST in some fashion. If you look at the soldering on the underside of the board, you can see that none of the copper pads are connected to each other. For this reason, it becomes pretty difficult to create a bus line without using a lot of bridged solder joints. Since I had no other choice, I went that route and ended up with a bunch of large solder blobs and wires running along the top connecting several areas of my board.

One other problem I ran into was the placement of the LEDs. Originally I had intended to use four LEDs, but when I started soldering on the first three I realized I wasn’t going to be able to fit a fourth and still have them in a semi-cluster. Because I was anticipating a fourth LED on the left side of the microcontroller, I mounted it in the middle of the board and that meant that I had to bend the LEDs awkwardly to fit through the cutout in the top of paper bowls (shown in Part 1 of this build log).

In the end, all the boards worked as expected and I was able to finish out the project. As much as I am in this for the electronic design, I have become really interested in the form versus function aspects of my final products. Companies like Apple have made a fortune off the way their products feel when people hold them and have gone out of their way integrate form and function as much as possible. I am still trying to get a handle on that concept in my own designs, but I have come up with some new ideas to try in the future. Look to wrap up this build log in my next post with the bill of materials (BOM).