Sunday, May 23, 2010

Capacity for capacitance

And then there's the capacitor. Simply put, a capacitor stores electricity. When a charge is applied to the capacitor, it is stored until a path is available for the current to flow. You might think "Oh, so it's like a battery." (C'mon, admit it. You might think that...) Well, it is and it isn't. Aside from the technical differences in how they're made, (a capacitor is a series of plates separated by an insulator, a battery consists of plates made of dissimilar metals suspended in an electrolyte) the capacitor charges and discharges very quickly, while the battery takes it's own sweet time.

The ability to charge and discharge quickly makes them handy in a couple of ways. Using a capacitor in parallel with a heavy reactive load like a motor or power amplifier can provide an extra "shot" of power when a load is suddenly applied. That's handy if you want to put big subwoofers in your car, but isn't used too often in a yard haunt.

What does come in handy is the capacitor's ability to filter out spikes in voltage. Halloween props very often involve the use of devices like pneumatic solenoids, relays, and motors that present a highly reactive load to a power supply. It's also very common for those props to be triggered or controlled by sensitive controllers. Putting capacitors in parallel with the power leads of the controller smooths out any voltage spikes the props might create. The charging and discharging of the capacitor smooths out the peaks and dips in voltage.

Think of it this way. Lets say your highly successful haunt has a straight queue line. As people come up in groups of 2 or 3 (or 10) the pressure on the line (voltage) rises and falls.



Now if you take a chapter from Disney's attraction design and add a "stretching room" like the Haunted Mansion, the flow of people is smoothed out.



Capacitance is measured in farads, and capacitors have a maximum voltage rating. For filtering purposes the smaller the farad rating, the faster it charges and discharges. That means that smaller capacitors filter higher frequency spikes, while the larger ones handle lower frequencies.

Wednesday, May 12, 2010

Playin' around with VSA

OK, so in the past I've used I.R. sensors & pressure mats to trigger props. It's always worked OK, but there have been times when the triggers failed, or the timing was off, or (worst of all) the props have been too frightening for the young TOT's & I've wished they didn't fire. I like the of manually triggering the props, but don't want to be tied to a wired control panel. I could use a simple wireless remote, but why do that when I can do it a much geekier way?



The routines in the video are just audio only examples, but they are .vsa files. I'm using Monkey Basic's awesome Helmsman to pre-load the VSA files, and a free program called EventGhost to trigger them. EventGhost has a web server plug-in that lets you create web pages with buttons on them that can trigger events on the computer. (EventGhost can do lots of other things, too. The learning curve is a little steep, but once you're past it you can do some really cool stuff.)

The video's just a proof of concept & I still have a few bugs to work out, but it works!
Once I get the kinks worked out I'll write up a how - to.

Tuesday, April 6, 2010

enter the drago - er, ah, diode?

This is an easy one - Put simply, a diode lets current flow in one direction, but not the other. Kinda like a check valve.



A couple of things to remember about diodes - a diode will cause a bit of voltage loss in a circuit. This is referred to as forward voltage drop, and is usually around .5 - .7 volts. Diodes also have a maximum reverse voltage. If this is exceeded, the diode will break down and allow the current to flow in the wrong direction (that'd be bad, mkay?)

The polarity of a diode is denoted by a stripe on one end of the diode. Current flows into the end furthest from the stripe and passes out the other, but not the other way 'round.

Thursday, March 18, 2010

Transistorized...

Aah, the transistor. Where would we be without it? For starters, I wouldn't be sitting on the couch writing this post. The computer would be a bit too big and expensive for that, what with all the vacuum tubes it would take to make it work. As it is there's far more processing power in my laptop than there was on the Apollo space capsule that put men on the moon, thanks to the transistor.

But what is a transistor, exactly? A transistor is a semiconductor that allows a low current to control a much higher current. (I'm not going to go into what exactly a transistor is, 'cause it's boring.)

I'm going to limit this post to basic bi-polar junction transistors, although the basics apply across many other types of transistors as well. Transistors can be used to amplify current, or be used as a switch. For the circuits I'll be building for my haunt the transistors will be primarily used as switches, so that's what I'll focus on here.

There are two types of bpj transistors - PNP & NPN. This refers to the polarity of the junctions in the transistors, and determines how they are connected and used.



Transistors have three connections - the base, emitter, and collector. In a NPN transistor, a small amount of current applied to the base allows a larger current to flow from the collector to the emitter and on to ground.



Power is connected to the load, and the negative connection of the load connects to the collector of the transistor. A small current applied to the base allows the current to flow from the collector through the emitter and on to ground, completing the circuit.

In the above diagram you'll notice a couple of resistors. The resistor between the base and the trigger source is vital to the longevity of the transistor. The connection between the base and the emitter has very low resistance, and when power is applied to the base the connection is close to a short circuit. This would cause what's called "thermal overrun" (a fancy way of saying the transistor would get really hot).

OK, great. So we need a resistor, but how do we know what resistor to use? Too much resistance and the transistor won't reach saturation and pass the full amount of current needed, too little resistance and too much current passes through the transistor and it burns up. Never fear, there's a way to figure it out, & all it takes is a little math (you know, the stuff we learned in school that we never thought we'd need to know...)

When you look at the specifications of a transistor, you'll see DC collector current and hFE. The DC collector current is the highest sustained current that the transistor can handle, and the hFE is the forward current gain (not sure why they call it hFE, but if they called it fcg we haunters might confuse it with a flying crank ghost.) To figure out what value resistor we need, we have to figure out how much current the base requires for the transistor to reach saturation. This is simply the DC collector current divided by the hFE. So for example, if we have a DC collector current of 5 amps and a hFE of 1000, the base current would be .005 amps, or 5 milliamps. To ensure saturation it's a good idea to increase this a bit, so we'll multiply the base current by 1.2 in our final calculation. To find our resistor value we go back to Ohm's law - V/I = R. Assuming we're dealing with a 12 volt circuit, our calculation would be 12/(5 / 1000 * 1.2) = 2000, or 2K ohms.

The other resistor in the circuit isn't critical, but can help if you have erratic switching. In the case of the NPN circuit the resistor is considered a pull-down resistor. It's job is to hold the base low when no trigger voltage is present. The value of this resistor isn't critical, but should be significantly higher than the base resistor. A good rule of thumb is to multiply the base resistor's value by 10 for the pull-down resistor's value.



A PNP transistor is similar to the NPN, but instead of applying current to the base to trigger current flow, you apply ground.



In this case power is applied to the emitter, and when the base is grounded current passes through to the collector and into the load.

The resistor calculations are the same, but in this case the second resistor's job is to hold the base high when the transistor isn't triggered (called a pull-up resistor in this case).

Transistors are very versatile - you'll be hearing about them a lot in the future. Unless of course you get sick of my ramblings and quit reading...

Sunday, March 7, 2010

Resistance is futile

OK, so we've covered some of the basic terms we'll run into in simple circuits. So now lets look at some of the components we'll use to actually build them.

Lets start with the lowly resistor. A resistor limits the current flow in a circuit (I know, we've already established that.)



More specifically, a resistor is a device that is added to a circuit to control and limit the flow of current. The resistance of a resistor is fixed and not affected by the flow of current or changes in voltage. (There are variable resistors, but they don't count.) (OK, they kinda count, but we're just talking about plain old resistors right now.)

For some strange reason, resistors aren't marked labeled with plain markings. That would be too easy. Instead, they're marked with a series of colored stripes. The colors denote the value and tolerance of the resistor.



Resistors also have a wattage rating that denotes the overall safe power rating of the resistor.

There are some really good resistor color code calculators online.

Saturday, February 27, 2010

Watts the deal?

In my last post I tried to explain voltage, current, and resistance. Not too sure how well I succeeded, but no matter. Ever forward, right?

There's one more term that we'll see frequently - watts. Watts (W) are a measure of power, and are calculated by multiplying current by voltage. So if you have a 100 watt light bulb that runs off 120 volts, that bulb would draw .84 amps (100 watts divided by 120 volts). Pretty simple, huh?

So, what's the benefit of knowing all this, you may ask. Well, for starters you can figure out if you have enough power to run your haunt before you overload your power supply and burn your yard up (that would be bad). Just add up the total amperage draw for each circuit & make sure your power supply has a high enough amperage rating to exceed the total load.

Thursday, February 18, 2010

Just who is this Ohm fella, anyway?

In some of my previous posts I've talked a bit about some electronics projects I've been playing with. I've had some very positive feedback so far, but I've also had quite a few questions. So before I go on I thought I'd explain some of the electronic terms I'm talking about and how they affect each other.

So let's start with current. Current is the volume of electrons flowing through a circuit. If you think of electrons as people walking through your haunt, then current would be the number of people that it would take to keep the haunt full.



Current is measured in amperes, commonly abbreviated as amps. Lets say your haunts pathway is wide enough to allow two people to walk side by side, and it's always full because your haunt rocks. So for the sake of this explanation we'll say your haunt draws two amps.



The width of the path in this example is what limits flow. That limiting factor is called resistance.



Hallways, doors, props, and actors all increase the resistance to the flow of people. Similarly, wires, resistors, caps, microcontrollers, and virtually everything else in an electrical circuit contribute to the overall resistance.


Since you've built such an incredibly awesome haunt you have people lined up for blocks waiting to get in. Those people don't like waiting in the cold so they start pushing on the people in front of them, causing pressure. That pressure is called voltage.



So now we have three basic elements of electrical circuit design: current, resistance, and voltage. Back in 1827 this German guy named Georg Ohm didn't have anything better to do, so he figured out how current, resistance, and voltage relate to each other. What he came up with was Ohm's law (Georg was a bit narcissistic). Ohm's law states that I = V/R, where I is current in amps, V is voltage, and R is resistance in Ohms. (Yes, resistance is measured in Ohms. I'll bet that stroked old Georg's ego.)

So lets say things are running smoothly in your haunt. Then unexpectedly a bus load of German tourists shows up to check things out. They've heard great things about the 3-axis flying crank trash can trauma you've built, and in their excitement they start pushing, increasing the pressure (voltage) on the people going through. In order to keep things running smoothly, you can either a: increase the capacity or speed of your haunt (increase the amperage), b: remove obstacles (decrease resistance), or c: sedate the Germans (lower the voltage).

As long as you know 2 of the 3 values, you can figure out the third.



This diagram will help with Ohm's law calculations. Cover the variable you're looking for, and then perform the remaining calculation.

(Note: I'd like to apologize to any German bus tourists - I meant no offense. I'd also like to apologize for any unintentional snarkyness in this blog post. I'm not sorry for the intentional snarkyness, though.)