Documentation‎ > ‎

6. Misc Info

Microphone / Line Input Selection

This is controlled automatically by iOS.  If iOS detects you have something plugged in, it will use it instead of the microphone and speaker.  There are no explicit settings in Geiger Bot for this.  As of 1.4.5 Geiger Bot now reports the exact audio route that iOS sees, so you can easily verify your cable connection.  Line input cables will be correctly identified as "Headset" by iOS.

If you have problems with a specific cable or unit try to contact the manufacturer or seller if possible.  Verify the wiring is correct, specifically for the iPhone (not all 4-pin 1/8" headset cables are wired the same), and that the voltage is normal consumer line level.

If the input levels seem low, and the voltage is correct, you likely will need to set the RMS window to be smaller than the default of 16, perhaps 1 or 2 samples.  See the manual settings section below for more information.

Digital Input:

Digital input into iOS devices (dock connector, Bluetooth) specifically requires licensing through the Made-for-iPod program by Apple, and a special encryption chip.  Thus, each device supported via a digital connection would require it to be licensed by Apple, and I would need to implement support especially for it in Geiger Bot.

One other thing to note is that the communication protocol between licensed devices and iOS must also conform to Apple protocols, so it is not a simple matter of just putting an encryption chip between an existing device and your iPhone.  The microcontroller on the device must be specifically programmed to interface with iOS.

If you are a manufacturer who has such a licensed device and would like to have support developed for it in Geiger Bot, please contact me.



Cerberus: The Watchdog Process

To increase the reliability of Geiger Bot, especially in remote monitoring situations, a watchdog process, denoted as Cerberus in the console, polls the audio engine for error codes, a regular "bone" value being set by the audio processing code, and heuristically determines if there is no input at all.  This is all automatic and requires no intervention, nor is there anything to configure here.  Watchdog timers are commonly used as failsafes in embedded systems.

If Cerberus detects a problem, it will try to restart the audio engine after a delay.  There are three levels to Cerberus's reaction severity:

Yellow Alert

A yellow alert is that heuristics have determined no input from the audio device for two minutes.  This is not merely a lack of "clicks" being detected, it is no fluctuation in the raw input buffer at all.  This should never happen with normal operation.  No error code has been registered and no notification of an error state has been received.  Cerberus is regularly getting its bone.

Cerberus will attempt a "soft" restart of the audio engine without doing anything major.  This is the same process used when it is interrupted by something like a phone call, and is pretty safe.  The atomic symbol on the console background will turn from dark gray to bright yellow.  If Cerberus detects no errors returned by iOS after doing this, it will clear this state and things will go on normally.

Red Alert

The audio engine has indicated it needs to be restarted, due to either operating system error codes or if the iOS system-wide audio server crashes.  (rarely happens)  Cerberus will attempt to do this by backing up the current data, deallocating and recreating the audio engine, and restoring the data.  When it is doing this, the atomic symbol in the console background will be red.  A console message will be displayed.  If Cerberus is successful, this will clear and things will go on smoothly.

System Failure

This is the result of an error being returned by the operating system that not even regenerating the audio engine component could fix.  This could happen if the OS audio server crashes and is not restarted.  It can also happen if there are no audio "routes" for recording and playback.  For example, the first generation iPod touch does not have a microphone, but can use a headset with a microphone.   Cerberus contains an exception for this case.  But that lack of audio hardware creates a serious problem with audio input Cerberus cannot fix.

The only example of a system failure condition I have received is from a user making a line input cable.  This was due to voltage on the line being too high (500 mV; should be about 100 mV p-p) and a wiring problem, where the contact furthest from the tip of the plug was assumed to be ground (it is the mic line).  I suspect what happened is the cable was enough to disable the device's microphones, but was not a valid input so there were no available audio routes.

Anyway, in addition to the atomic symbol on the console background turning red, an overlay will appear on the screen with "SYSTEM FAILURE" in red, as iPhone users might not necessarily be watching the console and I hate pop-ups.  This means Geiger Bot cannot get any input data from the sensor, and all automated attempts at recovering have failed.  I would suggest first terminating Geiger Bot and restarting it, and then rebooting your iPhone/iPad if that fails.

Cerberus will keep trying to fix things but will likely be unable to by itself.


Without Cerberus, you could lose audio input and receive no notification of it.

Cerberus also reports the specific operating system error and shows any changes in the audio route, which should help troubleshooting, especially electrical problems in line input cables.








Specific Unit Tips (Microphone Input)

Gamma-Scout Alert:
    - does not appear to have an audio rate output cap, at up to ~30K CPM tested, clean audio output waveforms
    - conversion factor on my unit seems to be ~22 CPS/mR/h at ~15 CPM and 30K CPM
        - Gamma-Scout said the exact formula was non-linear and proprietary (ie, varies with count rate)
        - at background levels, they stated ~142 CPM/uSv/h for Cs-137, or closer to ~23 CPS/mR/h
    - disable the Gamma-Scout's alarm if testing a source
    - I recommend you use very sparingly with Geiger Bot due to the power consumption of the speaker and the soldered-on battery
    - the Gamma-Scout's DER (dose equivalent rate) display uses a 20-second measurement (integration count) time

Kvarts DRSB-01:
    - low battery decreases volume and makes the volume variance extremely high at fast count rates
        - if your volume peaks are all over the place, check your battery level
    - audio output caps at ~1200 CPM (~10 uSv/h)

Soeks-01M:
    - audio output caps at 1200 CPM (~10 uSv/h)
    - drops count sounds at higher rates due to warning tone.  disabling it or increasing the threshold helps somewhat.
    - internal conversion factor is 22, same as Geiger Bot's default
    - soft volume output, so positioning more important
        - tone 4 is loudest, speaker on back of unit
    - positioning recommendation: set on side, put microphone by bottom of grille




A Note About Measurement Time

Measurement time is one of the most important factors in accurately measuring radiation.  It is much like setting the exposure time of a camera shot.  Just as an individual imaging sensor's pixel detects a photon of light, so too does a GM tube detect a single photon of gamma radiation.

Too short of a measurement time when detecting radiation is like taking an underexposed picture in a dark environment.

And normal background levels of radiation are like the darkest night.

So, allow for a longer exposure.

A Note About Measurement Time - Auto Measurement Time 

The default measurement time is now "auto", or automatically controlled.  This is a 120 second moving average that will reset itself if a large change in the count rate is detected.

The point of auto measurement time is to provide you with the best features of both a short measurement time and a long measurement time without needing to select between measurement times or "zero the meter".

Thus, you have the accuracy of a 120 second measurement time, while retaining the responsiveness of a 10 second measurement time.


So, how does auto measurement time work?  Beware, math headache follows.


It is accomplished using a statistical algorithm similar to the alert threshold on the Polimaster PM1703.  (when in doubt, copy the Russians... or Belorussians, in this case)

Like any good statistical analysis, this takes into account the spread of the measurement.  The advantage this has is that it reduces false positive resets.  It is not just saying "the average is x times greater than the previous average", it is saying "the new average rate is outside of the 99.99997% confidence interval for the previous average rate."

Why 99.99997%?  That is the 5-sigma confidence level and is considered to be pretty certain of something. It is also the default value on the PM1703, which I have experience with and found to be a very robust threshold for reducing false positive events.  It means there is only a one in three million chance of a false positive result.

In the real world, this works pretty well.  A chunk of uranium ore (~9 uSv/h) is detected and resets the measurement time in about 2 seconds with a SBM-20 based counter.









Example Dose Equivalents (not rates)

 Medical: Dental X-Ray
5 µSv 0.005 mSv
 0.0005 Rem
    0.000005 Sv
 Annual Average Dose (US) 6,200 µSv 6.2 mSv  0.62 Rem    0.0062 Sv
 Medical: Chest CT
12,000 µSv 12 mSv
 1.2 Rem
    0.012 Sv
 Annual Radiation Worker Limit (US)
20,000 µSv
 20 mSv
 2 Rem
    0.02 Sv
 Dose limit, Fukushima emergency workers250,000 µSv  250 mSv  25 Rem    0.250 Sv
 Human LD50, no medical care (@60 days)
3,000,000 µSv3,000 mSv
300 Rem
    3 Sv
 Fatal Doses During Goiânia Incident5,250,000 µSv   5,250 mSv  525 Rem    5.25 Sv
 Human LD50, w/ medical care (@60 days)
6,000,000 µSv6,000 mSv
600 Rem
    6 Sv
 German Cockroach LD50
64,000,000 µSv64,000 mSv
6,400 Rem
  64 Sv
 W54 fission warhead @ 150m (0.02 kt)
103,000,000 µSv103,000 mSv
 10,300 Rem
  10.3 Sv
 Thermococcus gammatolerans LD100
30,000,000,000 µSv30,000,000 mSv
3,000,000 Rem
30,000 Sv

Example Dose Equivalent Rates

 Avg. Background Radiation
 230 nGy/h
23 µR/h0.23 µSv/h
 0.023 mR/h
 Fukushima background, May 2011
 1,600 nGy/h
160 µR/h1.6 µSv/h
 0.16 mR/h
 Highest Rate in Finland (Chernobyl)
 5,000 nGy/h
500 µR/h5 µSv/h
 0.5 mR/h
 Cosmic Rays @10.6km altitude
 6,000 nGy/h
600 µR/h6 µSv/h
 0.6 mR/h
 Chernobyl grounds, 2010
 6,000,000 nGy/h
600,000 µR/h6,000 µSv/h
 600 mR/h
 Chernobyl reactor area, meltdown
 300,000,000,000 nGy/h
30,000,000,000 µR/h300,000,000 µSv/h
 30,000,000 mR/h


Contamination by Isotope

Below is a chart of how the contribution to the overall activity level by specific isotope changed over time in Pripyat due to Chernobyl.

(source: Wikipedia)

1.  The main fission product that has not decayed is Cs-137, a gamma/beta emitter.  (this is also the case with Fukushima)
2.  The main health risk is likely more Strontium-90, a beta emitter
3.  Because of the effects of rain, concrete surfaces are relatively clean.  Conversely, indoor areas that are sealed such as the Pripyat hospital basement have very high levels still, due to uniforms and equipment from the firefighters.
4.  Cs-137 is concentrated in moss, amongst other things
5.  Radiation tends to be found in hot spots, though the general background levels get higher as you move closer to the plant

There are of course, confounding factors.  Note that finding radiation in collected rainwater is not necessarily evidence of fission products.  Rain carries radon daughters and even in the US will show an elevated count for a while (mostly alpha).  This also applies to wipe tests from areas with dust and electrostatic attraction such as CRT displays.  Inhaling polonium still isn't very good for you regardless of the source, of course.

To distinguish isotopes, gamma spectroscopy is usually required.


Detecting Radiation in Food and Drink

Unfortunately, you will most likely be unable to detect contamination in food or drink.

Detecting radiation in food and drink is difficult.  Because the radioisotopes are being ingested into your body, those similar to other elements such as calcium can accumulate and cause tremendous damage over time, even if the amount ingested is not harmful outside of the body.  Not only is the radiation itself damaging, but there is recoil at the atomic level when radiation is emitted, which causes further damage still.  Decay to a different element can break bonds in biological molecules.  Alpha radiation, which is not a concern outside of your body, becomes very damaging within it.

So, the issue is that you have to test for much lower levels of radiation in food and drink samples than you normally would -- levels below even the radioactivity of a banana.  These low levels mean you want to minimize exposing the sensor to other sources of radiation, including natural background ones, and maximize the sensor's exposure to radiation from the sample.

In general, this is not really possible with a Geiger counter.  You really need a scintillation counter, and not just any scintillation counter -- a calibrated, highly sensitive one, shielded from background sources and in a coincidence circuit to minimize the effects of cosmic radiation.  Spectrum analysis of the type of radiation (usually gamma) is also helpful.

But it's not even that easy.  The sample is usually chemically processed, which generally involves dehydration, and then dissolving it into toulene or benzene, volatile and toxic compounds that are probably more dangerous than whatever it is you're measuring.  Then, the sample is placed in container of suitable geometry, which usually means a large flat dish.

From a metareview by the US EPA I read, a long integration count with a laboratory scintillation counter did not require further chemical processing of samples for I-131 and Cs-134 / 137.  However, one of the other problematic fission products, Strontium-90, is much more difficult to detect.  Its relatively weak beta radiation is easily absorbed by the water in the fluid.  But inside the body Sr-90 is similar to calcium and can stay with you and cause long-term damage.  This is especially true for children with developing bones, and Sr-90 works its way up the food chain through dairy products due to this similarity to calcium.  For detecting Sr-90, dehydration, chemical extraction with yttrium, and finally dissolving into benzene is what I saw for one method used.

Iodine-131, which is arguably the most dangerous fission product and was shown to be responsible for most of the long-term deaths with Chernobyl, is easier to detect in smaller quantities than Strontium or Cesium, because it is more intensely radioactive and emits quite a bit of both beta and gamma radiation as it decays.  However, at this point, there is very little I-131 from Fukushima left, and almost all of it has decayed.

So, while you can measure contamination by Cesium of food and drink without chemical processing of samples, it still requires very sensitive and accurate hardware, and I just do not think you will be able to achieve this with a Geiger counter.  Geiger Bot can perform very long integration counts and give you part of the tools for doing this, but it is a small part.

Now, if food is really contaminated, that certainly can be detected with a Geiger counter.  In Fallout 3, for example, you receive a dose rate of 1 rad per second from pretty much any food, which is 360,000 uSv/h.  You can detect that at distance, and it would be best not to eat that.

But that level is not the largest risk you will face in reality.  It is from slight contamination and long-term exposure.  While a Geiger counter is a reasonably sensitive instrument, it is important to realize its limits.  And so the food supply's safety is dependent upon government monitoring because this equipment is not affordable to most individuals.  My Polimaster PM1703M scintillation counter is 50 times more sensitive than my Soeks-01M.  And it is professionally calibrated.  But it is still inadequate for this task.

On the other hand, if I lived in Japan, I'd be waving a Geiger or scintillation probe around every food item I bought.  Just in case.  But the reality of the situation is you need much better equipment to detect most contamination in the food supply.






Ionizing Radiation Sensors


Unsurprisingly, Geiger Bot is mostly focused around Geiger counters, which are the most common kind of radiation detection sensors used as such.  The default tube Geiger Bot uses, a Russian SBM-20, is one of the best deals in basic radiation detection today and can be had for about $15 USD on eBay.  (and I'm not the first person to notice this)

Geiger Bot can also work with photodiode sensors, ion chambers, and scintillation counters.  The only extensive use of any of these I have seen is photodiode sensors.  A user in Japan using a "mintbox" 7-diode kit had to decrease the RMS window to 8, delay windows to 4, and the volume threshold to 1000 with manual settings.  A value of 5 or 6 CPS/mR/h was recommended as the conversion factor.  Ion chambers have not been tested to my knowledge, but should work provided they have audio output.

Gamma spectroscopy support is something I have developed using the Made-for-iPod connector, but the product it was developed for never made it to market and general digital I/O on iOS is not really possible due to licensing restrictions.  The histogram was in fact, originally a spectrogram from a MCA.  It is possible to send 128 or 256 channels of audio data over a line input connection, but this entails rather extensive signal processing.  It is something that may be developed in the future.  Unfortunately, the bandwidth available here using current protocols is not sufficient for extensive isotope identification.

I have also investigated more direct methods of detecting radiation without an external sensor, by detecting memory errors and using the camera sensor.  I could not generate any memory errors with my available test sources, even when stepping around error correction techniques.

Using the camera sensor, covered by electrical tape, does work at relatively low rates of gamma radiation (3 uSv/h).  Unfortunately, a problem here is that the same make and model of CMOS or CCD sensors have quite variable gamma sensitivity, and apps that do not allow threshold adjustment will fail for many people.  Temperature also plays a role here, and the sensitivity of an CMOS sensor warmed from being in your pocket differs significantly from when it is lying on a table, and unfortunately 3rd party apps can't directly read the temperature sensor to compensate for that.

These are not insurmountable problems, but combined with the relatively low sensitivity of the sensor (~5 CPM at background levels), this is an unattractive option compared to other types of sensors.  This is something I may add to Geiger Bot in the future eventually as I think it has value as a "backup" to another external sensor (plus I get to play with 2D DSP) but it is a lower priority than Geiger counter input.  It is cool that you have a free sensor more sensitive than a CDV-715, though.  I have purchased several commercial apps but my favorite is actually a freeware one named GammaDetector.  The adjustable sensitivity is the key feature, and if you have been disappointed by previous apps utilizing the camera you may find this works for you.



The Impact of Networked Sensors
Morgan Freeman networks a few sensors in the 2008 film 'The Dark Knight'

So, for detecting radiation, you have many options, ranging from free and built-in (the camera) to very high-end professional equipment capable of identifying isotopes with high sensitivity.  Geiger Bot can work with more than just Geiger counters, and using the smartphone platform to process data allows for simpler, smaller and less expensive radiation detectors that have more capabilities than you will find on even modern digital radiation detectors due to the connectivity of the smartphone.

These relatively new ways of using networked detectors from government, industry, NGO, and individual citizens have had a significant impact in the political and scientific understanding of the effects of the Fukushima incident in Japan.  Prior to the Fukushima incident, a poll found 68.3% of Japanese supported existing nuclear power generation.  A more recent poll in June 2011 found 74% of respondents in favor of phasing it out it entirely.

That is a remarkably large shift in public perception.  It is due to citizen and NGO monitoring of radiation levels that the true extent of the release of fission products was shown to be greater than previous estimates had found, which created increased mistrust of government and industry data as the paper notes.  Not fully disclosing information is a frustrating and disappointing political move after a nuclear incident, when others have set the precedent for much more.   One example of this being the firefighters from Chernobyl and Pripyat who gave their lives to stop the fire from reaching the other reactors.  As Anatoli Zakharov said, "... it was a moral obligation -- our duty."  Nuclear oversight requires a higher standard, and honoring that duty at an individual and collective level.

An unexpected element in this shift in public perception is the origin of much of this data.  It was a legion of humble Geiger counters, rather than the sensitive detectors from industry monitoring alone.   While less sensitive on an individual basis, the geographic coverage of sensors happened on a scale not previously seen; a single radiation detection station in a city, no matter how sensitive, cannot equal the resolution of many smaller, mobile, networked sensors.  This is particularly true for the manner in which released fission products distribute into "hot spots", whose measured radioactivity decreases quickly with distance.

Just like statistics for a single measurement, multiple measurements from many sources follow a roughly Gaussian distribution and statistical analysis can be used to show the confidence level from this superset of data.  The number of samples attenuates the effects of uncalibrated sensors and bad measurements -- or undisclosed ones.  The same underlying mathematical patterns for an individual sensor hold true for a collective set of sensors.  Technology allows us to integrate this information into a cohesive view, and see the natural order that is already present.

This stands in contrast to a recent New York City ordinance passed outlawing private Geiger counter ownership because of the possibility of sharing inaccurate information.  While this is a real concern, it is clear that there is useful information that can be obtained; both signal and noise.

More than just radiation detection, Japan's advanced seismic detection network, largely considered to be the best in the world and consisting of thousands of seismographs and other sensors, saved many lives from the earthquake and tsunami itself.  This system paid for itself many times over and is another example of the power of many networked sensors.  Research by Stanford on networked earthquake detection has recently examined using accelerometers in laptops as another source of data for seismic event monitoring, and that may have the potential to augment the existing sensor data.

As smartphones gain more sensor capabilities and become more ubiquitous it will be interesting to see how our use of this information and how we look at it changes, even if the sensor itself does not.  Being able to better and more accurately understand the world around us is something that benefits us all.
Comments