Det User Thin

56
QuarkNet/Walta/CROP Cosmic Ray Detectors User’s Manual Jeff Rylander and Tom Jordan, Fermilab R. J. Wilkes, Hans-Gerd Berns and Richard Gran, U. Washington August 2004

description

 

Transcript of Det User Thin

Page 1: Det User Thin

QuarkNet/Walta/CROPCosmic Ray Detectors

User’s Manual

Jeff Rylander and Tom Jordan, FermilabR. J. Wilkes, Hans-Gerd Berns and Richard Gran, U. Washington

August 2004

Page 2: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

II

Page 3: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

i

QuarkNet/Walta/CROPCosmic Ray Detectors

User’s Manual

This manual provides information for setting up and using a cosmic ray detector with theQuarkNet Version 2 Data Acquisition (DAQ) board and ancillary hardware. It serves bothbeginning and advanced users.

Much of the technical information was originally compiled in a user’s manual written by R.J. Wilkes. Hans Berns, Rik Gran, Sten Hansen, and Terry Kiper contributed some of thetechnical documentation with input from the practical experience of many beta testers.1

Although some of the components of your cosmic ray detector may have come from varioussources, the heart of the detector is the QuarkNet DAQ board. The development of this boardis a collaborative effort involving Fermilab, the University of Nebraska and the University ofWashington. Appendix A has a description of the history of this project.

Project Development Team

Fermilab: Sten Hansen, Tom Jordan, Terry Kiper

Univeristy of Nebraska: Dan Claes, Jared Kite, Victoria Mariupolskaya,Greg Snow

University of Washington: Hans Berns, Toby Burnett, Paul Edmon,Rik Gran, Ben Laughlin, Jeremy Sandler, Graham Wheel, Jeffrey Wilkes

1 For more technical documentation on the DAQ board, see http://www.phys.washington.edu/~walta/qnet_daq/

Page 4: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

ii

Table of Contents

Chapter 1 In the ClassroomCosmic Ray Experiments within the ClassroomHow Can I Use Cosmic Ray Detectors in My Classroom?What Experiments Can My Students Perform?

Chapter 2 Hardware IntroductionHardware OverviewThe DAQ Readout BoardPower SupplyGPS ReceiverScintillation CountersCables for Connecting to PC

Chapter 3 Data DisplayData Display on a PCKeyboard Commands

Chapter 4 The DAQ CardGPS ObservationSingles and Coincidence Rate MeasurementData Collection

Chapter 5 Data Upload and AnalysisQuarkNet Website OverviewData Upload to the ServerAnalysis Tools

Chapter 6 Advanced TopicsCounter PlateauingData WordsCoincidence Counting VariationsOn-board Barometer Calibration

AppendicesAppendix A: History of Card DevelopmentAppendix B: Schematic DiagramsAppendix C: Terminal Emulator SetupAppendix D: Precise Event Time Calculation AlgorithmAppendix E: Details of Time Coincidence and Data HandlingAppendix F: Acronym and Jargon Dictionary

Page 5: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Page 6: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Chapter 1: In the Classroom

Cosmic Ray ExperimentsFor most of today’s particle physics experi-ments, large accelerators accelerate particlesto very high energies. However, it is possi-ble to do high-energy physics in your schoolwithout a particle accelerator! Nature servesas an accelerator for cosmic rays—particlesthat are of astrophysical origin (It is notcompletely understood!) and seem to be eve-rywhere throughout the universe. These“primary” cosmic rays, which are mainlyprotons (and a few heavier nuclei), interactwith nucleons in the earth’s upper atmos-phere in much the same way that fixed targetcollisions occur at particle physics laborato-ries. When these primary particles interactwith nucleons in the atmosphere, they pro-duce mainly pions and kaons. In the colli-sions, if most of the incoming momentum istransferred to an atmospheric proton, thefollowing reactions are common:

p + p p + p + π+ + π° + π-

and

p + p p + n + π+ + π+ + π-.

If most of the momentum is transferred to aneutron, then these reactions are common:

p + n p + p + π+ + π- + π-

and

p + n p + n + π+ + π° + π-.

The products of such interactions are called“secondary” particles or “secondary” cosmicrays. Some of these products, however, are

very short -ived and generally decay intodaughter particles before reaching theearth’s surface. The charged pions, for in-stance, will decay into a muon and a neu-trino:

π- µ- + ν µ

or

π+ µ+ + ν µ.

Although these reactions are not the onlypossibilities—they are examples of commonreactions that produce secondary particlesand their daughters. Counting all secondaryparticles detected at sea level, 70% aremuons, 29% are electrons and positrons, and1% are heavier particles.

If these secondary particles have sufficientenergy, they may in turn interact with otherparticles in the atmosphere producing a“shower” of secondary particles. The parti-cles in this shower will strike a wide area onthe earth’s surface (perhaps several m2 oreven km2) nearly simultaneously. Figure 1illustrates one of these showers.

Although your students can do several cos-mic ray experiments with a single classroomsetup, the QuarkNet website<http://quarknet.fnal.gov/grid/> providesstudent access to data from multiple cosmicray detectors to detect and study largershowers. Several professional versions ofthis same experiment are taking data thatmay help determine the origin of some ofthese highly energetic primary cosmic rays.

Page 7: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

How Can I Use a Cosmic RayDetector In My Classroom?The very nature of cosmic ray experimentsis quite different from traditional labs thatcan be completed in a lab period or a coupleof lab periods. Cosmic ray experiments typi-cally require a great deal of run time to col-lect data. Extra class time, however, is notsomething most teachers have in an alreadyfull course. You may also wonder how toprovide each student time to do an experi-ment when you have only one setup.These are realistic questions. As a possiblesolution, the following approach allows younot only to incorporate these experimentsinto your course but also to help your stu-dents discover how high-energy physics ex-periments are really done.

Organize the cosmic ray experiments as along-term project that spans a quarter oreven more. If students work on this projectintermittently, you can run these cosmic ray

experiments in parallel with your “standard”curriculum with days set aside periodicallyfor cosmic ray detector work.

After an introduction to cosmic rays, theequipment, and the research questions thatphysicists ask in this field, have studentgroups write up a proposal for the experi-ment that they want to perform. These ex-periments might include calibration and per-formance studies, muon lifetime experi-ments, shower studies, or flux studies as afunction of one of many variables, e.g., timeof day, solar activity, east/west asymmetry,angle from vertical, barometric pressure, etc.Your students can also look for particles thatare strongly correlated in time and may bepart of a wide-area shower.

Once proposals are accepted, give each stu-dent “collaboration” a few days to a week torun their experiment. In some cases, twogroups might pool their time and share thesame data but for different physics goals.This is not unlike how real high-energyphysics experiments are done! If time per-mits, students can do a second run with thestudent-suggested modifications.

While one group is using the hardware,other groups can design their setup, analyzetheir data (or other data), visit the “Poster”section of the QuarkNet cosmic ray websiteto research the results of other studentgroups, etc. Having your students post theirwork here and/or having them give oralpresentations (sometimes with guest physi-cists!) may make for a great summary to theproject.

What Experiments Can MyStudent Perform?There are four categories of experiments thatstudents can do with the comic ray detec-tors:

Figure 1. A cosmic ray shower produced bya primary cosmic ray entering the earth’satmosphere.

Page 8: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

1. Calibrations and performance studies2. Flux experiments3. Muon lifetime experiments4. Shower studies

Calibrations and PerformanceStudiesBefore students can “trust” the cosmic rayequipment, they can and should do somecalibrations to study the response of thecounters and the board. Calibration studiesinclude plateauing the counters, thresholdselection and barometer calibration. Theseare discussed in Chapter 5. In addition, theQuarkNet online analysis tools include a“system performance” study for uploadeddata. The details of this study are outlined inChapter 5 and on the website.

Flux ExperimentsYour students can do a variety of flux ex-periments investigating such things as cos-mic ray flux as a function of time of day,solar activity, east/west asymmetry (show-ing the µ+/µ- ratio by assuming thesecharged particles will bend in the earth’smagnetic field), angle from vertical, baro-metric pressure, altitude. The list goes on.This can be an exciting set of experiments asstudents study the factors that they want totest. Chapter 5 discusses flux studies in moredetail.

Muon Lifetime Experiment to Ver-ify Time DilationA classic modern physics experiment toverify time dilation is the measurement ofthe muon mean lifetime. Since nearly all ofthe cosmic ray muons are created in the up-per part of the atmosphere (≈30 km abovethe earth’s surface), the time of flight for

these muons as they travel to earth should beat least 100 µs:

smx

smxd

vt muonflight µ100

1030

/1033

8

=== .

This calculation assumes that muons aretraveling at the speed of light—anythingslower would require even more time. If astudent can determine the muon lifetime (asdescribed in Chapter 5) and show that it issignificantly less than this time, they arepresented with the wonderful dilemma thatthe muon’s time of flight is longer than itslifetime!

This time dilation “proof” assumes that allmuons are created in the upper atmosphere.Although this is actually a good approxima-tion, your students cannot test it. However,by using the mean lifetime value and bymeasuring flux rates at two significantly dif-ferent elevations, you can develop experi-mental proof for time dilation. This experi-ment requires you to have access to amountain, an airplane, or collaboration witha team from another school that is at a sig-nificantly different altitude! Here is a won-derful opportunity for schools to work to-gether proving time dilation. A very thor-ough explanation of this experiment is out-lined in the 1962 classroom movie titled,“Time Dilation: An Experiment with MuMesons.” 2 This movie helps you (and yourstudents) understand how the muon lifetimemeasurement (along with flux measurementsat two different altitudes) can be used toverify time dilation.

Shower StudiesWith the GPS device connected to yourDAQ board, the absolute time stamp allows

2 This 30 minute movie can be ordered on CD for$10 from http://www.physics2000.com/.

Page 9: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

a network of detectors (at the same site or atdifferent schools) to study cosmic ray show-ers. Your students can look for small show-ers or collaborate with other schools in yourarea to look for larger showers.

The QuarkNet online analysis tools allowstudents to not only look for showers but tomake predictions about the direction fromwhich the shower (and thus the primarycosmic ray) originated. Details for doingshower studies can be found in Chapter 5and on the QuarkNet website.

Page 10: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Chapter 2: Hardware Introduction

Hardware OverviewFigure 2 shows a typical cosmic ray detectorsetup composed of:1. Counters—scintillators, light guides,

photomultiplier tubes and bases (twoshown).

2. QuarkNet DAQ board.3. 5 VDC adapter.4. GPS receiver.5. GPS extension cable.6. RS-232 cable (to link to computer serial

port).7. Optional RS-232 to USB adapter (to link

to computer USB port instead of serialport).

8. Lemo signal cables.9. Daisy-chained power cables.

For this setup, the DAQ board takes the sig-nals from the counters and provides signalprocessing and logic basic to most nuclearand particle physics experiments. The DAQboard can anlyze signals from up to fourPMTs. (We show two in the figure.) Theboard produces a record of output datawhenever the PMT signal meets a pre-defined trigger criterion (for example, whentwo or more PMTs have signals above somepredetermined threshold voltage, within acertain time window). The output data re-cord, which can be sent via a standard RS-232 serial interface to any PC, contains tem-poral information about the PMT signals.This information includes: how many chan-nels had above-threshold signals, theirrelative arrival times (precise to 0.75 ns),

1

2

3 4

5

67

8

9

9

Figure 2. A typical cosmic ray detector setup.

Page 11: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

and the starting and stopping times for eachdetected pulse. In addition, an external GPSreceiver module provides the absolute UTCtime of each trigger, accurate to about 50 ns.This allows counter arrays using separateDAQ boards—such as different schools in awide-area array or two sets of counters at thesame site—to correlate their timing data.Keyboard commands allow you to definetrigger criteria and retrieve additional data,

such as counting rates, auxiliary GPS data,and environmental sensor data (temperatureand pressure).

This chapter includes an overview of eachmajor component shown in Figure 2. Addi-tional details regarding some componentsare in the appendices.

DAQ Readout BoardFigure 3 is a picture of the DAQ board withseveral major components labeled. Thisboard is the logic link between the scintilla-tion counters and the PC. The board pro-vides discriminators and trigger logic forfour channels of PMTs. The board includesfive built-in scalers, allowing simultaneouscounts of singles on each channel, plus trig-gers at whatever logic level you specify (2-to 4-fold majority logic).

A standard RS-232 interface can be con-nected to any PC (Windows, Linux or Mac).The datastream consists of simple ASCII

text lines readable by any terminal-emulatorprogram. In addition, a GPS clock providesaccurate event time data synchronized toUniversal Time (UTC), so widely separatedsites can compare data. In datastream mode,the DAQ board outputs a series of text linesreporting event data: trigger time in UTC(with 24 ns resolution and absolute accuracyabout 100 ns), leading and trailing edgetimes for each pulse recorded within thecoincidence time window (with 0.75 ns pre-cision), and data from the GPS and internalclocks. Additional keyboard commands al-low reading of temperature, barometric pres-sure and other sensors.

Figure 3. The QuarkNet DAQ v2 board with major components labeled.

Page 12: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Board ComponentsFigure 4 is a block diagram of the QuarkNetDAQ v2 board. (See Appendix B for aschematic diagram.)

DiscriminatorsPMT signals are first pre-amplified by afactor determined from a set of changeableresistors (Amplification factor x10 is usedfor QuarkNet, x2 by CROP, x1 byWALTA.) Discriminators are implementedusing voltage comparator chips with the ref-erence threshold voltage varied via screw-driver adjustable potentiometers (trimpots).Threshold levels can be set from 0 to -750mV by adjusting each potentiometer whilemonitoring voltage at a nearby test point.It is important to remember that the voltagecomparators look at the amplifier output, soraw PMT signal levels are multiplied by anyamplification factor present before beingcompared. For example, if you used a -30

mV threshold with NIM discriminators andhave x10 amplification, your threshold levelon the QuarkNet DAQ board should be setto -300 mV.

Complex Programmable Logic Device(CPLD)Trigger logic is implemented using a CPLDchip. Software revisions for this chip mustbe prepared using special software but canbe downloaded via the serial port. Thisflexibility allows the engineers to distributeupdates that alter the fast logic, if necessary.Any trigger logic level from singles to 4-fold can be set by keyboard commands tothe board. Majority logic is used: any com-bination of three active channels causes atrigger at the 3-fold level, for example.

Figure 4. Block diagram of the QuarkNet DAQ v2 board.

Page 13: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Time-to-Digital Converters (TDCs)Discriminator output pulses are fed intoTDCs3 which measure the arrival time ofleading and trailing pulse edges. TDCs keeptrack of their state (high or low) at 0.75 nstime intervals. If the trigger criterion is satis-fied, the TDC data are latched and read out,giving leading and trailing edge times foreach channel relative to the trigger time inunits of 0.75 ns. This allows you to calculatePMT pulse widths (time over threshold, orTOT, see Figure 5) as a crude estimate ofpulse area and thus energy.

Microcontroller (MCU)The MCU is really just a special-purposeCPU that provides the onboard ‘slow’ logic(with a time scale of microseconds, notnanoseconds) to interface the board to youvia a terminal window or equivalent on yourPC. At present, the MCU can be repro-grammed to redefine functionality only byusing special software and burn-in hardware.

Auxiliary SensorsThere is a temperature sensor built into themicrocontroller chip. This sensor is presentso that CPU temperature can be measured.This temperature and the supply voltage are 3 “TDC” is a generic term in particle physics technology. Thespecific chips used on the board are TMCs (“Time MeasurementChips”). You may see this designation in some documentation.

reported whenever the board is started up.While the board components are rated fortemperatures between –20°C and +80°C, theboard temperature should not normally goabove +50°C.

A second temperature sensor is located onthe booster board built into the GPS cable’s“far end” DB9 connector. This sensor can beused to log outdoor temperature at thecounter locations, and is read out with akeyboard command. The GPS module maybe damaged if its temperature goes below–40º C or above +85º C.4

A barometric pressure sensor is built into theboard as well. It can also be calibrated andread out (in units of kPa) with a keyboardcommand.

Board FunctionalityThreshold Detection and SettingAfter amplification, the PMT signals are fedto voltage comparators. The comparators seta HIGH logic level whenever the amplifiedPMT signal exceeds their negative thresholdvoltage setting as shown in Figure 6. Thislogic level has 0.75 ns resolution. Thismeans that we can measure the time differ-ence between pulses on different channels atthe same site down to less than a nanosec-ond! We depend on the GPS clocks, with 24ns resolution, for timing between schoolsites.

4 At DAQ card power-up or reset, the temperature on the DAQcard (actually, inside the MCU chip) is reported. Note that this isnot a good indicator of air temperature at the card site, even if thecard is located outdoors, since the chip generates considerable heatwhile operating. It is a useful way to make sure the card is healthy,however! Temperatures over +40º C may be dangerous to thecard’s chips.

Figure 5. Typical PMT pulse from whichthe Time Over Threshold (TOT) can bedetermined.

Page 14: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

To measure the current threshold voltagevalue, compare the test points, to ground.The test points for each threshold are labeled“TPVTH” and the ground labeled “TPGND”in Figure 7.

Setting the threshold level too high will missall but those events that correspond to alarge amount of energy deposited in the de-tector; setting the threshold too low will re-sult in background noise within the elec-tronics being mistaken as event counts.

So how do you determine the appropriatethreshold setting? Consider the graph Figure8 on the next page as a ‘ballpark’ determi-nation of the optimum threshold value to usefor a channel. For the data shown in thisgraph, the PMT voltage was set to that de-termined by plateauing the counter (see sec-tion 6.1 for help on how this is done) andkept constant throughout the experiment.

The plot shows the singles rate in that chan-nel as a function of threshold value. You cansee that the counting rate decreases as thethreshold setting increases. Once the thresh-old value became as high as 0.5 V, thecounting rate decreased more linearly. The“kink” in the graph may be used to suggestthat noise contaminated the counting ratemuch more significantly when the thresholdwas set below 0.5 V. Operating slightlyabove this value is probably the optimumthreshold value to choose.

Figure 7. Close-up picture of the DAQ boardshowing threshold test points used to measurethreshold voltage for each channel.

TPVTHTPGND

Figure 6. A typical negative PMT pulseshowing the user-defined threshold valuecompared to reference ground.

Signal afteramplification

User determinedthreshold

Referenceground

Page 15: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Coincidence LogicThe DAQ board can also determine whethersignals in separate channels are coincident intime. For example, if the trigger criterion isset to 2-fold, then as soon as any channelgoes above threshold, a time window isopened. (Window time-width is adjustable.)If any other channel goes above thresholdduring this time window, all event data arelatched and outputted for the overlap timeinterval when both are active. Notice thatpulse data are reported for a time intervalthat is not of fixed length but just covers theoverlap period when two or more channelsare active. Leading and trailing edge timesare reported for any active channels (not justfor the two channels that launched the trig-ger), with empty data entries for channelsthat remained inactive during the triggerwindow. For a single event trigger, the DAQboard may need to output several lines ofdata. The first line has an “event flag” foridentification. Any following lines withoutthis flag are simply additional data for thesame event.

Rate CountersThe card has five built-in counters, num-bered 0 through 4: counters 0 through 3 re-cord the singles count for each channel, andcounter 4 records the trigger count for what-ever coincidence level you have set. By ze-roing these counters with a software com-mand, then running the board for a fixedlength of time and reading out the countersat the end, you can obtain singles rates foreach channel as well as the coincidencerates.

Power SupplyThe board requires a stable +5 VDC powersupply, with 800 mA or greater output cur-rent. A 110VAC to 5VDC/2.4A modularswitching power supply, of the type used formany small electronic devices, is suppliedwith the board. Replacements are readilyavailable at Radio Shack or a similar elec-tronics store.

PMT bases provided by QuarkNet can bepowered by the same +5 VDC power supply

Figure 80. A graph of frequency vs. threshold for a counter used to de-termine threshold setting.

Threshold Determination

0100200300400500600700800900

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

Threshold (V)

Fre

qu

ency

(c

ou

nts

/min

ute

)

Page 16: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

that is plugged into the DAQ board. Thesebases are daisy-chained from the board us-ing a common male-male phono jack cablewhich is also readily available at RadioShack or similar store.

Note: It is important to distinguish theseDAQ power supply modules from otherunits used for computers or other electronicdevices requiring DV voltage. Connection ofthe wrong power supply to your DAQ boardwill probably fry it.

GPS ReceiverThe external LeadTek GPS module shownin Figure 9 is connected through a specialcable which has a seemingly-standard Dconnector (serial port connector) on the farend. This connector mates with the commer-cial GPS module’s serial connector. How-ever, the special cable’s D connector actu-ally contains a tiny circuit board with com-ponents needed to ensure good performanceover 100’ or longer cables. The GPS clockwill not work if the special cable is not used.

Interfacing the GPS with the DAQBoardThe external GPS module is interfaced tothe Quarknet DAQ board with a special ex-tension cable, which can be over 100’ long

if necessary. Although the GPS module’sRS-232 D plug appears conventional, it hasbeen modified with a special connector,which contains the circuitry required to de-liver DC power to the module and interfacethe 1PPS (1 Pulse Per Second) signal to theboard. This connector should not be inserteddirectly into your PC’s serial port.

You may wish to use the GPS module aloneto observe satellite data without operatingthe DAQ card. For stand-alone operation ofthe GPS module, you need to construct aspecial adapter to allow connection of a+5VDC power supply directly to the mod-ule—you can use the same power supplyused for the DAQ card. The wiringdiagram for the adapter is shown in Figure10 on the next page. Parts shown in thewiring diagram can be obtained at mostelectronics supply stores. The LED is op-tional and just blinks to display the 1PPSsignal, indicating valid data.

The GPS module itself is weatherproof, butthe connectors should be protected. Also, thescrews on the cover of the GPS module tendto rust, so they should be covered with plas-tic paint or nail polish before deploymentoutdoors.

GPS StartupOnce powered-up, the GPS module shouldquickly “find itself” if it is in a location witha clear view of at least half the sky. Usuallyit does not work well through windows andshould be physically outdoors. The receiverwill lock onto four or more satellites,download the data needed to operate accu-rately and start averaging its position andclock settings at one-second intervals.Within a few minutes after startup, youshould obtain accurate GPS data. The unit’sLED display blinks red when first powered-up and searching, and changes to steady-

Figure 9. The LeadTek GPS receiver andcable. The cable shown here can be con-nected to a GPS extension cable.

Page 17: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

green when it has acquired enough satellitedata to locate itself accurately. Time data arenot accurate until then.

The GPS module provides several kinds ofdata. The commercial GPS module directlysupplies the date and “coarse” time (in UTC,not local time) down to milliseconds, orthree decimal places after seconds, and re-ports its geographic location in latitude andlongitude down to the equivalent of a few10s of meters.

The “1PPS” SignalThe stock LeadTek GPS module was modi-fied slightly for our application to allow themore precise timing we need down to 10s ofnanoseconds (eight decimal places followinginteger seconds). The GPS receiver outputsa logic pulse at the beginning of each UTCsecond, called the 1PPS (1 Pulse Per Sec-ond) signal.

The GPS receiver sends two types ofdatastreams to the board. The first is RS-232ASCII data telling what time it is, at whatlatitude, longitude and altitude the receiveris, and information about the satellites thereceiver is using. The other data is a 5V100ms pulse telling exactly when the data istrue. Each stream of 5V 100ms pulses ar-rives every second, thus the 5V pulse isnamed 1 pulse per second (1PPS). The mi-crocontroller on the board records thecounter value during which the pulse is re-ceived. The time is according to a counterrunning at ~41.67 MHz.

In principle, the leading edges of 1PPS sig-nals from GPS receivers anywhere in theworld are all in synch, to within the accu-racy of the non-military GPS system (about100 ns.) This feature allows accurate timesynchronization between school sites. Thespecial connector and cable attached to the

commercial GPS module transmits the 1PPSsignal about 100’ or more without excessivetiming degradation.

How to Calculate Event TimesThe DAQ board has onboard a 41.667 MHzoscillator, which “ticks” every 24 nanosec-onds (1/41.667x106 sec). Such a device doesnot maintain its frequency very accurately,and our oscillator’s frequency may drift by10-100 Hz from its nominal value (perhapseven more under extreme temperaturechanges). A counter (scaler) keeps countingthe clock ticks. Whenever this 32-bit counterreaches its maximum capacity of 4.3 billion,approximately every 100 seconds, it just“rolls over” back to zero, like an old car’sodometer, and continues counting. Clockcalibration occurs the internal clock counterevery time a 1PPS signal arrives.

Find the precise event time by getting thedate and time down to the nearest secondfrom the GPS module’s coarse time (withone correction described below), finding thenumber of clock ticks between the last 1PPSand the event trigger, and dividing by thenumber of clock ticks between the last two1PPS pulses to get the fraction of a seconddown to 24 ns precision. Of course, youhave to know whether the counter rolledover during the last second when doing thearithmetic.

There is a caveat to the previous paragraph:If the data rate is very slow—less than aboutone event per 100 sec—the internal countermay roll over more than once betweenreadings. In this case, all bets are off, andthe seconds cannot be reliably calculated.The next firmware update will includecommands to produce an output line at each1PPS, and/or automatic DG commands atregular intervals, ensuring that the necessary

Page 18: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

information is logged between counterrollovers.

One minor correction is also needed: theGPS module reports the time down to themillisecond, but there is a delay of a fractionof a second relative to the 1PPS edge. Forexample, when the 1PPS signal says it isexactly 12:01:25.000000000, the GPS timefield in the data record may say it is12:01:24.850. This delay (reported as+0.150 sec in this example) will cause youto associate the wrong integer second withthe event time if you are not careful. (TheGPS time delay may be negative, i.e., a for-ward shift, with the ASCII time data aheadof the 1PPS signal.) The DAQ board is pro-grammed to list the delay in milliseconds foreach data record so the reported time in sec-onds can be corrected to match the 1PPSdata. The algorithm described in AppendixD implements these calculations.

For people who like really deep-down de-tails, the delay mentioned above, which youcan determine and correct, is not the wholestory. There is an additional delay of 150-250 ms, which is unresolvable, since it isburied in the manufacturer’s firmware.Luckily, it is too small to cause the roundingprocedure described above to go wrong.Remember, all this is just about determiningthe integer seconds part of the time. Nano-second-level timing is not affected. Also, wehave not discussed corrections for the an-tenna cable delay—the event time calculatedis when coincidence occurs at the DAQboard, not at the counters. This is of no con-sequence as long as all school sites in an ar-ray use approximately the same cablelengths, within a few 10s of meters. The al-gorithm showing how to get the preciseevent time is shown in Appendix D.

Using the GPS without the DAQBoardTo use the GPS module via the serial port ofa PC (without the DAQ board) requires theconstruction of a simple adapter circuitshown in Figure 10. The LED is optionaland simply blinks to display the 1PPS signaland indicates when the GPS module haslocked onto a position and time fix. 5VDCpower can come from a 110VAC adapter ora PC’s PS/2 mouse jack. Power drawn isequivalent to what a mouse would consume,and will not affect your computer. You cansubstitute a connector to mate with a stan-dard 5VDC power adapter, available fromany electronics store.

Scintillation CountersA typical counter used in this experiment isshown in Figure 11. A counter is comprisedof a plastic scintillator, a light guide, a PMT,and a PMT base which provides the neces-sary operating voltage for the PMT andsends an electrical signal to the DAQ boardwhen a light pulse is “seen” by the PMT.For the counter shown in Figure 11, only thesquare portion of the paddle actively scin-tillates. The trapezoidal shape is merely a

Figure 10. The adapter circuit wiring dia-gram required when the GPS is connecteddirectly to the computer (without connectionto the DAQ board).

Page 19: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

light guide which directs the light toward thePMT using total internal reflection. Whencalculating the surface area of the activeportion of your detector, use only the squareportion.

It will be necessary to “plateau” yourcounter before the counting rate can betrusted. Small fluctuations in the high volt-age can offer significant variations incounter response if the operating voltage isnot near the voltage plateau. Details for howto plateau a counter are in Chapter 6.

ScintillatorsSince muon flux at sea level is ~1 x 10-2

muons/cm2/sec, and since these compriseabout 70% of the cosmic rays at sea level, adetector of significant surface area will helpto increase the counting rate to 10s or even100s of events each minute. If shower ex-periments or flux studies are of interest, thenincreasing surface area is the primary way toincrease the counting rate. If muon lifetimeexperiments are of interest, however, thenincreasing the thickness of the scintillatorwill also increase the counting rate sinceonly the muons that have stopped and decaywithin the detector can be used for lifetimestudies.

The process by which a scintillator scintil-lates light when a changed particle traversesis not discussed in this manual. This phe-

nomena, however, is an important one inhelping your students understand the opera-tion of the detectors.

PMT/BaseAlong with the production of the DAQboard, QuarkNet and Fermilab have pro-duced a Cockcroft-Walton base that can beused with an RCA 6342 PMT or similar 2”10-stage tube. This base does not require theuse of a high voltage power supply but ispowered by the same +5VDC supply that isused for the DAQ board. The base is housedin an aluminum can (see Figure 12). Appen-dix B includes a schematic for this PMTbase. If a separate tube and base are used inyour experiment, you may need to makeslight resistor modifications to the board inorder to achieve the proper signal size afteramplification.

The PMT voltage across the first and lastdynode—the operating tube voltage—rangesfrom 0–1600 VDC for the RCA 6342 PMTand the corresponding base provided byQuarkNet. A potentiometer at the end of thebase can be used for adjusting this voltage.The “pot” is marked off from 0 to 10 whichcorrespond linearly to the voltages from 0 –1600 V. This means that increasing the potby “1 unit” corresponds to an increase in160 V across the first and last dynode.

If you want to check the value of the tubevoltage, two test points on the end of thebase are provided to probe with a standardDC low voltage voltmeter (see Figure 12).This probe voltage measurement must bemultiplied by 385 to obtain the actual tubevoltage.

An important question to ask is, “Whatshould be the voltage setting for mycounter?” Because the response of eachcounter is unique, the answer to this ques-

Figure11. A typical cosmic ray counter con-sisting of scintillator and light guide (the flatpaddle region to the right), the PMT (blackcylinder), and the PMT base (light-coloredcylinder on the left end.)

Page 20: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

tion is different for each counter. To deter-mine the operating voltage for a particularcounter, you must “plateau the counter.”Details can be found in Chapter 6.

Lemo cables, which are thin coaxial cableswith “lemo” connectors on the ends, carrythe PMT signal to the DAQ board. A toggleswitch on the end of the base allows you toturn on/off the tube without disconnectingthe power cable. An amber LED near thetest points tells when the base is “on.”

Cables for Connecting to PCThe DAQ board connects to your PC’s serialport with a standard serial cable. If your PCdoes not have a standard RS-232 serial port,you can use a USB-to-serial converter,available commercially.

Figure12. The end of a PMT base showingtest points that may be probed with a lowvoltage DC voltmeter to measure PMT oper-ating voltage. A multiplication factor of 385is used to determine actual tube voltage.

Test Points

Page 21: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Chapter 3: Data Display

Data Display on a PCView the data with a terminal emulationprogram such as Zterm (Mac or Windows),Hyperterminal (Windows) or a “homemade”Unix-based program you can downloadfrom the QuarkNet website. See Appendix Cfor details on setting up these terminalemulation programs.

Keyboard CommandsOnce the terminal emulator is initialized andthe scintillation counters and board are pow-ered, you should begin to see data on thescreen that looks something like that shownin Figure 13.

The meaning of these “words” will be dis-cussed in great detail in Chapter 6. Note that

a single event may result in more than oneline of data! In this section, we discuss themeaning of some of the keyboard commandsthat you can type in order to modify/readvarious values to/from the board that are notdisplayed on the screen until requested.

Your PC is capable of sending commands tothe DAQ board in addition to receiving thedatastream from the board. Figure 14 showsan example of three keyboard commandsthat you type in order to measure the tem-perature at the GPS sensor, the value of thescalers, and to display GPS data.

The “HE” (help) command sends a summaryof all keyboard commands. Figure 15 showsthis command summary.

Figure 130. Sample screen of datastream from DAQ board when viewed with a terminalemulation program.

Page 22: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Figure15. A list of all keyboard commands viewable by typing “HE.”

Figure14. Example of keyboard commands that may be sent to the DAQ board withthe appropriate board responses.

Page 23: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Some of the most commonly used com-mands are discussed in Table 1. See

Chapters 4 and 6 for more detailed descrip-tions of how and when to use these com-mands.

KeyboardCommand Description

CD Counters Disabled. Does not write event lines on the PC monitoreven though the scalers will still increment. This is useful when you donot want to “see” all the data coming in.

CE Counters Enabled. Writes event lines on the PC monitor. This com-mand has the opposite effect of the CD command.

DS Display Scalers. Displays values of the scalers in hexadecimal. Scal-ers 0-3 store the singles rates for channels 0-3, and counter 4 recordsthe number of n-fold coincidences, where “n” is whatever level youset. These counts are running totals since the last time the counterswere zeroed.

RB Reset Board. Resets scalers and TMC only.

RE Reset Everything. Resets everything (including card setup parametersthat you may have modified); will zero all scalers.

TH Thermometer. Reports reading of temperature sensor on the GPSmodule connector, about 3 feet from the GPS module itself.

GP GPS Data. Displays current date, time, GPS position, and number ofsatellites visible.

Table 1. Some of the most common keyboard commands with descriptions.

Page 24: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Chapter 4: The DAQ Card

GPS ObservationTo read out the current GPS time, latitude,longitude, altitude and number of satellitesin view, type “GP” as shown in the previoussection. You can, however, directly monitorthe GPS module’s serial datastream bysending the command “NM 1.” This com-mand will pass all data from the GPS mod-ule directly to your PC. Normally, theboard’s MCU reads, interprets and distillsthe raw GPS information to produce the DGcommand output. Although this will con-tinue to be true even after you send the “NM1” command, you will get many more linesof detailed data (in the GPS industry’s stan-dard NMEA format). Refer to the link tounderstand this data format.<http://www.phys.washington.edu/~berns/archive/Leadtek/GPS_Protocol_ReferenceManual.pdf>

To disable NMEA data-forwarding and re-turn to normal operation, send the commandNM (i.e., no “1”).

If you connect the GPS module directly toyour PC’s serial port, as discussed before,you can also use a software package pro-vided by LeadTek to display sky maps ofsatellites and other interesting data. This canbe found online.<http://www.phys.washington.edu/~berns/archive/Leadtek/GMonitor.exe>

Singles and Coincidence RateMeasurementImportant measurements you want to makeare the rate at which an individual counter ishit (“singles rate”) as well as the rate atwhich a 2- to 4-fold coincidence occurs(“coincidence rate”). To determine these,type the following commands shown in Ta-ble 2:

CD Counter Disabled. Prevents the datastream from off your screen.

RB Reset Scalers. But immediately after type . . .

DG Display GPS Data. Gives the initial time—when you began counting. (Youcould use a stopwatch to measure the elapsed time instead.)

DS Display Scaler. After an adequate amount of time has passed (say 5 min-utes or so) take the final reading of the scalers and then immediate type . . .

DG Display GPS Data. Give the final time.

The counting rates for any particular scaler(0-3) can be determined by dividing the hexvalued scaler by the difference of the begin-ning and ending times. The number of n-foldcoincidences that occurred within the

elapsed time is recorded in scaler 4. Divid-ing the number of coincidences by theelapsed time will yield the coincidence rate.Figure 16 illustrates this command sequenceand the corresponding board outputs.

Table 2. The keyboard command sequence performed for determiningcounting rate.

Page 25: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

As an example of the singles rate, considerthe data in which the counting rate for chan-nel 0 was BCFH = 302310. The elapsed runtime was 21:35:45 – 21:30:46 = 4:59 or 4.98minutes. Thus, the singles rate is

min607

min98.43023

sin

countscountsR gles ==

Data CollectionOnce you have setup and tested your equip-ment and have plateaued the counters, youare ready to collect and save data for a run.Although the commands for starting andstopping a run vary slightly with each termi-nal emulation program (see Appendix C forthese commands), the idea is the same: Once

the datastream appears on your monitor, se-lect the command that will allow you to be-gin capturing text. You will be prompted totype a name and a folder into which thesedata will be saved. Your emulator will savethese data as a text file that can be analyzedlater. The data will be written to this filecontinuously. For example, opening this text

Initial GPS time

Ending GPS time

Scaler values after elapsed time

Figure16. An example of keyboard commands and board responses used to de-termine the singles counting rate in a particular channel.

Page 26: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

file while data is being saved will display allthe data collected up to that moment.When you want to stop a run (which couldbe minutes, hours or even weeks later!), use

the stop command for your particular emu-lator. (See Appendix C for this command.)This file can be uploaded to the server andthe data analyzed.

Page 27: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Chapter 5: Data Upload and Analysis

Figure 17. The QuarkNet Cosmic Ray Collaboration webpage serves as the studenthomepage for the cosmicray project.

QuarkNet Website OverviewTeacher PagesThe QuarkNet teacher activities database isfound at<http://eddata.fnal.gov/lasso/quarknet_g_activities/view.lasso>.

By selecting the “Grid Cosmic Ray Collaboration” link, you can find out more aboutthis project and use online tools for imple-menting this project in your classroom. Youwill find a page to register their school aspart of the cosmic ray investigations net-work so that your students may upload data

from their detector. A link to the studenthomepage is also located here.Student PagesThe student homepage for this project is<http://quarknet.fnal.gov/grid> (Figure 17).

Among many resources, students will find: Studies – Interesting questions along

with ideas to answer these questionsthrough experiment.

Resources – Links to related projects,physicists and other student group con-tacts.

Upload Data – Links to upload data andgeometry files.

Page 28: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Data Analysis – Powerful analysis toolsto analyze data for a variety of experi-ments. Even students without a detectorcan analyze data.

Poster Session – A method for studentsto share their results, search the work ofother students and collaborate with stu-dents at other schools.

Data Upload to the ServerWhile many of the cosmic ray detector experi-ments that your students can do require only theequipment at your local site, analyzing the data iscumbersome with software such as Excel.Working locally discourages student collaborationlike that found in real high-energy experiments.Accordingly, QuarkNet is developing a websitethat allows data uploads and analysis. Thissimplifies the analysis of these complex data andsupports student collaboration.

Before students can upload data to the server, youwill need to register your detector as part of thecosmic ray investigations network. This is easilydone on the teacher website. Registration willrequire you to enter the serial number of thedetector found on the bottom of the DAQ carditself, or by typing the keyboard command “SN”in the terminal emulator.

By selecting the “Upload” link from the<http://quarknet.fnal.gov/grid> page, you willseee instructions and links for uploading data.(You do not need to worry about uploading datathat may be “contaminated” by keyboardcommand lines typed during the operation of thisrun as the analysis software will create a new filefor this data using only data lines that are thecomplete 16 words across.)

Once you have uploaded data, to see that ithas been loaded successfully select the“Data” link. You can “View” your data inyour school’s folder. The link to view thisdata lists the date the data was collected. If a

data run spans more than one day, the datawill be broken into separate files labeledwith the appropriate date.

Analysis ToolsOnce your students have collected and up-loaded the data, there are four studies theycan do. Analyze data from your detector aswell any other detector that has uploadeddata. You can even look for coincidencesbetween your school and other schools if runtimes overlap! This section will explain thenature of each study/analysis and provide aframework from which you can get started.

System PerformanceThe main objective of the “system performance”study is to understand the quality of the data thatyou have collected or want to analyze.

The primary technique used to evaluate data in theperformance study is a histogram of the numberof events as a function of time over threshold(TOT, see Chapter 2). In a very loose sense, TOTis a measure of the amount of energy deposited inthe scintillator for a given event. Ideally, the DAQboard would have been equipped with an ADC(Analog-to-Digital Converter) to measure pulseheight and thus the energy deposited in thescintillator. To keep the cost down, however, aTDC (Time to Digital Converter) was used. (SeeChapter 2 for more on the TDC.). Since tallerpulses (pulses with more energy) are generallywider, there is a correlation between the time thatthe pulse exceeded the threshold value and theamount of energy deposited in the scintillator.

Page 29: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Figure 18(a)5 shows the ideal, Gaussian-shaped distribution about a mean value forthe time over threshold; Figure 18(b) showsan actual data run plot.

The actual data run histogram peak does oc-cur around 12 ns (which is typical for the1/2” thick scintillator, the PMT efficiency,and threshold settings used in our experi-ment). This actual data, however, appearsmore skewed than Gaussian. This histogrammay tell us that there is “good” data in ouractual run data, but that it is contaminatedwith short pulses (a.k.a. noise) that were justabove threshold. Increasing the thresholdvalue may “clean-up” this channel in thefuture.There is probably a large portion of the actual rundata in Figure 18(b) that represents actual muons

5 Figure is used with permission. Eric W. Weisstein."Gaussian Distribution." From MathWorld--A Wolf-ram Web Resource.http://mathworld.wolfram.com/GaussianDistribution.html

traversing the counter. No real data histogram willever look perfectly Gaussian, but a shapesomewhat resembling that of Figure 18(a) can bea reasonable indicator that much of your data is“good” and represents real muons.

One factor you can modify in plotting a histogramis the number of bins into which the data aredivided. Choosing a different number of bins forthe same data set can significantly change theshape of the graph and may help evaluate thequality of the data.

Flux ExperimentsCosmic ray flux, CRΦ , can be defined as

( )( )areatimeevents

CR =Φ .

Since the area of your detector will probablynot be varied in during an experiment, fluxstudies ask the question, “How does the rateat which cosmic rays pass through my de-tector depend on . . . ?” Since there are manyways to complete this question, this study is

(ns)

Figure 18. (a) The Gaussian distribution expected from an ‘ideal’ system performancegraph, (b) an actual system performance grph.

aTime over Threshold (ns)

b

Time over Threshold (ns)

Num

ber

of E

vent

s

Num

ber

of E

vent

s

Page 30: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

a fairly straightforward yet excellent open-ended research question for your students.

Flux experiments may include several geo-metries of your detectors such as (1) a singlecounter, (2) multiple counters placed in thesame plane to increase detector area, (3)closely stacked counters that require coinci-dence, and (4) separated, stacked countersthat require coincidence used to look at fluxfrom only a particular direction of the sky.There are several interesting variables to testin flux studies. Have your students generatethe questions that they want to study.

In analyzing flux study data, students selectthe data set and channel(s) to be analyzed.The analysis tools produce a histogram offlux vs. time similar to the one shown inFigure 19. Students can juxtapose data re-garding their independent variable as afunction of time to look for correlations.

Muon Lifetime Experiments

A classic modern physics experiment is themeasurement of the muon mean lifetime.This experiment has historical significanceas the very first experimental evidence of

time dilation. Chapter 1 discusses how thelifetime measurement can be used to verifytime dilation. Here we develop the muonlifetime measurement itself.

Consider Figure 20. When a muon enters acounter, a signal is generated in that counter.If the muon traveled through counter 1 andinto counter 2, both of these counters shouldhave a signal at approximately the sametime. If the muon has stopped within counter2, however, it will “wait around” until it de-cays and generate a second signal in counter2 upon decay. The time tDECAY, the timebetween the two signals in counter 2, can beextrapolated from the data file. Since no sig-nal occurred in counter 3, this is a strongindication that a muon did indeed decay incounter 2.

Theory suggests that the muon lifetime ex-hibits the characteristic exponential decaythat is common to other physical phenom-ena, such as radioactive decay. In the case ofradioactive materials, the decay expressionis given by

τ

t

eNtN−

= 0)(

1

2

3

Figure20. A three counter muon lifetime de-tector system.

Figure19. Cosmic ray flux(events/detector area/sec) vs. time graphover a period of two hours.

Page 31: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

where N0 is the initial population, N(t) is thepopulation after time t, and τ is the meanlifetime. The fact that muons in our experi-ment do not coexist, whereas they do in ra-dioactive materials, does not change the de-cay expression. This does, however, give aslightly different meaning to N(t) and N0. Inthis experiment, N0 is not the number ofmuons present at t = 0 but represents the to-tal number of muons that were captured anddecayed within the detector. N(t) is then thenumber of these muons with tDECAY > t.

It should also be mentioned here that themuon’s time of flight before it entered thedetector is of no concern. Though tDECAY isnot its entire lifetime, plotting the number ofdecays as a function of decay time will yieldthe same exponential decay shape fromwhich lifetimes can be found. The common“zero time” that we use here is when eachmuon entered the detector. If a large numberof decays are collected in the manner de-scribed above, a plot can be produced usingthe web analysis tool similar to the oneshown in Figure 21.

While doing a lifetime study, no coincidence

level should be set locally. Instead, coinci-dence levels may be requested in the webanalysis. Students select the data file to beanalyzed, the coincidence level, and the timeinterval between which coincidences musthave occurred. The lifetime can be deter-mined by fitting this decay plot with an ex-ponential decay function of the form de-scribed above. It is also possible for studentsto estimate the background value that shouldbe subtracted from each bin before fitting.This is also shown in Figure 21.

Shower StudiesWith the absolute time stamp that GPS of-fers, a network of detectors (at the same site,or at different schools) can study cosmic rayshowers. The web analysis tools allow stu-dents to make predictions about which di-rection in the sky the shower (and thus theprimary cosmic ray) came from.

Students select the specific data sets to ana-lyze (these may be from different locations),the coincidence level required, and the timeinterval between which coincidences musthave occurred. A 3-D plot of position on theearth (xy) is graphed as a function of signaltime (z). This graph allows them to ‘see’ thedirection from which the shower came.

(ns)

Figure22. Shower study plot showing coinci-dences within a 70 ns time window.

Figure21. A lifetime graph showing numberof number of decays as a function decayfrom when the muon entered the scintilla-tor. Fitting this data to an exponential de-cay function can yield the lifetime.

Muon Lifetime Decay PlotMay 28, 2004

Page 32: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Chapter 6: Advanced Topics

Plateauing CountersIn order to determine the operating voltageof each of your counters, it is necessary toperform a simple procedure in which you“plateau the counter.” This step is necessarybecause counting variations due to drifts inthe tube gain or voltage can occur during anexperiment. By using an operating voltagenear the center of this plateau, these effectsare minimized.

How to Plateau a counterThere are two methods to plateau a counter:1) Plateauing using a single counter2) Plateauing using multiple countersThe first technique is simpler, however, itmay make “seeing” the plateau more chal-lenging.

Plateauing Using a Single CounterTo plateau a single counter, choose a thresh-old value for the discriminator and hold thisconstant for your experiment. (Chapter 2discusses how to choose a threshold value.)Turn on the DAQ board and connect it toyour computer so that you can view thedatastream on your monitor using a terminalemulation program. (See Appendix C forhelp setting up a terminal emulation pro-gram.) Once you see the datastream, con-vince yourself that lower potentiometer dialvalues result in a lower counting rate whilehigher settings produce a very highdatastream rate on your monitor.

Noting the potentiometer reading on thebottom of the PMT base, perform a simpleexperiment to determine the singles rate forthe channel that the counter is connected tousing the method described on page 19.Continue the process for many differentvoltages (potentiometer settings) to producea graph similar to the one shown in Figure23. Remember that the scalers increment inhex format. Also, note that the channels arenumbered 1, 2, 3, and 4 on the board, num-bered 0, 1, 2, and 3 respectively on themonitor. This numbering scheme (startingfrom 0 instead of 1) is consistent with engi-neering and computer programming prac-tice.

The optimum operating voltage is where thesemi-log graph looks the most horizontal.For the graph shown, this occurs around 5.5V. Sometimes it is difficult to “see” the pla-teau with this technique. If multiple countersare available, the technique outlined belowmake the plateau more apparent.

Figure23. Example of counter plateau graphused to determine operating voltage of PMT.

Counter Plateau Plot

1

10

100

1000

10000

100000

4 4.5 5 5.5 6 6.5 7 7.5

Potentiometer Value

Sin

gle

s F

req

uen

cy

(co

un

ts/m

inu

te)

Page 33: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Plateauing Using Multiple CountersConsider the three-counter setup in Figure24. Let’s plateau counter 2. (This can occureven if counters 1 and 3 have not been pla-teaued.) You can setup an experiment to in-vestigate the coincidence frequency betweencounters 1 & 2, 2 & 3, and 1 & 3 as a func-tion of the potentiometer setting on the baseof counter 2. (You may need to collect datafor these three coincidence sets during sepa-rate runs unless you have a splitter for thesignal cables and a second DAQ board.)

Since coincidences between 1 & 3 should berelatively constant over the experiment, thiscan serve as a baseline from which to com-pare the 1 & 2 and/or 2 & 3 coincidences. A

plot of 3&12&1

vs. counter 2’s potentiometer

reading or a plot of 3&13&2

vs. counter 2’s

potentiometer reading produces a plateauplot similar to that shown in Figure 25. Youcan see that this plateau region is somewhat“flatter” than was the case with the singlecounter technique discussed above.

Figure 25 shows that the “flattest” part ofthe graph is near the potentiometer setting of5.5. This value will serve as a reasonablevalue at which to operate this counter.

Data WordsThis section explains the meaning of each ofthe data “words” that appear as a result of asingle event. It is not imperative for you tounderstand these words in order to collectand analyze data, but understanding thesewords can help as you attempt to evaluatethe quality of your data.

The datastream from the DAQ board is inASCII format. Each data line contains 16words as shown are a sample set of data onthe nest page in Figure 26. Words 1-9 are inhex format. The data shown below is for asingle event—a single event can span sev-eral lines of data!

Figure 25. Example of multiple counterplateau graph used to determine operatingvoltage of the PMT for counter 2.

Multiple Counter Plateau Plot (Counter 2 is being plateaued)

0.01

0.1

1

10

100

4 5 6 7

Potentiometer Value (for counter 2)

Co

inci

den

ce

Fre

qu

ency

(1

& 2

/ 1

& 3

)

Figure24. Shown here is a three-counter setupused in plateauing a counter in order to deter-mine the optimum operating tube voltage.

1

2

3

Page 34: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Below is a brief description of each of the“words.”

Word 1: A 32-bit trigger count of the 41.66MHz CPLD clock mounted on the DAQboard with a range from00000000...FFFFFFFF. Its resolution (1LSB increment) is 24 ns.6,7 A trigger countof 00000000 means that the DAQ card isstill in the initialization phase, i.e., the GPSreceiver has not started to generate 1PPSpulses yet. Do not use the initial data untilthe trigger count becomes non-zero!

Word 2: TMC count of the Rising Edge atinput 0 (RE0). It is also the trigger tag. Theformat used is shown below:bits 0-4 = TMC count of rising edge, reso-

lution = 0.75 ns (=24 ns/32)bit 5 = channel edge tag (1 = valid rising

edge, 0 = no rising edge)bit 6 = not used, always 0bit 7 = trigger tag (1 = new trigger, start of

6 24.00 ns if the CPLD clock is exactly 41666666.67 Hz. Theactual CPLD frequency of each card is usually tuned within ±30Hz of the target frequency of 41666667 Hz. Generally, an Hz driftfrom the target CPLD frequency result in accuracy errors of up ton*24 ns. For example, a 30 Hz drift means that the accuracy timeerror has a range of ±720 ns if exactly 24.00 ns are assumed for aCPLD clock tick time. It is reasonable to assume that an errorwithin ±1000 ns is acceptable for a school network if the schoolsare more than 1 mile apart from each other.

7 The CPLD clock frequency fluctuates slightly over time, de-pending on temperature changes and oscillator ageing drifts.Therefore, in order to achieve high accuracy (±50 ns) in computingthe absolute trigger times, you need to poll the current CPLD fre-quency at a regular basis (say once every 5 minutes) with com-mand DG (Display GPS data). If the event rate is high enough (atleast 1 event per 100 seconds), the CPLD frequency can be com-puted from the 1PPS counter numbers of consecutive events.

a new event; 0 = follow-up data of a trigger event)

Word 3: TMC count of Falling Edge at in-put 0 (FE0). The format used is shown be-low:bits 0-4 = TMC count of falling edgebit 5 = channel edge tag (1 = valid falling

edge, 0 = no falling edge)bits 6-7 = not used, always 0.

Word 4: TMC count of rising edge at input1 (RE1); same format as RE0, except bit 7 isalways 0.

Word 5: TMC count of falling edge at input1 (FE1); same format as FE0.

Word 6: TMC count of rising edge at input2 (RE2); same format as RE1.

Word 7: TMC count of falling edge at input2 (FE2); same format as FE1.

Word 8: TMC count of rising edge at input3 (RE3); same format as RE1.

Word 9: TMC count of falling edge at input3 (FE3); same format as FE1.

Word 10: A 32-bit CPLD count of the mostrecent 1PPS (1 pulse per second) time markfrom the GPS receiver. This hex wordranges from 00000000...FFFFFFFF and hasa resolution of 24 ns just like word 1.8

8 The same uncertainty comments apply here as in word 1.

80EE0049 80 01 00 01 38 01 3C 01 7EB7491F 202133.242 080803 A 04 2 -038980EE004A 24 3D 25 01 00 01 00 01 7EB7491F 202133.242 080803 A 04 2 -038980EE004B 21 01 00 23 00 01 00 01 7EB7491F 202133.242 080803 A 04 2 -038980EE004C 01 2A 00 01 00 01 00 01 7EB7491F 202133.242 080803 A 04 2 -038980EE004D 00 01 00 01 00 39 32 2F 81331170 202133.242 080803 A 04 2 +0610

Figure26. A sample event containing five lines of data. Each line is comprisedof the same 16-word format with each word separated by a space.

Page 35: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Word 11: UTC time of most recent GPS re-ceiver data update. Although one update issent each second, it is asynchronous with the1PPS pulse. The format used is shown be-low:

HHMMSS.mmmwhere: HH = hour [00...23]

MM = minute [00...59]SS = second [00...59]mmm = millisecond [000...999]

Word 12: UTC date of most recent GPS re-ceiver data update. The format used isshown below:

ddmmyywhere: dd = day of month [01...31]

mm = month [01...12]yy = year [00...99]e.g. 03=2003]

Word 13: A GPS valid/invalid flag.A = valid (GPS data OK),V = invalid (insufficient satellite lock for 3-

D positioning, or GPS receiver is in ini-tializing phase); time data might be OKif number of GPS satellites is 3 or moreand previous GPS status was "A" (valid)within the last minute.

Word 14: The number of GPS satellitesvisible for time and position information.This is a decimal number between 00…12.

Word 15: This hex word is a DAQ statusflag. The format used is shown below:

bit 0: 0 = OK1 = 1PPS interrupt pending (Warn-

ing flag: If DAQ card is busy,then 1PPS count might lag be-hind or get mismatched.)

bit 1: 0 = OK 1 = trigger interrupt pending (pos-

sibly high trigger rate; if con-tinues, then data might be cor-rupted.)

bit 2: 0 = OK

1 = GPS data possibly corruptedwhile DAQ uC was/is busy.

bit 3: 0 = OK1 = Current or last 1PPS rate is not

within 41666666 ±50 CPLDclock tick.s (This is a result of aGPS glitch, the DAQ uC beingbusy, or the CPLD oscillator nottuned correctly.)

Word 16: The time delay in millisecondsbetween the 1PPS pulse and the GPS datainterrupt. A positive number means 1PPSpulse is ahead of GPS data, and negativenumber means GPS data is ahead of 1PPS.To get the actual GPS time to the nearestsecond, round (word 11 + word 16/1000) tonearest full second. This gives the actualGPS time at the last 1PPS pulse.

See Appendix F for the interpretation of thedata for the previous example.

Coincidence Counting Varia-tions

Setting with Keyboard CommandsChapter 4 discusses how to use some key-board commands to read scaler values over aknown period of time in an effort to deter-mine basic counting rate. That simple cal-culation does not discuss two parame-ters—gate window and TMC delay (d and wrespectively). The gate window, d, refers tohow close in time pulses must be to cause atrigger. The TMC delay, w, more difficult todefine, determines which pulse edges getread out into the datastream when a triggeroccurs, by delaying this information untilthe trigger actually happens. (See AppendixE for a full explanation of each quantity andthe details of time coincidence and datahandling.)

Page 36: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Consider the actual physical quantities andrelate them to the two parameters, d and w. TTRG: This quantity is the maximum

time window during which real physicsprocesses might cause a trigger. In otherwords, if you set the card for 2-fold co-incidences, and one channel receives asignal at t = 0, at least one other channelmust show a signal before t = TTRG oryou will not receive any informationabout that pair of pulses. The examplesin Appendix E may help.

TWIDTH: This quantity is the durationafter the first pulse in a trigger duringwhich you want to record all rising andfalling edge times. The channel in whichthese extra pulses occur does not matter;all of them will be saved.

The physical quantities TTRG and TWIDTH arethe values for d and w you set on the board.You set TTRG and TWIDTH based on the typeof experiment that you want to perform.Below is a list of several types of experi-ments and typical parameter values for each.

Muon Telescope Flux ExperimentsSet d = 2, and w = 401.If you want to build a muon telescope withcounters less than a meter apart, TTRG is thetime it takes a muon to go from the topcounter to the bottom counter. Since thesemuons travel at essentially the speed of light(≈ 1 ft/ns), the TTRG is only a few ns so youset d to the minimum value of 2 clock ticks,or 48 ns. Similarly, to simply count muons,you are only interested in a short time win-dow for edges, so you could take TWIDTH =48 ns as well.

Muon Lifetime MeasurementsSet d = 2, and w = 401.If you want to look for muons that stop anddecay (2.2 µs mean lifetime) in a counter,you look for the decay electron pulses sev-eral microseconds after the trigger, so youhave TWIDTH = 400 (9600 ns, or about 10µs).

Cosmic Ray ShowersSet d = 50 (= 1.2 µs) and w = 100.In extensive air showers, the main “pan-cake” of arriving particles should be be-tween 10 m and 200 m thick. The earliestand latest particles might arrive at the count-ers about 0.6 µs apart, for a vertical shower.Thus you want TTRG to e about 1 µs. TWIDTH

can be about the same.

However, you should not set huge time win-dows “just to be safe.” Doing this causes thecard to be busy all the time, and its effectivedead time will become a serious problem.The values of d and w should be as small aspossible for the given physics goals.

Default values, effective when the card ispowered up, are d = 6 (= 144 ns) and w =10 (= 240 ns). Modifying these values isprobably unnecessary for muon telescopeexperiments. However, for air shower de-tectors or muon lifetime experiments, youshould set them at larger values. These val-ues serve as a good guide. If you want to usethe values of d = 50 and w = 100, Table 3shows how to set the DAQ card to thesevalues:

RE Resets the card by setting all counters to zero and return everything to de-faults

CD Disables the counters and TMC

Page 37: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

WT 01 00WT 02 32

Sets the time register with read pointer (register 01) = 00 and the writepointer (register 02) to d, in hexadecimal. The TMC delay d will be the dif-ference of these values (so in fact you could set 01 to some value nn, and 02to nn + d). This example sets d = 50. We have set register 02 to 32H = 5010.The maximum is 7FH = 12710.

WC 00 1F Sets the coincidence level and enable desired channels. Set control reg-isters with the WC (Write Control register) command. Register 0 sets thecoincidence level, using its first (left) hex character. Here, 0 means singles,1 means 2-fold, and n-1 means n-fold coincidence level is to be required.This is different from how coincidence is described in the data analysissoftware found online. The second (right) hex character represents the de-sired pattern of enabled/disabled channels in its bits, with 0s for disabledchannels and 1s for enabled channels. In this example, 1F means set 2-foldcoincidences with all 4 channels enabled: FH = 1111. If you wanted to dis-able channel 2 you would use 1101 = DH. If you wanted to enable three-foldcoincidences with channel 2 turned off, you would use WC 00 2D.

WC 02 64WC 03 00

Sets the value of w (gate width). Registers 2 and 3 hold the gate width set-ting in integer clock ticks (units of 24 ns). The lower 8 bits of the binarynumber representing w go in register 2, and the higher 8 bits in 3. Thus, thedesired gate width w is given as abcd and is typed as

WC 02 cdWC 03 ab

As an example, to get w = 100 clock ticks (10010 = 0064H = 0000 0000 011001002) you would type what is shown to the left.

CE Re-enables the onboard counters

DS Displays the scaler values

Interpreting Coincidence Data fromthe DAQ BoardThis example shows how to interpret thecoincidence data from the board. Assumeyou are looking for 2-fold coincidence be-tween any two of the inputs. As discussed inthe previous section, “WC 00 1F” will set upthis 2-fold coincidence. If, after some time

has past, you type “DS,” the card will returnthe scaler values for each channel as dis-cussed previously. In addition, the ‘@04’line returns the value of the 2-fold coinci-dences. This number is also in hexadecimal.The screen capture on the next page (Figure27) illustrates these commands and outputs.

Table 3. A keyboard command sequence that allows for coincidence countingvariations of the gate window and TMC delay.

Page 38: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

On-board Barometer Calibra-tionYou can measure air pressure with a ba-rometer on the DAQ board. The barometersensor must be calibrated before it can yieldpressure in units of kPa. To calibrate thesensor, you will need a real barometer (orsome way to retrieve actual pressure in thelocal area). The actual barometer reading

should be recorded every time the command“BA” is typed on the keyboard. The ‘BA’command displays a number that representsthe ADC (analog-to-digital converter) countreadout of the on-board barometer. Figure28 illustrates this command. Notice that thevalue changes each time the “BA” commandis typed due to fluctuations in local air pres-sure.

If you take actual barometer readings eachtime the ADC count is recorded (over a pe-riod of significant fluctuation in air pres-

sure), a graph similar to the one shown inFigure 29 can be produced.

Figure27. A sample terminal emulation window displaying how to set coincidencelevels and how to read this coincidence data.

RB—resets the scalers and TMC

WC 00 1F—sets up two fold coincidence between anyof the four channels

DS—displays the scalers for channels 0-3 (@00through @03), displays the number of coincidences(@04) present for above defined criteria, displays the1PPS signal (@5)

Board responds that coincidence is set as specified

Figure28. The ADC count is displayed each timethe ‘BA’ command is typed.

Page 39: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Determine the slope and y-intercept for thebest-fit line and input those values into the

board via a keyboard command and yourpressure sensor is calibrated.

Figure 29 illustrates the command sequenceused in the barometer calibration. Note thatthe reciprocal of the slope

= 2.530188.01

is what the software calls

“gain,” while the y-intercept (61.3) is whatthe software calls “baseline.”

Figure29. Calibration plot used to convert ADCcounts to air pressure in kPa.

Pressure Sensor Calibration Plot

y = 0.0188x + 61.33

97.297.497.697.8

9898.298.498.698.8

99

1900 1920 1940 1960 1980 2000 2020

ADC Counts

Air

Pre

ssu

re (

kPa)

HB is barometer help command

User types inputs ‘baseline’ and ‘gain’ from graph informat asked for (see above)

Values are stored in board.

Figure30. Command sequence used to calibrate the barometer.

Page 40: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Appendices

Appendix A: History of Card Development

After participating in the 1994 Teacher Re-search Associates Program (TRAC) at Fer-milab under the mentorship of Dane Skow,high school physics teacher Jeff Rylanderwas excited about his experience doinghigh-energy physics research and wanted tobring a real high-energy physics experimentback to his classroom. During the next year,Jeff collected the equipment needed to per-form a cosmic ray muon lifetime experimentin his class. Fermilab electrical engineerSten Hansen developed a low-cost circuitboard for the setup that served as the logicboard to analyze a single counter output andthen deliver a readable signal to a classroomcomputer. In 1996, high school students atMaine East High School in Park Ridge, Illi-nois did this muon lifetime experiment.

Independent of Rylander’s experiment, pro-jects like CROP and WALTA began sup-plying schools with NIM crates and mod-ules, on loan from Fermilab, to participantsin school-network cosmic ray detector pro-jects. The loaned equipment had a bookvalue of about $10,000 per school. Althoughmost of the modules were obsolete and nolonger in demand for current experiments,the large cost drove the need to provide avery low-cost set of front-end electronics tothese teachers. Also, off-the-shelf NIMmodules could not handle GPS timing dataand PC interfacing. Thus, while adequate fortraining teachers, these wide-area networkprojects could not begin taking real data inschools with the NIM hardware.

During 2000, Tom Jordan of Fermilabworked on the possibility of using new pro-

grammable logic and time digitizerchips—similar to ones used in Rylander’sexperiment—to put cosmic ray experimentsin the hands of QuarkNet teachers aroundthe country. At Tom’s request, Fermilab en-gineers Sten Hansen and Terry Kiper devel-oped a prototype front-end card for a simpletable-top cosmic ray demonstration detector.This “Version 1” QuarkNet board put to-gether components that were cheap, reliableand highly capable of integrating on a smallboard the discriminator, logic and scalerfunctions of NIM modules for four PMTchannels, and a universal PC interface.However, only relatively coarse (~20 ns)pulse timing information could be provided.

At the SALTA Workshop, held as part ofthe Snowmass 2001 meeting, QuarkNetjoined CROP and WALTA to plan an im-proved Version 2 board. The goals were: Nanosecond local timing. <100 nanosecond absolute timing. Reporting of all pulse edge times within

a reasonable time window. Up to 4-fold majority logic. Total cost per board under US$500.

Remarkably, these goals were quicklyachieved! A team at KEK, the Japaneseequivalent of Fermilab, had developed atime-to-digital module for the ATLAS parti-cle physics experiment using a custom-madeASIC chip called TMC (Time MeasurementCell). Samples, available at Fermilab, areused in the new board design to provide thedetailed, precise timing data needed for airshower detectors. In addition, the TMCchips allowed for time-over-threshold (TOT)

Page 41: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

estimates of pulse area. University ofWashington engineer Hans Berns designedand implemented an on-board system to in-tegrate data from a very low-cost (US$100)GPS receiver module. This provided the fi-nal piece of missing functionality. The Fer-milab team revised the board and its firm-ware to better encompass the needs of airshower experiments. Team members fromboth Seattle and Lincoln worked on user-friendly LabView® interfaces for the boards,as well as black-box production specimensof the Version 2 DAQ software for standardtasks. After lab-testing prototypes, Quark-

Net, CROP and WALTA distributed in thesummer of 2003.

Currently, Fermilab is helping to produceseveral hundred DAQ boards and PMTbases for distribution to QuarkNet teachersaround the country. A software developmentteam is developing the web interface usingGrid computing tools and techniques to al-low cosmic ray data networks nationwide.Now students across the country are able tocollaborate as they perform real HEP ex-periments.

Page 42: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Appendix B: PMT Base and DAQ v2 Board SchematicDiagrams

Page 43: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Page 44: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Appendix C: Terminal Emulator Setup

HyperterminalHyperterminal, a terminal emulation pro-gram, often comes with a Windows-basedPC or can be downloaded from the Internet.Hyperterminal allows the PC’s monitor todisplay the data that is sent from the DAQboard to the PC’s serial port or USB port.

Once this program is opened, a window ap-pears that asks for a name for the connection

that you are making. Enter a convenientname so that in the future you will not haveto go through the initial setup routine eachtime you want to establish a connection.

Once you select “OK,” the window shownin Figure 31 appears. You need to select theCOM port that the DAQ board is connectedto on the back of your computer.

You need to change two settings from theirdefault values on the next screen. Thesemodifications are shown in Figure 32.

Once these settings have been made, selectthe “Capture Text” _ “Start Capture” com-mand from the “Transfer” menu. A windowappears in which you type a name for thetext file to which the datastream will be

written. Once a file name and folder for thatfile have been selected, the “Start” buttonbegins the process of writing data to the textfile. As long as the connection is open, datais written to the file. This text file containsdata for later analysis. To stop writing datato the file, select “Capture Text” _ “StopCapture.” The connection may be closed,and the text file is ready for analysis.

Choose the COM port that the DAQboard is plugged into on the back ofyour computer (Serial port is COM1and USB is COM3 for this computer.)COM3, the USB port, is selected here.

Figure 30. This window illustrates where the COM port selection is madewhich tells the computer to which port the DAQ board is connected.

Page 45: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

ZtermZterm is a terminal emulation program thatcan be downloaded and used on either a Macor Windows-based PC. This program allowsthe computer to display the data that is sentfrom the DAQ readout board to the com-puter’s serial port or USB port.

Once this program is installed and openedon your machine, the computer should autodetect the port your DAQ board is connected

to. If this is in question, you can hold downthe shift button while Zterm is opening. Thisopens a window showing all possible de-vices that are connected. You can select theUSB device or serial port connection.

Select the “Settings” _ “Connection” menus.The window shown in Figure 33 appears.You need to change two values from the de-fault settings: Data Rate = 192000 bits/secand Flow Control = Xon/Xoff.

Figure 32. Where baud rate and flow control settings are modified forproper reading of the DAQ datastream with Hyperterminal.

This window will appearcorresponding to the prop-erties of the COM port se-lected.

Change this to 19200 b/s.

Change this to Xon/Xoff.

The rest of the settingskeep the default values.

Page 46: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Once the settings have been made, select the“Start Capture” command from the “File”menu. A window appears in which you typea name for the text file to which thedatastream will be written. Once a file nameand folder for that file have been selected,the “Start” button begins the process ofwriting data to the text file. As long as theconnection is in place, data is continuallywritten to the file. This text file containsdata to be analyzed. To stop writing the datato the text file, select “Hang Up” from the“Dial” menu or just quit Zterm. The con-nection is closed, and the text file is readyfor analysis.

UnixA simple Shell script allows the incomingdatastream to be written to file on a Unixsystem. The script is very short and can bedownloaded from the QuarkNet website.

You will be prompted to give a name anddirectory for the file to be written to and thelength of time for the run. This programdoes not allow you to see the data on themonitor, however. Hyperterminal, Zterm, orsome other terminal emulation program canbe installed in order to view the datastreamon the monitor.

Figure33. Where baud rate and flow control settings are modifiedfor proper reading of the DAQ datastream with Zterm.

Change these two settingsto the values shown.

Page 47: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Appendix D: Precise Event Time CalculationAlgorithm

Example CalculationThe following two simultaneous events wererecorded by two boards triggered by apulser. One was captured on a laptop and

one on a PC. For the purpose of discussingthe data format, each column is labeled witha letter. The lines are split in half for read-ability.

A B C D E F G H ITrigger Count RE0 FE0 RE1 FE1 RE2 FE2 RE3 FE3

Laptop 1BB7FB6A B7 01 37 01 00 01 00 011BB7FB6D 01 24 01 24 00 01 00 01

PC 1BB7FB52 B5 01 35 01 00 01 00 011BB7FB55 01 21 01 21 00 01 00 01

J K L M N O P1PPS Count Time

(GMT)Date Valid? # Satellites Error Bits Correction

Laptop 1B1F27A0 210727.727

110603 A 06 A +0096

1B1F27A0 210727.727

110603 A 06 8 +0096

PC 1B1F2787 210727.372

110603 A 06 A +0450

1B1F2787 210727.372

110603 A 06 8 +0450

Table 4. Example event data from PC and laptop used to illustrate how to cal-culate precise event times.

Page 48: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Column A is the clock value at which thetriggers came. Columns B through I con-tain timing information in fractions of aclock period. Each input has data for therising edge (RE) and falling edge (FE) of thepulse for each channel. Column J is theclock value at which the 1PPS arrived. Col-umn K is the time and L the date at whichthe 1PPS arrived. This value must be cor-rected by Column P and rounded to the nextsecond. Column M is “A” when the GPSdata in a row is valid and “V” when it is in-valid. Column N is the number of satellitesthe receiver is using. O is four error bits,each of which indicates the trigger IRQstatus. Bit 0 indicates that the 1PPS interruptis pending, bit 1 that the trigger interrupt ispending, bit 2 that the GPS data could becorrupt (write in progress during readout),

and bit 3 that the current or last 1PPS pulsewas not within 41666666 ± 50 clock ticks.To calculate the absolute time of the 1PPS,we must add K to P and round to the nearestinteger second, first converting to secondsafter midnight. Separate K into hours, min-utes, seconds, and milliseconds. Multiply by3600 for hours and 60 for minutes.

PPSm TP

KRound 1sec

sec 1000=

+ .

To calculate the relative time between theinput pulses you must understand the edgedata represented in columns B through I.Each column contains a tag bit (bit 5) to in-dicate whether the column contains data.Bits 0-4 are the data. Bit 6 is always 0. Bit 7of column B only indicates whether a newtrigger is contained in the line; for columnsC through I bit 7 is always 0. See bit map.

7 6 5 4 3 2 1 00 (Trig tag for RE0) 0 Channel Tag Data Data Data Data Data

Bit 7 of Column B indicates a new trigger.To calculate the time of each trigger, therelative time between the 1PPS and the trig-ger must be found. This can be calculated bysubtracting the counts in Column J fromthose in A (first converting to decimal).

clkTJA Δ=− . The data from columns B

through I may be added but give superfluousprecision (for small data sets) given the1PPS is measured only in integer clock peri-ods. To calculate the absolute time of col-umn A, convert clkTΔ to seconds (multiply

by the reciprocal of the clock frequency),

sec

1T

fT

clkclk Δ=

Δ , and add to PPST1 . Thus

the absolute time of the trigger is:

absPPS TTT =Δ+1 . The long form is:

( )abs

clk

m TfJAP

KRound =−

+

+1000

secsec . In this

case the triggers happen at the followingtimes in seconds after midnight:

PC:( )

7658276048.240341666667

455026567-465042258

1000

450372.76047 =+

+= RoundTabs sec

after midnight

Table 5. Bit map for columns B through I for event data shown in Table 4 above.

Page 49: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Laptop:( )

7655876048.240341666667

455026592-465042282

1000

0096727.76047 =+

+= RoundTabs sec

after midnight

The difference between the two times in thisexample is the length of one clock period.This is to be expected because the clock pe-riod is the limit of the resolution of the trig-gers. By writing a program to examine thefiles containing readout data, you can easily

check the time difference for each event. Forthese data, the time differs no more than 2clock periods verifying that the GPS datacan be used in correlating data betweenQuarknet DAQ v2 cards.

Page 50: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Appendix E: Details of Time Coincidence and DataHandling

This appendix explains the operation of thecard’s time coincidence and data handling ata deeper level. To keep the cost low, theproject engineers created a very cleverscheme for handling the tasks needed withminimal resources. Of course, “clever” alsomeans “not simple.” For this reason, the wayin which triggering is handled differs insome details from what one might expect forsimple modular fast electronics like NIMcoincidence units. The card handles coinci-dences as described below.

Descriptions of Gate Windowand TMC DelayWe define two parameters, which you canset:1. w = Gate Window: Just like the “width”

setting in a NIM module, the gate win-dow determines how close togetherpulses must be to cause the card to trig-ger. Note: In digital electronics, the term“gate” means a signal used to enable(“open the gate for”) passage of othersignals or data.

2. d = TMC Delay: This quantity deter-mines which pulse edges get read outinto the datastream when a trigger occursby delaying this information until thetrigger actually happens.

Both w and d are measured in units of 24nanoseconds, the internal clock tick interval.

Consider the actual physical quantities andrelate them to the two parameters listedabove. TTRG: This quantity is the maximum

time window during which real physics

processes that we want to study mightcause a trigger. In other words, if we setthe card for 2-fold coincidences and onechannel gets a signal at t = 0, at least oneother channel must show a signal beforet = TTRG or you lose detailed informationabout that pair of pulses. The examplesbelow may help.

TWIDTH: This quantity is the durationafter the first pulse in a trigger duringwhich we want to record all rising andfalling edge times. The channel in whichthese extra pulses occur does not matter;all of them are saved.

Set the values of w and d as follows: Set d > TTRG, but no smaller than two

clock ticks. Set w > TWIDTH + d – 1.

Whenever an above-threshold voltage isdetected on any channel, that channel turnson an internal trigger bit for w clock ticks (wx 24 ns). At the end of that time the internaltrigger bit is reset to zero.

The card’s startup default setting is for 1-fold coincidence, which means ittriggers on singles: any above-threshold sig-nal on any channel produces output data.Unless your PMTs are extremely quiet, ac-tually triggering on singles will quicklyoverwhelm the card.

When the card is set for 2-fold coincidences,a trigger is declared any time that two ormore channels' trigger bits are “1” simulta-neously. If the card is set for 3-fold coinci-dence, then it requires three channels with

Page 51: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

their bits set simultaneously, and similarlyfor 4-fold.

The trigger bits must overlap by at least one24 ns clock tick to activate a trigger. If onechannel's bit drops and another rises, notrigger occurs. Also, the trigger is active forexactly the overlap period. The card has aTRG output that goes high when a triggeroccurs. You can watch this on the oscillo-scope and see its duration change as the sig-nals are closer or further apart.

The TMC delay d is very different than thealmost-just-like-NIM coincidence describedabove. The reason for this is that we want todo more than count triggers; we also want torecord all the edges that contributed to agiven trigger. It is hard to program the cir-cuits inside the board to look back in time tothe first pulse that contributed to the triggerwhen the second pulse might have arrived asignificant amount of time later. (It was alsohard to make the old NIM modules do this.)Instead, we separate the part that generatesthe trigger from the part that reads out thetiming information and then we delay thisdetailed timing information so that it is readout after the trigger is generated. The cardneeds to save only information that happenswhen the gates overlap.

Consider the card’s startup default settings,d = 6 and w = 10. Imagine a physics eventwhere one pulse arrives three clock ticksafter another. The trigger will occur whenthe second pulse arrives—three clock ticksafter the first. At this point, the card detectstrigger bit overlap, and the TRG output goeshigh. Internally, however, pulse edge timeinformation is delayed six clock ticks (d =6), so the information about that first pulseis available after just three more clock ticks(the trigger is still on). The informationabout the second pulse arrives after anotherthree ticks. (Again, the trigger is still on.)

Because both edges appear when the triggeris on, they appear in the datastream sent tothe computer.

Examples of Event TimingDiagramsBelow are four examples of event timingdiagrams showing 2-fold coincidences, withd = 6, w = 10. In each case, pulses of width2 clock ticks (48 ns) arrive at inputs 0 and 1,but with different time separations in eachexample. The timing diagrams show the dis-criminator output, the channel trigger gate,and the TMC output after delay d, for eachchannel, plus the coincidence trigger gate,and the edge time information obtained fromthe TMC upon readout.

Example AThe signal in channel 1 arrives 2 clock ticks(48 ns) after the signal in channel 0. Figure34 illustrates that the trigger gate is 8 tickslong (overlap time of the two 10-tick chan-nel gates). All edges get reported.

Example BThe signal in channel 1 arrives 3 clock ticks(72 ns) after the signal in channel 0. In thiscase, the trailing edge of the delayed TMCsignal for channel 1 lies outside the cardtrigger gate (overlap time of the individual

Figure34. Signal and gate timing diagram for Example A.

Page 52: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

channel gates), so only its leading edge isreported. This is illustrated in Figure 35.

Example C (Figure 36)The signal in channel 1 arrives 5 clock ticks(120 ns) after the signal in channel 0. Notethat the delay value is 6 clock ticks (144 ns).In this case, both edges of the signal onchannel 1 lie outside the trigger (overlap)window and are not reported. If your physicsapplication involves simply counting trig-gers (as in a muon telescope), this does notpresent a problem. However, if you areanalyzing edge time data, as in a muon de-cay or air shower experiment, this wouldappear to be a 1-fold event! If this situationrepresented a real physics process youwanted to study, you would need to lengthenthe values of d and w to accept all the edgesin this event. If this is not done, this lookslike a random background event that you

have to eliminate or ignore when you ana-lyze the data.

The next example is an actual event re-corded by the DAQ card, on Aug. 8, 2003,with a mini-array of 4 counters. In this ex-ample, the card was set with d = 6, w = 10(the default startup values), and for 2-fold orgreater coincidence level. (The interpreta-tion of the data words for this event can befound in Appendix F.)

Example D (Figure 37)Notice the datastream had 5 lines of data forthis single event.

80EE0049 80 01 00 01 38 01 3C 01 7EB7491F 202133.242 080803 A 04 2 -038980EE004A 24 3D 25 01 00 01 00 01 7EB7491F 202133.242 080803 A 04 2 -038980EE004B 21 01 00 23 00 01 00 01 7EB7491F 202133.242 080803 A 04 2 -038980EE004C 01 2A 00 01 00 01 00 01 7EB7491F 202133.242 080803 A 04 2 -038980EE004D 00 01 00 01 00 39 32 2F 81331170 202133.242 080803 A 04 2 +0610

Figure37. A sample event containing five lines of data. Each line is comprisedof the same 16 word format with each word separated by a space.

Figure 35. Signal and gate timing diagram forExample B.

Figure36. Signal and gate timing diagram forExample C.

Page 53: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

The pulse timing diagram, Figure 38, showsthe four PMT channels’ trigger bits as afunction of time in nanoseconds. (Remem-ber, channels are numbered 0 through 3).Pulse edge times are recorded with 0.75 nsprecision. Recall, however, that the triggerlogic works in time bins of 24 ns.

Figure 39 shows the channel trigger bits as afunction of time, in units of 24 ns.

The following sequence of events occurs:1. The first pulse arrives on channel 2 at t =

1 (in units of 24 ns). Trigger gate 2 is setfor 10 ticks. The TMC records thepulse’s leading edge at 18 ns relative tothe last 24ns clock tick.

2. Three nanoseconds later, a pulse arriveson channel 3. Trigger gate 3 is set for 10ticks. The TMC records this pulse’sleading edge at 21 ns.

3. Trigger gates 2 and 3 are set simultane-ously, so a trigger gate (TRG) is as-serted. If no further signals arrived, the

trigger would stay on for ten 24ns timebins (240 ns) since the signals on chan-nels 2 and 3 arrived inside the sameclock tick.

4. In 24ns time bin 2, pulses arrive inchannels 0 and 1, setting their triggergates for 10 ticks. Thus, the 2-fold coin-cidence requirement is met continuouslyfrom time bin 1 until time bin 11, a totalof 11 clock ticks or 264 ns (shaded areain Figure 39).

5. At the end of this interval the triggergates for all channels are down, so theTRG gate is dropped. The pulse edgetimes stored during the time the triggerwas on are read out of the TMC chip andreported.

6. Only edges that are within the triggerinterval after they have been delayed by6 ticks are put into the datastream. Thus,all the pulses in Figure 36 are recorded,but the second falling edge of channel 3(which is off the figure to the right) willfall outside the shaded area in Figure 38and will not be recorded.

Note: The actual values encoded in thedatastream represent the delayed times. If itis vital to get the actual time for each edge,then each of them actually arrived d x 24 nsearlier than the time given in the data record.Usually only relative timing matters, andthis kind of accuracy is not necessary.

Figure 38. Discriminator output timingdiagram for Example D.

Figure 39. Channel gate timing diagram(card trigger interval is shaded) for Ex-ample D.

Page 54: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Appendix F: Acronym and Jargon Dictionary

Acronym orTerm

Description

1 PPS One Pulse Per Second. GPS signal used for precise time synchronization.

AC Alternating Current.

ASCII American Standard Code for Information Interchange. Numeric code fortext files.

ASIC Application-Specific Integrated Circuit. A custom-made chip, like theTMC chip used in the DAQ board.

ATLAS A Toroidal LHC ApparatuS. A large international collaborative experi-ment at the Large Hadron Collider (LHC) at CERN Laboratory in Swit-zerland. < http://atlas.web.cern.ch/ >

Binary Base 2 number system with only 2 digits: 0 and 1. For example, thedecimal numbers 1, 2, 3, and 4 are written 1, 10, 11, and 100 respectivelyin binary notation. To distinquish a binary number from a decimal (base10) number, a subscript “2” follows the number: 1002 is the same as 410.

Bit Binary Digit. Component of a number expressed in the binary systemusing only 0s and 1s.

Byte A block of four binary bits which can store one ASCII character. Also, aunit of capacity for computer storage devices (hard drives, memorychips, etc.).

BNC Either Bayonet/Neill-Concelman (the inventors of the BNC connector),or Berkeley Nucleonics Corporation (opinions differ). The name for acommonly used connector for coaxial cable.

Coincidence In high-energy and nuclear physics, a set of events that occur “simulta-neously” (i.e. within some small period of time.) For example, “3-foldcoincidence” means particles are detected simultaneously in three sepa-rate detectors.

Counter The detector element in high-energy physics experiments. Refers to thescintillator, light guide, photomultiplier tube (PMT) and base assembly.

CPLD Complex Programmable Logic Device. A general-purpose integrated cir-cuit chip which can be used in many ways, as programmed by the user.

CPU Central Processing Unit. The “heart” of a computer.

CROP Cosmic Ray Observation Project. Nebraska-based project to study largescale cosmic ray showers.< http://physics.unl.edu/~gsnow/crop/crop.html >

DAQ Data Acquistion.

DB9 Serial Communications D-shell connector with 9 pins. Used on the GPSdevice.

DC Direct Current.

Page 55: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

Discriminator In high-energy and nuclear physics, an electronic circuit that produces anoutput pulse only when its input voltage exceeds a selected (threshold)level.

DOE United State Department of Energy. < http://www.doe.gov/ >

Event In high-energy and nuclear physics, a coincident pattern of detected par-ticles that is likely to be of interest, and should be recorded. (Derivedfrom the use of the same term in special relativity: an occurrence at aparticular point in space and time.)

FIFO First In, First Out. A type of memory buffer where data is taken out inthe same order as it is put in.

FNAL Fermi National Accelerator Laboratory. Also known as Fermilab.< http://www.fnal.gov >

FPGA Field-Programmable Logic Array. One variety of CPLD.

Gate In digital electronics, a signal that enables another signal to be transmit-ted. The digital equivalent to a toggle switch.

GPS Global Positioning System. < http://tycho.usno.navy.mil/gps.html >

HEP High-energy physics. The branch of physics that studies the nature andbehavior of high-energy particles.

Hex Hexadecimal. A number system with base 16. Use the characters 0-9 andA-F to represent numbers with decimal values of 0-15. Widely used incomputers, since one hex digit represents 4 binary bits. Data storage in‘bytes’ of 4 bits or multiples of 4 (8, 16, 32, etc.) is very common. Ex-ample: A37FH = 4185510 = 1010 0011 0111 11112. The subscript ‘H’ de-notes a hex number.

HV High Voltage

KEK Koh-Enerhughi-Ken-Kyu-Sho. A high-energy accelerator research orga-nization in Tsukuba, Japan. The Japanese equivalent to Fermilab.< http://www.kek.jp/intra.html >

LED Light-Emitting Diode

LEMO (Company name) Miniature coax cable connectors—serve the samefunction as BNCs.

MCU Micro Controller Unit. (See also “CPU.”)

NIM Nuclear Instrument Module. A standard for interchangeable nuclearphysics electronic modules dating back to the 1950s.

NMEA National Marine Electronics Association. Commonly used data specifi-cation with navigation instruments, e.g., GPS receivers.

ns Nanosecond = 1 billionth (10-9) of a second.

NSF National Science Foundation. < http://www.nsf.gov/ >

Op-Amp Operational Amplifier. An integrated circuit element that amplifies a sig-nal. Op-amps are the building blocks of many kinds of digital circuits.

PC Personal Computer. A generic term that covers Windows, Mac, or Linux-based computers.

Page 56: Det User Thin

Classroom Cosmic Ray Detector User’s Manual

based computers.

PMT Photo Multiplier Tube. Vacuum tube that converts extremely low lightlevels (down to single photons) into electrical signals.

QuarkNet National science outreach program funded by NSF and DOE.< http://quarknet.fnal.gov >

RS-232 Recommended Standard 232. A connector commonly used for computerserial interfaces.

SALTA Snowmass Area Large-scale Time-coincidence Array.< http://faculty.washington.edu/~wilkes/salta/ >

Scaler Pulse counter.

TDC Time-to-Digital Converter.

TMC Time Memory Cell. Name of the specific TDC chip used in the DAQboard. < http://research.kek.jp/people/araiy/TEG3/teg3.html >

TOT Time Over Threshold.

TRG Trigger. In high-energy and nuclear physics, the digital signal that indi-cates an event of interest has occurred and data should be logged.

UNL University of Nebraska, Lincoln.

USB Universal Serial Bus.

UTC Universal Time Coordinated. Formerly known as Greenwich Mean Time(GMT).

UW University of Washington, Seattle.

VAC Volts of Alternating Current system. Most US appliances use 110 VAC.

VDC Volts of Direct Current system. The DAQ board used 5VDC.

WALTA Washington Large-scale Time-coincidence Array.< http://www.phys.washington.edu/~walta >