Home
Hints and Tips
Electronics 101
   Welcome to electronics 101.  This is the first installment of lighting models.  If you don't know what electricity is go to Ask Dave: What is electricity.  OK, that being said, We will deal with low voltage circuits,  No need to find a friend to use as a fuse (or if they're really dumb a circuit breaker.)  First, we will be basing this on LEDs (Light Emitting Diodes.)  Feel free to experiment with small light bulbs like those for model railroads.  The standard diode symbol looks kinda like this >|   With an LED to get it to light  the > should point towards ground (negative).  If they are in the circuit backwards, they will not light.  For our purposes, this is the main difference between a LED and a standard light bulb.
Formulae:
      E=I*R     where E is Voltage, I is amps, and R is resistance in ohms.
      P=I*E      where P is Watts
      Rt=(R1*R2)/(R1+R2)    Hopefully you won't need this.  Equivalent resistance for parallel resistors.
    Now, what are those Evil things for you may ask??  Well, go ahead, ask.  .....I'm going to tell you eventually, but those three basic formula can get you very far in electronics.

    OK, first pick a battery set up.  You probably want between 3 and 12 volts.  The choice is based on how long you want your batteries to last, but more importantly, what you happen to have handy.  I like the holders for 4 AA cells, or a 9V battery.
    Now look at your LEDs.  (you probably grabbed the smallest ones you could find.  That is probably a good thing.)  On the package it will probably say what the current draw is. (something like 20mA  give or take).  Now if you simply hook your LED across the battery terminals....  Boy is that bright.  .....Oh did it go out?  Congratulations.  You just learned that all electronics work on smoke.  If you let the smoke out, they don't work anymore.  OK, back to the formulae.  E=I*R. if your LED happens to be say 20mA (.02A) rated, a good ball park to work with is to just use that formula to figure out what size resistor to use.  For example if I had a 9V battery, 9=.02*R or R = 450 ohms.  (your LED also has a rated voltage drop.  Technically you could use supply voltage minus LED voltage as E, but I'd rather have a bit dimmer LED without burn out.)  Place the resistor between the LED and the terminal of the battery.  No not that one, One that you haven't let the smoke out of yet.  Still no light?  Try turning the LED around.  There. that's better. 
     So do I need a soldering iron to hold all this together?  Naw, there is a nifty tool called a wire-wrap tool available at your local Radio Shaft or a nice one from OK Industries.  They have two little holes in the end of a round shaft.  You will also need some wire wrap wire.  30 Ga. will be fine.  Strip about an inch of insulation off. If you're not in the dental profession, your teeth work fine, or else use the little wire stripper on the tool.  I tend to use a seperate wire stripper, but that's just me.  the wire goes in the outside hole.  A little of the insulation should also go up into the hole (if it is a modified wrap tool.  These are better, because the first wrap on the pin still has insulation, thus less chance of shorting.)  The leg of the LED or resistor goes in the center hole.  Now turn the tool clockwise untill all of the wire is wrapped around the leg.
     Now as your battery goes down,  The LED will get dimmer.  Hmmmm, What to do...  Well, you can either live with it (longer battery life over all), or put in a voltage regulator like a LM340 or LM7805 5V regulator.  these will take upto 36VDC in and put out 5VDC (so long as your input is above 5 and you don't exceed how much current they can supply.)  The only problem being that they take some current to operate, even if their aren't any lights on after it.  In fact, they probably draw as much as 10 to 20 LEDs!  (or even more depending on the regulator and the LEDs).  So why would you want to add one?   Ok, well ya got this light see.  It sure doesn't do much does it?  What if you want it to blink?  like a blinker, or hazard lights, or to simulate the flash of your Death Ray?
    Well you are probably going to need some ICs (Integrated Circuits).  Most common ICs run at roughly 5VDC, but you are probably using 6 to 9 volts.  If you don't use some kind of regulation, you can prove again that all electronics works on smoke.  (I'd also like to point out that friends also work on smoke, if you let the smoke out of them, they don't work either.)  Check the pinout on your regulator, usually, counting from left to right, pin one is + IN, pin 2 is GND(-), and pin 3 is + OUT.
You should add a large Capacitor between the +OUT and GND.  Preferably an electrolytic cap.  Now, Electrolytics usually have a plus and negative side as well.  If you hook them up backwards, they sometimes work, sometimes smoke(and smell
REALLY bad), and sometimes explode.
     If you use 4000 series ICs instead of 7400 series, you shouldn't need a regulator, but 7400 series are usually cheaper, and have a much larger variety.
     The most useful ICs are...  The 555 Timer (this I believe is a 5VDC chip), the hex inverter, AND gates, OR gates, Exclusive OR gates, Decade counters and Ripple counters.  These can be ganged in various ways to produce many different effects.
     There have been books written on the 555 alone.  This is where most people would start to make a blinker.  It can be set up to put out a constant stream of HIGH LOW HIGH.... (HIGH is near the input voltage, and LOW is close to GND.)  Personally, I think they are too expensive.
     The HEX Inverter has six seperate "gates" in it.  A high on the input side produces a low on the output side and vice versa, hence the name HEX meaning six and Inverter meaning opposite.
     The AND gate (there are various number of inputs and number of gates per IC) looks at all of the inputs.  If they are all high (for a given gate)  the output goes high.  If ANY input is low, the output is low.
     The OR gate outputs a HIGH if ANY input is HIGH
     The Exclusive OR gate outputs a HIGH only when one input is HIGH and the other is LOW.
     Decade Counters, every time the input pin goes HIGH (or in some cases LOW) a different output goes HIGH and the rest go LOW.  This is useful for a scrolling band of LEDs  like the pulsing of spaceship engines.  Some can be ganged to gether for longer scrolls.
     The ripple counter takes input like the decade counter, but the output is a binary sequence. if I use 1 to represent a HIGH and 0 to represent LOW, the out put progresses like this 0000, 0001, 0010, 0011, 0100... Thus the lowest toggles HIGH LOW the fastest.  the next place toggels at half the speed, and so on.  Now combine it's output to the input of the afore mentioned gates, and very complex patterns can be developed.
     Now that you are confused, let's go play and try to straighten things out.  On to Electronics 102!
Electronics 102