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.

Sunday, May 20, 2012

Eclipse Viewing with Junk Box Parts

Backyard astronomy is always fun, and it doesn't get much better than a solar eclipse.  I set up my small spotting scope today for neighborhood kids to safely view the eclipse.  One of the safest ways that I know of is to use the telescope to project an image of the eclipse on to a screen.  Here is the screen I built from aluminum from the hardware store and a small piece of foam core available from any office supply store.

I also used a simple clock drive I built using a wide assortment of junk box parts.  The design was mostly based on adapting the other parts to the found worm drive.

With a way to project the image on to a screen and a clock drive that would compensate for the earths motion I was ready to watch the eclipse.  Here you can see all the parts coming together.  The added lead dive weight is used to take out slop in the gears of the drive train.  This picture was taken just as the eclipse was starting.

This picture was taken right at the height of the solar eclipse event.  The air was noticeably cooler and ambient light was less.

Sunday, May 6, 2012

Additional Pentode Information

I finally got around to posting additional details of the miniature pentode test fixture, including a schematic and list of tubes.  Although I built the test fixture primarily to work with 6AU6 tubes the pinout of that tube is so common that just like the dual triode test fixture there is a long list of other tube types that can be tested.  There are basically three basing diagrams that can be used with this fixture.  Here are the three bas diagrams and the list of tubes that should be supported.

Tube Heater Voltage Diagram
EF95 6.3 VAC 7BD
EF93 6.3 VAC 7BK
6JH6 6.3 VAC 7CM
6JH6 6.3 VAC 7CM
6HZ6 6.3 VAC 7EN
6HS6 6.3 VAC 7BK
6GY6 6.3 VAC 7EN
6GX6 6.3 VAC 7EN
6GM6 6.3 VAC 7CM
6EW6 6.3 VAC 7CM
6DT6A 6.3 VAC 7EN
6DK6 6.3 VAC 7CM
6DE6 6.3 VAC 7CM
6DC6 6.3 VAC 7CM
6CF6 6.3 VAC 7CM
6CE5 6.3 VAC 7BD
6CB6A 6.3 VAC 7CM
6BZ6 6.3 VAC 7CM
6BJ6 6.3 VAC 7CM
6BH6 6.3 VAC 7CM
6BC5 6.3 VAC 7BD
6BA6 6.3 VAC 7BK
6AU6 6.3 VAC 7BK
6AK6 6.3 VAC 7BK
6AK5 6.3 VAC 7BD
6AH6 6.3 VAC 7BD
6AG5 6.3 VAC 7BD
12EK6 12.6 VAC 7CM
12DZ6 12.6 VAC 7CM
12CX6 12.6 VAC 7CM
12BZ6 12.6 VAC 7CM
12BL6 12.6 VAC 7CM
12BD6 12.6 VAC 7CM
12BA6 12.6 VAC 7CM
12AW6 12.6 VAC 7CM
12AU6 12.6 VAC 7BK
12AF6 12.6 VAC 7CM

    Here is the schematic of the Pentode test fixture

Friday, March 23, 2012

More DIY IR Jammer

I did breadboard and test the DIY IR jammer last weekend but it’s taken me this long to carve out a minute to post the results.  The schematic is correct and only took a few minutes to re-create on the plugboard.  For power I used a small bench supply set to 6 volts to duplicate four AA cells.  When I powered up the circuit it oscillated just as predicted, but the frequency of oscillation did not agree with LT Spice.  The first time I entered in the schematic I just picked an arbitrary Op Amp from those provided by Linear Technology.  That is what caused the discrepancy.  I tracked down a TL082 model and that provided results that are nearly identical to the actual circuit.  Here is a screen shot of the LT Spice schematic including the spice directives used to add the external model.

So the lesson here is use the correct model for accurate results.  I’m including the TL082 model I used in the body of the post.  Just copy and paste it into a text file adding a .sub extension if you want to do your own simulation.

TL082 Spice Model

* (REV N/A)      SUPPLY VOLTAGE: +/-15V
*                | INVERTING INPUT
*                | | POSITIVE POWER SUPPLY
*                | | | NEGATIVE POWER SUPPLY
*                | | | | OUTPUT
*                | | | | |
.SUBCKT TL082    1 2 3 4 5
  C1   11 12 3.498E-12
  C2    6  7 15.00E-12
  DC    5 53 DX
  DE   54  5 DX
  DLP  90 91 DX
  DLN  92 90 DX
  DP    4  3 DX
  EGND 99  0 POLY(2) (3,0) (4,0) 0 .5 .5
  FB    7 99 POLY(5) VB VC VE VLP VLN 0 4.715E6 -5E6 5E6 5E6 -5E6
  GA    6  0 11 12 282.8E-6
  GCM   0  6 10 99 8.942E-9
  ISS   3 10 DC 195.0E-6
  HLIM 90  0 VLIM 1K
  J1   11  2 10 JX
  J2   12  1 10 JX
  R2    6  9 100.0E3
  RD1   4 11 3.536E3
  RD2   4 12 3.536E3
  RO1   8  5 150
  RO2   7 99 150
  RP    3  4 2.143E3
  RSS  10 99 1.026E6
  VB    9  0 DC 0
  VC    3 53 DC 2.200
  VE   54  4 DC 2.200
  VLIM  7  8 DC 0
  VLP  91  0 DC 25
  VLN   0 92 DC 25
.MODEL DX D(IS=800.0E-18)
.MODEL JX PJF(IS=15.00E-12 BETA=270.1E-6 VTO=-1)

Here is the revised spice plot followed by the actual waveforms that I recorded with my oscilloscope. 

It’s easy to see how well the simulation agrees with the hardware.

I came up with two simple tests to confirm that the circuit was actually emitting infrared pulses.  The first test was to simply point a video camera at the LEDs while the circuit was on.  This picture shows this basic setup.

Even the cheapest of video cameras will show infrared light.  The infrared light shows as a pale blue in this picture I took of the video monitor.

The next test was equally as easy and simply involved attaching a photodiode to an oscilloscope, and then pointing that photodiode at the IR LEDs.  The resultant pulses can be easily seen here.

Did it work??

I took the lab supply with the plugboard on top into the living room and set it on the coffee table and flipped the power supply switch on.  Admittedly my setup is not very covert, but it did successfully disable the remote's ability to change channels.

Thursday, March 15, 2012

DIY IR Jammer Missing Information

The GREAT CREATE at Radio Shack is truly a well-intentioned and worthwhile exercise for getting kids interested in electronics and technology.  It harkens back to the Radio Shack I new as a child where I could find all the bits and pieces for my projects.  I found a brochure in the local Radio Shack that supposedly provided instructions on building a infrared remote jammer. 

I say supposedly because on closer inspection the brochure was filled with errors and missing information such that any kid trying to build it would have been met with disappointment and frustration.  Projects like this done properly can be an inspiration that jumpstarts a career in science or engineering. Improperly presented they can turn a young mind away from a potentially great learning experience.  With that in mind I posted the missing schematic and an explanation of how the circuit works, along with a spice simulation.

The Schematic;
The schematic breaks down into two major blocks with the first being a relaxation oscillator built around the TLO82 FET opamp, and the second being a current driver that uses the BJT transistor to convert the output of the oscillator into current drive for the infrared light emitting diodes.

The relaxation oscillator works by using the opamp as a comparator.  The charging and discharging of the RC network comprised of R11, R10, and C3 which is fed into the inverting input of the opamp causing the output to change states positive to negative every time the node of R10 and C3 reaches the 3 volt compare point set on the non inverting input.  That 3 volt point is is set by the voltage divider R12 and R5.

The diode driver works by AC coupling the signal out of the opamp through C1 directly into the base of the transistor.  The resulting pulses drive the transistor from cutoff to near saturation.  10 ohm resistor R7 provides current limiting through the diodes.  

Spice Simulation; 
All of this can be demonstrated by viewing the graph I created using LT Spice.  LT Spice is one of the best free programs available for simulating electronic circuits and can be found on Linear Technologies Web site.  I highly recommend it.  As for the simulation it shows the first 200 microseconds of the circuit, at which point it reaches steady state oscillation.  This graph shows the RC circuit in red, the opamp output in blue, and the diode current in green.  I may take time this weekend to build up the circuit to see if it works and matches the simulation.  If I do there will be pictures.

Critique of the Brochure;
  1. The two pictures of the circuit are rotated 90 degrees making it difficult to trace out.
  2. The shopping list is wrong and calls out only two 10k resistors, while the circuit requires 6 10 K resistors.
  3. No schematic or no link to a schematic.
  4. No explanation on how it works.