Presented for your consideration...The BRS Clock

124 views
Skip to first unread message

Bill Stanley

unread,
Jun 18, 2019, 7:43:47 PM6/18/19
to neonixie-l

 

I promised to post some details on my current Nixie nightmare. I present:


The BRS Clock

The current version of the clock is in 2 (or more) PCBs. This was done to allow changes to the display type by only either changing the display board or the display cluster boards. The board can be used with Nixie tubes (10 cathode or 14 cathode “British Flag” types), LEDs, possibly VF or other.


The CPU board:

A pair of 16 pin headers on top of the CPU board connects it to the display. The CPU supplies 12V, 5V and 170V with the 170 able to be margined by the CPU. I2C connects “things” on the display to the CPU. The time data is sent in a serial format (clock+data) along with a transfer strobe to write the data to the tubes. For Nixie displays, the HV5812PJ-G chip does direct drive to the cathodes, there is no multiplexing. Additional signals include a room light sensor an 11 pins defined for control like decimal points, symbols and “pimp lights”.


The CPU is currently a Silicon Labs C8051F360


Time base. There a 4 possible time base sources for the clock. In increasing accuracy order:

The CPU time base: This is the worst but with some work can be trimmed up somewhat. If this is the only time base, the clock will lose time in a power failure.

AC line clock: The primary power source is 12V. It can be AC or DC. If the power source is 12V AC, the line frequency is sampled (50 or 60Hz detected) and used to run the clock. The AC line has good long term stability, much better than the CPU clock. As with the CPU clock, a power failure will reset the clock date/time.

DS3231S: This Maxim chip along with a coin cell has very good accuracy and will remember the date/time during a power failure.

GPS: An optional Trimble Lassen GPS receiver can be plugged onto the CPU board. It provides a very accurate 1PPS signal and UTC date/time for the highest accuracy. Other GPS receivers that support the NMEA sentence structure and a 1 PPS signal could also be used. The GPS has a battery backup to allow faster cold starts.


6 pushbuttons (plus reset) allow user setting of date, time and setup parameters. The parameters are saved in EEPROM so are available after a power-down. 1 button sets/unsets DST so the twice a year change is simple.


There are a number of connectors to plug in various external devices. They are

Indoor temperature/humidity: A small sensor will allow the display the indoor temperature and humidity every 5 minutes.

Outdoor temperature: A different small sensor will display the outdoor temperature at the same time as the indoor, if connected.

PIR/room light: A Passive IR motion sensor and room light level sensor will allow shutdown in darkness when no-one is around. The room light sensor can adjust the brightness of the pimp lights automatically.

MP3 player: A simple MP3 player is connected to play different sounds at different times. The current code plays the Westminster Chimes on the quarter hour and the hour count at the top of the hour. Many other things could be done.

Meter DAC: My friend wanted a “Steam Punk” look to the clock so we incorporated 3 D/A converters (12 bit accuracy) driven at a 1/10 second update rate with the H/M/S. He will use these to drive vintage large analog meters so the time will be read as analog.

Stopwatch: Another request was for a work clock that displayed a running stopwatch every 5 minutes. Three control switches are provided to start/stop/reset the stopwatch.


Displays

The displays are mounted on a daughter card plugged into the CPU. This allowed me to only modify the display to run with a number of different display types. The following information is for Nixi display tubes.


Tubes: Designed using the ‘QTC’ concept from pvelectronics in UK. This mounts the tube (solder or socket) on a small PCB that plugs into the display board with a 12 pin 0.1” connector. I have created adaptors for about 8 or so different tubes. New tubes are quick to create. The original used IN-14 + IN-19 tubes


Bottom lights: These lights shine thru the base of the tube thru a hole in the QTC board. I call these “pimp lights” and come in 2 flavors; a standard single RGB LED that cycles automatically thru multiple colors and a dedicated WS2812B RGB LED that is individually programmed with 256 levels of each color. The WS2812B is currently programmed to cycle thru colors once a minute (seconds), once an hour (minutes) and once a day (hours). For example, on the seconds, the color starts at 100% red at 00. The red drops and the green rises and a 1/10 second rate until at 20, the light is full green. Green then drops and blue comes up so that at 40, it is 100% blue. Blue then drops and red comes up so that at 00, we are back to 100% red. Pimp lights are lead zero blanked with the tubes, depending on the selected lead zero blanking (LZB) mode.


Symbols: If a compatible symbol tube exists, it is installed to the right of hours, minutes and seconds. When the time is displayed, the symbols display H/M/S. When displaying temperature, they display F/% (temp and humidity) in other modes they are blanked.


Display boards: there are currently 3 display boards; small, large and cluster.

The small display board was designed for the IN-14 digit/IN-19 symbol tubes. With the QTC changes I have operated other tubes such as the B-5750.

The large display board was for bigger tubes like the Z560M digits/IN-15 symbols. It could also work for IN-12 digits.

The cluster display was created to allow different sizes of displays to be quickly created. The concept is that a hub board is plugged into the CPU. The hub then splits off to 3 20 pin ribbon cables, 1 each for H/M/S. Plugged into the far end of the cable is a display clusted board that holds the driver and QTC sockets for 3 displays. The common hub exists and a cluster has been designed for the Z560M digits/IN-15 symbols. The cables ease the mounting requirements for larger displays. It should also work well for the upside-down HP displays


Open Source: I am not making this a business. I usually fab more boards that I need and some down-level stuff exist. I am willing to share what I have and know so I will supply the schematics (OrCad/PDF), PCB layout (allegro/gerbers) and code (8051 assembly language). If you need some other display adapted (Panaplex, LED etc) let me know. If it interests me (semi-retired) I can help or make suggestions. All of these boards are surface mount based. The smallest part is 0603 so not super small. If needed, I could solder tough parts that require a fine tim or hot air mount the 2 parts that need it.

If you have any questions, want documentation or availability, let me know. I am a master of questionable answers (or was that answerable questions?). Always glad to get a question starting with “could you…..” or have you ever….

   -Other Bill-

 

Paolo Cravero

unread,
Jun 20, 2019, 12:57:28 PM6/20/19
to neoni...@googlegroups.com
Outstanding Bill! And it will be programmed in Assembly!

Are you using some tricks to improve the reliability of "reading" AC line? Either HW or SW. In Europe AC time is currently running 32 seconds late since the beginning of the year. It will catch up, as it did in 2018 when the grid had "lost" 300 seconds in 3 months. Every time I think my IN-14 clock has troubles with AC pulses, but in fact it's the grid running noticeably fast or slow.

Paolo

--
You received this message because you are subscribed to the Google Groups "neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send email to neoni...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/0215e2e7-a5d1-4f53-9628-4fb196aeecc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gregebert

unread,
Jun 20, 2019, 1:34:37 PM6/20/19
to neonixie-l
A genuine DS3231 does a remarkable job of keeping accurate time. I have one in a wristwatch prototype board that has not been updated for more than 4 years, and it's still within 1 minute of the real time.

Jeff Walton

unread,
Jun 20, 2019, 1:57:16 PM6/20/19
to neoni...@googlegroups.com
One trick for using line frequency is to rectify, and wave shape to get a square wave.  Then set up a monostable one-shot with a period just shorter than the line frequency (or doubled full wave).  This will prevent any extraneous noise from getting through to the divider circuit that feeds the clock logic.  I used a scope and superimposed noise on the input to help fine-tune and verify the one-shot timing.  

I built my first clock over 40 years ago with TTL logic using this method and the accuracy was within seconds/year.  I didn't have temperature compensated crystals or components back then.  But after many years, the method has proven to be very reliable.  The US grid has been a good timing source for a non-critical application. 


Jeff Walton 

Bill Stanley

unread,
Jun 20, 2019, 4:42:20 PM6/20/19
to neonixie-l
Hi Paolo;
Programmed, past tense. I am working on putting the last 5% of features into the code now (you know, the programming part that takes 95% of the time).
I am US based so not sure about the stability of other grids. My first clock (RTL based 49 years ago, details in my "about me" post). used R/C/D filtering into 6 hex inverters. At the 3.6V logic level + the base of the transistor exposed made for a very noise prone unit. I actually started a design of an XO to replace the AC line but never finished it. My next line sync clock was (and still is) my Heathkit with Panaplex displays. That clock would drift slightly but was very usable for the timebase cost. My only trick is to use an opto-isolator to generate the clock.

Slight division, a project I played (have PCBs and some code) with was to build a plug-in replacement (8051 based) for the Mostek chip in the Heathkit clock. It would use a modern time base + GPS. If there is any interest, I could post the work I have done and perhaps restart it if anyone else is interested..

Jeff; For my clock line time base, I decided on a brute force filter. I use a opto-isolator powered by the rectified AC line with the assumption that any noise would need enough energy to light an LED via a large resistor to get thru. Not impossible but a fairly high bar. Since that signal does go to a counter/timer, I could create a software one-shot to add a bit more protection, I will think about that (and there goes 5% more overrun on code)

Gregbert: Interested in the "genuine" qualifier and what is behind it. The original clock board was put in a box in late 2015 with a CR2032 coin cell powering the DS3231. When I restarted the project in early 2019, the clock came up with under 1 minute off  Great chip and really long battery life

Back to the AC line, In the US, a few years ago there was a push to reduce the AC line accuracy based on the claimed cost to keep the line cycle count balanced. Not sure what happened to that proposal, anybody remember?

  -Other Bill-
To unsubscribe from this group and stop receiving emails from it, send an email to neoni...@googlegroups.com.

To post to this group, send email to neoni...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/0215e2e7-a5d1-4f53-9628-4fb196aeecc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neoni...@googlegroups.com.

gregebert

unread,
Jun 20, 2019, 5:17:14 PM6/20/19
to neonixie-l


Gregbert: Interested in the "genuine" qualifier and what is behind it. The original clock board was put in a box in late 2015 with a CR2032 coin cell powering the DS3231. When I restarted the project in early 2019, the clock came up with under 1 minute off  Great chip and really long battery life


There are apparently some fake DS3231/DS3232 ICs out there that have timekeeping problems. So far, I have found 2 different bugs on different modules with the cheap RTC modules bough on Ebay.
  • Rollover problem on Dec 31: Date goes to Sept  02
  • Accuracy problem: Losing time at the rate of more than 1 minute per day
When I use units purchased from Digikey, I have no problems.

BTW, this chip averages about 1-2uA current consumption, then every 100 seconds it runs an internal routine that takes a lot more than 50uA; the spike pegs my 50uA mechanical meter.


My first few nixie clocks use the AC-line for timing; I do see some day-to-day wandering, and in addition it seems to accumulate a few extra seconds per month. I have a pretty good low-pass filter for the timing-extraction, so it must be low-frequency noise spikes. All of my new clocks use a RasPi for automatic timing, so I have not bothered to trace-down the line-frequency stability.

Terry Kennedy

unread,
Jun 20, 2019, 5:59:32 PM6/20/19
to neonixie-l
On Thursday, June 20, 2019 at 12:57:28 PM UTC-4, Paolo Cravero wrote:
Are you using some tricks to improve the reliability of "reading" AC line? Either HW or SW. In Europe AC time is currently running 32 seconds late since the beginning of the year. It will catch up, as it did in 2018 when the grid had "lost" 300 seconds in 3 months. Every time I think my IN-14 clock has troubles with AC pulses, but in fact it's the grid running noticeably fast or slow.

Apparently this was (is?) due to the former Yugoslav states:

(fair use excerpt):
"Serbia, Kosovo power grid row delays European clocks

SARAJEVO, March 7 (Reuters) - European power grid lobby ENTSO-E urged Serbia and Kosovo to urgently resolve a dispute over their power grid, which has affected the broader European network, causing some digital clocks on the continent to lose time."

Mac Doktor

unread,
Jun 20, 2019, 8:42:33 PM6/20/19
to neoni...@googlegroups.com

> On Jun 20, 2019, at 4:42 PM, Bill Stanley <billsta...@gmail.com> wrote:
>
> Jeff; For my clock line time base, I decided on a brute force filter. I use a opto-isolator powered by the rectified AC line with the assumption that any noise would need enough energy to light an LED via a large resistor to get thru. Not impossible but a fairly high bar. Since that signal does go to a counter/timer, I could create a software one-shot to add a bit more protection, I will think about that (and there goes 5% more overrun on code)

Have you tried using a ZCD (zero-crossing detector) opto-coupler followed by a Schmitt trigger? I built a thyristor-based variable light controller that way years ago and it worked perfectly.


Terry Bowman, KA4HJH
"The Mac Doctor"

Reply all
Reply to author
Forward
0 new messages