Embed With Elliot: The Static Keyword You Don’t Fully Understand

One of our favorite nuances of the C programming language (and its descendants) is the static keyword. It’s a little bit tricky to get your head around at first, because it can have two (or three) subtly different applications in different situations, but it’s so useful that it’s worth taking the time to get to know.

And before you Arduino users out there click away, static variables solve a couple of common problems that occur in Arduino programming. Take this test to see if it matters to you: will the following Arduino snippet ever print out “Hello World”?

void loop()
{
	int count=0;
	count = count + 1;
	if (count > 10) {
		Serial.println("Hello World");
	}
}

Continue reading “Embed With Elliot: The Static Keyword You Don’t Fully Understand”

Wimshurst

3D Printed Wimshurst Machine

Steampunk extraordinaire [Jake von Slatt] has released his latest creation. This time he’s built a Wimshurst machine from mostly 3D printed parts. The Wimshurst machine is an electrostatic generator and was originally invented in the late 1800’s by James Wimshurst. It uses two counter-rotating disks to generate an electrostatic charge which is then stored in two Leyden jars. These jars are also connected to a spark gap. When the voltage raises high enough, the jars can discharge all at once by flashing a spark across the gap.

[Jake’s] machine has a sort of Gothic theme to it. He designed the parts using Autodesk’s 123D Design. They were initially printed in PLA. Skate bearings were used in the center of the disks to ensure a smooth rotation. The axle was made from the fiberglass shaft of a driveway reflector. The vertical supports were attached the base with machine screws.

The Leyden jars were made from sections of clear plastic tube. The caps for the jars were 3D printed and are designed to accept a short length of threaded 1/8″ pipe. Copper wire was used for the interior contacts and are held in place with electrical tape. The metal sectors on each disk were made from pieces of cut aluminum tape.

You may be wondering how this machine works if it’s almost entirely made out of plastic. [Jake] actually painted most of the parts with a carbon paint. This makes them electrically conductive and he can then use the parts to complete electrical circuits. Unfortunately he found this to be rather ineffective. The machine does work, but it only produces sparks up to 1/2″ in length. For comparison, his other machine is capable of 6″ sparks using similar sized Leyden jars.

[Jake] actually tried rebuilding this project using ABS, thinking that the PLA may have been collecting moisture from his breath, but the result is still only 1/2″ sparks. He suspects that the bumpy surface of the plastic parts may be causing the charge to slowly leak away, preventing a nice build up. He’s released all of his designs on Thingiverse in case any other hackers want to give it a whirl.

Static Bleeder

When you are in the middle of the desert, pretty much every solution to a mechanical or electrical problem is a hack. [Sgt.M] who was deployed in Iraq sought out the help of radio guru [H.P. Friedrichs] about a static problem he was having. When dust storms would blow in strange things would happen in camp. Humming and crackling could be heard and [Sgt. M] actually had an electrical arc from a lamp to his hand at a distance of about 2 feet.

[Friedrichs] helped him find the problem. Their antennae were acting as static electricity collectors in the dust. All that dust friction in the dry air constantly built up a charge. The solution was simple, discharge the electricity at the antenna when it isn’t in use. Several solutions are outlined on the page, so check them out.