From d49e9840d044270c9899b6da4b80a92f319d6ad5 Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Fri, 28 Oct 2011 19:38:06 -0600 Subject: [PATCH] Add WWVB page --- in/images/wwvb-capture.png | Bin 0 -> 4332 bytes in/wwvb.md | 87 +++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 in/images/wwvb-capture.png create mode 100644 in/wwvb.md diff --git a/in/images/wwvb-capture.png b/in/images/wwvb-capture.png new file mode 100644 index 0000000000000000000000000000000000000000..eb42bf624d33b4bc0535c0e32a8b89f2ad2bd62a GIT binary patch literal 4332 zcmbtYc{r5q+a9vaSTe@GWNDCHn6ky&L)Ijr$i5^~vV<^$md98ludE}(h$d}AMP<)Y zNHJcrlL#YO(jZ&DXS~Pv^;?ePJC5)B{d3O!+{bgD_jO(8eO>qUOp>jQIWLzu7YqjD zwX`^92ZOPUL*uV-RtQ&|S&%Ro^10|-lkdjRVjI1u3 z@qqLGn@I$!_CxuW|(}j$+=mVJ&10`chd_+v1LChm}xx0dtLr$l`CdeI09j9<+&? zMjkX`sETF&n>APUJ0i8i@YC`}ZA_JgK-l!$2j2N@fZJoOvfXBo_q?bztuyt!Uw;xg z)X0IOs%r&~?~(0}Bm4+IkZ%H>Q4cFQT(<_wuI@mbi;Ih`lM&Ys$JCU&6+E=kR;1If z*-KMwwrEYs`gd=BaP63y+1#rgxoEm^3rr&4Y?Wj1+L%I4afWF5{yKTy=L`*^ z(g#ivbR0XIOx8dtWEVXsb21@ZztW`P|8>&tQ&XJGR6 zJ>Ic$?I)kY=>yyABrHZeHN2LzA3HVCJGb(9_?|1nq55Gf`O!^keu6xa_hkQ*>ikf6 z9(DLifRXC#G9j${Q0NWvBYOpUHhq&U*5XwDqg;;LrJ3I+HC=Qs@UpS(mqL6CNFouR z06a;|spio{BUQv}1wX{b3jXk>ibHr&m3+&et`f~d&vgfsP~L4kW&O`L`5BBY|BVD# zX91Z-a6_2!&EsTiLFQ$Q1;lT3#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!DFjT%$Jz+T

!+_~NYG4v$O&bK*UVsLXQrFb9EQ}I^*R`89$dAc>AQP@UJ z2D3rB18rdm?o15nm%o+&(X{_g9z_%~-r0e+(ZHLvXZzA!yx{{2CmDJJ?m7GXixRTR z&!(8mgiOjBm-E$UjC&}Z zELK?q@Vx9xaD2vBorkZ*f{VEV-uF#X{|neLt+xOG literal 0 HcmV?d00001 diff --git a/in/wwvb.md b/in/wwvb.md new file mode 100644 index 0000000..e7d92f6 --- /dev/null +++ b/in/wwvb.md @@ -0,0 +1,87 @@ +title: WWVB +linktitle: wwvb +parent: Home +ctime: 2011-10-28 + +Repositories: SOON + +TMI uses a WWVB receiver in its RWS product. +[WWVB](http://www.nist.gov/pml/div688/grp40/wwvb.cfm) is a radio station +operated out of Ft. Collins, CO by NIST, which provides a 60Hz carrier wave on +which is encoded the current time as synchronized with a pair of on-site atomic +oscillators. The low frequency of the WWVB broadcast means it is available +through most of North America. Perhaps you have heard of *Atomic Clock* radios. +These simply incorporate a WWVB receiver which is then used to automatically +set, and periodically compensate, the radio's internal real time clock +circuitry. + +TMI's RWS (Remote Weather Station) project collects weather data completely +autonomously, time-stamping recorded data using its onboard RTC. The WWVB +broadcast is used to both initially set the RTC, and to periodically compensate +for its drift over time. + +TMI chose to incorporate the C-MAX +[CMMR-6](http://www.c-max-time.com/products/showProduct.php?id=31) WWVB receiver +into its RWS design. This simple board requires very little power, and the fact +that the WWVB receiver need only be consulted occasionally to compensate for RTC +drift means its time averaged power consumption is very low. The CMMR-6 offers +a simple output, TCO, treated as a digital signal. TCO is logic high when the +WWVB carrier is transmitting at full power, and is logic low when the WWVB +carrier is transmitting at reduced power. Each second uses a variable period in +which the carrier is at reduced power to encode one of three values: a 0 bit, a +1 bit, and a frame marker. 60 of these tri-state bits form a time frame +containing the time, to the minute, during the current frame transmission. More +about the WWVB signal format is available +[here](http://tf.nist.gov/stations/wwvbtimecode.htm). + +While the [WWVB time code format](http://tf.nist.gov/stations/wwvbtimecode.htm) +is easy to parse, this is not so true in the presense of noise. TMI has chosen +to address noise by implementing a digital 4th order Butterworth filter, using a +32Hz sample rate and a 3 Hz cutoff frequency. The filter inputs are either 0.0 +and 1.0, sampled from the CMMR-6 TCO pin, and the filter output is some fraction +inclusive of the range 0.0 through 1.0. The microprocessor code implements +hysteresis to generate a digital output, where outputs >= 0.7 are treated as +logic 1, outputs <= 0.3 are logic zero, and any value in between these +thresholds leave the logic output unchanged. This filter, implemented within +the uC, requires up to 5% of the CPU while WWVB is in operation, but does a +stellar job at cleaning up the WWVB signal. To evaluate filters and generate +their implementation logic, we used the simple and easy to use +[Fiview](http://www.uazu.net/fiview) design tool. + +Consider the following oscilliscope capture of live WWVB reception. TCO is the +output from the CMMR, and FOUT is the output from the digital filter. Note that +the filter delays the signal by approximately 200 ms. + +![Oscilloscope capture image](images/wwvb-capture.png) + +As mentioned earlier, the duration of the low period indicates the bit type. +200 ms for bit 0, 500 ms for bit 1, and 800 ms for a frame mark. As can be seen +in the TCO trace, there is a significant amount of relatively high frequency +noise interfering with the TCO signal. A discrete algorithm would likely be +unreliable in decoding TCO. However, the filtered output, FOUT, successfully +removed all the noise with minimal signal distortion. A discrete algorithm can +parse FOUT with a high degree of reliability. In this case, the trace as +decoded -- 0 0 1 0 M 0 0 1 1 -- was the correct sequence for the captured frame. + +The decode algorithm determines a bit value for the current low period duration +that is best matched by the expected durations. But the low pass filter cannot +remote all sources of error, so a frame may be received with bits in error. +Frames are validated according to the [WWVB time code +format](http://tf.nist.gov/stations/wwvbtimecode.htm), and two frames must have +matching data to consider a valid time acquisition. Of course in this sense, +matching frames do not have the exact same values, but the second frame's +contents differ from the first frame's only by the number of minutes separating +their acquisition. + +There are still a few enhancements possible in this design. First, the TCO +signal could be captured via an ADC, to bring additional information on each +bit into the filter. This, however, might require some software gain control +depending upon how good the CMMR-6 AGC circuitry is, and may not be worth the +effort. + +The second enhancement is one that will be implemented. Instead of matching two +complete frames to indicate valid aquisition, instead match complete frame +sections. Three incoming frames all with errors in different sections would +allow this latter approach to construct a known good frame, where the current +algorithm could not. In very noisy cases, this enhancement should perform +better. -- 2.39.2