HP Clock

Thursday, September 5, 2013

Modeling Molecules

Most of us remember making the models of molecules by snapping together multicolored plastic spheres.

Inspired by this childhood experience I decided to attempt the virtual version using Python and Blender.  The secondary motive was to gain some proficiency in reading and parsing data from a text file using Python and then use Blender to do the rendering of the molecule.  The first thing I needed was some data to parse using Python.  I was happy to discover that the data I needed for the molecules was available at the Protein Data Bank.  Initial development and parsing of the text data was done using IDLE, Python's Integrated Development Environment.  After I was satisfied with my ability to read and parse text data I moved my script into Blender.  Here you can see Blender in the scripting mode.

You can see from the screen capture where Line 22 of the script points to the text file that contains the molecule data.  In this case I’m drawing a picture of an LSD molecule.   After running the script I wanted to create a nice 3D image of my molecule.  Using Blender in the Default mode I set up a stage for the molecule to be rendered on.  Here is how the image of the LSD molecule turned out.

If you want to try this on your own you can download the scripts and text file data from this web page.  In the example on this page I created a complete 3D model and animation of a short piece of DNA.  All of it can be downloaded from this URL.

This page also contains links to the Protein Data Bank, as well as information about the color and size of the individual atoms.  I’ll try to update the page adding CSV files of different molecules when I create them from the protein database files.  You can also find the code on GIT Hub using this link


Sunday, January 13, 2013

Cold War Artifact

When my friend Curtis visited me last week he surprised me with this cold war artifact possibly from the late 50s early 60s.  He picked it up at the museum in Los Alamos, New Mexico.  Initially, none of us recognized the device or knew what its purpose was.  I sent this picture to my daughter and she suggested this was worthy of blog post.

Opening up the box only deepened the mystery when I was greeted with a circuit board containing flash light bulbs, resistors, diodes, one transistor and a transformer.  There was also a place for a single D Cell battery. There was a tantalizing clue to the devices purpose when I discovered a sticker on the inside with a schematic.

Here is a closer view of the interior of the case and the schematic.

Using Google and the number CD V-750 that appeared on both the outside of the box and the interior sticker the manual for the device was located.

Using Photoshop I was able to create a better image of the schematic.

So what is it?

The operating and maintenance manual explained everything, including the purpose of the device, how it worked and how to fix it.  The yellow box is a Radiological Dosimeter Charger.  It’s used to charge, or ‘zero’ a quartz fiber dosimeter.  This style of dosimeter is essentially a small electroscope, and the quartz fiber is a delicate gold plated indicator.  This quartz fiber indicator is inside a small airtight ionization chamber.  The ends of this chamber are transparent so that the fiber can be viewed with a built in microscope, and compared to the built in reticule to determine the charge on the fiber.  To reset a dosimeter of this type requires 150 to 200 volts.

With the manual in hand I wondered if this charger was still functional.  The circuit is very straightforward and is actually a simple switching supply used to generate the high voltage from a D Cell battery.  Transistor Q1, capacitor C1, and transformer T1 primary windings create an oscillator.  The output of that oscillator is stepped up through the transformer where it is rectified by CR1 and filtered by C2 to create the high DC potential.  Potentiometer R2 and resistor R3 create a voltage divider.  The wiper of R2 creates an adjustable output voltage to reset the dosimeter.  In this picture you can see the printout of the manual showing the waveform at the anode of CR1, the D Cell, and the jumper used to bypass S1 to activate the circuit. 

What about the light bulbs?  The light bulb that is lit is used to read the dosimeter.  The other bulb is simply a spare held in a rubber grommet.

What could be better than to test the charger with a vintage instrument from the same era?  I used my Tektronix 535A tube oscilloscope to view the waveform at the anode of CR1.  You can see that the waveform is nearly identical to the waveform shown in figure three of the manual.  Each large division on the oscilloscope reticule is 10 microseconds. 
A more exact reading was taken with a digital scope.  The period of the transistor oscillator is 36.26 microseconds, or about 27.6 KHz.  The ringing between each major pulse had a period of 5.8 microseconds, or about 172.4 KHz.  So it does work!

One last observation...

Opening the cover let out the unique aroma of 50s Science and Science fiction movies.

Monday, January 7, 2013

More Junk Box Astronomy & the Transit of Venus

I thought it would be a good idea to do my intended post about the Transit of Venus before it happens again.  Of course that won’t happen in our lifetime since the next two transits of Venus will happen in December 10–11, 2117, and in December 2125.  My inspiration for this post was based on my reading of the book by Andrea Wulf “Chasing Venus”.

The book brings to life what was the first big international scientific collaboration.  Sir Edmund Halley, knowing that he would not be alive to see the results, postulated that by accurate measurement the physical size of the solar system could be determined.  He encouraged his younger contemporaries to undertake the adventure that would take them to the far ends of the earth to make their measurements.  Here you can see what was predicted for the transit of 1761.

For us, our adventure led us to the top of the parking structure at the office where I work.  Using the same set up that I had used just a few weeks earlier to view the partial eclipse of the Sun by the Moon we waited for Venus to appear in front of the Sun.  

In this projected image both Venus and Sun spots can be easily  seen.  The large fuzzy ring in the projection is an artifact of the folded optic system used by the telescope. only one person asked why Venus did not catch fire...

One of us brought the darkest of welding goggles.  This did work, but Venus was barley visible since there was no magnification with this method.

In this Green image the goggles were simply placed over the eye piece of the telescope and the picture was taken with a phone camera.  We had to work quickly since the focused rays of the Sun on the goggles heated them to very high temperatures within a minute of exposure.