Skip to main content

Radiating Superconductors, Arduinos, and Data Acquisition

While doing research for the NMSU Superconductor Gravity Experiment, I came across an article published by J.E. Hirsch of UCSD. He writes that his 'hole theory of superconductivity', (more on this in a later post), predicts that x-ray photons should be emitted by a superconductor similar in size to our sample when it changes from the superconducting to the non-superconducting state. The superconducting sample I'm using cycles between states each time a set of levitation force data is taken, so I decided to go ahead and try to detect the radiation predicted by Dr. Hirsch as a side project. A Geiger counter is being used as the radiation detector because it was readily available. Data acquisition with the Geiger detector turned out to be a little more work than I expected.

My first thought was that I could simply record the beeps coming from the Geiger counter and then use Audacity to analyze the resulting audio file. There were a few issues that cropped up with this method though. First, it's not immediately obvious that two or more beeps close to each other can be distinguished from a single beep. In the waveform shown below, the bigger the peak, in general, the more beeps occurred at that time, but not always. The second issue was that it seemed somewhat likely that the audio recorder being used was 'helpfully' increasing the amplitutde of the beeps so that they could be heard above other transient noises like the magnets power supply fan. If that were the case, then single beeps could easily be interpreted as multiple beeps. Given these issues, the audacity data analysis scheme wasn't going to work.

Arduino to the Rescue

Since the audio data wasn't going to cut it, we needed to get closer to the source. The next idea was to capture the signals that drove the piezoelectric buzzer on the Geiger counter. The signal turned out to be a five volt digital waveform. By sampling the line driving the buzzer, we could wind up with a graph of beeps vs. time. The only question left was how to sample the data in a cheap and simple way. A few months back, I purchased an Arduino kit from For those of you that don't know, the Arduino is a microcontroller board and associated programming interface that was designed to make microcontroller projects accessible to not only engineers, but also to casual users like artists and performers. I purchased my little kit to play with, not knowing exactly what I would do with it. When it came time to sample the Geiger counter output however, I remembered that the Atmel ATmega382 on the Arduino board had several analog to digital convertors, (ADCs), that might fit the bill perfrectly.

I setup my kit as shown below. The Arduino board shown above is one of the 'official' boards that you can purchase pre-assembled. My little kit from Dale Wheat, has a much simpler construction. The analog supply for the ATmega382 is just bridged over from the digital supply. The ATmega382 documentation goes on at lenght about seperating the digital and analog supplies to reduce noise, and they're right, but for this project, the simple digitial supply bridge did just fine.

To test the board I built a low current voltage divider circuit between teh supply rail and ground and used the divided voltage as my test input. The ADC on the ATmega382 has a 10 bit resolution. That means that there are 1023 steps between 0 volts and the maximum voltage, in this case, 5 volts. My voltage divider consisted of two 51 k-ohm resistors in series. The high resistance value was chosen to avoid pulling too much current from the power supply. The voltage at the point between the two resistors should have been 2.5 volts. I browsed through the Examples/Basics menu in the Arduino software and found an example that writes back values from the ADC to the serial port connecting the Arduino and the laptop. I uploaded the example to the memory on the ATmega382 and started it. The value printed on the serial monitor coming back from the Arduino board was 503. Scaling this by 0.0048 V per ADC step gave a result of 2.458 V, about 1.6% off from the expected value of 2.5 V and well within the expected margin of error since I was using 5% tolerance resistors.

The next step was to attach the ADC to the Geiger counter. A quick review of the onliine schematic diagrams for the Geiger counter showed where to hook into the speaker output:

Using the excellent serial package for Python, I was able to write a few short lines of python code to grab the Geiger counter data and store it in a file:
import serial
import datetime
from datetime import datetime


testout = open("testgeig3.out", "w")

for k in range(0,1000000,1):
 tester = ser.readline()
 hour =
 minute =
 second =
 microsecond =
 #print str((hour*360)+(minute*60)+second) + "." + str(microsecond) + "," + tester
 testout.write(str((hour*360)+(minute*60)+second) + "." + str(microsecond) + "," + tester +"\n")

A note about using serial ports: I found rather confusing documentation that seemed to indicate that another serial port, (other than the one provided by the existing USB interface shown), needed to be setup on the Arduino to bring ADC data out of the chip. With the Arduino kit I have from, this wasn't the case. I was able to read the ADC data back over the same serial port.

A, (very little), bit of data massaging in Excel, and the following graph of counts, (represented as ADC voltage spikes), with respect to time, (in seconds), was generated:


Popular posts from this blog

Cool Math Tricks: Deriving the Divergence, (Del or Nabla) into New (Cylindrical) Coordinate Systems

Now available as a Kindle ebook for 99 cents! Get a spiffy ebook, and fund more physics
The following is a pretty lengthy procedure, but converting the divergence, (nabla, del) operator between coordinate systems comes up pretty often. While there are tables for converting between common coordinate systems, there seem to be fewer explanations of the procedure for deriving the conversion, so here goes!

What do we actually want?

To convert the Cartesian nabla

to the nabla for another coordinate system, say… cylindrical coordinates.

What we’ll need:

1. The Cartesian Nabla:

2. A set of equations relating the Cartesian coordinates to cylindrical coordinates:

3. A set of equations relating the Cartesian basis vectors to the basis vectors of the new coordinate system:

How to do it:

Use the chain rule for differentiation to convert the derivatives with respect to the Cartesian variables to derivatives with respect to the cylindrical variables.

The chain rule can be used to convert a differe…

Division: Distributing the Work

Our unschooling math comes in bits and pieces.  The oldest kid here, seven year-old No. 1 loves math problems, so math moves along pretty fast for her.  Here’s how she arrived at the distributive property recently.  Tldr; it came about only because she needed it.
“Give me a math problem!” No. 1 asked Mom-person.

“OK, what’s 18 divided by 2?  But, you’re going to have to do it as you walk.  You and Dad need to head out.”

And so, No. 1 and I found ourselves headed out on our mini-adventure with a new math problem to discuss.

One looked at the ceiling of the library lost in thought as we walked.  She glanced down at her fingers for a moment.  “Is it six?”

“I don’t know, let’s see,” I hedged.  “What’s two times six?  Is it eighteen?”

One looked at me hopefully heading back into her mental math.

I needed to visit the restroom before we left, so I hurried her calculation along.  “What’s two times five?”

I got a grin, and another look indicating she was thinking about that one.

I flashed eac…

The Javascript Google URL Shortener Client API

I was working with the Google API Javascript Client this week to shorten the URLs of Google static maps generated by my ham radio QSL mapper. The client interface provided by Google is very useful. It took me a while to work through some of the less clear documentation, so I thought I'd add a few notes that would have helped me here. First, you only need to authenticate your application to the url shortener application if you want to track statistics on your shortened urls. If you just want the shortened URL, you don't need to worry about this. The worst part for me was that the smaple code only showed how to get a long url from an already shortened rul. If you follow the doucmentaiotn on the insert method, (the method for getting a shortened url from a long one), there is a reference to a rather nebulous Url resource required argument. It's not at all clear how to create one of these in Javascript. The following example code shows how:
var request = gapi.clie…