Tuesday, April 4, 2017

Caching a "Bullet"

In my quest to get a ping pong ball up to speeds normally only achieved by military aircraft and light arms I ran into a metering problem. With my 1200 frame per second camera the ball only appeared in frame for 1 to 3 frames depending on how lucky I was. By having a length reference and knowing how long the shutter was open it was sometimes possible to calculate how fast the ball was moving by measuring how long its "streak" appeared to be in an image. This was only somewhat accurate and relied on the chance that the streak both started and ended in frame during one exposure so I came up with a much more accurate (and cheap) measurement apparatus.

I put two strips of aluminum foil 30cm apart and held tightly in a frame, using some alligator clips and 3.5mm stereo jacks I fed the output of my audio card into one end of each strip. On the other end I used more gator clips to feed the signal (from the audio card, and through the foil) back into the input of the audio card. When the ball is fired through the two strips they break a couple fractions of a second apart, by playing a tone through the strips and recording the result it is possible to count the number of audio samples (at 48,000samples per second) between the breaks. Now I have both an accurate measurement of the distance traveled and an accurate measurement of the time it took, letting me measure the speed of my ping pong balls with much more precision than my 1200fps camera.

Sunday, January 8, 2017

Paul Particle Trap

Normally a Paul Trap is used to catch individual ions, single nuclei or charged molecules, and then sort them according to their m/z ratio (mass to charge). However it is possible to scale the whole idea up to a table top size in order to catch finely ground powders like flour or corn starch.

The trap works by alternately pulling and pushing the particles in 2 or 3 axis. For one half of the cycle they are pulled up and down while being pushed inward from the sides, when the polarity of the trap reverses the forces reverse as well. The particles move according to the forces they feel but never get far before the reversal, trapping them in a small volume of space. When the voltage on the trap is increased the particles with the most charge relative to their mass will pick up more speed and eventually be flung from the trap, when the voltage is decreased the particles with the most mass relative to their charge will be overcome by gravity and will fall from the trap, in this way ions are sorted for used in mass spectrometers.

Thursday, December 8, 2016

Homemade Strain Gauge

I work with a lot of electronic scales, weighing raw materials, trucks and finished product, every one of those scales contains one or more load cells. Up until a few weeks ago, load cells were a mysterious aluminum block that turned static load into a weight on a scale. After a couple hours of Google-Fu I found that the important part of every load cell was a strain gauge, a variable resistor that changed value as it is deformed.

Strain gauges are generally described as a conductor that will be stretched along with a substrate, causing the conductor to become thinner and more resistive. When the substrate is squeezed the conductors are bunched up and become thicker, decreasing the resistance, it sounds simple enough until I figured out how little the resistance actually changes. Using about 250cm of very fine wire I was only able to measure a change of about 8mOhms. Normally 8mOhms would not be a huge problem for measurement but the total resistance of the strain gauge was 50.008 ohms.

To think of it another way, imagine measuring a 50meter long bar and trying to find out if it has grown or shrunk by 8mm BUT the tool you use has to measure the entire length, there aren't many tools that do that kind of accuracy for cheap. Instead of trying to measure the whole value I used a wheatstone bridge to measure only the change in resistance, this is like laying out a known 50meter bar next to the one you want to measure and then checking the difference between the two, this is much easier and can be done with non-specialized tools in both the physical and electrical examples.

Thursday, October 20, 2016

Electrically Conductive Flame

Reading about high voltage it is often mentioned that flames contain plasma, like an electrical arc, and are electrically conductive. A candle placed between the leads of a high voltage transformer will draw the arc longer, its flame will also wick away the charge on my Van De Graaff when brought near. But, when I try to pass 120v current through or measure the resistance of the flame with a meter it seems to be an open circuit

After doing some more reading I found most candle flames aren't hot enough to be conductive. In order to make the charge carriers (electrons) mobile enough to conduct current, the flame has to be hot enough to give the electrons the energy needed to break free from their atoms. With some experimenting I found that some metals work well and others will not, when exposed to flame copper forms a skin of copper oxide which will insulated it from the flame quite a bit, clean steel seemed to work a lot better. A little more tinkering showed that geometry is important as well, getting the most metal possible in contact with the flame increased the conductivity to the point where a very weak audio signal could be passed, and I could make this video.

With a pair of large parallel plates, and a very hot flame it could even be possible to generate current using a magnetohydrodynamic generator! Putting strong magnets perpendicular to the plates and the flow of the flame would cause the charges in the flame to migrate to one plate or the other, resulting in a measurable voltage.

Wednesday, September 28, 2016

Heat Pipes

Heat pipes are used in lots of modern computer hardware, they are the copper pipes that are threaded though and around the heat sinks and heat generating devices on motherboards and graphics cards. Heat pipes look like regular copper tubing until you try to change its temperature, an empty pipe will heat at one end and very little at the other, over time the tube will reach a steady state with a steep temperature gradient from one end to the other.

Applying heat to a heat pipe will quickly cause a rise in temperature along the entire length of the tube with a temperature gradient of only a few degrees. If you cool the far end of the pipe while it is hot, its temperature will drop along the whole length of the pipe, even the part where heat is being applied. With a heat sink at one end and a CPU at the other is is possible to make the effective radiating surface of the CPU hundreds of times greater than its actual one or two square cm.

Making a heat pipe is relatively simple: take a tube, and add a very small volume of water, then pull as hard a vacuum as possible inside the tube before sealing it. Pulling a vacuum lowers the boiling point of the water until it is boiling at room temperature, once sealed the liquid water will always be just on the verge of boiling, stopped only by the pressure of the water vapor in the upper part of the tube. When heat is applied the balance is disturbed and the liquid water starts to boil, water vapor from the boiling water travels up the tube carrying the heat with it. Once the vapor touches the cool sides of the tube it condenses back into liquid water where it can run back to the hot end and absorb more heat. Provided that all the water doesn't boil off at the same time the heat pipe can conduct head hundreds of times better than any solid material.

Tuesday, September 27, 2016

Fire Alarm Homework

Fire Alarm Problem

Given the original fire alarm circuit make the following modifications:
  • Add a second initiation circuit with relay (Z2)
  • Add a trouble silence pushbutton and relay (TS)
  • Add an alarm silence pushbutton and relay (AS)
The following notes were also included:
  • (AS) and (TS) should be reset by the existing reset button
  • Initiation (Z2) should have it's own alarm light
  • Silence buttons should only silence audible signals
  • Silence features should only work when audible signals are active (no preemptive silencing)

(Click images for a larger view)

Sunday, September 25, 2016

Random Walks - Creative Coding

Random walks are one of the first graphically interesting programs that many people will make, having rules that are simple and immediate results makes it a great piece of low hanging fruit. I have written up a random walk every time I learn a new language and always felt a little underwhelmed at the results, usually an amorphous black blob with jagged edges, there has to be a way to make a random walk look a little nicer.

I started my random walk with the standard set of rules:

10:Roll a random number from 0 to 3
20:move up, down, left or right depending on the number
30:draw a pixel
40:goto 10

I quickly had to add some limits to stop the program from writing off the edge of the screen and to stop the walk if it goes past a set number of steps, usually a few tens of thousands. Then I made a 2D array the same size as my output screen, I used this to keep track of how many times the random walk visited each cell, and another array was used to keep track of the order in which the steps were taken. Now that I had some information about each step on the random walk I could use it to generate some more interesting output.

As each cell is drawn two numbers, each being between 0 and 1 inclusive, are generated representing the value, relative to all the other cells, for each cell's number of visits and position from beginning to end of the walk. To make the internal details of the walk clearer I also increased the space in between each cell, this also allowed me to use the size of each point as another output variable. By varying the size, colour, saturation and brightness of each step, based on the cell's position in "time" and how many times it was visited I was finally able to get the interesting random walk I have been waiting over a decade to see. (Check out the full sized version on in my Flickr gallery)