CRISTAL + CAPACITOR = TIME DELAY HELP

183 views
Skip to first unread message

MrThe50sanchez

unread,
Apr 19, 2021, 4:23:22 AM4/19/21
to neonixie-l
Hello Guys!

I have a nice question to ask you guys if you can give me some help.

I builded a Nixie watch, It works good, but I'm having a little bit of time delay, 1 min within 6 hours.

At the first time, I had 6 min delay for 6 hours aproximately. I investigated the relation of the cristal and the capacitors you need to install with it. First, I had 22pF for a cristal that requires 12.5pF, giving me that 6 min delay for 6 hours, then, I realised these and installed 10Pf capacitor and the delay decreased to 1 minute for 6 hours, and I just ordered new capacitors of 12pF to get more closer to the manufacture requires, So I imagine that the delay is gonna get less.

·Is there any way to make this time delay shorter?
·Do you recommend me a tipe of cristal that is really acurate to install on my watch?

 Thanks a lot nixie lover's

Bill van Dijk

unread,
Apr 19, 2021, 8:34:49 AM4/19/21
to neoni...@googlegroups.com

If you are still slow with the 10pF, a 12pF is not going to do it. The relationship between the crystal and load capacitor is critical, and it is therefore a mystery to me that so many (of the cheaper) are sold without the specifications. Anyway, if yours is a cheap Chinese crystal, try some other ones, perhaps you just got a bad one. Generally I always like to get a good brand name crystal. If you want to play with the one you have, try something lower yet, 8 or 7pF.

 

In general terms, and within limits, larger cap slows it down, smaller cap speeds it up. Sometimes (if you use 2 caps) using a slightly different cap on one leg of the crystal can make a difference in the final frequency.

 

Bill

--
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 view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/7ce2b557-f652-44b2-a71f-ed75b96ea06fn%40googlegroups.com.

gregebert

unread,
Apr 19, 2021, 12:14:25 PM4/19/21
to neonixie-l
I highly recommend a DS3232; it's very accurate, has the internal crystal, and requires very little power.

My nixie watch debug board has been sitting in the garage and has not been adjusted since March 2015 and it's gained less than 2 minutes after 6 years. Another interesting fact is the battery (used 1100mAh cellphone battery) will need it's first recharge today after 6 years of usage. Most of the time it sits there with the display off, so only the RTC and the leakage of the voltage regulator cause the battery to drain. But it's rather amazing that a well-used Li-ion battery could last that long on a single charge.

David Forbes

unread,
Apr 19, 2021, 1:26:41 PM4/19/21
to NeoNixie
My Nixie watches have a variable 5-30pF capacitor on the crystal so that I can adjust the oscillator to exactly 32768 Hz. You could use a different value depending on your crystal characteristics. I use an old Hewlett Packard universal frequency counter, running in time period averaging mode, measuring the time period of 10,000 cycles of the oscillator. 
I connect an oscilloscope probe to the oscillator output pin on the PIC computer to achieve minimum loading of the crystal circuit. I have to adjust it to run a bit slow with the probe connected, to get proper timekeeping when the probe is removed. 
I can adjust it to within one second per week using this technique. I've done this on 2000 Nixie watches by now, so it works.


chuckrr

unread,
Apr 19, 2021, 2:23:36 PM4/19/21
to neoni...@googlegroups.com

David,  I need to consult you about the rubidium oscillator.   I am wanting to set one up.   Can you offer any hints or tips

on dividing down the osc. Freq.  (10 mHz, I think it is, and typically powered by 24 volts DC).    Any of your thoughts

will be helpful.    Thanks,  Chuck
 

To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/CAPbqtvfXMhwT4BZLp64Rn_1SpMxDa-46RBVcpLMgkb0-4fFxMw%40mail.gmail.com.

MrThe50sanchez

unread,
Apr 20, 2021, 12:21:33 PM4/20/21
to neonixie-l
Hello Bill,

Thanks a lot for your answer and your knoledge,

I will do a chart with different capacitors values and I will see how the time delay get's. I'm using two capacitor to ich leg of the cristal.

as you say, my cristal is not that good, do you recommend a cristal in specific?

thanks a lot!

MrThe50sanchez

unread,
Apr 20, 2021, 12:23:47 PM4/20/21
to neonixie-l
Hello!

that's crazy!!!  haha

Yes, I was thinking to put a RTC on my watch, but it is more space. that's my second option If I dont fix really good the time delay.

But, as I know, With the RTC for example DS3232,  you also need to put an external cristal right? so, does theDS3232 regulate this time delay in any form?

thanks a lot!

MrThe50sanchez

unread,
Apr 20, 2021, 12:27:56 PM4/20/21
to neonixie-l
Hello David!

that's awesome, I really like the idea, I just bought an oscilloscope but a really cheap one, the only one I could affort.

I will try make some change's on the watch to catch a Via to connect the oscilloscope to it and take a good look to the frecuencia to try to get that 32.768 KHz  frecuency.

I love the idea of the variable capacitor, it is a really really good idea guys.


Thanks a lot for the comments, now I have more ways to keep studiying this methods and components.


Thanks!

gregebert

unread,
Apr 20, 2021, 1:25:53 PM4/20/21
to neonixie-l
The DS3232 has an internal crystal, with periodic temperature compensation (every 100 seconds). There are also non-volatile trim registers that allow you to fine-tune the trimming even further, though I have not needed to do that.

You wont be able to use a scope to fine-tune the crystal oscillator, because the scope wont have sufficient precision or accuracy. A frequency counter is a starting point, but in the end you will need to measure the time over a period of days to get it accurate.

Many years ago I had a clock-calendar in my S100 computer, and I would tweak the trim capacitor every few days. After a week it was really close. There were no cellphones, GPS receivers, or NTP servers to get the time; you had to call the phone company for a recorded message with the time, or catch a radio/TV station identification.

Bill van Dijk

unread,
Apr 20, 2021, 1:42:44 PM4/20/21
to neoni...@googlegroups.com

Without knowing your exact design I cannot recommend a specific xtal. For instance, PIC processors recommend a xtal with a load capacity of about 12pF, while other designs are optimized for different xtals. Often the devise data sheet will give you a short list of recommended xtals which have been tested by the chip designer. The main thing is that for critical applications (such as a time keeping devise) always get a good brand name item with full specifications. Often xtals used for running a program are not critical, so there you can sometimes get away with something cheap; as long as it runs, and is close. I am a great proponent of recycling, but saving 32kHz clock xtals is not worth the trouble. Xtals are complicated; there are different cuts and styles, all specific to particular applications.

 

There is a great app note from Microchip worth reading:

http://ww1.microchip.com/downloads/en/appnotes/00949a.pdf

 

Even Wikipedia has a decent chapter on xtals:

https://en.wikipedia.org/wiki/Crystal_oscillator

 

Lots of other good information sources on the interweb.

 

Cheers, Bill

MrThe50sanchez

unread,
Apr 21, 2021, 5:07:20 AM4/21/21
to neoni...@googlegroups.com
Thank's a lot Bill,


I'm gonna take a really good look at all the info you provide and will make a really good accurate watch. 



You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/TiYbTyH9ISc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/013901d7360c%2491079660%24b316c320%24%40gmail.com.

MrThe50sanchez

unread,
Apr 21, 2021, 5:09:19 AM4/21/21
to neoni...@googlegroups.com
David!

I was just taking a look at your Nixie watch diagram, what is the function on the resistor R11 = 510K on the Crystal circuit of the pic.

For getting better readings on the output oscillator?

Thanks a lot.



jf03...@gmail.com

unread,
May 19, 2021, 11:07:36 AM5/19/21
to neonixie-l
Did you ever get it t run at the correct speed?  If so, how did you fix it?

MrThe50sanchez

unread,
May 19, 2021, 2:18:26 PM5/19/21
to neoni...@googlegroups.com
Hello!
 
First of all I did a new design of the PCB which I added closer track between the cristal and the PIC pins. Also changed from 0603 encapsulated capacitors to 1206 to have a better pad for soldering.

These are the test I'm doing thanks to the nixie community and internet research.

1. I'm trying different values of capacitors (0-12pF) to see which is the delay in 24 hours. I still having 2-3 min delay in 24h, But I need to try more values (Just waiting to new stock arrives)

2. I'm going to install in another design a variable cap (But this is going to be the same test as 1 at the end) just changing values to see which gets less delay.

3. I made another design adding an RTC to the pic, I think this is the better way, but now I'm struggling with the pic, adding the new software change's and the new pin declaration is gonna be a lil bit hard for me, but I will end completing it with effort and a lot of learning and internet research.

I will let you know when I finish this test and will let you know.

PD: The cristal I ordered has in his datasheet 12.5pf (7pf in ich capacitor) or  (6 in ich capacitor) so that's why I'm Upgrading my pcb design.

Best regards.

Christopher.





--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/TiYbTyH9ISc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/8c45e8b5-dd09-496c-b1fe-8116fd4dd4cdn%40googlegroups.com.

jf03...@gmail.com

unread,
May 19, 2021, 11:49:30 PM5/19/21
to neonixie-l
As long as you are still trying things, you should try different crystals.  Instead of New Old Stock from a surplus electronics dealer (probably from the 1970s wen quality control was not very good), you could take one out of a clock or watch mechanism that does a good job keeping time (the ones I have gotten in the 21st century have been very accurate, within a few seconds per month).


MrThe50sanchez

unread,
May 20, 2021, 2:55:42 AM5/20/21
to neoni...@googlegroups.com
Hello!

Yes, That was another topic talked about.

The crystal I bought is from https://www.arrow.com/es-mx the one I bought and I'm trying is the ECS-2X6-FLX.
CRYSTAL ECS.JPG

How do you see this crystal? Any recommendations of where can I get a good quality cristal for my watch?

Thanks a lot!!!


El jue, 20 may 2021 a las 5:49, jf...@my-deja.com (<jf03...@gmail.com>) escribió:
As long as you are still trying things, you should try different crystals.  Instead of New Old Stock from a surplus electronics dealer (probably from the 1970s wen quality control was not very good), you could take one out of a clock or watch mechanism that does a good job keeping time (the ones I have gotten in the 21st century have been very accurate, within a few seconds per month).


--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/TiYbTyH9ISc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.

jf03...@gmail.com

unread,
May 20, 2021, 10:03:55 AM5/20/21
to neonixie-l
All the cheap watches and clock movements seem to use the same small cylindrical crystal.  I got many of mine by taking them out of old watches or clocks that had stopped working properly (like worn out gears in a clock).  If you do not already have any in your junk box, you should be able to buy a working one from a street vendor or flea market for under 5, and probably less than 1.  Also, new crystals will cost less than US$1 each (plus shipping and handling), so you could buy several and select the one that works the best.

Dekatron42

unread,
May 20, 2021, 10:28:08 AM5/20/21
to neonixie-l
What PIC-controller is the crystal hooked up to? Did you follow the design specifications for using the crystal you chose?

/Martin

MrThe50sanchez

unread,
May 20, 2021, 2:20:38 PM5/20/21
to neoni...@googlegroups.com
Wow!

That's an interesting Idea too! Yes, here in Spain we have a lot of street markets where you can find a lot of electronic waste components.

I will let you know How this works out!!

Thanks a lot for the help.


--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/TiYbTyH9ISc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.

MrThe50sanchez

unread,
May 20, 2021, 2:40:49 PM5/20/21
to neoni...@googlegroups.com
Ei Martin!

I'm using PIC16F1936 (16F family!)

my connections are the following.

Crystal pin 1 - RA7/OSC1/CLKIN/SEG2
Crystal pin 2 - RA6/OSC2/CLKOUT/VCAP/SEG1

 
I add you my pcb design (The old one) and the new one!

(OLD ONE)
 old ddesign.png



NEW DESIGN
new design.png


Thanks a lot!

--
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 view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/b9d34649-4fef-4fe8-a44b-8544b51dee8cn%40googlegroups.com.

Dekatron42

unread,
May 20, 2021, 3:09:01 PM5/20/21
to neonixie-l
Since this is a Tuning Fork type of crystal they are sensitive to to much energy and might become damaged if you use them incorrectly. You should read this article: http://ww1.microchip.com/downloads/en/appnotes/91097a.pdf and also read the Microchip application note above that Bill van Dijk suggested as they both explain/discuss how to use this type of crystal.

In this document for the PIC-processor in question: http://ww1.microchip.com/downloads/en/devicedoc/41364e.pdf they also mention the 91097a.pdf above as a document to read on page 71.

/Martin

MrThe50sanchez

unread,
Jul 18, 2021, 2:53:32 PM7/18/21
to neonixie-l
Hello Again group!


I've been testing this for a while, and I still have some delay minutes. This is the PCB design I'm using and components.

Components:
·PIC16F1936
·CRYSTAL MS3V-T1R CRYSTAL 32.768 Khz.
·Capacitors ( used 6.0 ; 7.0 ; 9.0 & 12.5) pF as datasheet from crystal recommend.
·Resistor value between 50/65 K ohm.

PCB Design:

This design is done following the document you guys added called:  Microship TB097 which give's good instructions on how install Crystals to our pics.


Guys, My head is gonna explote because I don't find the problem that is making minutes delays in 24H (About 3 mins per 24H).

I'm questioning two fact's that can be making this delay:

1. Pins connections between Crystal + Pic. In some other designs, crystal is attached to other pins. For example.

Example A) Crystal pins connected to PIN 9: A7/CLKIN & PIN 10: A6/CLKOUT.

Example B) Crystal pins connected to PIN 11: RC0/T1OSO & PIN 12: RC1/T1OSI.

this make's me think that I'm connectin the crystal to wrong pins? what's the difference between them?

2. Maybe I need to try better with other cap values?

3. Software getting the count wrong?

Thanks a lot guys, I really appreciate your time and help.

Christopher..

Dekatron42

unread,
Jul 18, 2021, 3:19:21 PM7/18/21
to neonixie-l
The capacitance you cite from the datasheet is not the recommended capacitance for the external capacitors, it is the load capacitance of the crystal - you must check your ordering document to see which crystal you got unless you can read the information on the crystal itself if it is laser printed there. The load capacitance can then be used to calculate what capacitance value you need for the two other capacitors - do a quick test with two 22pF or 27pF capacitors if you have the crystal with CL = 12.5pF - twice the load capacitance from the formula in the application note: http://ww1.microchip.com/downloads/en/appnotes/91097a.pdf is usually a good start, so if you have a lower CL value use twice that for tests.

Neither is the series resistance in the datasheet the value you need for the external resistor, it is the internal resistance of the crystal itself. You should use the value in the application note to start with, 220k - it might be that you have damaged the small crystal by over driving it if you used a lower value, it is explained in the application note why you need to protect the crystal from over driving. You can read some on series resistance and crystal selection here: https://www.maximintegrated.com/en/design/technical-documents/tutorials/7/726.html . The datasheets and product documentation found on the manufacturer website: https://www.microcrystal.com/en/products/khz-quartz-crystals/ms3v-t1r/ and https://www.microcrystal.com/en/products/khz-quartz-crystals/ms1v-t1k/ do contain the equivalent circuit for the crystal similar to the one above.

So try with twice the load capacitance for both capacitors and use the recommended 220k resistor as in the application note and see how it behaves - also use the pins recommended in the application note, ie CLKIN & CLKOUT.

/Martin

gregebert

unread,
Jul 18, 2021, 7:24:43 PM7/18/21
to neonixie-l
It is gaining time, or losing time ?

If it's losing time, could it be caused by execution delays in your software ? I've seen some really bizarre things happening with my Raspberry Pi based clocks because of the chaotic behavior of Linux, and I have even seen metastability-related failures due to the way I had software scanning hardware for asynchronous events. They are fixable, but they definitely challenge your debugging skills.

BTW, the last time I saw such a thing was yesterday....I'm testing my RZ568m tubes for a new clock, and saw my time jump by 2 seconds, instead of the usual 1 second, because of the way in which I update the displayed time. These are often subtle bugs you dont catch while typing-in your code.

MrThe50sanchez

unread,
Jul 19, 2021, 8:27:43 AM7/19/21
to neoni...@googlegroups.com
Hello!

It looks like I was in a Mistake with the datasheet of the crystal, thinking that the 6.0 to 12.5 pf capacitors would be perfect for the time running perfect, But with this configuration, I have like 2 mins of delay in 24H.

I really appreciate the help, Just took a quick look and you are right, 22-27Pf and 220K ohm seems that is going to fix the delay I have.

I will have a good reading of the links you added, will try, and will let you know.

Thanks a lot!

ZY

unread,
Jul 19, 2021, 11:38:26 AM7/19/21
to neonixie-l
If you're going with SMD components, you can also try using a SMD crystal to simplify the build process some more. I used this one for example (although currently out of stock, but there are probably similar ones)
https://www.digikey.com/en/products/detail/fox-electronics/FK135EIHM0-032768-T3/1024594

Also for future reference, sometimes it's actually the RTC that is faulty. I order a lot of components from aliexpress and have had no issues with going cheap, except in the case with RTCs. With cheap RTCs they are sometimes the ones that failed a self test off the production line and they'd be way off on time. I have a testing rig set up to make the RTC output a test frequency square wave that I can measure with a multimeter before I solder them.

Reply all
Reply to author
Forward
0 new messages