The game of credit card roulette is analyzed to determine how the probability of fair dinner payment for all participants varies with the number of dinners eaten together, and the number of friends in the dinner party. The goal is to determine for a group of friends of size F, after eating N credit card roulette dinners together, the probability P_fair that they will have each paid a fair amount to within a fraction A, which is set to 10% in the python scripts.
One channel of LEDs is PWMed according to an LPF-peak-detector combination, and the other is PWMed according to an HPF-peak-detector. The crossover frequency is around 100 Hz. I think the visual effect is quite nice.
This circuit controls the average current through an electromagnet to counterbalance gravity and levitate a small magnetic object. The circuit controls the duty cycle of the bipolar square wave applied to the electromagnet, which proportionally controls the force applied to the object. Unfortunately, from force on the object, there are two integrations to get to its position, which is what we're trying to control. In other words, after an error is sensed, the force applied to the object is altered to compensate, but there is significant delay before the position is corrected, which could cause overshoot and instability.
This circuit implements a lead compensator to provide a phase bump near the loop crossover frequency to stabilize the system. For more reading check out the Wikipedia page on Lead-lag compensation. A (very poor quality) scan of the schematic is available:
Here is a video of the levitator in action:
I worked here as a research associate at the Contact Dynamics Facility during summer of 2008. As part of a four-person team of interns, we developed a hardware-in-the-loop simulation of Langley's proposed Lunar Surface Manipulation System (LSMS). Quite cool stuff. We worked in the Hubble Space Telescope (HST) building and got to see the real flight hardware (and the mockup) Lunar Reconnoissance Orbiter (LRO).
I also worked as project manager for the Robotics Academy's community service project. We visited a few summer technology-oriented programs and demonstrated robotics and got kids involved in engineering their own obstacle avoidance algorithms. We had a lot of fun building the light-seeking computer mouse robot demo. Below is a Youtube clip of Ben Mann and me testing it out.
Here are some pictures of the people I met over the summer:
[Link] This is a quaint little snippet of antiquated z80 assembly code that does a quicksort in 44 bytes. With a lot of register juggling and a recursion trick so I only had to save the upper bound coordinate, it manages to only use the stack as a sorting queue and only the 6 or so z80 registers (not including the shadow registers IX and IY).
All of the registers have special purposes, and cannot be used for everything, but I was able to make do. This is one of the craziest things I have written, surely one of the most useless (the z80 was made in the 1970's) but trivially novel, nonwithstanding.