<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/"/>

<title>Jeff Epler's blog</title>
<modified>2021-06-24T01:43:49Z</modified>
<tagline>Photos, electronics, cnc, and more</tagline>
<author><name>Jeff Epler</name><email>jepler@unpythonic.net</email></author>
<entry>
<title>Quick CircuitPython Driver for ES100 WWVB Receiver</title>
<issued>2021-06-24T01:43:49Z</issued>
<modified>2021-06-24T01:43:49Z</modified>
<id>https://gamma.unpythonic.net/01624499029</id>
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/01624499029"/>
<content type="text/html" mode="escaped">

I picked up an &lt;a href=&quot;https://www.universal-solder.ca/product/universal-solder-everset-es100-wwvb-bpsk-atomic-clock-starter-kit/&quot;&gt;ES100 WWVB receiver kit&lt;/a&gt;
and wrote a quick &amp;amp; dirty library to interact with it in CircuitPython.

&lt;p&gt;I'm not super thrilled with how the chip works; I imagined that the
date &amp;amp; time registers would act like an RTC after a successful reception,
but instead they just mark the second when reception &amp;amp; decoding completed
and are cleared to zero as soon as a new reception attempt is kicked off.

&lt;p&gt;Still, I'll have to figure out a clock to put it inside.  I am still
thinking of doing an edge-lit display version of the Roman Solar Clock,
so maybe that's where it'll go.

&lt;p&gt;The library is &lt;tt &gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/01624499029/jepler_es100.py&quot;&gt;jepler_es100.py&lt;/a&gt;&lt;/tt&gt; and the example is &lt;tt &gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/01624499029/code_es100.py&quot;&gt;code_es100.py&lt;/a&gt;&lt;/tt&gt; (rename to code.py).
I ran it on a Feather nRF52840 Expess with CircuitPython 6.3, but it should
work on a range of boards.

&lt;p&gt;Because the ES100 just locks up the I2C bus if you &amp;quot;repeated-start&amp;quot; it, I had
to use my custom rolled register library instead of &lt;tt &gt;adafruit_register&lt;/tt&gt;.
I did build it on top of &lt;tt &gt;adafruit_bus_device&lt;/tt&gt;.

&lt;p&gt;&lt;p&gt;&lt;b&gt;Files currently attached to this page:&lt;/b&gt;
&lt;table cellpadding=5 style=&quot;width:auto!important; clear:none!important&quot;&gt;&lt;col&gt;&lt;col style=&quot;text-align: right&quot;&gt;&lt;tr bgcolor=#eeeeee&gt;&lt;td&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/01624499029/code_es100.py&quot;&gt;code_es100.py&lt;/a&gt;&lt;/td&gt;&lt;td&gt;1.1kB&lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor=#dddddd&gt;&lt;td&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/01624499029/jepler_es100.py&quot;&gt;jepler_es100.py&lt;/a&gt;&lt;/td&gt;&lt;td&gt;3.3kB&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;
</content>
</entry>
<entry>
<title>Minimal Time-Zone Handling for CircuitPython</title>
<issued>2020-07-17T21:37:17Z</issued>
<modified>2020-07-17T21:37:17Z</modified>
<id>https://gamma.unpythonic.net/01595021837</id>
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/01595021837"/>
<content type="text/html" mode="escaped">
&lt;img src=&quot;https://media.unpythonic.net/emergent-files/01595021837/zones960.png&quot;&gt;

&lt;p&gt;For my clock, I want automatic handling of Daylight Saving Time.  However,
CircuitPython doesn't build in any distinction between local and UTC time, and
fitting in the entire Python3 datetime module or an Olson time zone database is
simply not going to happen.  What can we do that is simple enough to fit, but
can represent the reality of timezones where I live?</content>
</entry>
<entry>
<title>Calibrating the DS3231 and PCF8523 RTCs</title>
<issued>2020-07-16T18:22:35Z</issued>
<modified>2020-07-16T18:22:35Z</modified>
<id>https://gamma.unpythonic.net/01594923755</id>
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/01594923755"/>
<content type="text/html" mode="escaped">
&lt;img src=&quot;https://media.unpythonic.net/emergent-files/01594923755/frequency.jpg&quot;&gt;

&lt;p&gt;The &lt;a href=&quot;https://www.adafruit.com/product/3028&quot;&gt;DS3231&lt;/a&gt; and &lt;a href=&quot;https://www.adafruit.com/product/2922&quot;&gt;PCF8523&lt;/a&gt; real time clocks (RTCs) can
both be calibrated by writing various register values.  To follow the
calibration procedures you'll need a frequency counter you trust, with at least
6 digits to calibrate the PCF8523 and 7 digits to calibrate the DS3231.  (It
also has to operate at the comparatively low frequency of 32.768kHz; a common
inexpensive 8-digit frequency counter such as the &amp;quot;SANJIAN STUDIO&amp;quot; has a
minimum of 100kHz so it's not usable for this purpose)  I use an old HP 5315B
universal counter that has been calibrated against GPS time.</content>
</entry>
<entry>
<title>Helpful Scripts for CircuitPython & Real Time Clocks (RTCs)</title>
<issued>2020-07-16T15:12:26Z</issued>
<modified>2020-07-16T15:12:26Z</modified>
<id>https://gamma.unpythonic.net/01594912346</id>
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/01594912346"/>
<content type="text/html" mode="escaped">
&lt;img src=&quot;https://media.unpythonic.net/emergent-files/01594912346/rtcboards.jpg&quot;&gt;

&lt;p&gt;I have used two different RTCs in the Feather form factor.  One has
the &lt;a href=&quot;https://www.adafruit.com/product/2922&quot;&gt;PCF8523&lt;/a&gt;, and the other
has the &lt;a href=&quot;https://www.adafruit.com/product/3028&quot;&gt;DS3231&lt;/a&gt;.  The former has an SD card slot while the latter has higher precision including a temperature-compensated crystal oscillator.</content>
</entry>
</feed>
