Archive for January, 2013


Today in LabLulz, I’m going to walk through a recent preparation I did in my chemistry lab: increasing and measuring the concentration of hydrogen peroxide.

WARNING: This procedure involves heat and the end product is a powerful oxidizer. Don’t get burned and don’t get it on yourself – wear gloves, splash-resistant goggles, and an apron. I had a spill of ~15%, all over everything, including myself. It was okay, but only because I followed safety protocols. I didn’t have the apron though, and I had to get pantsless.

Hydrogen peroxide is an interesting substance; it’s formula is H2O2, meaning that it is composed of two hydrogen atoms bonded to two oxygen atoms.

sdfsfasdf

Figure 1. Behold, the hydrogen peroxide molecule!

It is a powerful oxidizer, decaying into water and free oxygen. This is because the bond between the two oxygen atoms, called the peroxide bond, is unstable. Some substances which contain the peroxide bond are even explosive, like triacetonetriperoxide. Because it’s an explosive precursor, and somewhat dangerous on its own, concentrated hydrogen peroxide can be difficult to come by. The weak 3% solution found in drugstores is all that is available to DIYers, hobbyists, and other scientists outside of the mainstream chemical supply chain.

Fortunately, it is relatively trivial to increase the concentration from 3% to around 30%. There are several tutorials on the subject at YouTube (TheChemLife; zhmapper, nerdalert226) so I’m going to focus on measuring the concentration of the end product, a procedure which the videos tend to treat very qualitatively. I hope this tutorial will be informative and useful, even outside of punklabs; the process is easily generalized and density is important in many fields, including medicine and winemaking.

The concentrating procedure is pretty simple: pour about 500 mL of the 3% solution into a beaker and heat it, forcing the excess water to evaporate until there is a tenth as much liquid left (peroxide boils at 150 C, compared to 100 C for water.) There are only a couple of tricky points: the liquid must NOT boil, only steam – if it starts boiling, the peroxide will decay. Bits of dust and dirt will also cause disintegration, so the equipment must be kept very clean and free from scratches.

Okay, so after a few hours, I have about 50 mL of liquid. I drop a bit into a solution of corn starch and potassium iodide, and the mixture turns black, a positive test for oxidizers. I add a squirt to some sulfuric acid and copper wire, and the metal wire begins bubbling and the solution begins to turn blue with copper sulfate*. This reaction is faster and more vigorous than when I try it with the 3% solution, so I’ve clearly succeeded in increasing the concentration, but to what level? To answer that question, I’m going to measure the density of the solution. Continue reading

Advertisements

I’m revisiting some older research of mine, so that I can talk a little bit about some data visualization I did along the way. If you frequent TriZPUG or the SplatSpace, you might have seen my original presentation, but In Case You Missed It…

You might remember a while back I got interested in researching the statistical thermodynamics of poker tournaments. To briefly recap, I was treating the distribution of chips amongst players as a probability distribution, which meant that I could use the concept of entropy to describe the distribution. Entropy in thermodynamic systems is associated with how ‘spread out’ the energy is in that system: A hot cup of coffee in a cold room has low entropy while warm coffee in a warm room has high entropy. In a statistical system like a poker table, entropy measures how evenly distributed the chips are between the players. When the players start the tournament with equal amounts, the entropy is at a maximum. When one player wins all the chips, the entropy is at a minimum. Already things are interesting – entropy in this statistical system must decrease with time, in stark contrast with the second law of thermodynamics. And we haven’t even looked at what happens between those two points!

Poker entropy

Poker entropy

To better understand the behavior of tournaments, I needed a way to play them and replay them, to turn them into something other than tables of names and numbers. The first representation worked well at illustrating the distribution, but failed to capture the dynamics; except in catastrophic rearrangements, it was not always obvious how the chips moved around from hand to hand.

[link]

What’s going on is, I’ve whimsically renamed the players for anonymity, and then represented the size of their stack with a circle. Each hand is then represented by a transaction in which chips flow from one or more players to a single winner, with chip flow represented by black lines whose size is representative of the magnitude of flow. I find this hypnotic.

If you don’t care about coding, feel free to skip down….

How exactly did I put this together?

Zeroeth, we have to get our tools together.

import pickle, sys    #file IO utilities
import pygame    #pygame library
from pygame.locals import *    #more pygame stuff
from math import sin, cos, pi, sqrt    #math tools

First, there is a great deal of tedious regular expression slicing and dicing that you have to do to convert a tournament history file into usable data; I’ll be merciful and skip that. So I’ve finally bundled up the data in a couple of files.

Continue reading

How did TopOc do on last year’s to-do list?

Not bad! As consistent readers might have noticed, the big news behind the scenes is that I have gotten involved in another production space, LumShop. Not only is it providing facilities for DIY Spectro development, it is also kindly hosting my chemistry lab! This will end well, I’m sure.

So what’s next?

  • Even more hard-hitting commentary and sass
  • More fractals and fungaloids!
  • Augmenting and measuring the concentration of hydrogen peroxide!
  • Third generation DIY Spectro!

Between this lineup and my lab, I’m sure the site will stay busy, but if you have any requests or suggestions, leave a comment!