Here you will find a few videos and code of some current and past projects I am working on. Also, my resume is available here.
Most of the parts can be bought at Radio Shack. You won't be able to find the IRFP250 power mosfet there (get it from Digikey), but you could substitute a 2N3055 or the smaller TIP120 or TIP3055. Since those are BJT's instead of mosfets you might have to adjust R9 which would feed the base current to the transistor. It's best to add a heat sink to whatever transistor you choose. The pots you get at Radio Shack are ok in a pinch, but they wear out quickly and tend to not stay on the breadboard very well, so get a few of these from digikey instead, they work great.
High Voltage Theory - Simplfied
I soldered alligator clips on the high voltage wires of my flyback. This makes it easy to experiment with different electrodes. Try to get a nice clean arc, or try to get a beautiful spread out purple corona. With every electrode you try, be sure to try it on both the positive and negative terminals, as it can make a huge difference. Electrons tend to fly on/off the electrodes at sharp points. This makes sense since voltage is somewhat analogous to pressure, and the conducting electrons can be viewed as a sort of gas moving through the crystal lattice of the metal. The transformer pulls electrons off of the positive terminal and pushes them onto the negative terminal, increasing the pressure of this electron 'gas' on the negative terminal and decreasing it on the positive terminal (this also explains why the negative terminal gets much hotter, higher pressure with more electrons means more electron/lattice collisions, thus increasing temperature). As more and more electrons get pushed onto the negative terminal the pressure grows, at some point the repulsive force between electrons becomes greater than the attractive force between the electrons and the positive charged nuclei of the lattice and an electron will fly off the negative terminal. An electron at the tip of a sharp point feels more repulsive pressure from it's neighboring electrons than would an electron on a rounded end. It's somewhat similar to how the sharp point of a needle can puncture something due the greatest psi happening at a point. That's the classical picture anyways and is useful for experimenting, but of course a complete quantum picture would be different.
Operation of the speaker
Sound is a pressure wave. When a speaker cone pushes out, it compresses the air creating a high pressure area, and when it pulls back, it creates a low pressure zone. The plasma speaker does the exact same thing. By varying the amount of current through the arc, you change its temperature. A large current equals a hotter arc which heats the air around it and the hotter air expands. A smaller current creates a lower temperature and the air condenses. The process pushes air back and forth, just like a regular speaker. This circuit uses a technique called Pulse Width Modulation (PWM) to do that.
The flyback is operated by sending a square wave to the power fet Q2. When it's on, current flows through the flyback's primary, building up a magnetic field inside. When Q2 is turned off, the magnetic field abruptly collapses, and since induced voltage is proportional to the time rate of change of the magnetic field, it's this abrupt collapse that generates the large voltage. The frequency that Q2 switches should be higher than the range of human hearing, about 20kHz, otherwise you'll hear a high pitched squeal. Once the transistor is turning off an on, you then need to adjust the duty cycle. This means that even though the transistor is switching on and off 20 thousands times a second, you will varying the ratio time spent on to the time spent off. If the transistor is on for 3/4 of a cycle and off for 1/4 of the cycle, there will be a larger current in the flyback's primary than if the transistor is only on for 1/4 of the cycle and off the rest of the time.
The comparator IC1A makes a basic relaxation oscilator. The frequency is primarily set by capacitor C1, smaller the value faster the circuit. Pots R1 and R2, are also involved in setting the frequency, R1 controls how fast C1 charges (R5 is involved too, since the LM339 is an open drain output) and R2 controls how fast it discharges (R5 is not used during discharge). Using pots for those resistors allows you to experiment with the shape of the waveform across C1. The voltage across C1 is then fed to another comparator, IC1B, which does the pulse width modulation. R3 is used to control the duty cycle of the flyback whether or not you have an audio signal coming in. It acts as a sort of base duty cycle, because when you feed in an audio signal, it modulates the duty cycle from there. The audio signal is fed into IC2A, which is a basic differential opamp. Its output is capacitively coupled to R3's connection to IC2B. R15 controls the gain of the amplifier.
To get the best sound, play with all the knobs to get it tuned just right, but this circuit seems to be a good starting point.
Here's a few other things you can do with a high voltage source.
This is a Jacob's Ladder. There's not much to it, but fun to build though. It uses the same circuit as above, but without the amplifier circuit connected. Control the voltage and current by turning R3.
You can make a fluorescent light bulb light up without actually connecting it to anything. Rapidly alternating the electric field surrounding the bulb from very high and back to zero is enough to polarize the gas in the bulb, to the extent where some electrons around a gas atom are pulled far enough away from the nucleus that they go to a higher energy level. When the electric field goes back to zero, the electrons return to their original energy level emitting a photon. It is necessary to have an arc between the positive and negative terminals. What happens is that as the voltage builds up between the terminals of the flyback secondary, the gas atoms polarize due to the strong electric field. Once the voltage surpasses the necessary voltage to breakdown the air, the arc forms and rapidly the electric field goes back to zero, causing the electrons to return to their original energy level by emitting light.
Go to Radio Shack and get yourself a $5 xeon bulb. I have no idea what the proper voltage and current for this bulb is, but play with the knobs on the pots a bit and you can have a lot of fun playing with it. Grab some rare earth magnets and make the stream of light corkscrew around. Flip the magnet over and the corkscrew goes the other way. This happens because charged particles moving in a magnetic field experience the Lorentz force.
google search so I won't post my own. First, I made my own capacitors out of some tin foil and a $5 piece of vinyl from a craft store.
They measure about 17nF each and I wired 3 in series for a total capacitance of ~6nF. Next grab a few dollars of copper ground wire (~10 feet), some pie tins, a couple nails for a spark gap, a paper towel tube, and tear the magnet-wire coil out of a broken shake flashlight. Wrap the copper ground wire in a spiral (either vertical or flat) and wrap the magnet-wire around the paper towel tube and assemble the final coil like so
Is it an impressive Tesla coil? Not at all. Was it fun to build and play with? Absolutely! I personally find the purple corona to be very beautiful and I get more corona and bigger sparks with the flyback driving the Tesla coil than with the flyback alone. The maximum spark length I achieved was 6cm. Why so little? The main reason is probably because the flyback and its driver just don't put out enough power. Also, I'm sure there's quite a lot of losses in the caps I made, as the vinyl I used probably isn't the best dielectric, and high quality homemade caps are difficult to make. Each part of a Tesla coil interacts with every other part, so adjusting the length to width of the secondary coil, the size and shape of the tophat, the width and design of the spark gap, the coupling between the primary and secondary coil, the capacitors and the power of the input transformer all play a role. Richie's Tesla Coil page has a wealth of information. I'm in the process of making another secondary coil with different dimensions and I hope to find a better high voltage source soon.
This is a 6-channel Christmas light controller which was my Christmas gift to my parents. Sure, it's a bit 3rd-grade-art-project-as-a-present-ish, but hey, how many people get custom made electronics for Christmas? And besides, your mom loved your art projects. You simply plug in any ol' strand of christmas lights into each outlet and then you can control the timing of when each strand turns on and off, and you can also control the brightness from completely off to full brightness with any level in between, which gives you the ability to do all kinds of fading in and out or blinking - be as creative as you can be.
Making a light show is pretty easy too. You simply experiment with the string called program_str which is listed towards the top of main.c.
It's a sort of script with each line being a command that contains the timing info, the channel, the command and any options for the command. Each line is terminated with \n.
The command format is
"100 1 c 70\n"
There are five different command that can be given to each channel
An example light show is
"0 1 b 1 125 4000 4000\n" // immediately, sets channel 1 to blinking,
"3000 loop 3\n" // wait 3 seconds and then loop the following 3 times (can also have nested loops)
"0 2 f 125 0 -1\n" // fade channel 2 from off to on
"500 3 f 1 125 2\n" // wait 500ms and then fade channel 3 from on to off, but do the fade twice as fast
"500 end \n" // wait 500ms and go back to loop
"0 1 c 1\n" // channel 1 full brightness
"0 2 c 50\n" // channel 2, little less bright
"0 3 c 90\n" // channel 3, still less bright
"5000 1 z\n" // wait 5 seconds now turn all channels off. It automatically repeats the light show
"0 2 z\n"
"0 3 z\n"
As a future improvement, I think it'd be relatively easy to write a GUI program that let's you graphically build the light show so you wouldn't have to write the commands by hand, just point-click-run. Another future improvement will be to put in a wireless link so the light show string isn't statically compiled in. I'd probably do this with something easy like an off the shelf zigbee or bluetooth product that can implement a simple wireless serial port - maybe an XBee module -
There's basically 3 parts to the circuit.
The first is the microcontroller circuit, which is just a PIC micro along with the necessary pull-up resistors. It runs off of a 5V supply (old cellphone charger - why buy a transformer and build your own when I have 4 of them just sitting in my drawer?)
The second is the zero-cross detector. Since christmas lights run off of AC, they turn on and off 120 times a second, so to dim them, you just detect when the AC waveform is zero and then waiting a little bit before turning them on. So for half brightness, only turn them on for roughly half the time. The circuit I used is a very good circuit that I found here, except for I switched out the 22k resistor for a 50k one so that the pulse it gives is a bit closer to the actual crossing point. It uses an opto-isolator so the 5V side of the circuit is physically separate from the 120V side. The output is tied to an interrupt pin on the mcu, so each time the AC waveform crosses zero, an interrupt is called that updates when the last zero cross happens so the brightness control can be properly done.
The third is the output channel circuits. It uses triacs - one for each channel - to turn the lights on and off. The circuit seems to be a relatively common way of controlling AC loads with a micro. These are electrically isolated from the 5V circuit as well by opto-triacs.
Although, all the part numbers are shown on the schematic, a complete list is here too
Since main.c is the only interesting file, so it's the only individual file link I'll put, but the entire code is available as christmas_light_controller.tar.gz
Since 6 channels isn't very many, you're somewhat limited in what you can do, but here's a quick example of controlling lights on a tree. But the good thing is, it'd be very easy to add more channels. I only stuck with the initial six as a proof of concept and you can't find plug-in bars with more than 6 outlets, and I think the plug-in bar conveniently ties it all together.
> sudo gem install qtbindings
Then run with
> ruby main.rb
or if you desire
> chmod +x ribble
You can view the source by clicking on individual files listed below or you can download the tarball ribble.tar.gz
I wrote this in Ruby with Qt along with using Qt Designer to make the layout. To run, the procedure is similar as above, first install qt-bindings with
> sudo gem install qtbindings
Then compile the user interface
> rbuic4 lifewidget.ui -o lifewidget_ui.rb
and finally run with
> ruby main.rb
Get the whole tarball or see individual files. life.tar.gz
This is an accelerometer based controller I made. The main components are:
Now the controller in action...
Shake the ball to have a cup full of dice shake on the screen and then roll them onto the table!
Written in C++ using SDL with OpenGL.
This is a simple 3D demo of using the controller to tilt an object on the screen.
Written in C++ using SDL with OpenGL. This uses a small framework I wrote to wrap SDL and the accelerometer ball's functionality. This allows me to very quickly set up a program to test ideas.
...and some code
This is a video of using the accelerometer based controller as a mouse. Tilting the ball moves the mouse pointer. Pointer's velocity is proportional to the degree of tilt.
Written in C using the uinput driver.
This is the code for a simple tetris game. Although a windows console program, it was written with the intent of porting to a Freescale HC12 for an embedded systems course. Written in C.