Project: The Forever Clock Operation ... There are no buttons or switches - just let the GPS clock run. Tilt the clock backwards will display GPS information and further tilting will display the local temperature and humidity. In ten years, just replace the RTCs lithium 3v batteries! Reading the NeoPixel clock face is the same as any analog clock with two exceptions. Read the short green hand LEDs first indicates the hours and next read the red long hand LEDs which indicates 5 minute rounded intervals. All minutes are always read "after" the hour - 3:45 is "only" 45 minutes after 3 o'clock NOT 15 minutes till 4 o'clock or 15 minutes till 3 o'clock. The other exception is when both the minute and hour hands have the same value like 4:20 o'clock. In which case, the center red minutes LED is lit on along the same axis with two green hour LEDs. (multicolor hand) Boring technical description ... A 1 Hz precision interrupt, generated from the main precision DS3232 RTC, drives the main "setwatch function" in the Espruino. The Espruino, polls both precision, battery backed, real time clocks and the GPS ublox module for time values and other information. Time zone calculation and DST (daylight savings time) are then executed. The analog and the real time clocks values are then displayed on the backlit, 4x20 LCD. The NeoPixel clock face also shows the time. Automatic daily GPS time synchronization occurs at 21:59:59 and then follows at 22:59:59 for the main real time clock (DS3232) that syncs with the secondary local precision real time clock (DS3231). The one hertz "real time scan" takes only 441 milliseconds out of 1000 ms for the Espruino instructions to complete without overruns! Keeping accurate and precision time is not a mundane task. There are numerous algorithm checks to prevent any time synchronization from occurring if there are large differences between the on-board real time clocks and the GPS module. Since the precision DS3232/3231 real time clocks can be purchased, nowdays, for $4 USD (ebay) then having two precision clocks on-board is very cost effective. The main RTC DS3232 is set for GMT/UTC and the secondary RTC (DS3231) is set for local DST time. The GPS uBlox module syncs to the main RTC and the main RTC then syncs to the secondary RTC only if the time are within the proper time difference range. Also, the GPS fix signal has to be stable for x count of seconds for any time synchronization to take place. In addition, the GPS received NEMA "fix status" has to be a 1 or 2 before any time synchronization. The Espruino has three status LEDs on-board. We used the blue LED for the 1 Hz RTC interrupt status, the green LED for the main RTC to secondary RTC sync status and the red LED for the GPS to main RTC sync status. Both sync status LEDs are reset/cleared during the early morning hours. The Espruino (Pur3 aka Gordon) pre-made library modules provided almost flawless operation for the GPS, bus 1 I2C RTC DS3232 / bus 2 I2C RTC DS3231, NeoPixel WS2811 string LEDs, bus 1 I2C LCD 4x20 display, ADXL335 accelerometer and the DHT22/AM2302 temperature / RH humidity sensor. There were very few minor patches made to these library modules for this user application. Mechanical Design and Packaging ... We wanted to design a precision clock from "scratch" and we chose to design a printed 3D enclosure. All electrical connections, to all electronic sub-assemblies needed to be routed through the clock packaging enclosure design for the clean modern look. Extreme 3D design care had to be taken to prevent excessive 3D "filament" waste in the enclosure design which translates to increase added $$$$ cost. Using the "free" and extremely easy to use on-line TinkerCad, the enclosure was designed in about one day. The 3D output "STL" file(s) were sent to a local vendor for production @ $0.25-$0.35(USD)/cm3. The enclosure design used multi-color 3D parts to make it very unique and modern. The main green enclosure base contained all the clock electronics and the NeoPixel clock base contained the special NeoPixel LED circular array printed circuit board. A special acrylic dome was fitted on the NeoPixel clock face. On the back of the NeoPixel clock base the DHT22 temperature/humidity sensor is mounted. Note: Buying and waiting up to 30 days for parts from "offshore" suppliers saved many dollars on this project but added long delays to this project. Ebay has very cheap prices for "offshore" electronic suppliers, that cannot be beat, but you have to be aware there are countfeit/faulty parts out there. Major design and parts problems in project: 1 The "new" 5 mm WS2811 RGB LEDs NeoPixel had only a pitch of 0.050" between each of the four leads (1.27 mm). A "clean look" single sided printed circuit layout was doable but very extremely troublesome to design. This "offshore" discrete LED component was not designed for thru holes on a printed circuit board! 2 The "new" 5 mm WS2811 RGB LEDs NeoPixel recommended a 1000 uf capacitor on the supply and 300-500 ohms on the input data signal. The 300/500 ohms had to be adjusted to 470 ohms to prevent ringing and data transmission errors from the MOSI SPI signal from the Espruino. 3 Having the supply voltage going over 5 V stops the NeoPixel from working. Acquired a switching supply and adjusted below 5 V works just fine.(4.7 V) 4 Turning on the NeoPixels for the first time, without the data signal, will turn the NeoPixels all "blue", so users can troubleshoot bad LEDs. This surge, in some cases, will draw 50-54 ma. per LED. In our case, 25 x 54 ma. = 1.35 AMPS! You need a secondary power supply to provide for worst case operation. Don't even try to use the USB or Espruino battery supply for these NeoPixels! 5. NeoPixel MOSI data signal and power has to be shielded or noise will make the operation suspect. 6 I consider myself as an "Espruino power user" which takes the JavaScript Espruino to the maximum of resources. You can never have enough memory for your Espruino. (JSVARS). Through creative software algorithms, minification, and newer Espruino revisions, I just barely fit the code into the Espruino without "out of memory" problems. When you have the high level JavaScript microcontroller like the Espruino, you are able to do much more and in doing so will deplete memory resources rather quickly. BigRam was installed, for more JSVARS memory, after it worked consistently in our application. 7. System power supply switching configuration. Since the Espruino can be powered by USB and the NeoPixels by another switching power supply, a method was needed to switch fast between power sources for USB programming and for normal operation. We used an external 2A wall-wart to power the switcher for the Neopixels and a power splitter which has a mirco USB (Adafruit) connector. 8. We negotiated with over 15 3D printers just to make our clock enclosure. Most 3D printing contractors must only make bobbleheads or figurines and when we went and presented a real project with specs most vendors fell flat. Also, excessive job order 3D printing costs prevented the clock enclosure from being made on time. We finally found several low cost and professional 3D printers that provided the means to finish our clock enclosure. 9. Using the DHT22 you need to poll greater than 2 seconds for proper operation. Also, we had a severe humidity accuracy problem but it was later resolved. Espruino Modules "libraries" used: HD44780.js LCD DS3231.js * (DS3232/DS3231) ADXL335.js Accelerometer DHT22.js DHT22 GPS.js * uBlox GPS * modified for user application. Parts: 1 I2C DS3232 precision RTC. 1 I2C DS3231 precision RTC. 1 I2C LCD 4x20 with LED backlight/w serial backpack. 1 Serial uBlox GPS w/antenna. 1 Custom made WS2811 5 mm NeoPixel dot clock board (w qty 25 diffused RGB LED NeoPixels). 1 ADXL335 analog 3 axis accelerometer for tilt indication. 1 DHT22/AM2302 temperature & RH humidity sensor. 1 Custom made 3D E Block enclosure for Espruino GPIO. 1 Custom made, 3D, ABS, stylish, color enclosure for all electronic sub-assemblies. 1 JavaScript v 1.3 Espruino ARM module. 1 DC-DC Buck Converter Step Down Module LM2596 adjustable Power Supply Output 1.23V-30V for the Neopixel clock face. 1 5V 2 amp wall-wart regulated 5V dc power supply for system power supply. Espruino GPIO used: B3 - RTC1 - 1 Hz interrupt from main RTC with pullup in software. A0 - DHT22/AM2302 - Digital/In/Out Temperature & RH humidity sensor B8-B9 - I2C - SCL/SDA - I2C1 - bus for DS3232 RTC1 (main RTC) and LCD 4x20 display. (external pullups from DS3232 RTC) B10-B11 - I2C - SCL/SDA - I2C2 - for DS3231 RTC2 (secondary RTC) (external pullups from DS3231 RTC board) C0,C1,C2 - ADC - ADXL335 (analog) accelerometer x,y,z -- only z axis (C2) is needed C11-C10 - USART3 - RX/TX - for GPS uBlox B15 - MOSI - SPI2 - for NeoPixel 25 LED clock ring - only 1 digital output needed. LED1 - Red LED - GPS to main RTC sync status. LED2 - Green LED - Main RTC to secondary RTC sync status LED3 - Blue LED - 1 Hz interrupt status from main RTC Espruino JSVARS (memory usage) used 2050 JVARS out of maximum of 3250 v71 BigRam. Things to do: Put a slip ring (Sparkfun) on the NeoPixel display so it can be rotated 360 degrees. The 3D NeoPixel base will need to be re-designed for this slip ring. We reviewed many precision digital clocks on the internet but our forever, GPS, precision, digital clock is the best money can build/buy except that we could not afford the QUANTUM Chip Scale Atomic Clock module for $1500 USD. End of project ...