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)




Wednesday, September 21, 2016

Video Microscopy Gear

Using a microscope is easy after a couple hours of practice, shooting photos or video through a microscope is hard, even after weeks of practice.

Shooting regular video of regular sized objects I have to get the lighting, white balance, focus, exposure and framing all set, then I hit record and try to make what I want to happen, happen. Shooting microscopic video means I need to get all of the above done as well as everything required to use a microscope, find the creature I want to look at, set the magnification, set the iris on the light source and try not to bump the table or move my chair for fear of "Blair Witch" style footage.

At first I tried shooting directly though the eyepiece but the results were ok at best, better if I used my cell phone instead of a dedicated camera. After a trip to the hardware store I rigged up an adapter that would allow me to put my camera's sensor in place of the eyepiece. This setup has two advantages, 100% of the light goes to the sensor, and it frees up both hands to adjust focus and translation of the slide.

After a few weeks of this I decided that the yellow, incandescent, heater that was used to illuminate subjects was not up to par. The scope became warm to the touch after just a few minutes, it cooked my subjects and the dimmer made an annoying hum. A trip to the electronics supply gave me a relay, a USB battery charger, a transistor and a 2 watt LED flashlight. I used the transistor and a couple resistors to make a 2 watt LED dimmer, and using the relay to switch between external 5v power and the, now internal, USB battery, I now had a portable microscope that could be used, untethered, for up to 20min!



The LED dimmer is designed to work from 5v (available from USB ports everywhere). The USB battery is wired to the LED circuit through the normally closed contact of a relay. When external 5v power is applied to the relay coil the battery output is disconnected from the LED and the 5v external power is applied through the normally open contact. At the same time the USB battery is charged by the external 5v power so it can be used later.

Friday, September 16, 2016

Bouncing Liquid Soap

If you pour liquid soap as a thin string onto a surface it will eventually make a puddle and then start to pile up, every so often instead of sticking, the streaming soap will shoot off at right angles or sometimes strait up into the air! This surprising behavior is the Kaye Effect, discovered in the 60's by Allen Kaye, it occurs in all shear thinning liquids, non-Newtonian fluids that become less viscous as you pour and stir them.

As the incoming stream impacts against the standing pool of soap, a very thin sheet of air is trapped in between. This sheet of air makes the standing pool act like a frictionless surface, the incoming stream slides away in all directions or makes a small divot which then acts like a ramp, directing the stream back up into the air! By using a syringe it is possible to fire a stream sideways across the surface of the soap where it then acts like a long, heavy chain thrown across a sheet of ice.

Another interesting behavior is when a kink or wave in the falling stream of soap remains stationary or travels backwards up the stream against the flow! (See 1m12s) This unusual event can also be seen in lengths of falling chain (or long loops of continuously flowing chain).

Incremental Encoders

Precision measurement of rotational speed and direction is a requirement for a lot of automation, conveyor belts in particular. In order to know how far a belt has moved there has to be some feedback to the controlling hardware, a potentiometer could be used but they can only rotate a limited number of times in one direction and are subject to wear. So how do you measure unrestricted rotation? Incremental encoders are the answer.

The most basic encoder is a disk with 2 sectors which can be detected by sensors, it doesn't matter what type of sectors are used or what type of sensors are used as long as there is a clear ON and OFF signal. One sensor is placed at the top of the disk, and as the disk begins to turn the sensor will pick up a series of transitions from ON to OFF and from OFF to ON. By measuring the time between transitions it is possible to calculate the rate of rotation of the disk but there is still no information about the direction of rotation.

If another sensor is placed at the side of the disk a second signal will be generated but with a delay relative to the first sensor. After the first sensor transitions to ON the disk must turn an additional 90 degrees before the second sensor also transitions to ON. However, if the disk rotates in the opposite direction the second sensor will transition before the first. By knowing which sensor reads an ON to OFF or OFF to ON first, it is possible to determine the direction of rotation as well as the rate!

The sectors themselves can be anything, holes detected by an optical sensor (popular in computer mice), metal strips detected by a metal detector, pits and lands detected by mechanical switches or conductive and non-conductive areas detected by sliding brushes. As long as there is a way to generate a binary signal it is usable in an encoder.


Medium Format Scanner Camera

If you use hold a lens in front of a wall which is across from a window you will be able to project an upside down image of that window onto the wall. If you hold a scanner up in place of the wall you can scan that projected image into a digital photo! Using some cardboard, tape and an old magnifying glass it is possible to make a medium format black and white camera out of an old flatbed scanner.

High Voltage Anti-Gravity

You can rub a balloon on your head and pick up little bits of paper using the static charge but can you move anything else in this way? Placing a lit candle on top of my Van De Graaff generator does something interesting, it completely takes the charge away, when you touch the terminal there is no spark at all. The hot gases in the flame are slightly conductive, which to a low current, high voltage power supply, means it is effectively a dead short to ground. So what happens when I blow the candle out?

With the flame gone, charge begins to collect on the surface of the terminal. After the charge reaches a critical value the liquid wax, which has been charged along with terminal, is repelled so strongly that it creeps up the wick and the sides of the candle, eventually forming sharp points. Wax then jumps off these liquid point as streams of micro-droplets which fly across the room and stick to the nearest grounded object. If a grounded surface is brought near by the wax will jump to it, losing its charge. Once discharged the wax becomes attracted to the Van De Graaff and it will jump back.

Another interesting behavior happens when only one wax point forms, the stream of micro droplets will fly a meter up into the air and occasionally orbit around grounded objects before making contact or falling to the ground. I have yet to catch this on film but it is on my 'todo list.'


Seeing Liquid CO2

In the atmospheric conditions in which you tend to find humans carbon dioxide can only exist as a solid, dry ice, or as a gas. Solid carbon dioxide has the interesting property of transitioning directly to as gas when it is heated though a processes called sublimation but what if we wanted to see it as a liquid?

To turn a gas into a liquid we can do two things, cool it off (which will just give us dry ice), or you can squeeze it to increase its density. By putting some dry ice into a heavy walled plastic bottle preform it is possible to force dry ice into melting, allowing us to see carbon dioxide as a liquid. At around 100psi is is just possible to have CO2 exist as a liquid as long as you keep it around -55c (the dry ice helps), however as more dry ice melts the temperature and pressure starts to increase, if it all melts the pressure will quickly rise to over 1000psi so it is important that the tube is vented well before all the dry ice is gone.

An interesting side effect of venting the tube is that the liquid instantly begins to boil, transitioning from a liquid to a gas consumes energy and all the liquid that does not boil is frozen instead!


Sound of the Lorentz Force

The Lorentz Force is felt by the charge particle in an electric current as they pass through a magnetic field, the force felt will always be at right angles to both the direction of the magnetic field and the direction of the current flow. Depending on the country and decade you live in this is also known as the left or right hand rule, if the magnetic field is pointing the X direction and the current is flowing in the Y direction then the current carrying particles feel a force in the Z direction.

By passing a high current audio signal though a short length of aluminum foil, which is suspended in a strong magnetic field, the world's simplest speaker is born. As current flows back and forth the foil is alternately pushed and pulled in such a way that we can hear its flapping as sound. The official name for this is a "Ribbon Speaker," if you were to hook the input of an amplifier to the ribbon and yell into it, it would become a "Ribbon Microphone" instead.


4 Wire Measurement for Small Value Resistors

When measuring resistance most of us set our phasers for OHMS and start prodding, but for very low value resistors this can become problematic. The resistance of your leads, their connection to the meter and their connection to the conductive object in question may be if equal or greater than the resistance of the object itself. You could always short out your leads, record that resistance and then subtract it from your final measurement but chances are you will be using the least significant digit of your meter which means your readings are already going to be suspect.

Four wire measurement works by passing a known current though your mystery object via 2 wires and measuring the resultant voltage drop across the object with an additional 2 wires. With only the incredibly low current required to measure voltage passing through the "voltage leads" there will be only an immeasurably small voltage dropped in the leads themselves and their connections. This high accuracy voltage measurement can be used, along with your known current to calculate the resistance of your mystery object with a high degree of accuracy. E/I = R