[{"element_type":"image_url","content":"https://github.com/emmby/WatchTower/raw/main/docs/ezgif-2a44364473c432.gif","metadata":{"alt":"The Watch Tower","caption":""}},{"element_type":"markdown","content":"\u003cp\u003eThere are some beautiful radio-controlled watches available these days from Citizen, Seiko, Junghans, and even Casio. These timepieces don’t need fiddling every other month, which is great if you have more than one or two and can never remember what comes after “thirty days hath September…”\u003c/p\u003e\n\n\u003cp\u003eIn the US, these watches work by receiving a 60-bit 1-Hz signal on a 60-kHz carrier wave broadcast from Fort Collins, Colorado called \u003ca href=\"https://en.wikipedia.org/wiki/WWVB\"\u003eWWVB\u003c/a\u003e. The broadcast is quite strong and generally covers the entire continental US, but some areas of the country can have unreliable reception. I live in the SF Bay Area in an area with high RF noise and my reception can be spotty. My watches sync often enough that it’s not an issue 363 days out of the year, but sometimes they can miss DST shifts for a day or two. The east coast is known to be even more challenging.\u003c/p\u003e\n\n\u003cp\u003eWouldn’t it be great if anyone could set up a little repeater to transmit the time so their watches were always in sync?\u003c/p\u003e\n\n\u003cp\u003eWWVB has been around awhile and there have been various other projects (\u003ca href=\"https://www.instructables.com/WWVB-radio-time-signal-generator-for-ATTINY45-or-A/\"\u003e1\u003c/a\u003e,\u003ca href=\"https://github.com/anishathalye/micro-wwvb\"\u003e2\u003c/a\u003e) that have demonstrated the feasibility of making your own WWVB transmitter. But these all had very limited range. I wanted to build something that could cover my whole watch stand and be based on a more familiar toolset for the typical hobbyist, namely USB-based 32-bit microcontroller development boards, WiFi, and Arduino. My goal was to make something approachable, reliable, and attractive enough it could sit with my watch collection.\u003c/p\u003e\n","metadata":{"markdown":"There are some beautiful radio-controlled watches available these days from Citizen, Seiko, Junghans, and even Casio. These timepieces don’t need fiddling every other month, which is great if you have more than one or two and can never remember what comes after “thirty days hath September…”\n\nIn the US, these watches work by receiving a 60-bit 1-Hz signal on a 60-kHz carrier wave broadcast from Fort Collins, Colorado called [WWVB](https://en.wikipedia.org/wiki/WWVB). The broadcast is quite strong and generally covers the entire continental US, but some areas of the country can have unreliable reception. I live in the SF Bay Area in an area with high RF noise and my reception can be spotty. My watches sync often enough that it’s not an issue 363 days out of the year, but sometimes they can miss DST shifts for a day or two. The east coast is known to be even more challenging.\n\nWouldn’t it be great if anyone could set up a little repeater to transmit the time so their watches were always in sync?\n\nWWVB has been around awhile and there have been various other projects ([1](https://www.instructables.com/WWVB-radio-time-signal-generator-for-ATTINY45-or-A/),[2](https://github.com/anishathalye/micro-wwvb)) that have demonstrated the feasibility of making your own WWVB transmitter. But these all had very limited range. I wanted to build something that could cover my whole watch stand and be based on a more familiar toolset for the typical hobbyist, namely USB-based 32-bit microcontroller development boards, WiFi, and Arduino. My goal was to make something approachable, reliable, and attractive enough it could sit with my watch collection.\n\n"}},{"element_type":"markdown","content":"\u003ch2\u003eIs this legal?\u003c/h2\u003e\n\n\u003cp\u003eThe FCC requires a license to transmit, but has an \u003ca href=\"https://www.law.cornell.edu/cfr/text/47/15.209\"\u003eexemption\u003c/a\u003e for 60 kHz transmitters as long as the field strength is under 40 μV/m40 \u003cem\u003eμ\u003c/em\u003eV/m at 300 meters. You will definitely not exceed this limit 💪🏼\u003c/p\u003e\n","metadata":{"markdown":"## Is this legal?\n\nThe FCC requires a license to transmit, but has an [exemption](https://www.law.cornell.edu/cfr/text/47/15.209) for 60 kHz transmitters as long as the field strength is under 40 μV/m40 *μ*V/m at 300 meters. You will definitely not exceed this limit 💪🏼\n"}},{"element_type":"markdown","content":"\u003ch2\u003eAbout WWVB\u003c/h2\u003e\n\n\u003cp\u003eThe classic WWVB transmits one bit of information per second (1Hz) and takes one minute (60 bits) to transmit a full time and date frame.\u003c/p\u003e\n\n\u003ch3\u003eAn example\u003c/h3\u003e\n\n\u003cp\u003eHere’s an example of one 60 second time encoding:\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/image%201.png\" alt=\"image.png\"\u003e\u003c/p\u003e\n\n\u003cp\u003eYou can see that the minute of the time is encoded in the first 10 seconds of the window. The hour is in the next 10 seconds, the day is between seconds 22 and 33, etc.\u003c/p\u003e\n\n\u003cp\u003eIf we wanted to indicate that the time was 30 minutes past the hour, for example, we would set bits 2 and 3 (20 and 10) to “high”. \u003c/p\u003e\n\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003cth\u003e\u003cstrong\u003eBit\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003e00\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003e01\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003e02\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003e03\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003e04\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003e05\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003e06\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003e07\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003e08\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003e09\u003c/strong\u003e\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eValue\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e40\u003c/td\u003e\n\u003ctd\u003e20\u003c/td\u003e\n\u003ctd\u003e10\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e8\u003c/td\u003e\n\u003ctd\u003e4\u003c/td\u003e\n\u003ctd\u003e2\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cem\u003eExample: 30\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cem\u003e0\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cem\u003e1\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cem\u003e1\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cem\u003e0\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cem\u003e0\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cem\u003e0\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cem\u003e0\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003cp\u003eSimilarly, the 7th hour of the day would be 0000111 for bits 12 thru 18.\u003c/p\u003e\n\n\u003ch3\u003eIt’s a trit, not a bit.\u003c/h3\u003e\n\n\u003cp\u003eHow do we represent “high” and “low” for each 1s bit? You might think it would just be a high voltage for high and a low voltage for low, like you would use on a digital arduino pin, but that’s not how it’s done.\u003c/p\u003e\n\n\u003cp\u003eWWVB “bits” are actually not just 0 and 1. They’re actually \"trits” because they can represent a 0, 1, or a “mark”, and this is one reason why we can’t just use a simple high/low to represent them. The mark is important to allow simple receivers to orient themselves within the signal window. Your watch knows that the last second in the window and the first in the next window are both “marks”, and so it knows to start a new window whenever it sees two marks in a row.\u003c/p\u003e\n\n\u003cp\u003eWWVB uses \u003cstrong\u003ePulse Width Modulation\u003c/strong\u003e (PWM) to represent the three possible trit states. In a given 1 second bit, the width of the pulse determines whether the bit is a 0, 1, or mark.\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eIf power is reduced for one-fifth of a second (0.2 s), this is a data bit with value zero.\u003c/li\u003e\n\u003cli\u003eIf power is reduced for one-half of a second (0.5 s), this is a data bit with value one.\u003c/li\u003e\n\u003cli\u003eIf power is reduced for four-fifths of a second (0.8 s), this is a special non-data \"mark\", used for framing.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003cth\u003e\u003cstrong\u003eHigh\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003eTrit value\u003c/strong\u003e\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e0.2s\u003c/td\u003e\n\u003ctd\u003e0\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e0.5s\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e0.8s\u003c/td\u003e\n\u003ctd\u003emark\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003cp\u003eComing back to that original example but just focusing on the Minutes section, you can see the trits in the color encoding of the diagram. \u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/image%202.png\" alt=\"image.png\"\u003e\u003c/p\u003e\n\n\u003cp\u003eLight blue is high and dark blue is low. You can see second 00 is dark blue (low) for 0.8s, which means it’s a “mark”.  Second 01 is dark blue for 0.2s, so it’s a 0. Second 02 is dark blue for 0.5s so it’s a 1, and so on.\u003c/p\u003e\n\n\u003cp\u003eSo now you know how to encode the time and date using WWVB!\u003c/p\u003e\n\n\u003ch3\u003eThe carrier wave\u003c/h3\u003e\n\n\u003cp\u003eThere’s one more part of the signal that needs explanation. While we’re transmitting bits at a frequency of 1 bit per second (1 Hz), we’re actually doing it on top of a 60 kHz carrier wave. The carrier wave isn’t particularly important to the actual encoding of the bits, but it is important because that’s the frequency that’s been allocated for WWVB use and so your watch is looking for a 60 kHz signal using its 60 kHz antenna.\u003c/p\u003e\n\n\u003cp\u003eLike we said in the previous section, we represent a high/low/mark trit by the width of our pulse. High for 200ms is a zero, high for 500ms is a 1, high for 800ms is a mark. The way we’ll do that on our 60 kHz carrier wave is by using PWM again, but this time on the 60 kHz signal instead of on the 1 Hz signal. We’ll use a duty cycle of 50% to represent high, which means that half of our 60 kHz pulse is high and half is low. We’ll use a duty cycle of 0% to represent low which effectively means the whole pulse is low.\u003c/p\u003e\n\n\n\u003cp\u003eSo what you'll expect to see when you're transmitting a WWVB \"mark\" is a 1s pulse where half of the pulse is \"high\" using a 60 kHz signal at 50% duty, and the other half is \"low\" with a 0% duty (not to scale):\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/mark.png\" alt=\"mark\"\u003e\u003c/p\u003e\n\n\u003cp\u003eSimilarly, a 0 would be a 60 kHz 50% duty cycle for 0.2s, followed by a 0% duty cycle for 0.8s. And a 1 would be the reverse.\u003c/p\u003e\n\n\u003ch3\u003eThe layers of WWVB\u003c/h3\u003e\n\n\u003cp\u003eIn summary, a WWVB date/time is encoded using a few different layers of encoding. At the top is what we think of as a date/time and at the bottom is the 60 kHz carrier wave.\u003c/p\u003e\n\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003cth\u003e\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eA date/time is encoded as a…\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e60-bit frame, using…\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e1s PWM trits, on top of a…\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e60 kHz 50% duty cycle carrier wave\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e🐢🐢🐢 all the way down\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003cp\u003eNow that you understand how it works, let’s build the transmitter!\u003c/p\u003e\n","metadata":{"markdown":"## About WWVB\n\nThe classic WWVB transmits one bit of information per second (1Hz) and takes one minute (60 bits) to transmit a full time and date frame.\n\n### An example\n\nHere’s an example of one 60 second time encoding:\n\n![image.png](https://github.com/emmby/WatchTower/raw/main/docs/image%201.png)\n\nYou can see that the minute of the time is encoded in the first 10 seconds of the window. The hour is in the next 10 seconds, the day is between seconds 22 and 33, etc.\n\nIf we wanted to indicate that the time was 30 minutes past the hour, for example, we would set bits 2 and 3 (20 and 10) to “high”. \n\n| **Bit** | **00** | **01** | **02** | **03** | **04** | **05** | **06** | **07** | **08** | **09** |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| **Value** |  | 40 | 20 | 10 |  | 8 | 4 | 2 | 1 |  |\n| *Example: 30* |  | *0* | *1* | *1* |  | *0* | *0* | *0* | *0* |  |\n\nSimilarly, the 7th hour of the day would be 0000111 for bits 12 thru 18.\n\n### It’s a trit, not a bit.\n\nHow do we represent “high” and “low” for each 1s bit? You might think it would just be a high voltage for high and a low voltage for low, like you would use on a digital arduino pin, but that’s not how it’s done.\n\nWWVB “bits” are actually not just 0 and 1. They’re actually \"trits” because they can represent a 0, 1, or a “mark”, and this is one reason why we can’t just use a simple high/low to represent them. The mark is important to allow simple receivers to orient themselves within the signal window. Your watch knows that the last second in the window and the first in the next window are both “marks”, and so it knows to start a new window whenever it sees two marks in a row.\n\nWWVB uses **Pulse Width Modulation** (PWM) to represent the three possible trit states. In a given 1 second bit, the width of the pulse determines whether the bit is a 0, 1, or mark.\n\n- If power is reduced for one-fifth of a second (0.2 s), this is a data bit with value zero.\n- If power is reduced for one-half of a second (0.5 s), this is a data bit with value one.\n- If power is reduced for four-fifths of a second (0.8 s), this is a special non-data \"mark\", used for framing.\n\n| **High** | **Trit value** |\n| --- | --- |\n| 0.2s | 0 |\n| 0.5s | 1 |\n| 0.8s | mark |\n\nComing back to that original example but just focusing on the Minutes section, you can see the trits in the color encoding of the diagram. \n\n![image.png](https://github.com/emmby/WatchTower/raw/main/docs/image%202.png)\n\nLight blue is high and dark blue is low. You can see second 00 is dark blue (low) for 0.8s, which means it’s a “mark”.  Second 01 is dark blue for 0.2s, so it’s a 0. Second 02 is dark blue for 0.5s so it’s a 1, and so on.\n\nSo now you know how to encode the time and date using WWVB!\n\n### The carrier wave\n\nThere’s one more part of the signal that needs explanation. While we’re transmitting bits at a frequency of 1 bit per second (1 Hz), we’re actually doing it on top of a 60 kHz carrier wave. The carrier wave isn’t particularly important to the actual encoding of the bits, but it is important because that’s the frequency that’s been allocated for WWVB use and so your watch is looking for a 60 kHz signal using its 60 kHz antenna.\n\nLike we said in the previous section, we represent a high/low/mark trit by the width of our pulse. High for 200ms is a zero, high for 500ms is a 1, high for 800ms is a mark. The way we’ll do that on our 60 kHz carrier wave is by using PWM again, but this time on the 60 kHz signal instead of on the 1 Hz signal. We’ll use a duty cycle of 50% to represent high, which means that half of our 60 kHz pulse is high and half is low. We’ll use a duty cycle of 0% to represent low which effectively means the whole pulse is low.\n \n \u0026lt;img src=\"https://github.com/emmby/WatchTower/raw/main/docs/dutycycle.png\" width=400\u0026gt;\n\n So what you'll expect to see when you're transmitting a WWVB \"mark\" is a 1s pulse where half of the pulse is \"high\" using a 60 kHz signal at 50% duty, and the other half is \"low\" with a 0% duty (not to scale):\n\n ![mark](https://github.com/emmby/WatchTower/raw/main/docs/mark.png)\n\n Similarly, a 0 would be a 60 kHz 50% duty cycle for 0.2s, followed by a 0% duty cycle for 0.8s. And a 1 would be the reverse.\n\n### The layers of WWVB\n\nIn summary, a WWVB date/time is encoded using a few different layers of encoding. At the top is what we think of as a date/time and at the bottom is the 60 kHz carrier wave.\n\n|  |\n| --- |\n| A date/time is encoded as a… |\n| 60-bit frame, using… |\n| 1s PWM trits, on top of a… |\n| 60 kHz 50% duty cycle carrier wave |\n| 🐢🐢🐢 all the way down |\n\nNow that you understand how it works, let’s build the transmitter!\n\n"}},{"element_type":"markdown","content":"\u003ch2\u003eComponents\u003c/h2\u003e\n","metadata":{"markdown":"## Components"}},{"element_type":"product","content":"https://www.adafruit.com/product/5395","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/3297","metadata":{}},{"element_type":"parts","content":"\n  \u003cdiv class=\"parts-details\"\u003e\n    \u003cdiv\u003e\n      \u003cspan class=\"parts-quantity\"\u003e1\u003c/span\u003e\u003cspan\u003e x \u003c/span\u003e\n        \u003ca href=\"https://www.canaduino.ca/product/60khz-atomic-clock-receiver-v4-wwvb-msf-jjy60\" class=\"parts-name\" target=\"_blank\"\u003eCanaduino 60 kHz ferrite rod receiver\u003c/a\u003e\n      \u003cdiv class=\"parts-description\"\u003eYou just need the ferrite rod antenna from this kit, or use take one from an existing radio-controlled quartz clock movement you may have laying about.\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"parts-action\"\u003e\n  \u003cdiv\u003e\n      \u003ca href=\"https://www.canaduino.ca/product/60khz-atomic-clock-receiver-v4-wwvb-msf-jjy60\" class=\"parts-url btn-primary\" target=\"_blank\"\u003eBuy Now\u003c/a\u003e\n\n  \u003c/div\u003e\n\u003c/div\u003e\n\n  \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n","metadata":{"name":"Canaduino 60 kHz ferrite rod receiver","url":"https://www.canaduino.ca/product/60khz-atomic-clock-receiver-v4-wwvb-msf-jjy60","description":"You just need the ferrite rod antenna from this kit, or use take one from an existing radio-controlled quartz clock movement you may have laying about.","quantity":"1"}},{"element_type":"product","content":"https://www.adafruit.com/product/64","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/724","metadata":{}},{"element_type":"markdown","content":"\u003ch2\u003eOptional\u003c/h2\u003e\n\n\u003cp\u003eNone of the following is necessary, but some of it might be nice to have.\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eOscilloscope\u003c/strong\u003e. It can be hard to know if your circuit is doing anything without an oscilloscope. There are some micro DSOs for around $100, and some android-based table DSOs for around $200, but I like the Rigol DHO800 series as an entry-level oscilloscope if your budget can stretch to around $400. A digital multimeter or an individual LED can also be helpful in a pinch.\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003e10V power supply\u003c/strong\u003e. If you need more power you can use an external power supply. I found the signal to be strong enough without it and preferred the convenience of a single USB power supply. If you want to go up to 13V, switch to the \u003ca href=\"https://www.adafruit.com/product/2448\"\u003eTB6612\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003e3D printer\u003c/strong\u003e if you would like to print the tower enclosure for your circuit.\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003ePermaboard\u003c/strong\u003e or \u003cstrong\u003ePerma-proto\u003c/strong\u003e. After you’ve prototyped your circuit you’ll want to move it to something more permanent. \u003ca href=\"https://www.adafruit.com/product/571\"\u003ePerma-proto\u003c/a\u003e is convenient because it exactly matches your breadboard layout. Permaboard is more configurable but less convenient. Either one can be cut to size.\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eSoldering iron\u003c/strong\u003e. If you’re using permaboard, you’ll need a soldering iron. I love the \u003ca href=\"https://pine64.com/product/pinecil-smart-mini-portable-soldering-iron/\"\u003ePinecil v2\u003c/a\u003e, it’s USB-powered, auto-sleep, nearly instant-on, open-source and temperature controlled.\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eGPS module\u003c/strong\u003e. The nice thing about using module development boards like the Feather, Grove, Arduino, etc. is their support for additional modules. The \u003ca href=\"https://www.adafruit.com/product/3133\"\u003eAdaFruit Ultimate GPS FeatherWing\u003c/a\u003e pairs well with their Feather boards and includes an accurate RTC. If you go GPS, you don’t necessarily need a microcontroller with WiFi.\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eLCD display\u003c/strong\u003e. This can be a nice touch and can make it easier to tell if your tower is working or not. I like the \u003ca href=\"https://www.adafruit.com/product/5483\"\u003eAdafruit ESP32 TFT Feather\u003c/a\u003e or similar. I made an earlier prototype with a screen that displayed the current time, but didn’t like the way the screen lit up my bedroom at night. You can also connect many external displays using the simple I2C connector on many dev boards.\u003c/li\u003e\n\u003c/ul\u003e\n","metadata":{"markdown":"## Optional\n\nNone of the following is necessary, but some of it might be nice to have.\n\n- **Oscilloscope**. It can be hard to know if your circuit is doing anything without an oscilloscope. There are some micro DSOs for around $100, and some android-based table DSOs for around $200, but I like the Rigol DHO800 series as an entry-level oscilloscope if your budget can stretch to around $400. A digital multimeter or an individual LED can also be helpful in a pinch.\n- **10V power supply**. If you need more power you can use an external power supply. I found the signal to be strong enough without it and preferred the convenience of a single USB power supply. If you want to go up to 13V, switch to the [TB6612](https://www.adafruit.com/product/2448)\n- **3D printer** if you would like to print the tower enclosure for your circuit.\n- **Permaboard** or **Perma-proto**. After you’ve prototyped your circuit you’ll want to move it to something more permanent. [Perma-proto](https://www.adafruit.com/product/571) is convenient because it exactly matches your breadboard layout. Permaboard is more configurable but less convenient. Either one can be cut to size.\n- **Soldering iron**. If you’re using permaboard, you’ll need a soldering iron. I love the [Pinecil v2](https://pine64.com/product/pinecil-smart-mini-portable-soldering-iron/), it’s USB-powered, auto-sleep, nearly instant-on, open-source and temperature controlled.\n- **GPS module**. The nice thing about using module development boards like the Feather, Grove, Arduino, etc. is their support for additional modules. The [AdaFruit Ultimate GPS FeatherWing](https://www.adafruit.com/product/3133) pairs well with their Feather boards and includes an accurate RTC. If you go GPS, you don’t necessarily need a microcontroller with WiFi.\n- **LCD display**. This can be a nice touch and can make it easier to tell if your tower is working or not. I like the [Adafruit ESP32 TFT Feather](https://www.adafruit.com/product/5483) or similar. I made an earlier prototype with a screen that displayed the current time, but didn’t like the way the screen lit up my bedroom at night. You can also connect many external displays using the simple I2C connector on many dev boards.\n"}},{"element_type":"markdown","content":"\u003ch2\u003eInstructions\u003c/h2\u003e\n\n\u003ch3\u003eSimulator\u003c/h3\u003e\n\n\u003cp\u003eBefore you get started, you might be interested to see a simplified version of the software in action on the Wokwi Arduino online simulator.\u003c/p\u003e\n\n\u003cp\u003e\u003ca href=\"https://wokwi.com/projects/431240334467357697\"\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/wokwi.png\" alt=\"The Watch Tower on Wokwi\"\u003e\u003c/a\u003e\n\u003ca href=\"https://wokwi.com/projects/431240334467357697\"\u003ehttps://wokwi.com/projects/431240334467357697\u003c/a\u003e\u003c/p\u003e\n\n\u003cp\u003eThis simulator connects a virtual Arduino to a virtual logic analyser on PIN 4, and lets you download the output\nof PIN 4 for offline viewing on your computer.\u003c/p\u003e\n\n\u003cp\u003eTo use it:\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eRun the simulator for a few seconds. Notice that D0 is\nflashing on the logic analyzer. The logs will also show\nthe current date/time (which starts at Jan 1 1970 since\nwe aren't using wifi to initialize it to another value)\u003c/li\u003e\n\u003cli\u003eStop the simulator. The logic analyzer will automatically\ndownload \u003ccode class=\"inline\"\u003ewokwi-logic.vcd\u003c/code\u003e to your computer.\u003c/li\u003e\n\u003cli\u003eOpen \u003ccode class=\"inline\"\u003ewokwi-logic.vcd\u003c/code\u003e in a viewer like \u003ca href=\"https://sigrok.org/wiki/PulseView\"\u003ePulseView\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n","metadata":{"markdown":"## Instructions\n\n### Simulator\n\nBefore you get started, you might be interested to see a simplified version of the software in action on the Wokwi Arduino online simulator.\n\n[![The Watch Tower on Wokwi](https://github.com/emmby/WatchTower/raw/main/docs/wokwi.png)](https://wokwi.com/projects/431240334467357697)\nhttps://wokwi.com/projects/431240334467357697\n\nThis simulator connects a virtual Arduino to a virtual logic analyser on PIN 4, and lets you download the output\nof PIN 4 for offline viewing on your computer.\n\nTo use it:\n\n- Run the simulator for a few seconds. Notice that D0 is\n  flashing on the logic analyzer. The logs will also show\n  the current date/time (which starts at Jan 1 1970 since\n  we aren't using wifi to initialize it to another value)\n- Stop the simulator. The logic analyzer will automatically\n  download `wokwi-logic.vcd` to your computer.\n- Open `wokwi-logic.vcd` in a viewer like [PulseView](https://sigrok.org/wiki/PulseView)\n\n"}},{"element_type":"markdown","content":"\u003ch3\u003eSoftware\u003c/h3\u003e\n\n\u003cp\u003e\u003ca href=\"https://github.com/emmby/WatchTower\"\u003ehttps://github.com/emmby/WatchTower\u003c/a\u003e\u003c/p\u003e\n\n\u003cp\u003eUpload the Arduino sketch to your Arduino using the Arduino IDE.\u003c/p\u003e\n\n\u003cp\u003eThe LED will light up yellow/orange while connecting to WiFi. If you haven’t yet set your SSID, connect your phone to SSID: WWVB and follow the instructions to enter your wifi password.\u003c/p\u003e\n\n\u003cp\u003eOnce the network is connected and the time has sync’d, the light will turn green briefly and then turn off.\u003c/p\u003e\n\n\u003cp\u003e\u003cstrong\u003eSetup()\u003c/strong\u003e\u003c/p\u003e\n\n\u003cp\u003eThe Arduino setup() method does a few things.\u003c/p\u003e\n\n\u003cp\u003eInitialize the components we’ll be using, particularly the serial port, LEDs, WiFi, output pins, timezone, and network time sync (NTP). The network time sync will happen automatically in the background every hour. This is important because the realtime clock (RTC) on most microcontrollers are notoriously subject to drift and are rarely accurate for more than a few hours.\u003c/p\u003e\n\n\u003cp\u003eStart the 60 kHz carrier wave at a 50% duty cycle.\u003c/p\u003e\n\n\u003cp\u003e\u003cstrong\u003eLoop()\u003c/strong\u003e\u003c/p\u003e\n\n\u003cp\u003eArduino then moves to the loop(), which continuously performs the following operations:\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eGet the current time in UTC\u003c/li\u003e\n\u003cli\u003eConvert it to your local timezone to determine DST\u003c/li\u003e\n\u003cli\u003eCompute whether the 60 kHz carrier wave should be set to 50% (logical high) or 0% (logical low) for that specific moment in time. Time is always UTC, except for the DST bit which is relative to your local timezone.\u003c/li\u003e\n\u003cli\u003eSet the PIN_ANTENNA to high or low based on that value.\u003c/li\u003e\n\u003cli\u003e[Optional] you can flash the led for high/low PWM. This is nice for making sure things are working, but it’s grounds for divorce in the bedroom.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003eDo some other nice-to-haves like logging, setting LEDs and/or rebooting when there are issues.\u003c/p\u003e\n","metadata":{"markdown":"### Software\n\nhttps://github.com/emmby/WatchTower\n\nUpload the Arduino sketch to your Arduino using the Arduino IDE.\n\nThe LED will light up yellow/orange while connecting to WiFi. If you haven’t yet set your SSID, connect your phone to SSID: WWVB and follow the instructions to enter your wifi password.\n\nOnce the network is connected and the time has sync’d, the light will turn green briefly and then turn off.\n\n**Setup()**\n\nThe Arduino setup() method does a few things.\n\nInitialize the components we’ll be using, particularly the serial port, LEDs, WiFi, output pins, timezone, and network time sync (NTP). The network time sync will happen automatically in the background every hour. This is important because the realtime clock (RTC) on most microcontrollers are notoriously subject to drift and are rarely accurate for more than a few hours.\n\nStart the 60 kHz carrier wave at a 50% duty cycle.\n\n**Loop()**\n\nArduino then moves to the loop(), which continuously performs the following operations:\n\n- Get the current time in UTC\n- Convert it to your local timezone to determine DST\n- Compute whether the 60 kHz carrier wave should be set to 50% (logical high) or 0% (logical low) for that specific moment in time. Time is always UTC, except for the DST bit which is relative to your local timezone.\n- Set the PIN_ANTENNA to high or low based on that value.\n- [Optional] you can flash the led for high/low PWM. This is nice for making sure things are working, but it’s grounds for divorce in the bedroom.\n\nDo some other nice-to-haves like logging, setting LEDs and/or rebooting when there are issues.\n"}},{"element_type":"markdown","content":"\u003ch3\u003eVerify the microcontroller alone\u003c/h3\u003e\n\n\u003cp\u003eIf you installed and ran your software and you set up the wifi connection, your board should now be outputting a signal on your output pin.\u003c/p\u003e\n\n\u003cp\u003eIf you have an LED, you can connect the long end (anode) to your output pin and the other end to ground. If everything is working it should flash on/off about once a second.\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/ezgif-814d4a585a4921.gif\" alt=\"ezgif-814d4a585a4921.gif\"\u003e\u003c/p\u003e\n\n\u003cp\u003eIf you have a digital oscilloscope, you should be able to see a 3V square wave with a periodicity of 16us (1 / 60,000) something like the following:\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/RigolDS2.png\" alt=\"RigolDS2.png\"\u003e\u003c/p\u003e\n\n\u003cp\u003eThat’s the 50% duty cycle PWM carrier wave initialized during setup().\u003c/p\u003e\n\n\u003cp\u003eIf you zoom out to say 1 second per grid square resolution, you’ll be able to see the WWVB signal clearly:\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/RigolDS10.png\" alt=\"RigolDS10.png\"\u003e\u003c/p\u003e\n\n\u003cp\u003eIn the 10 seconds shown here, I see a 1, mark, 0, 1, 1, mark, 1, 1, 1, and 1.\u003c/p\u003e\n\n\u003cp\u003eNow if you modify the software to hardcode the date to Mar 6, 2008 7:30:00 am and zoom out to see a full 60 seconds, your signal should exactly match the signal in the example we started with:\u003c/p\u003e\n\u003ccode class=\"c\"\u003e\u003cpre\u003e  buf_now_utc.tm_year = buf_now_local.tm_year = 108; // 2008 = 1900 + 108\n  buf_now_utc.tm_yday = buf_now_local.tm_yday = 65;\n  buf_now_utc.tm_mon = buf_now_local.tm_mon = 2;\n  buf_now_utc.tm_mday = buf_now_local.tm_mday = 6;\n  buf_now_utc.tm_hour = buf_now_local.tm_hour = 7;\n  buf_now_utc.tm_min = buf_now_local.tm_min = 30;\n\u003c/pre\u003e\u003c/code\u003e\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/image%203.png\" alt=\"image.png\"\u003e\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/image%204.png\" alt=\"image.png\"\u003e\u003c/p\u003e\n\n\u003cp\u003eLooks great! Everything is working as expected.\u003c/p\u003e\n","metadata":{"markdown":"### Verify the microcontroller alone\n\nIf you installed and ran your software and you set up the wifi connection, your board should now be outputting a signal on your output pin.\n\nIf you have an LED, you can connect the long end (anode) to your output pin and the other end to ground. If everything is working it should flash on/off about once a second.\n\n![ezgif-814d4a585a4921.gif](https://github.com/emmby/WatchTower/raw/main/docs/ezgif-814d4a585a4921.gif)\n\nIf you have a digital oscilloscope, you should be able to see a 3V square wave with a periodicity of 16us (1 / 60,000) something like the following:\n\n![RigolDS2.png](https://github.com/emmby/WatchTower/raw/main/docs/RigolDS2.png)\n\nThat’s the 50% duty cycle PWM carrier wave initialized during setup().\n\nIf you zoom out to say 1 second per grid square resolution, you’ll be able to see the WWVB signal clearly:\n\n![RigolDS10.png](https://github.com/emmby/WatchTower/raw/main/docs/RigolDS10.png)\n\nIn the 10 seconds shown here, I see a 1, mark, 0, 1, 1, mark, 1, 1, 1, and 1.\n\nNow if you modify the software to hardcode the date to Mar 6, 2008 7:30:00 am and zoom out to see a full 60 seconds, your signal should exactly match the signal in the example we started with:\n\n```c\n  buf_now_utc.tm_year = buf_now_local.tm_year = 108; // 2008 = 1900 + 108\n  buf_now_utc.tm_yday = buf_now_local.tm_yday = 65;\n  buf_now_utc.tm_mon = buf_now_local.tm_mon = 2;\n  buf_now_utc.tm_mday = buf_now_local.tm_mday = 6;\n  buf_now_utc.tm_hour = buf_now_local.tm_hour = 7;\n  buf_now_utc.tm_min = buf_now_local.tm_min = 30;\n```\n\n![image.png](https://github.com/emmby/WatchTower/raw/main/docs/image%203.png)\n\n![image.png](https://github.com/emmby/WatchTower/raw/main/docs/image%204.png)\n\nLooks great! Everything is working as expected.\n"}},{"element_type":"markdown","content":"\u003ch3\u003eElectronics assembly\u003c/h3\u003e\n\n\u003cp\u003eNow that you’ve verified the microcontroller is working, it’s time to put all the components together.\u003c/p\u003e\n\n\u003cp\u003eThe electronics consist of three basic components: the microcontroller board, the amplifier breakout board, and the antenna.\u003c/p\u003e\n\n\u003cp\u003eThe connections are quite simple, you can do them on a breadboard or a proto board. I recommend starting with a breadboard, which will look identical to this perma-proto board but without the solder:\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/PXL_20250728_205028200.jpg\" alt=\"PXL_20250728_205028200.jpg\"\u003e\u003c/p\u003e\n\n\u003cp\u003e\u003cstrong\u003eMicrocontroller board\u003c/strong\u003e (Adafruit ESP32 QT Py in this photo)\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eConnect the ground pin to the ground plane (photo: J2).\u003c/li\u003e\n\u003cli\u003eConnect the 5V pin to the power plane (photo: J1).\u003c/li\u003e\n\u003cli\u003eConnect your signal pin [M0] to the input pin of your amplifier \u003ca\u003eAIN1\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eDRV8833 Amplifier breakout\u003c/strong\u003e\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eConnect the second input pin [AIN2] of your amplifier to ground (photo: J11).\u003c/li\u003e\n\u003cli\u003eThe Adafruit DRV8833 motor driver board has a sleep pin that needs to be pulled high to enable the breakout, so connect that to power 5v or 3v power, whatever is convenient. We used 5V here. (photo: J12)\u003c/li\u003e\n\u003cli\u003eConnect ground to the ground plane. (photo: J16)\u003c/li\u003e\n\u003cli\u003e[Optional] Connect the “motor” voltage [VM] to your 5V plane (photo: J17). This is needed if you are powering your amplifier via USB like I have here, but it should not be done if you are planning to use an external power supply on VMotor.\nThe antenna and amplifier circuit can contribute some noise to your 5V line. If you’re worried about it you might use an external power supply instead, but I found for these settings that the noise was negligible (although see Alternatives Considered for some lessons learned).\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eAntenna\u003c/strong\u003e\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eYou can plug your antenna directly into your breadboard, or use a 0.1\" Pitch PCB Mount Screw Terminal Block Connector connected to [AOUT1] and \u003ca\u003eAOUT2\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n","metadata":{"markdown":"### Electronics assembly\n\nNow that you’ve verified the microcontroller is working, it’s time to put all the components together.\n\nThe electronics consist of three basic components: the microcontroller board, the amplifier breakout board, and the antenna.\n\nThe connections are quite simple, you can do them on a breadboard or a proto board. I recommend starting with a breadboard, which will look identical to this perma-proto board but without the solder:\n\n![PXL_20250728_205028200.jpg](https://github.com/emmby/WatchTower/raw/main/docs/PXL_20250728_205028200.jpg)\n\n**Microcontroller board** (Adafruit ESP32 QT Py in this photo)\n\n- Connect the ground pin to the ground plane (photo: J2).\n- Connect the 5V pin to the power plane (photo: J1).\n- Connect your signal pin [M0] to the input pin of your amplifier [AIN1] (photo: J4\u0026gt;J10).\n\n**DRV8833 Amplifier breakout**\n\n- Connect the second input pin [AIN2] of your amplifier to ground (photo: J11).\n- The Adafruit DRV8833 motor driver board has a sleep pin that needs to be pulled high to enable the breakout, so connect that to power 5v or 3v power, whatever is convenient. We used 5V here. (photo: J12)\n- Connect ground to the ground plane. (photo: J16)\n- [Optional] Connect the “motor” voltage [VM] to your 5V plane (photo: J17). This is needed if you are powering your amplifier via USB like I have here, but it should not be done if you are planning to use an external power supply on VMotor.\nThe antenna and amplifier circuit can contribute some noise to your 5V line. If you’re worried about it you might use an external power supply instead, but I found for these settings that the noise was negligible (although see Alternatives Considered for some lessons learned).\n\n**Antenna**\n\n- You can plug your antenna directly into your breadboard, or use a 0.1\" Pitch PCB Mount Screw Terminal Block Connector connected to [AOUT1] and [AOUT2] (photo: C11, C12)\n"}},{"element_type":"markdown","content":"\u003ch3\u003eSignal Verification\u003c/h3\u003e\n\n\u003cp\u003eYou should be able to do the same LED trick as last time, only this time with the long anode on AOUT1 and the short cathode on AOUT2.\u003c/p\u003e\n\n\u003cp\u003eOr with your oscilloscope, you can look at the output of your microcontroller and compare it to the output of your amplifier:\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/RigolDS6.png\" alt=\"RigolDS6.png\"\u003e\u003c/p\u003e\n\n\u003cp\u003eHere the 3V signal on the microcontroller is blue, and you can see that the amplifier is outputting a similar wave but at 5V. If your wave doesn’t look quite like this, check that your antenna is plugged in. The antenna has an impedance that will cause the ringing that you see in the waveform, that’s expected and okay.\u003c/p\u003e\n\n\u003cp\u003eThe final test is to verify it works with a real watch!\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/ezgif-21153c1710707a.gif\" alt=\"ezgif-21153c1710707a.gif\"\u003e\u003c/p\u003e\n","metadata":{"markdown":"### Signal Verification\n\nYou should be able to do the same LED trick as last time, only this time with the long anode on AOUT1 and the short cathode on AOUT2.\n\nOr with your oscilloscope, you can look at the output of your microcontroller and compare it to the output of your amplifier:\n\n![RigolDS6.png](https://github.com/emmby/WatchTower/raw/main/docs/RigolDS6.png)\n\nHere the 3V signal on the microcontroller is blue, and you can see that the amplifier is outputting a similar wave but at 5V. If your wave doesn’t look quite like this, check that your antenna is plugged in. The antenna has an impedance that will cause the ringing that you see in the waveform, that’s expected and okay.\n\nThe final test is to verify it works with a real watch!\n\n![ezgif-21153c1710707a.gif](https://github.com/emmby/WatchTower/raw/main/docs/ezgif-21153c1710707a.gif)\n\n"}},{"element_type":"markdown","content":"\u003ch3\u003eAssembling the enclosure\u003c/h3\u003e\n\n\u003cp\u003eThe enclosure is designed for a 51mm x 63mm perma-proto, which is the size of a half size perma-proto with the excess trimmed. You can trim a proto board by scoring along a straightedge with a utility knife and then bending the board at the score, either by pressing it down on a hard surface at an angle or using a vise grip. Or feel free to modify the Autodesk Fusion file to the size of your own board.\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/image%205.png\" alt=\"image.png\"\u003e\u003c/p\u003e\n\n\u003cp\u003eHere I also made a quick and dirty “mount” for the antenna by twisting a couple of loops of wire and soldering them to the perma proto.\u003c/p\u003e\n\n\u003cp\u003ePrint the enclosure using a 3D printer. I used standard PLA, standard 0.4mm nozzle, and pretty much default slicer settings with no supports.\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eSTL: \u003ca href=\"https://github.com/emmby/WatchTower/raw/main/enclosure/The%20Watch%20Tower%20v7.stl\"\u003eThe Watch Tower v7.stl\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003eAutodesk Fusion: \u003ca href=\"https://github.com/emmby/WatchTower/raw/main/enclosure/The%20Watch%20Tower%20v7.f3d\"\u003eThe Watch Tower v7.f3d\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/image%206.png\" alt=\"image.png\"\u003e\u003c/p\u003e\n\n\u003cp\u003eOnce the pieces are printed, insert the circuit board into the bottom and press the lid for a snap fit.\u003c/p\u003e\n","metadata":{"markdown":"### Assembling the enclosure\n\nThe enclosure is designed for a 51mm x 63mm perma-proto, which is the size of a half size perma-proto with the excess trimmed. You can trim a proto board by scoring along a straightedge with a utility knife and then bending the board at the score, either by pressing it down on a hard surface at an angle or using a vise grip. Or feel free to modify the Autodesk Fusion file to the size of your own board.\n\n![image.png](https://github.com/emmby/WatchTower/raw/main/docs/image%205.png)\n\nHere I also made a quick and dirty “mount” for the antenna by twisting a couple of loops of wire and soldering them to the perma proto.\n\n\nPrint the enclosure using a 3D printer. I used standard PLA, standard 0.4mm nozzle, and pretty much default slicer settings with no supports.\n\n\n* STL: [The Watch Tower v7.stl](https://github.com/emmby/WatchTower/raw/main/enclosure/The%20Watch%20Tower%20v7.stl)\n* Autodesk Fusion: [The Watch Tower v7.f3d](https://github.com/emmby/WatchTower/raw/main/enclosure/The%20Watch%20Tower%20v7.f3d)\n\n![image.png](https://github.com/emmby/WatchTower/raw/main/docs/image%206.png)\n\nOnce the pieces are printed, insert the circuit board into the bottom and press the lid for a snap fit.\n"}},{"element_type":"markdown","content":"\u003ch2\u003eEnjoy!\u003c/h2\u003e\n\n\u003cp\u003ePlug into USB and you’re done! Your watches should now sync automatically every night.\u003c/p\u003e\n\n\u003cp\u003e\u003cimg src=\"https://github.com/emmby/WatchTower/raw/main/docs/image.png\" alt=\"image.png\"\u003e\u003c/p\u003e\n\n\u003cp\u003eI reliably get about 8 to 10 inches of signal in a straight line with no obstructions. \u003c/p\u003e\n\n\u003cp\u003eIf you need more than that, try giving a higher voltage a try using an external power supply. Or you might try a higher duty cycle or doubling up the H-bridges, but see the warnings below!\u003c/p\u003e\n","metadata":{"markdown":"## Enjoy!\n\nPlug into USB and you’re done! Your watches should now sync automatically every night.\n\n![image.png](https://github.com/emmby/WatchTower/raw/main/docs/image.png)\n\nI reliably get about 8 to 10 inches of signal in a straight line with no obstructions. \n\nIf you need more than that, try giving a higher voltage a try using an external power supply. Or you might try a higher duty cycle or doubling up the H-bridges, but see the warnings below!\n"}},{"element_type":"markdown","content":"\u003ch2\u003eAlternatives considered\u003c/h2\u003e\n\n\u003cul\u003e\n\u003cli\u003eI wanted to avoid using a separate amplifier breakout board so I tried the Adafruit RP2040 scorpio. It can do 60khz PWM at 5V natively, but it was only able to drive 12mA per channel which wasn’t enough to saturate my ferrite antenna so the square wave collapsed.\u003c/li\u003e\n\u003cli\u003eI looked at the \u003cstrong\u003eAdafruit 8-Channel PWM or Servo FeatherWing\u003c/strong\u003e because I wanted to take advantage of module stacking, but it can only do 10mA per channel and 1.6khz.\u003c/li\u003e\n\u003cli\u003eI looked at Trinket and Itsybitsy ATmega based boards, but they can’t drive much current and they’re not modular with anything and they have no wifi so there’s little advantage over the QT Py.\u003c/li\u003e\n\u003cli\u003eI considered driving the DRV8833 with an external power supply. This would have given me higher voltage and likely a stronger signal. But I wanted the convenience of a single usb power supply, and the signal strength was sufficient for my needs.\u003c/li\u003e\n\u003cli\u003e⚠️ \u003cstrong\u003eWARNING\u003c/strong\u003e: I tried the linking both the A and B H-bridges of the  DRV8833 in parallel, and I also upped the duty cycle to 80%. Totally blew out my microcontroller, presumably with a flyback voltage due to the high inductance antenna. I’m not sure if it was the parallel or the 80% or the combination of the two, it would be worth experimenting further but I haven’t yet.\u003c/li\u003e\n\u003c/ul\u003e\n","metadata":{"markdown":"## Alternatives considered\n\n- I wanted to avoid using a separate amplifier breakout board so I tried the Adafruit RP2040 scorpio. It can do 60khz PWM at 5V natively, but it was only able to drive 12mA per channel which wasn’t enough to saturate my ferrite antenna so the square wave collapsed.\n- I looked at the **Adafruit 8-Channel PWM or Servo FeatherWing** because I wanted to take advantage of module stacking, but it can only do 10mA per channel and 1.6khz.\n- I looked at Trinket and Itsybitsy ATmega based boards, but they can’t drive much current and they’re not modular with anything and they have no wifi so there’s little advantage over the QT Py.\n- I considered driving the DRV8833 with an external power supply. This would have given me higher voltage and likely a stronger signal. But I wanted the convenience of a single usb power supply, and the signal strength was sufficient for my needs.\n- ⚠️ **WARNING**: I tried the linking both the A and B H-bridges of the  DRV8833 in parallel, and I also upped the duty cycle to 80%. Totally blew out my microcontroller, presumably with a flyback voltage due to the high inductance antenna. I’m not sure if it was the parallel or the 80% or the combination of the two, it would be worth experimenting further but I haven’t yet.\n"}}]