Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of \$9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.

Another 3rd-year ECE student chiming in. This thread looks really good! However, the only thing I would change in the OP is this:

#### clredwolf posted:

AC/Alternating Current - Useful circuits often have voltages and currents that change dramatically over time. The changing currents and voltages are often refered to as 'AC'. This varying voltage can follow a sine wave pattern, square wave, or various other mathematically-defined waveforms. AC even describes 'random' signals such as sounds and digital information! Basically, if the voltage/current changes, it's AC.

NOTE: There's often a good overlap between AC and DC in circuits of any complexity. Transistor radios, for instance, have DC characteristics but obviously the circuit must be AC in nature. Therefore, it's imperative to know the ins and outs of both DC and AC. Thankfully, that's not quite as hard as it sounds most of the time.

I would clarify that in order to be classified as AC, current has to change in both amplitude and direction relative to ground. The square waves typically used in microelectronics and digital signal processing are actually modulated Direct Current. The rest of your post is pretty much spot-on, I just thought it would be good to clarify that one point.

#### mirx999 posted:

I would clarify that in order to be classified as AC, current has to change in both amplitude and direction relative to ground. The square waves typically used in microelectronics and digital signal processing are actually modulated Direct Current. The rest of your post is pretty much spot-on, I just thought it would be good to clarify that one point.

It's kind of a weird gray area really. I agree that it's not AC per se, but if it changes fast enough (and it usually does) you can manipulate it like an AC signal. Often times you have to, in order to repair signals going through transmission lines/communications channels and other funky poo poo. I'll put a disclaimer in the OP though.

And now it's time for:

Simple Project #1 - LED Light

This is about as simple as it gets, in terms of projects. It's super useful though, and I'll give you some nice equations for when you want to 'hack' stuff and add LEDs. I'm also holding your hand all the way though it, to expose you to some of the math you'd be dealing with.

Let's say we have a 5 volt source, say from a computer power supply. We want to use it to power a bright LED. So first thing's first, we obtain an LED to add to the circuit. Let's go to, say, Jameco, to do this. A little poking around and we get this:

The LED

Lots of power for a little thing. Note that since this is an LED, it comes with a data sheet, here:

LED Data Sheet

The data sheet is very important for us. Because it's an LED, the voltage drop across it is listed in this data sheet. In this case, it's given as a graph instead of a number. Look at figure 3, and see that the diode 'turns on' at around 1.7V (the point where the graph changes is also when the LED starts shining). The higher the current through the diode, the higher the voltage drop. Also, I'll tell you that the more current you can push through the LED, the brighter the LED. Also, we see that this LED 'peaks out' at 50mA of current. You can run the LED beyond 50mA, but there are no guarantees that it will work right (for the computer literate of you its like overclocking a computer, you're running it out of spec). So for us, we're trying to figure out how to put 50ma through this diode with 5 volts.

Look at Fig. 3 again in the datasheet. From the graph we can see that at 50ma the voltage drop is around 2.1 volts. If you were to hook the diode up to the 5V source directly it would shine very brightly for a short period of time, get very hot, and probably burn out, release blue smoke, or even rupture. This is because there's nothing blocking the diode from drawing all the current it can. So, what resists the diode's insatiable appetite for current? A resistor of course!

So now we have our basic circuit. It will look something like this as a schematic:

The three parallel lines, for the uninitiated, are 'ground' or 0 volts. Both should be connected together to ensure that all grounds are 0 volts. This should look familiar to anyone who's worked on the electric system in a car. In that case, the metal body of the car acts as a 0 volt reference for the car.

Resistors unfortunately come in many resistances. Pick one too low, and the LED fizzles. Pick one too high and the LED is either too dim or will fail to light altogether. We know we need 50mA. We have an LED dropping 2.1V at that current, and a 5V voltage source.

The key to solving this equation is a little ditty called Ohm's Law. It goes like this:

##### code:
``V=I*R``
That is, the current through a resistor times it's resistance equals it's voltage drop. In this case, we know the LED drops 2.1 volts, but not what the resistor should drop. Since our voltage source is 5V, our LED drops 2.1V, and the resistor is the only other element in the circuit, we can safely subtract the LED's drop from the voltage source to get the resistor's drop.

So:

##### code:
`` 5V - 2.1V = 2.9V ``
The 'V' part of our ohm's law equation we now know to be 2.9V. The I part we want to be 50ma (since the current through the resistor is the same as the current through the LED in that configuration). All we need is the 'R'. So apply some algebra and divide the voltage by the current.

##### code:
``V / I = R``

##### code:
``2.9V / 50mA = R``
Just as a note, mA means milliamperes. A milliampere is 1/1000th of an ampere. So 50mA = 0.05A.

##### code:
``2.9V / 0.05A = R = 58 ohms``
Ok, so we need a 58 ohm resistor. Unfortunately you can't buy a 58 ohm resistor, they simply just don't make them. 56 ohms is however a pretty standard value. So is 68 ohms. Both work in our case. We can prove this with ohms law. Since we know the voltage isn't going to change *much*, we can keep it constant at 2.9V. Then we can see how it affects our current. So:

##### code:
``````V / R = I
2.9V / 56 ohms = 51.8mA
2.9V / 68 ohms = 42.7 mA``````
Note that while the 56 ohm resistor gives us a pretty close value, it's still over the rated value for the LED. That's probably okay in our case, but you can play the safe side and use the 68ohm resistor too. It won't be as bright, but it will work! Note that the resistor should probably be at least a 1/4 watt resistor or greater.

But what if we want to change the voltage to something more practical. We can get 5V off a power rail from a computer power supply, but what about in a car? The battery in a car puts out roughly 13.8V, while the alternator puts out about 14.4V at worst. Let's call it even at 14V.

In this case, what happens if we drop in our little LED? Well, let's keep the voltage drop across the LED the same for simplicity's sake. Now we have a voltage source of 14V, so:

Drop across the resistor:
##### code:
``14V - 2.1V = 11.9V``
Current through resistor:
##### code:
``11.9V / 56 ohms = 212.5mA``
Obviously that's not going to cut it. Note that the LED's real voltage drop would increase off the charts, but not enough to bring the current through it down to 50mA. It'll still fry. So let's rework our math. We know the voltage drop across the resistor should be 11.9V. So:

##### code:
``11.9V / 50mA = 238 ohms``
238 ohms is not a common value, but 220 ohms is. So:

##### code:
``11.9V / 220 ohms = 54mA``
Still a little over, but not too bad. (edit: As scholzie points out that's not going to kill it, but this gives me an excuse to introduce resistors in series!) 220 is pushing it, but not too badly.

You can also add resistors together in series to get a little closer. A 220 ohm resistor plus a 15 ohm resistor makes 235 ohms, which is much closer to 238 ohms.

##### code:
``11.9V / 235 ohms = 50.6mA``
Much better. Now our circuit looks like this:

Using this you've seen that you can use resistors to regulate current going into a diode. This is useful for LEDs, but also useful for other circuits as well. For example, I ran into a problem with one of my projects to where a power IC pulled way too much power. The circuit needed about 100mA at 5V at the most, but it was pulling upwards of an amp and frying itself. Hours of debugging later and I had not made any progress. To be rid of the problem, I placed a 10 ohm resistor between the 5V source and the IC. That not only limited the current to 100mA before the IC shut off (at around 4V), but after I did that the IC started pulling the correct current (~70mA). I suspect thermal runaway, for those curious, but the point is my quick fix worked.

Up next, building your LED light.

clredwolf fucked around with this message at 04:38 on Jan 9, 2008

#### MooglyGuy posted:

Where can I find a decent program for drawing up schematics and (bread)board layouts? I'm in the process of designing my own Z80-based computer, but using Adobe Illustrator is too slow and using a pen and paper is difficult to iterate on. A program that will prevent me from doing something loving stupid like attempting to connect Vcc to GND would be even better.

Schematic and PCB design

Kicad is an EXCELLENT open source schematic and pcb design program. I've used it for a few designs. It also produces industry standard files for when you want to get a PCB made by one of the many cut rate PCB manufacturers. Hell, even the autorouter works fairly well.

Digital Simulation

Digital Works is a freeware digital simulator which is extremely easy to use and from what I've gathered, quite powerful. It won't give you netlists or generate HDL source code, but it does give you a place to experiment with logic gates, flip flops, and whatnot. If you want to design a state machine and see how it works without having to buy a breadboard, this tool will do it for you.

http://www.spsu.edu/cs/faculty/bbrown/circuits/howto.html

#### Caffeine Wolf posted:

If you want to use anything in an IC you need to power it hence it is active.

#### clredwolf posted:

Also, ICs almost by definition have to consist of transistors, which are active devices. I think there might be one or two out there that are not active (but I have no idea what those would be, I just know it's possible), but 99% of them are active devices.

Sorry, but these are both just wrong. Resistor networks, integrated capacitor networks, and diode networks are all "Integrated Circuits" and none of them are active or contain transistors (with the exception that diodes are active or passive depending on who you ask). Any number of devices packaged in a self-contained unit is an Integrated Circuit, and there is no "definition" for integrated circuits which says they are active. I work in the semiconductor industry and I can (and have) design(ed) ICs with no active elements. They aren't terribly useful in a large circuit, mind you, but there you have it.

Edit: Just wanted to make a point. The confusion about diodes comes from the fact that if you look at it from the perspective that they consume and do not produce energy, then they are passive. The problem is that a passive network (a circuit made of only passive elements) has the same V-I characteristics as the passive elements (that is that they will have a measurable resistance, capacitance, and/or inductance, depending on the elements involved) and they will be easily predictable. Once you start throwing diodes and transistors into the mix, that stops being true (diodes and transistors are non-ohmic devices, and therefore their properties change with applied voltage). By that definition they are active.

Using a "switch" or "offset" model for diodes reduces the problem significantly though, because then they really are just treated like opens or shorts within the circuit.

#### nchernyy posted:

I think the confusion comes from defining electrical current before the discovery of the electron. People knew that there was charge flowing, they just didn't know it was made up of discrete particles that were negative.

Benjamin Franklin is the one who caused all the problems. It wasn't a "gently caress up" though. It made perfect sense to believe that current flowed from high potential to low potential. It was just wrong, unfortunately for us. We've made lots of mistakes like that, and quantum particles always seem to slap us in the face just when we though we had the right answer.

scholzie fucked around with this message at 03:29 on Jan 9, 2008

 Jailbrekr Apr 8, 2002 A TOWN LEVELED BY AN EXPLOSION? DOZENS LIKELY KILLED? OH GOD LET ME SEE THAT SWEET VIDEO OH MY GOD I'M CUMMING Alright, heres one. Its pretty lame because I'm just not that angry and venomous anymore.... # ? Jan 9, 2008 03:30
 Sir Lucius Aug 3, 2003 drat, this thread got too complicated too fast. I'm a simpleton mystified by the power of electricity. I was hoping the OP would continue posting pretty pictures of balls in tubes, and maybe one day I could learn what the hell a ground does and why one wire is hot and one is not. # ? Jan 9, 2008 04:07

#### clredwolf posted:

Much better. Now our circuit looks like this:

The power source shouldn't be 5V there anymore since you changed your power source.

Also, the spec sheet for that LED gives the Absolute Max. current as 70mA. You're not going to kill it with 5mA over spec as you alluded to. You'll just reduce its lifetime a little if you run it consistently (i.e. long periods of time) at that current. Spec sheets are written by engineers who build safety margins into everything. For true limits you should be looking at the extreme values. If you want to run your LED a little hot, go for it. You're not going to ruin it. It just might die in 13 years instead of 15.

Of course if you run it at 75mA you're looking for trouble. Kids, don't test your expensive super-bright LEDs by sticking the leads on a 9V, even for just a second. You're going to waste your money. On the other hand, you'll get to see what melting semiconductors look and smell like.

scholzie fucked around with this message at 04:11 on Jan 9, 2008

#### Phlegmbot posted:

I would say that diodes, including LEDs, are passive semiconductor devices, and not active.

Also, an IC is neither active or passive by definition.

"technically" they are categorized as such, but yeah, from someone who studied the workings of them they are no more "active" in how they work. Personally, I see capacitors/inductors as more or less active components due to their complex impedance characteristics with alternating signals.

#### quote:

drat, this thread got too complicated too fast. I'm a simpleton mystified by the power of electricity. I was hoping the OP would continue posting pretty pictures of balls in tubes, and maybe one day I could learn what the hell a ground does and why one wire is hot and one is not.
30s "water" analogy:

Think of electricity as a hose (some like to use bucket)

The pressure in the hose is the voltage.
The flow through the hose is the current.
The nozzle at the end of the hose is the resistance.

If you have a small nozzle, not much current leaves the hose, however if you up the pressure then more current will flow. If you put the nozzle on "soak" setting, there isn't much resistance and a lot more water flows with less pressure. Thats basic DC electronics there. The problem comes when you alternate the pressure/flow (voltage/current) relationship, which in turn screws with the resistance (impedance) of the nozzle.

These are basic principles of electricity, thermodynamics and even energy as a whole, all things more or less work the same.

Cheesemaster200 fucked around with this message at 04:22 on Jan 9, 2008

 Insurrectum Nov 1, 2005 If anyone wants a good small project to begin on, try the Mintyboost. It's a great, simple project that only costs \$30 and is a good introduction to soldering. # ? Jan 9, 2008 04:19

#### Insurrectum posted:

If anyone wants a good small project to begin on, try the Mintyboost. It's a great, simple project that only costs \$30 and is a good introduction to soldering.

My first 'real' soldering project was a little FM transmitter with built-in microphone purchased from Radio Shack. I think they don't sell it any more.

That being said, there are other options. Ramsey, for instance: https://www.ramseyelectronics.com

#### scholzie posted:

Edit: Just wanted to make a point.

No problem, both are good point. I wasn't aware that non-active ICs were even manufactured, let alone used. I called diodes active because they are non-ohmic, but you're right. Textbooks like to put them right next to other semiconductor devices, so it's probably a pretty common mistake. I'll change the OP to reflect both of those points.

#### scholzie posted:

Benjamin Franklin is the one who caused all the problems. It wasn't a "gently caress up" though. It made perfect sense to believe that current flowed from high potential to low potential. It was just wrong, unfortunately for us. We've made lots of mistakes like that, and quantum particles always seem to slap us in the face just when we though we had the right answer.

Nah, I've head enough physics to know better hence me calling it a "gently caress up". It's certainly an interesting history though, and Franklin has certainly earned the ire of many physics students.

#### Sir Lucius posted:

drat, this thread got too complicated too fast. I'm a simpleton mystified by the power of electricity. I was hoping the OP would continue posting pretty pictures of balls in tubes, and maybe one day I could learn what the hell a ground does and why one wire is hot and one is not.

Oh I still plan on doing it, but it's pretty time consuming and I've run into a ton of crap to do lately. Moving to a new city in a week is apparently not all that easy, go figure.

I'll continue the '101' stuff though, hopefully fill in the blanks, but I figured I'd start you all off with a nice project. I can also continue the project and show how to build large LED arrays and whatnot, but if I explain the theory then everyone will know how to do that and I don't have to. I'd rather do the theory at this point honestly.

clredwolf fucked around with this message at 04:41 on Jan 9, 2008

 Skycks Jan 6, 2008 Would something like this be a wise investment for a starter bench power supply? # ? Jan 9, 2008 06:24

#### clredwolf posted:

[*]Analog Devices - Very well-respected IC manufacturer. You can order some of their stuff in small quantities from them. Mostly they make sensors, Digital to Analog Converters, Analog to Digital Converters, DSP chips, and power ICs.

And sometimes if someone has a really really nifty sounding project some random Field Apps engineer might help someone out once in a while

P.S. If you buy a multimeter, buy a flukemeter. Anything Fluke, just get a fluke. You will not regret it.

#### Skycks posted:

Would something like this be a wise investment for a starter bench power supply?

I'll probably get flamed for this by some metric, but honestly I think the best thing an entry level person can do is to pickup one of those cheap 13.8V 5A bench supplies from Fry's for \$25. It's wide enough to let you use a 7812, 7805, or any of the multitudes of LDOs and other Linear regulators. Additionally it has enough juice to drive a beefy switcher and not panic at the initial inrush/surge. A novel noob may even figure out how to get +/- 6.0V from such a beast without ever using a switcher

FormulaXFD fucked around with this message at 06:32 on Jan 9, 2008

 franc0ph0bic Oct 26, 2007 Im just gonna throw this in - if anybody out there plays any for of amplified instrument (ie. electric guitar/bass, electric violin...) making simple circuits to modify the sound is very popular. I have made many different guitar effects, including distortions, delays, and modulation effects. There are many good beginner projects that are also very useful, and its a great way to learn electronics. # ? Jan 9, 2008 06:33

#### scholzie posted:

Of course if you run it at 75mA you're looking for trouble. Kids, don't test your expensive super-bright LEDs by sticking the leads on a 9V, even for just a second. You're going to waste your money. On the other hand, you'll get to see what melting semiconductors look and smell like.

I was using a 12V supply with a 1K variable resistor to give my nephew a practical demonstration of Ohms law and how it affects LED brightness. We had a cheap green LED hooked up and decided to see how much abuse it could take. I don't know what it was rated for, but at around 85mA it turned bright yellow and pushing it up to around 100mA made it turn a deep angry red color. I quickly backed down and it returned to green, but not quite as bright as before. After doing this a few times, it burnt out, but it was kind of an interesting experiment.

Unfortunately, we weren't able to get any to explode at 12V.

As a side note, the "superbright" LEDs (6K-15K mcd) I have are rated around 20ma with a max of 30mA. In testing, I didn't see much change in brightness between 20mA all the way up to 40mA and they were plenty bright running as low as 15mA. I don't see any point in pushing the limits just to get that extra little bit of brightness out of them, so I generally run them at, or slightly below, what they are rated for.

My methods would probably make and EE sick, but I would rather be playing around with a breadboard then muck around with a bunch of math. When working with LEDs, I'll generally start with a resistor that I know is too high and work my way down until the LED is "bright enough" (usually 15-20mA). From there, I feel the resistor to see if it is running hot. If it is uncomfortable to the touch, then I'll either move up to a higher wattage resistor, halve the value and put 2 in series, or double the value and put 2 in parallel. I make that decision based on what's available in the parts bin.

 scholzie Mar 30, 2003 If I had a daughter, she'd probably be pregnant by the time she turned 12. I got a few really nice super bright LEDs and I accidentally shorted one straight to 9V and it died instantly. I guess it depends on the color (and thus the substrate material the diode is built on). As for your resistor methods, I guess worse things have happened. You're wasting your time though because Ohm's law is just about the easiest thing to do in electronics. Also, you're dealing with voltages and currents that are so low you'll never need more than a 1/4 watt resistor. Assuming your resistor is about 50-75Ω, and your current is about 25mA, P = I2R = 0.03-0.05W. Even that example above, 50mA and 2.9 volts is just 145mW. 1/4W resistors are going to be ok for pretty much anything involving LEDs unless you get some of those crazy Luxeon LEDs with 1.5A max currents. # ? Jan 9, 2008 07:38

#### Skycks posted:

Would something like this be a wise investment for a starter bench power supply?

Its a good power supply. I have used similar hp/agilent supplies before. I wouldn't pay that much for one though. The shipping from asia is way too much.

Anyone know of a decent design for a lab power supply? Maybe this should be the first project for this thread. Coming up with a set of schematics for the basic things you need. Bench meter, power supply, simple 2Mhz scope/logic analyzer, function generator, RCL meter. The biggest problem I have always had with this though is its a pain in the rear end to calibrate everything.

Edit:
Oh also this guy making his own vacuum tubes is awesome: http://blog.makezine.com/archive/2008/01/make_your_own_vaccum_tube.html

ValhallaSmith fucked around with this message at 08:12 on Jan 9, 2008

#### scholzie posted:

As for your resistor methods, I guess worse things have happened. You're wasting your time though because Ohm's law is just about the easiest thing to do in electronics.

The reason I do it that way is because of the unknown LED values and lack of data sheets. Looking at this reference chart, it show a range of 1.5V to 3.8V at 20mA depending on what color LED you have. Also, the resistance of an LED changes based on how much current it is using, so you'd have to figure out that value as well if you planned on running them at something other than 20mA. I find it is just easier to plug the LEDs into the breadboard, hook up the multimeter, and try a few different resistor values.

#### scholzie posted:

Assuming your resistor is about 50-75Ω, and your current is about 25mA, P = I2R = 0.03-0.05W. Even that example above, 50mA and 2.9 volts is just 145mW.

It's very possible I'm in the wrong here, but those numbers don't look right to me. 50mA would be 145mW for the LED at 2.9V, but if you're powering that LED with a 12V supply, then the resistor would be dropping the other 9.1V at 50mA and dissipating 455mW. Not that I can see any reason why you would want to power an LED at 50mA, but if you did and are using a 12V supply, a .25W resistor wouldn't cut it.

You're right that at 12V and below in the 20-25mA range that a .25W resistor should be fine for whatever you are doing. When I mentioned using a higher wattage resistor or multiple lower wattage resistors, I was getting another project where I had to do that mixed up with some of the LED stuff I've worked on.

#### SkunkDuster posted:

Unfortunately, we weren't able to get any to explode at 12V.
It's hard to make LEDs explode. I connected them to 90V DC and they would just burn out. We had to use 230V AC to make them explode.

#### quote:

Also, the resistance of an LED changes based on how much current it is using, so you'd have to figure out that value as well if you planned on running them at something other than 20mA.

You don't need to know it. LEDs have a resistance but it's not important. You just substract the voltages and use the ohms law for the resistor.

This is a great thread, I'm really looking forward to getting help from you guys. I do experimental music using a lot of analog synthesizers and effects, so I've been needing to learn how to build and repair electronics forever. Does anyone have any simple through-hole audio oscillator projects they can post?

#### franc0ph0bic posted:

Im just gonna throw this in - if anybody out there plays any for of amplified instrument (ie. electric guitar/bass, electric violin...) making simple circuits to modify the sound is very popular. I have made many different guitar effects, including distortions, delays, and modulation effects. There are many good beginner projects that are also very useful, and its a great way to learn electronics.

Do you have any good resources for plans/parts/kits? I know PAiA are the masters of this sort of thing, but there's a surprising number of younger companies coming out with kits and plans for effects and synths. Obviously there's Synthesis Tech, Wiard and Doepfer, but there are a lot of DIY garage-based companies too. Here's a few I've run across, although I haven't tried them (mostly too difficult for a rote beginner like me) I have heard good things and they all offer plans on the site.

MFOS - They have a number of simple synth/effect plans up online as well as a full analog modular design. They sell PCBs for many of them too.
Ken Stone's Modular - Ken has been doing it a bit longer than MFOS. Also sells PCBs for most of his projects, and offers a stomp-box adapter so you can use any of the modules as effects as well.
Jürgen Haible - has a lot of really neat clone projects that are way beyond my ability. Probably expert-level stuff, but someday I'll build that Schulze phaser.

#### SkunkDuster posted:

The reason I do it that way is because of the unknown LED values and lack of data sheets. Looking at this reference chart, it show a range of 1.5V to 3.8V at 20mA depending on what color LED you have. Also, the resistance of an LED changes based on how much current it is using, so you'd have to figure out that value as well if you planned on running them at something other than 20mA. I find it is just easier to plug the LEDs into the breadboard, hook up the multimeter, and try a few different resistor values.

It's very possible I'm in the wrong here, but those numbers don't look right to me. 50mA would be 145mW for the LED at 2.9V, but if you're powering that LED with a 12V supply, then the resistor would be dropping the other 9.1V at 50mA and dissipating 455mW. Not that I can see any reason why you would want to power an LED at 50mA, but if you did and are using a 12V supply, a .25W resistor wouldn't cut it.

You're right that at 12V and below in the 20-25mA range that a .25W resistor should be fine for whatever you are doing. When I mentioned using a higher wattage resistor or multiple lower wattage resistors, I was getting another project where I had to do that mixed up with some of the LED stuff I've worked on.

The above example used a 5V source and a 2.1 V drop across the diode. Therefore, the drop across the resistor was 2.9V @ 50mA.

Also, as Komputernauta already mentioned, you don't have to worry about the strange I-V characteristics of an active diode. Once the LED is active it's almost a perfect ohmic device with a fairly steady resistance. The only portion of the curve where its not is during the short span between 0V and ~0.7-1.3V before the diode is saturated. All you need to do is decide at what voltage and current to run the LED. Nearly all the time you will have a spec sheet (or at least know enough about your LED to find one). In the event you don't, 25mA @ 3V is pretty much the standard spec for generic grab-bag LEDs. You can easily find a good starting resistance based on your input voltage using Ohm's law.

Regardless, I see your point, but I think that's a bad way of going about design, even from a hobbyist standpoint. Sure, it works for one LED, but what if you have 10 of them, neither in parallel nor in series? 25? 50? You have no choice but to do a little math, and if you've made yourself so comfortable not using it in the past then you're just going to get tired and likely give up. In the end, Ohm's law is so straight-forward and simple it usually takes more time to do the trial and error method (not to mention the fact that not everyone has a wealth of parts to play with at their disposal; they have to buy everything as they need it). Even if you don't know the LED specs, 25mA @ 3V always works for generic LEDs. Then you can tweak if it's not bright enough.

Sorry to nitpick so much, but if this thread is all about getting started in electronics, I think people should get started doing it the right way so that they are covered when something more complicated comes along.

scholzie fucked around with this message at 14:36 on Jan 9, 2008

#### Circumcision Hater posted:

Thanks for the info. I'm getting tired of buying new tips and irons every few months. I'm also interested in what other tools are needed for a good hobbyist setup. Heat gun and a big old pile of heatshrink tubing are definitely on my list of things to get. Should I look for anything in particular in a heat gun? Are temperature/CFM/BTUs/etc important or will whatever's in stock at the local industrial electronics store be fine?

I'm also interested in getting a vacuum rework station. How cheaply can I find a good one, and what brands should I look for?

Last question, when I started tinkering with things as a kid, my dad instilled a fear of flux in me, because ZOMG ACID. As a result, I've never used it, to this day. How bad is flux really? Will it eat my skin if I spill it on myself or just hurt a bit? What safety precautions should I take?

A good thing to do to keep your iron tips fresh and shiny is to "tin" them before turning the iron off. Basically cover the whole tip with a big glob of solder and let it cool on there. When you need to use the iron again, just let it heat up and wipe off the solder on the sponge.

By heat gun I actually meant one of these guys:

This thing is essential in reworking surface mount parts since it allows you to heat up the whole part at once. You can pop off a chip with dozens of pins in a matter of seconds, whereas I don't think you'd ever get it off with an iron. They also have a tip that fits over the end of the wand to reduce the airflow to a small tube rather than the big 1" or so opening, which is ideal for resistors and other small parts.

#### Cuw posted:

And if you are going to be soldering lots of surface mount parts you might want to look into getting an air solder station instead of a iron based one. They use a solder paste instead of solder wire and a really fine nozeled hot air gun and by god do they make soldering .22" pitch parts easy. They really complement a nice soldering iron more than replace it since you are going to need the iron for larger parts, you can't really use paste to solder wires together, or for through hole parts.

This works, but I solder parts almost exclusively with an iron, even the fine pitch stuff (there is a neat trick that involves dragging the iron along the pins). Have you ever looked at solder paste under a microscope? It's tons of tiny solder balls suspended in flux and looks really cool:

(Click for huge)

I have never needed a vacuum rework station for anything, but they are neat. You can save your money and buy a small manual solder sucker and a package of solder wick instead.:

Flux is your friend. It makes everything solder related easier. The type I use around the lab is Kester 959 low residue no-clean flux. It's designed for wave soldering machines, but it works great for doing stuff by hand too. I've gotten it all over my hands when I'm working and it has yet to hurt me. I just wash up when I'm done. Don't inhale when the iron vaporizes it though.

Edit - From their site:
959
No-Clean Alcohol-Based | Fluxes

Kester 959 is a no-clean, non-corrosive, halogen free liquid flux that is designed for the wave soldering of conventional and surface mount circuit board assemblies. Kester 959 was developed to minimize the formation of micro-solderballs during wave soldering operations. This flux contains a small percentage of rosin (1%), which improves solderability, heat stability and surface insulation resistance. Kester 959 offers the best wetting and the shiniest solder joints of any no-clean, solvent-based chemistry. Kester 959 leaves evenly distributed residues for the best cosmetic appearance.

This may be a lot for someone just getting started. I went for years using a soldering gun (huge compared to an iron) on through hole projects.

Hillridge fucked around with this message at 15:52 on Jan 9, 2008

 scholzie Mar 30, 2003 If I had a daughter, she'd probably be pregnant by the time she turned 12. It's worth mentioning that flux used in electronics is pretty weak. Gloves wouldn't hurt, but they certainly aren't necessary. I think the danger of flux is far outweighed by the danger of holding a branding iron and molten lead. # ? Jan 9, 2008 15:54

#### scholzie posted:

It's worth mentioning that flux used in electronics is pretty weak. Gloves wouldn't hurt, but they certainly aren't necessary. I think the danger of flux is far outweighed by the danger of holding a branding iron and molten lead.

I'll agree with this. I burned the living crap out of myself the first time I tried to solder something. In my CCNA/A+ class in High School our teacher gave us a little soldering intro lesson, and we made robots that walked around each other via I.R.'s or some crap

 scholzie Mar 30, 2003 If I had a daughter, she'd probably be pregnant by the time she turned 12. I sometimes gauge my productiveness by how many burns I got that day. It's usually because I'm up way too late and I lose concentration. But burning flesh tends to wake you right back up again. Also, everyone needs one of these. http://www.a-msystems.com/electronics/soldering/helpinghands.aspx The mag glass is useless though. Just throw it out and get one of those arm lamps with a magnifier on it if you are old and/or blind and really need it. Edit: Maybe someone (or I) should do a soldering tutorial. If there's interest maybe I can do it. I'm sure there are plenty out there on the net already though. scholzie fucked around with this message at 16:17 on Jan 9, 2008 # ? Jan 9, 2008 16:12

#### Kudosx posted:

I'll agree with this. I burned the living crap out of myself the first time I tried to solder something. In my CCNA/A+ class in High School our teacher gave us a little soldering intro lesson, and we made robots that walked around each other via I.R.'s or some crap

Don't scratch your face while holding the iron. I got a nice burn on my nose from doing that. Also, don't solder barefoot. One drip on your foot and you learn that lesson.

 BeefofAges Jun 5, 2004 Cry 'Havoc!', and let slip the cows of war. This is a neat thread. I'm doing my senior design project right now, and we're making something that might interest you guys. Basically, we're making wireless data repeaters. The idea is that you'll have a bunch of identical little boxes. You connect an ipod to one of them, and speakers to the rest. They'll build a mesh network and disseminate the data from the original broadcaster to each other device. If you want more info, check out our blog: http://repeaterproject.blogspot.com/ We spent fall quarter doing research, ordering parts, and writing our design document. This quarter, we have until March 14th to build everything. I'm hoping to get some pictures up soon. # ? Jan 9, 2008 17:07
 joebuddah Jan 30, 2005 Could somebody tell me a good book to learn plc programing? I'm probably going to buy a DL06 from automationdirect.com. I recently got some nifty automation devices for helping a friend tear down one of the machines at his job as they were selling it for scrap metal. # ? Jan 9, 2008 17:13

#### joebuddah posted:

Could somebody tell me a good book to learn plc programing? I'm probably going to buy a DL06 from automationdirect.com. I recently got some nifty automation devices for helping a friend tear down one of the machines at his job as they were selling it for scrap metal.

We used the free manual from directsoft when learning to program ours. DS5 works on the allen bradley series which are pretty much an industry standard. Well the manuals are free on the website and the documentation for ladder logic was pretty straight forward. What are you trying to accomplish with the PLC though?

#### Hillridge posted:

Don't scratch your face while holding the iron. I got a nice burn on my nose from doing that. Also, don't solder barefoot. One drip on your foot and you learn that lesson.

Jesus christ, I don't think I could ever mentally get a soldering iron near my face.

The first burn I ever got was the result of a surface mount resistor getting stuck to the tip of my iron. Tried wiping that off with my hand, heard sizzle, realized hand was burning, ouch.

It was kind of cool though, because I found out that you can use a soldering iron to remove your fingerprints (at least for a month or so).

 joebuddah Jan 30, 2005 I want a nematic arm to to move up to turn on a light switch when I break the beam. I'm just trying to get a feel for the I/o controls as I have all this stuff in my house. I'm open to any other ideas as well # ? Jan 9, 2008 17:47

#### joebuddah posted:

Could somebody tell me a good book to learn plc programing? I'm probably going to buy a DL06 from automationdirect.com. I recently got some nifty automation devices for helping a friend tear down one of the machines at his job as they were selling it for scrap metal.

I tried to PM you, but I guess you don't have that.
I need to look up the model (I think it's an Allen Bradley SLC 500 5/03 CPU), but I have a PLC and Backplane gathering dust at home if you're interested. I already sold off all of the IO modules so I have no use for the CPU module and backplane.

It looks similar to this, except my backplane has around 11 slots:
http://i11.ebayimg.com/06/i/000/cd/33/0129_1.JPG

Let me know if you can use it. I'd be happy to sell it for cheap and reclaim some space in my junk room.

#### joebuddah posted:

I want a nematic arm to to move up to turn on a light switch when I break the beam.

I'm just trying to get a feel for the I/o controls as I have all this stuff in my house. I'm open to any other ideas as well

1) http://tinyurl.com/2md9ot

2) Why do it so complicated? Just rig a relay to switch when the beam is triggered. I'm assuming you're using some sort of laser/CCD combination, so just use the CCD to activate the relay and switch on power to the light.

#### scholzie posted:

1) http://tinyurl.com/2md9ot

Maybe he does want a nematic arm

Here we are talking about using a 12V supply to light up LEDs (first mention of 12V).

#### SkunkDuster posted:

I was using a 12V supply

Here is Scholzie referencing that post (no mention of 5V anywhere):

#### scholzie posted:

As for your resistor methods, I guess worse things have happened. You're wasting your time though because Ohm's law is just about the easiest thing to do in electronics. Also, you're dealing with voltages and currents that are so low you'll never need more than a 1/4 watt resistor. Assuming your resistor is about 50-75Ω, and your current is about 25mA, P = I2R = 0.03-0.05W. Even that example above, 50mA and 2.9 volts is just 145mW. 1/4W resistors are going to be ok for pretty much anything involving LEDs unless you get some of those crazy Luxeon LEDs with 1.5A max currents.

Here is a 1/4W (250mW) resistor failing miserably in Scholzie's scenario (second mention of 12V):

#### SkunkDuster posted:

if you're powering that LED with a 12V supply, then the resistor would be dropping the other 9.1V at 50mA and dissipating 455mW.

Here is Scholzie backpedaling.

#### scholzie posted:

The above example used a 5V source and a 2.1 V drop across the diode. Therefore, the drop across the resistor was 2.9V @ 50mA.

And finally, we have Scholzie giving out some information that is flat out wrong:

#### scholzie posted:

Also, the spec sheet for that LED gives the Absolute Max. current as 70mA. You're not going to kill it with 5mA over spec as you alluded to. You'll just reduce its lifetime a little if you run it consistently (i.e. long periods of time) at that current.

With your vast experience in semiconductors, didn't you look at your post and think "drat, 70mA is awfully high, really loving high, for a regular LED. Maybe I should take another look at that data sheet to see if maybe I missed the word "peak" in there"?

Then you completely contradict yourself in the very next sentence and give out information that is absolutely correct. High five, buddy!

#### scholzie posted:

Of course if you run it at 75mA you're looking for trouble.

And some more poo poo that is dead wrong:

#### scholzie posted:

you don't have to worry about the strange I-V characteristics of an active diode. Once the LED is active it's almost a perfect ohmic device with a fairly steady resistance

I've plotted the "strange I-V" characteristics for a few of the LEDs I commonly use and I wouldn't call a 358% variation in internal resistance an "almost perfect ohmic device". The 14K mcd red LEDs I have drop 1.9V at 10mA giving them an internal resistance of 190 ohms. If you push them up to 40mA, the voltage drop increases to 2.13V with an internal resistance of 53 ohms. I had planned on plotting the curves for all of the various LEDs I have to use as reference sheets, but I stopped after plotting red, orange, and ultraviolet because I realized that...

#### scholzie posted:

You're wasting your time though because Ohm's law is just about the easiest thing to do in electronics.

...I was wasting my time plotting all these graphs when it was a hell of a lot quicker to just stick the LEDs on the breadboard with my multimeter hooked up in series to measure current, and then

#### SkunkDuster posted:

start with a resistor that I know is too high and work my way down until the LED is "bright enough" (usually 15-20mA)

It's not that I don't know the formulas, I just don't think that working them out on paper is always the most efficient way to build a circuit to light up some LEDs. If you just want to make a few LEDs light up, it is a lot quicker to just go straight to the breadboard and measure the results firsthand. Your posts seem geared towards people who want to become electronic engineers and think about substrates and whatnot. Mine are geared towards the average goon who wants to add an LED to his PS3 controller to make the Playstation logo button light up without setting anything on fire.

#### scholzie posted:

Regardless, I see your point, but I think that's a bad way of going about design, even from a hobbyist standpoint. Sure, it works for one LED, but what if you have 10 of them, neither in parallel nor in series? 25? 50?

I'd have to consult Schrödinger on that one.

I know where you are coming from, and have read the warnings against using LEDs in parallel or series/parallel, and I'm in agreement with you that spec sheets and margins of error are for pussies. Still, resistors cost about 2 cents each, so why would you bother taking a chance on the remote possibility of a runaway current situation when you can just wire them in series and use a few extra resistors?

If I was going to light up 50 LEDs, I would start by ignoring the number 50 and look at how many LEDs I could light up in series with my supply voltage. If I had a 12V supply, and I ballparked each LED to have a 3V drop at 25mA...

#### scholzie posted:

25mA @ 3V always works for generic LEDs

...then I would stick 4 of them in series with a small resistor to counter the dreaded runaway (better safe than sorry). If they lit up and looked good, and fell somewhre in the 15-30mA range, then great! If they were running a bit hot, then I'd increase the resistor value. If they didn't light up, I'd drop back to putting 3 in series and go from there.

Your math and formulas are dead on correct, but some of the stuff you have posted in this thread ranges from unclear to completely wrong. This is a great thread and I agree that

#### scholzie posted:

this thread is all about getting started in electronics, I think people should get started doing it the right way

so please take a couple minutes to look over your replies to make sure you are talking about the same thing the person you are replying to is (12V vs 5V) and your facts are correct (75mA PEAK voltage).

I'm also looking forward to this:

#### scholzie posted:

Maybe someone (or I) should do a soldering tutorial. If there's interest maybe I can do it.

#### scholzie posted:

I sometimes gauge my productiveness by how many burns I got that day.

With that aside, what the hell is the 5th band on this resistor for?

The orange-orange-orange-gold bands tell me that it is a 33K resistor with a 5% tolerance, and my meter is in complete agreement. So what is that yellow band at the end indicate?

#### SkunkDuster posted:

With that aside, what the hell is the 5th band on this resistor for?

The orange-orange-orange-gold bands tell me that it is a 33K resistor with a 5% tolerance, and my meter is in complete agreement. So what is that yellow band at the end indicate?

It's been a while, and I can't find my handy dandy resistor chart from Radio Shack back in the day (it's so cute, it has a wheel you turn to get the color! ), but I think that yellow band is an indicator of high wattage rating? It's certainly a big sucka.

#### SkunkDuster posted:

With that aside, what the hell is the 5th band on this resistor for?

The orange-orange-orange-gold bands tell me that it is a 33K resistor with a 5% tolerance, and my meter is in complete agreement. So what is that yellow band at the end indicate?

It indicates a temperature coefficient of 25ppm.

Usually resistors with more than 4 bands are precision resistors with the extra bands used for the extra significant digits. On your resistor the 4th band is clearly a tolerance band (special colors), so the 5th band gives the temperature coefficient (how tolerant the resistor is to temperature changes).

The parts per million (ppm) unit can be a little confusing, but the way it works is like this:
In the case of your resistor, for every °C (or K, take your pick) increase, the tolerance of the resistor becomes 25/1,000,000 worse. So if you change the temperature by 40°C you'd get an additional 0.1% variation in the resistance.

Hillridge fucked around with this message at 20:12 on Jan 9, 2008

 SnoPuppy Jun 15, 2005 Top Cop Just want to add a few more links: Linear Technology makes a free version of SPICE available from their download page: http://www.linear.com/designtools/software/index.jsp Its not too bad and it has all of their parts included in the library. Another decent PCB layout tool that is free for hobbyists is CadSoft's EAGLE. The unregistered version does have some limitations, but generally they don't seem to be too much of a hassle for smaller designs. http://www.cadsoftusa.com/ # ? Jan 9, 2008 21:17