Author Topic: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.  (Read 12645 times)

0 Members and 1 Guest are viewing this topic.

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« on: February 27, 2020, 04:11:23 am »
"I am once again asking for your technical support."

Hey guys, I have a question I hope you can help me out with. My high school has a senior project program, and I've agreed to make a nixie tube clock. Yes, I've reached that milestone in my electronics journey. The days are flying by and I need to whip up something really fast, project due April 13 :scared:
I could just slap in an Arduino, a 170V power module, some bits and pieces and call it a day but I wouldn't learn much. I want to design something a little more discrete, something I actually have to design, which means figuring out how to make a clock, how to use some ICs to do counting, decimal output and such, how to make a 170V power supply and how to drive the tubes off the IC outpus. (Side note, anyone have suggestions for an SMD transistor that can handle this voltage? I found a couple through-hole parts but there's gonna be a lot of them and I'd like to make the whole thing smaller)

Right now I'm working on the clock circuit. I can't use the standard 555 timer circuits I'm familiar with because I'd need something more accurate. Quarts crystals just seem like the right solution. I want to create a 32.768kHz signal and divide it down to 1Hz using a couple ICs. I found a fantastic video by "devttys0" on YouTube that explained everything about how a Pierce Crystal oscillator works. I'll be honest, some of it is a little high-level for me to understand at this point, so some of it went over my head.
He links to a tool he made that helps calculate the values for an oscillator (here: http://www.analogzoo.com/lab/pierce_bjt.html) but I messed around with the numbers for a while and just couldn't get what I needed. Looking back it seems like the circuit was designed for higher frequencies (e.g. 16MHz). So I looked elsewhere for another circuit that might work better.

I resulted to google images and found this picture:


I tried to follow through to the website it was hosted on but it seems to be down so I couldn't find any more info on this circuit.

The circuit on the right seems like a good solution for what I want. It uses a simple transistor and not much else. I have some questions:

- Is this (circuit on the right) actually a good solution for my application?

- What is up with that adjustable capacitor? Are they pricey, and will I need to hold my tongue at an angle while adjusting it to get the correct frequency? Is there a simple solution like this that doesn't use an adjustable capacitor?

- How "generic" is this circuit? Can I throw in just about any transistor (I might want to use an SMD transistor) or 32kHz crystal and just adjust the capacitors to match?

Sorry for the word salad. I'm stressing out a little bit about this and need to figure it out very soon. I'm trying to figure out as much of this as I can by myself but I'm quickly reaching barriers with my limited electronics knowledge and need some outside help. Thank you guys for the help.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #1 on: February 27, 2020, 05:13:45 am »
Why not use an oscillator and divider IC like the CMOS CD4060 or descendants? Readily available and cheap and gets you a 2 Hz signal.
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9507
  • Country: gb
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #2 on: February 27, 2020, 01:59:13 pm »
Yes, a CD4060 or 74HC4060 would be a good choice because it gets you an (up to) 14 stage binary divider.

With reference to the two circuits shown, the logic inverter based one should use an unbuffered inverter, a 74HCU04 would be a good candidate. For the transistor one, a 2N3904 is about as generic as it gets, yes a surface mount equivalent (MMBT3904) is fine.
Best Regards, Chris
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #3 on: February 28, 2020, 10:01:42 pm »
Thank you guys. The CD4060 seems like a great solution - combination of a frequency divider and a circuit that handles the quarts oscillator. I found an appropriate circuit and slapped a flip flop on the output and now I believe I have a functioning 1Hz clock. Thank you guys for the help.

While I'm here, I do have one question for something I'm going to run into later on in the circuit. I'm planning on using six nixie tubes in my clock. Two for the hours, two for the minutes, two for seconds. The first digits of the minutes and seconds will not go higher than 5 and that the first digit of the hours will not go higher than 1 (its a 12hr clock).

Considering everything, I will end up needing to drive 44 individual digits. If I decide to exclude the seconds, I will need to drive 28 digits. Every digit will need its own high-voltage transistor. With some googling I found the MMBTA42, which seems to be a high voltage, tiny SMD transistor which could work. I tried looking for a transistor array to save space and dollar, but the results seem to quickly dwindle down as the max output voltage increases. Is there an NPN transistor array that can handle the voltage of these nixie tubes (170V)?
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #4 on: February 28, 2020, 10:20:15 pm »
The transistor does not need to handle the supply voltage of the nixies. What it needs to handle is the difference between the supply voltage and the sustaining voltage of the nixie. The latter is typically around 130V. So the transistor has only to hold off 40V. Add a bit of margin and a 60V transistor will do.

You can check the datasheet of the 74141, a BCD to decade nixie driver. The output is rated to 60V. Unfortunately the 74141 is out of production, but there is a Russian clone, the K155ID1, that some people use.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #5 on: February 29, 2020, 12:29:03 am »
OP can have a little piece of help. ;D

Yes -- but therein lies the problem, more or less.  The CMOS oscillator is probably better behaved, whereas the BJT you need to account for its impedances, and the crystal and capacitors will act somewhat as impedance matching elements as well as resonant elements.  Which means the two capacitors may end up skewed one way or another, to get reasonably high gain (for low phase noise and current consumption) and frequency within tolerance.

Note that the crystal's frequency is pulled by the capacitors thus attached; the equivalent capacitance seen by the crystal must match its spec, to obtain the specified frequency tolerance.  The two caps act in series, so the series equivalent, plus whatever other capacitances the circuit has to offer (e.g. don't neglect CMOS input pin capacitance, or stray (trace / layout) capacitance).

If the trimmer cap doesn't affect stability -- that is, the oscillator has sufficient gain over the cap's range -- then you would adjust it to trim the frequency precisely.  If you don't have a precision frequency counter, you'll probably do this by small adjustment as you find the clock runs ahead or behind.

The impedance is generally around the same as the reactance of the capacitors, hence the resistors serving the filter network are also quite large -- circa 300kohms.  If you figure similar value capacitors but many times higher frequency, you'll similarly see why 10-30MHz oscillators use lower impedances (100-1000 ohms).  Simply a matter of scale.

Tim
« Last Edit: February 29, 2020, 12:31:04 am by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline pqass

  • Frequent Contributor
  • **
  • Posts: 726
  • Country: ca
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #6 on: February 29, 2020, 03:20:10 am »
See Dave's nixie video series part 2 #950 here:
He shows that you can use a regular ULN2003 or ULN2803 with a 47V zener (or combination <50V) on the COM pin as the low-side driver.

Therefore, you should be able to implement your clock mostly without discrete components; eg. 6xCD4017, 6xULN2803, 1xCD4060, 1x32765 Hz xtal, 6x22Kohm anode resistors, and a few bypass and clock caps+resistors+zener(s).
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #7 on: February 29, 2020, 03:42:19 am »
I used MPSA42 transistors in most of my nixie clocks, in a few I used some octal transistor arrays. The downside of many of the lower voltage parts is that you cannot turn the tube off completely, if you have no cathodes lit you will get some leakage that causes a blurry glow as I recall. Supertex also made some HV shift register ICs, I don't know if they still do.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #8 on: March 08, 2020, 01:41:21 am »
Getting lots of fantastic help from you all. Thank you so much! It took me a while to understand the solution with the Zener diode and the 50V transistor array but I think I understand it now. It's actually a pretty brilliant solution. I had concerns about the digits not turning off fully, but as Dave demonstrated that isn't an issue. It makes sense anyways - the sustaining voltage for the tubes is 130V (thanks greenpossum), and with the 50V zener in use with 170V applied to the nixies, each digit will only see 120V when it's turned off, which is not enough to keep it on. If 120V is too close to the sustaining voltage and some strange leakage happens, I could probably cut off the 170V supply for some microseconds every time the 1Hz clock fires, so each digit that is supposed to be lit up needs to reach the striking voltage. 120V is significantly lower than the striking voltage of 170V. But I'll test it because it probably won't be necessary.

Learning a lot here, thank you guys for helping.



I have a quick question. Could I connect all of the COM pins across the six ULN2803 chips to one zener for the whole circuit? Or should I just use one zener per chip?
Also, reading the datasheet for the ULN2803, it seems like it already has a built-in base resistor, so I can just feed the outputs from the CD4017 decade counters (will use 5V power supply) directly into the chip's inputs, am I reading this correctly?

One more question if you guys don't mind. At this point I think I don't have enough time to really dive into the details about boost converters and nixie power supplies, and rushing the design for a 170V power supply seems like a bad idea. (I want to make a polished version once I receive my HS senior project grade, there I will spend the time to learn everything about boost converters). For now, to present the project I think I'll just go with one of those nixie power supply modules you can get off ebay/amazon, but I'd thought I'd try asking if you guys know of any circuits that would boost a modest 5V or 12V or so up to 170V? I hate asking these sorts of questions before putting lots of effort into trying to figure it out myself, but the deadline is fast approaching.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #9 on: March 08, 2020, 02:01:44 am »
I don't think putting the zener in series with the common pin of the transistor array will work but you need to draw us a schematic.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #10 on: March 08, 2020, 02:46:39 am »
I don't think putting the zener in series with the common pin of the transistor array will work but you need to draw us a schematic.

Here is what Dave and pqass was talking about, I think


Simplified, treating the Darlington like one transistor:

 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #11 on: March 08, 2020, 06:17:55 am »
I would think they can be common, yes. Total current will be, what, mA if that?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #12 on: March 08, 2020, 08:23:50 am »
Ok, that should be fine. It really is protection for the transistor, but you still need to be able to hold off the difference in voltage otherwise the tube will not turn off. So now the condition becomes:

Vstrike < V+ < Vsus + 47.6

instead of Vceo(max) in the place of 47.6.

As for the V+ supply if I were doing it I would end up designing something similar to those prefab modules that use a boost controller IC. So using a module is fine in my book.
 

Offline tkamiya

  • Super Contributor
  • ***
  • Posts: 2178
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #13 on: March 08, 2020, 05:45:36 pm »
My personal feel is that you have enough on your plate already.  I wouldn't be afraid to use a module for high voltage part.  Once you are building, you will have plenty of debugging to do. 

I experimented with Nixies in late 1970s.  Most tubes doesn't necessary require 170 volts.  120 volt transformer output into a simple rectifier will do.  Just don't use wall supply and rectify it.  Use a SMALL transformer and use current limiting.  I just don't recommend doing so much the first time.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #14 on: March 09, 2020, 01:33:49 am »
Update! I fussed around in KiCad for a little while. This program takes some getting used to for sure.

Anyways, I made a schematic! I was wondering whether you guys could check my work and offer some advice.
It's slightly unfinished, first because there's certainly going to be some terribly incorrect things my very inexperienced self messed up, second because I couldn't find any footprints or symbols for an IN-14 Nixie for KiCad.
Here it is:


It's a lot to tackle so rather than just throwing it at you guys I'll explain my thought process with everything.



Oscillator Circuit
This is the section on the bottom.


- I took your guys's advice and used the CD4060 (thanks greenpossum and Gyro). I found a random schematic off Google Images (probably not a very good way to find a schematic, but it looked legit). I'm not entirely sure how the resistor values near the crystal were derived.

- The CD4060 divides the 32kHz signal down to 2Hz. The CD4027 takes that 2Hz signal and halves it to get that golden 1Hz.

- Looking on DigiKey, there seems to be an abundance of 32.768kHz crystals with a capacitance load of 12.5pF, I think I'll use one of these. So I would think I should use 25pF caps, but I looked at the CD4060 datasheet and there was an input capacitance listed. Should I take this into consideration when calculating these capacitance values? (I misread the datasheet as 5pF, it's actually 7.5pF so the caps should be only 10pF, that way the total capacitance would be 12.5pF.)

Should I throw in an adjustable cap?



Decade Counter
This is the middle part of the schematic. I did lots of crazy things here that I'm really not sure will work.


- The second digit of every section (hours, minutes and seconds) uses all digits zero through nine. When it counts past nine, it resets back to zero and then sends a clock signal to the next decade counter.

- The first digit of the minutes and seconds sections only use the digits zero through five. So, when these counters reach six, it has a wire running to it's reset pin to reset itself and it sends a signal to the next decade counter to increase by one.

- There's some funky stuff happening with the hours section. Here's why. I'm making a 12-Hour clock. Unlike the 24-hour clock, which goes from 0 to 23, the 12-hour clock starts at 1 and goes to 12 before turning back to 1. There's no such thing as "zero-o'clock" with 12-hour time. To tackle this issue, I just advanced the numbers by one. Let me explain.
With all the other CD4017 counters, Q0 controls the digit 0 for that Nixie Tube, Q1 controls digit 1, Q2 controls digit 2, and so on. But with U4 (the counter that controls the second digit in the hours), Q0 will actually control digit 1, Q1 controls 2, Q2 controls 3, etc.. and Q9 controls 0. This way, it starts out at one-o'clock and ends at twelve-o'clock.

- Once it reaches 12-o'clock I want the clock to reset. So, I made a simple AND gate with some NPN transistors. When the first hours digit is on 1 and the second hours digit turns to 3, it resets.



- I wanted to be able to adjust the time. So I added some things. First, I added a disable switch (SW3, underneath U14 on the far right). I want two things to happen when this switch is hit: 1) It stops the clock from counting up so I can adjust the time, and 2) It resets the seconds part to 00. I achieved this by sending the high voltage to the Enable pin of U14 and the Reset pin of both U14 and U12.

- To adjust time, I want to be able to press a button to increment the minutes or the hours by one. That's what SW1 and SW2 are for. I connected them to a little de-bouncer circuit using some resistors and capacitors, and added D2 and D3 to prevent the signal from being backfed to the previous counter's output.




Nixie Drivers
It's the top section.


I'm hoping this part is self-explanatory. Each of those pins on the different ICs will go to one of the cathode digits of the nixie tubes. I'm using the little trick with the zener diode to clamp the voltage and keep the magic smoke inside the IC packages (thanks greenpossum and pqass!). I'm hoping it'll work out with just one zener for everything (thanks for the advice Tim!). And crap, looking at it I just realized I put the zener in backwards!! oops!

Each nixie will receive 170V through a 20K resistor on each anode. (Just had a thought. Will I need a high-voltage resistor?) I'll go ahead and use a power supply module. Thank you tkamiya and greenpossum for advising me with this




I need to figure out how to put Nixie tubes in KiCad. I think at this point I'm just about ready to start troubleshooting.
Please let me know what you think of this circuit and if you see any issues
« Last Edit: March 09, 2020, 02:15:33 am by Mighty Burger »
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #15 on: March 09, 2020, 01:49:46 am »

Fixed the zener guys don't worry
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2223
  • Country: mx
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #16 on: March 09, 2020, 02:20:20 am »
On the decade counters, you are using a pair of transistors as a discrete AND.
My only comment here is that running from 5 volts and with two Vbe drops, the reset pulse’s high level could be borderline to meet CMOS levels.

I could be wrong, but please check it with a scope.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #17 on: March 09, 2020, 02:41:03 am »
- I took your guys's advice and used the CD4060 (thanks greenpossum and Gyro). I found a random schematic off Google Images (probably not a very good way to find a schematic, but it looked legit). I'm not entirely sure how the resistor values near the crystal were derived.

...

I need to figure out how to put Nixie tubes in KiCad. I think at this point I'm just about ready to start troubleshooting.

Have a look at https://hackaday.io/project/167443-crystal-tester where I discuss the values of the Rs and Cs around the crystal. I used 22pF myself. CD4060 datasheets are easy to find.

I think Kicad has a footprint wizard that can create a circle of pads.

As for the reset at 13 why not use CMOS logic to generate the reset signal? You just need a NAND gate (says he without looking too closely). Easier than futzing with resistors and transistors.
« Last Edit: March 09, 2020, 02:45:01 am by greenpossum »
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #18 on: March 09, 2020, 02:46:54 am »
On the decade counters, you are using a pair of transistors as a discrete AND.
My only comment here is that running from 5 volts and with two Vbe drops, the reset pulse’s high level could be borderline to meet CMOS levels.

I could be wrong, but please check it with a scope.

Good point. I'll have to see if it works. If not, what are my options? Is there a transistor that has a lower voltage drop?

Now that I think about it. I'm using four different types of ICs. Three of them, the CD4060, CD4027 and CD4017 all seem to have a supply range of 3 to 18V according to the datasheet. (The fourth one, ULN2803, doesn't need a power supply). So maybe I can just switch the whole power rail to 6V. Would this damage anything? My one concern would be about the outputs from the decade counters (CD4017) going into the darlington arrays (ULN2803). The ULN2803 datasheet says it has a series base resistor for every darlington transistor pair that makes it directly compatible with 5V and 3.3V logic. Is 6V too much without adding any additional resistance?

Maybe I could just put it a notch above 5V. Maybe 5.3V.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #19 on: March 09, 2020, 02:53:51 am »
Q1-E can only pull up to ~4.3V, but Q2-E can pull up to V(Q1-E) - Vce(sat).  It's fine. :)

Regarding the zener, I wonder if it's worth biasing on slightly?  A 100k (or even more) from +HV to it would do.  This ensures its leakage current doesn't idle any segments.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #20 on: March 09, 2020, 03:01:38 am »
- I took your guys's advice and used the CD4060 (thanks greenpossum and Gyro). I found a random schematic off Google Images (probably not a very good way to find a schematic, but it looked legit). I'm not entirely sure how the resistor values near the crystal were derived.

...

I need to figure out how to put Nixie tubes in KiCad. I think at this point I'm just about ready to start troubleshooting.

Have a look at https://hackaday.io/project/167443-crystal-tester where I discuss the values of the Rs and Cs around the crystal. I used 22pF myself. CD4060 datasheets are easy to find.

I think Kicad has a footprint wizard that can create a circle of pads.

As for the reset at 13 why not use CMOS logic to generate the reset signal? You just need a NAND gate (says he without looking too closely). Easier than futzing with resistors and transistors.

This was a helpful post. Thank you. Reading through it, seems like I should be OK with a plain 10M resistor (no need for this strange 13.6M value one). I'll experiment a little bit with the capacitance. I'll try out 10pF caps and 22pF caps, and maybe an adjustable cap, and I'll measure the frequency output and see how it changes.

I'll see if anyone else has made an IN-14 footprint, if not I'll go ahead and design one

For the reset-at-13 circuit I was hoping to use the most jellybean parts possible. (I think it would be an AND gate, if I'm not mistaken the reset pins are active high) Maybe it's better if I just go ahead and use CMOS logic, it is lower power after all
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #21 on: March 09, 2020, 03:12:15 am »
Q1-E can only pull up to ~4.3V, but Q2-E can pull up to V(Q1-E) - Vce(sat).  It's fine. :)
Thank you, I'm still learning about transistors so I wasn't aware of this

Regarding the zener, I wonder if it's worth biasing on slightly?  A 100k (or even more) from +HV to it would do.  This ensures its leakage current doesn't idle any segments.

You mean like this?
Excuse the crudity of the model  :)



Also, just had a thought. I don't have any bypass capacitors anywhere! Are they needed?
« Last Edit: March 09, 2020, 03:15:24 am by Mighty Burger »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #22 on: March 09, 2020, 04:03:49 am »
Yes, and yes.  A few 0.1uF scattered around the circuit will do, particularly the 4060. Probably, power will be routed in a chain from chip to chip, don't worry about having a cap for each chip, a few can share.  Something to dampen medium frequency resonance, maybe 10-100uF electrolytic, at the inlet or the end of the chain.  CD4000 isn't fast, especially at 5V.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2223
  • Country: mx
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #23 on: March 09, 2020, 02:15:01 pm »
Thanks, Tim, he has explained correctly my concern.

But returning to your question about the supply voltage, since your are planning to use CD40xx devices, you do have significant leeway with the supply voltage.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #24 on: March 13, 2020, 09:54:59 pm »
Tadaa

Here's a semi-final schematic


Time to build this thing up!
I'm probably going to order both SMD and THT versions of these so I can test it out on the breadboard before I design a PCB and solder everything on. This is probably fine for everything but the crystal part, maybe I can just solder Y1, C4, C6, R9 and R11 in a skeleton shape dealio, because breadboard capacitance might mess things up? Or is 32kHz low enough where I won't have to worry about that?

Also I put C4 and C6 as "TBD" because I want to test out these capacitor values and see what works best.

I was able to make the symbol and the footprint for the IN-14 without any problems. Thanks greenpossum for letting me know about that circular wizard
« Last Edit: March 13, 2020, 09:57:47 pm by Mighty Burger »
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #25 on: March 13, 2020, 10:51:02 pm »
Or is 32kHz low enough where I won't have to worry about that?

It's just that the tolerable stray capacitance is lower for 32768 crystal circuits. You could make the oscillator on a separate perfboard for testing.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #26 on: March 14, 2020, 11:46:23 pm »
Or is 32kHz low enough where I won't have to worry about that?

It's just that the tolerable stray capacitance is lower for 32768 crystal circuits. You could make the oscillator on a separate perfboard for testing.

Will do. I'd imagine the stray capacitance would be about the same on a perfboard as the finished PCB.

Well, I ordered the parts! They should arrive Tuesday/Wednesday. I want to jump right into designing the PCB but I'm a little reluctant in case I find an issue with the schematic. But April 13 is coming fast and JLCPCB ships from China ..
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #27 on: March 15, 2020, 12:02:02 am »
I also used keep out zones on both sides of the PCB around the crystal and the traces to it to minimise stray capacitance.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #28 on: March 22, 2020, 12:49:13 am »
I've built the circuit (most of it) on the breadboard! I've ran into three issues while building it.

1. The seconds would not carry over to the minutes, and the minutes would not carry over to the hours. I've figured out why. The outputs of U6 and U12 are connected to both their own reset pins and the clock pin of the next chip. The issue is that each chip resets itself before the next chip receives the signal to advance by one. I fixed this by adding a resistor and capacitor on the reset pins of U6 and U12 so that they reset a couple hundred microseconds later. This seems to work, and I've ordered enough additional parts that I can implement this.

2. When powering on the whole circuit, the state of the binary counters seems unpredictable. Usually they start at zero, but occasionally they will start with multiple random outputs on. It fixes itself once each chip counts over. I figured that this could probably be solved by signaling the reset pins right after the circuit receives power. I would probably do this by having a 100nF capacitor in series with a 10k resistor. The resistor connected to GND, and the capacitor connected to the +5V rail. The junction between the two could then go to each reset pin through a diode. But there's a few issues. I haven't bought enough extra diodes to make this happen (and I don't want to pay another shipping fee from Digikey, wasted money), I didn't test this solution out, and if I place a diode after the NPN AND gate that resets the pins of U2 and U4, that would probably bring the issue around again of the voltage dropping too low for CMOS. I could use an IC for the AND gate but it's starting to get a little convoluted for something due too soon.
I think for now I'll just deal with it and do nothing. I'll fix it in the polished version I want to make after this senior project is in the past. There's an advance button for the hours and the minutes, and a switch that resets the seconds, so if I plug it in and the counters go whack I'll just cycle through all the numbers until it's fixed. I will need to adjust the time anyways every time I plug it back in. I don't think the transistor arrays or the nixie tubes themselves will be damaged if multiple digits are lit simultaneously in the same tube, correct?

3. Some weird stuff happened while I was testing out the nixie tube driving circuitry, but it seems to have fixed itself except for one minor issue. Little bits of the different digits start to glow when no cathode is being driven. This won't be problematic for me because each tube should always have one cathode being driven when the clock is operating as it should. It's just an interesting issue that I might want to figure out in case I want to take this nixie driver design and apply it in other projects, but that's not something I will deal with right now.
Now, because of limited time and jumper wires, I only tested out one nixie tube (connected to the last digit in the seconds), and only four digits of said nixie tube. It concerns me a little bit because I couldn't test the whole entire circuit at the same time but I think it's good enough to design a PCB around and get this thing built.


 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #29 on: March 22, 2020, 05:32:12 am »
I found that blog page has a lot of info about nixies and their power supplies. The glow tends to happen when all cathodes are turned off.

https://threeneurons.wordpress.com/nixie-power-supply/

In your design you have at least one cathode on so that's not a problem. Some careful designs turn off the anode before the cathode. This is easier to do when the anode is also driven, for multiplexing.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #30 on: March 22, 2020, 08:46:42 pm »
I found that blog page has a lot of info about nixies and their power supplies. The glow tends to happen when all cathodes are turned off.

https://threeneurons.wordpress.com/nixie-power-supply/

In your design you have at least one cathode on so that's not a problem. Some careful designs turn off the anode before the cathode. This is easier to do when the anode is also driven, for multiplexing.

This is an extremely helpful blog. Thank you, I bookmarked that page. It explains a lot of the behavior I've been seeing with these tubes.



Also, very random question, does anybody know where I can get these brass fittings seen in this picture? They look very nice and I would love to use something similar in my clock. I'm using the same IN-14 tubes, a little over 18mm diameter. I'd assume I'd have to space them a little further apart if I use them.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #31 on: March 23, 2020, 08:12:45 am »
Maybe you can make friends with a tame machinist with a lathe. How about hardware shops? Some kind of decorative fitting?

One nice effect I've seen is to put a blue led at a suitable brightness under the nixie. Good contrast with the amber.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #32 on: March 24, 2020, 01:05:41 am »
Maybe you can make friends with a tame machinist with a lathe. How about hardware shops? Some kind of decorative fitting?

One nice effect I've seen is to put a blue led at a suitable brightness under the nixie. Good contrast with the amber.

I'm friends with some people with lathes, only problem is they're all wood lathes  ;D Ah well, I'm sure it'll still look good without the brass pieces

I've seen lots of videos and pictures of nixie clocks with blue LEDs, and to be honest I really do not like that look at all. If I make a polished clock to sell sometime in the future, I'll add it but personally I would end up just turning the blue LEDs off on mine all of the time. Thanks for the idea, though!
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #33 on: March 24, 2020, 02:01:39 am »
Post pix when you're done!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #34 on: March 24, 2020, 11:32:53 pm »
Is there any way I could ask you guys to review my circuit board? This is my first time making these things. I don't really know what I'm doing but I don't think I need to worry too much about high-frequency impedance or anything with the majority of this circuit.
Is the gerber file suitable for submitting to JLCPCB?

I used a keepout zone for copper fills around the oscillator area to minimize stray capacitance as per greenpossum's recommendation (thank you!). I also placed some vias to "stitch" the ground copper pours at different points on the board (is that the correct term?)

Thank you




Also, I am using the "NCH8200HV" module from Amazon as a 170V power supply. That is what that square is for.

I plan on mounting this right to the top wooden piece, so most of the components are on the bottom. The ones that are on the top of the PCB are thinner than the nuts for the bolts I plan on using.
« Last Edit: March 24, 2020, 11:37:19 pm by Mighty Burger »
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #35 on: March 24, 2020, 11:37:08 pm »
JLCPCB has a page on the settings you should use when generating Gerbers.

I recommend you use the highlight net function in Kicad to check that all the connections in the schematic actually correspond to tracks on the PCB. Better to find out at this stage than later. Also generate a 3D view so that you can check clearances. Especially important for large components like modules, capacitors and connectors.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #36 on: March 25, 2020, 01:36:03 am »
I'd like to see more distributed via stitching (what are those rows of vias, are those all GND? but they're so close together?), but other than that, at a glance it looks reasonable. :)

I would recommend ignoring the oscillator keepout suggestion.  No ground makes it hugely more susceptible to ambient fields.  If you're running too much capacitance from strays, just reduce the damn shunt capacitors, I mean duh..?

Tim
« Last Edit: March 25, 2020, 01:37:39 am by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #37 on: March 25, 2020, 01:40:30 am »
Was checking through some things and I realized I got my nixie tube footprint backwards. As it turns out, the datasheets I was looking at were a bottom-up view  :palm:
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #38 on: March 25, 2020, 02:01:39 am »
I would recommend ignoring the oscillator keepout suggestion.  No ground makes it hugely more susceptible to ambient fields.  If you're running too much capacitance from strays, just reduce the damn shunt capacitors, I mean duh..?

If you look at RTC crystals on PC boards this is what they do. Nobody in their right mind will run a trace to the other end of the PCB. All the recommendations say keep the crystal close to the IC pins. So there will be hardly any induced signal for a trace of what, 10mm?  :P
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #39 on: March 25, 2020, 01:44:11 pm »
Short trace length yeah, that's good.  But induced signal is induced signal... and the pins are huge and exposed.

You can reduce susceptibility here by dB if you use short traces and smaller pins and components.
By 10s of dB by pouring ground around it.
By 100s of dB if you put a shield can over it.

In exchange for no performance change in the oscillator?  That's not even a discussion!

Sure -- I'll look at three motherboards I've got in my junk bin right now --
Dell Inspiron 5160 I believe -- Intel SuperIO chip, BGA top side, RTC crystal bottom side.  Narrow 4-pin SO style plastic case.  No shunt capacitors (probably enough internal on the pins).  No evidence of removed internal planes.  8 layer board if I'm not mistaken.


Compaq 8510W workstation -- actually three tuning-fork (very narrow body, leadless(?) 4 pin) crystals I've spotted, one looks to be for the TPM (which, haha, Infineon SLB9635TT12 is a TPM controller from 2006 apparently!), has two flanking capacitors and a parallel resistor, solid ground underneath.  One beside the Intel SuperIO chip, has capacitors and resistors nearby but unclear if they're connected.  One beside the PCI bridge(?).  Interestingly, this board doesn't seem to have a backup battery, though the others do.

Desktop motherboard, K7T Turbo2 -- VIA SuperIO, metal-can watch crystal, THT.  Sort-of stapled to the board with a jumper wire.  Seems they stopped short of actually soldering it, but the can is very likely grounded.  Two connected capacitors, and a... 5.6M resistor?

So yeah, ground under all of them.  Removed grounds would be just absurd in high density, high speed builds like these, and would have no effect on the poor crystal. :-+

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #40 on: March 25, 2020, 07:15:18 pm »
Made some changes here.

- I fixed the IN-14 Nixie footprint. If anyone else ends up doing something similar, please ensure you get the footprint the right way around the first time to save some frustration :palm:
Because the digits are now in reverse order of the pins of the ICs, I had to do some very claustrophobic routing. Of course, I ensured the clearance was fine. I have the 170V nets at a clearance of 50 mils and the 50V nets at a clearance of 25 mils. Running the DRC, the only problems it detected were around the two pads of each of the anode resistors and the two pads of R1 (the resistor that pre-biases the zener diode). The anode resistors will only have a drop of 50V across the pads, and R1 will have a drop of 120V, looking online the acceptable clearances for those voltage ranges according to some safety standard are both 25 mil. KiCad's rudimentary netclass clearance system doesn't have a way to deal with that, so just to check, I temporarily changed the clearance of those netclasses to 25mil. Then when I ran the DRC, there were no problems! :D (Yes, I changed it back to 50mil and refreshed the copper pours)

- I changed up the via stitching a little bit. Distributed it a little more. It's not perfect but I think it'll do for this project.

Not sure what to do as for the GND plane underneath the oscillator part. You two seem to disagree, and with some googling I could only find conflicting answers. I figure that, since while testing the circuit my oscillator I lousily soldered together with unnecessarily long wires (I wasn't aware of the impact it had), with my garage space heater running that pumps out tons of electrical emissions enough to show up in large scales on my scope - since that worked just fine, I figure the oscillator on the circuit board should work OK with or without the GND copper pour. It isn't super high frequency stuff anyways. So I stuck with the status quo and didn't change anything. I might want to do more research on this if I plan on making a polished version. If this doesn't work somehow, I'll just throw in the board I've already soldered to perfboard that does work and wire it to the board just for the senior project grade.




With these renders I seem to only have models for one component, C2 (the electrolytic cap). I think the clearances for everything should be fine, if not I can just fab up a fix and take note of it if I make a polished version down the road.
Thank you guys for the help.
I'd figure I'd ask for one final overview to see if I've made any problems my inexperienced eye didn't catch before I order the boards.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #41 on: March 25, 2020, 09:45:31 pm »
So yeah, ground under all of them.  Removed grounds would be just absurd in high density, high speed builds like these

Since when is 32.768 KHz high speed? :P You have got it confused with CPU clocks. There is a reason many of those are SPXO.

Also OP took it much further than I normally do. My keepout is just in the vicinity of the crystal and also small ones between pins to prevent any trace from going in between. That said, either way is unlikely to make any difference to this low speed design.
« Last Edit: March 25, 2020, 09:59:31 pm by greenpossum »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #42 on: March 25, 2020, 10:28:23 pm »
So yeah, ground under all of them.  Removed grounds would be just absurd in high density, high speed builds like these

Since when is 32.768 KHz high speed? :P You have got it confused with CPU clocks. There is a reason many of those are SPXO.

Everything else is. PCI(e) buses routed past a super high impedance crystal with removed ground, would destroy both the crystal and the high speed signals. Sorry that was unclear.


Not sure what to do as for the GND plane underneath the oscillator part. You two seem to disagree, and with some googling I could only find conflicting answers.

It's regrettable that I don't have any source of authority to hand -- supportive and consistent references, or analyses, for example.  Or, even if I did, that they would necessarily be understandable.  My signature seems to be more authoritative than his, but that's still just a handful of words, and if they have no meaning to you, it's not much help.

You're welcome to go either way.  It will probably work.  Your environment may not be all that noisy afterall.  Maybe it will merely manifest as slightly out-of-spec or variable timekeeping, and that will be an acceptable burden.

Tim
« Last Edit: March 25, 2020, 10:32:57 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #43 on: March 25, 2020, 10:47:13 pm »
Well, I've ordered the boards. Apologies if I've offended anyone over the whole GND plane debacle. Thanks for the help everyone.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #44 on: March 25, 2020, 11:56:29 pm »
Quick update. The Idaho State Department of Education has decided to let school districts opt out of the senior project requirement because of le Corona. Whether my school actually cancels the project is to be seen. Either way I have been wanting to make a nixie tube clock for a very long time apart from anything school-related, and I'm very excited to see how this project turns out.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #45 on: March 26, 2020, 12:50:23 am »
Well you've got an attractive project going here so you would really get a lot of satisfaction getting it working. You might later like to write up your project at hackaday.io to show it off.
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2223
  • Country: mx
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #46 on: March 26, 2020, 02:39:09 pm »
Since your board is long and the relatively tall tubes con apply significant leverage on the board, I would strongly suggest that you add mechanical support between V2 and V3, and between V4 and V5.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #47 on: March 26, 2020, 05:58:20 pm »
Since your board is long and the relatively tall tubes con apply significant leverage on the board, I would strongly suggest that you add mechanical support between V2 and V3, and between V4 and V5.

You do bring up an interesting point I hadn't thought much about - mechanical design. It reminds me of one of Linus's videos he made recently where they were reviewing a product, and a member of the crew mentioned how he could tell it was made by electrical engineers because the structure was terrible  ;D
Unfortunately I've already ordered the boards so it is too late to adjust the mechanical support. I will add this to the ever-growing list of things I should refine if I make a polished version in the future. Thank you for the advice.

I wonder what the best way to mechanically attach my circuit board to the enclosure. I'm going for a look similar to the picture I uploaded a few posts up. At first I thought I would simply have small bolts going through the top wooden piece and attach the board using bolts and nuts, but thinking back on it that would mean having the bolt heads visible on the top. Since I'm going for aesthetics (otherwise I would've made a simple clock with 7-seg LEDs) I don't think this is a good option. I could use standoffs and attach it to the bottom board, but it would be less structurally sound than having it attached right to the top piece of wood. This is because, with the exception of the nixie tubes which will poke through holes, all components on the top of the board are very thin and so the board can be attached very close to the top of the clock, distanced by the width of a nut. Attaching it to the top would also give me leeway with the wooden enclosure, as the amount the nixie tubes pop out the top would not be dependent on how tall the entire enclosure is. Everything considered, though, it seems like the way to go is to attach it to the bottom piece of wood, unless there was a way to indiscreetly and strongly attach it to the top. I could potentially thread the wood, but that idea just seems sketchy to me, as I don't think wood would thread well with the fine thread pitch of M3 bolts. I also don't have any threading equipment.

Edit: Maybe I can use a threaded insert. Would those be strong enough? Am I overthinking this?
« Last Edit: March 26, 2020, 06:11:12 pm by Mighty Burger »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #48 on: March 26, 2020, 08:42:36 pm »
6 screws is fine.  You can by the way get press-fit and/or soldered nuts, which can be used on the bottom side as blind mounts.  Though they're weaker than a clamping joint is.  Or swaged nuts/standoffs, which grip the laminate and don't have much top side profile.

Mechanically I would be much more concerned about the tubes being loose in their sockets, that is, put in some kind of bracket and shock mount for them.  Then you can worry about the PCB.  At that point you can drop it off a ladder and I'm not sure what more you'd really worry about. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #49 on: March 26, 2020, 10:06:28 pm »
6 screws is fine.  You can by the way get press-fit and/or soldered nuts, which can be used on the bottom side as blind mounts.  Though they're weaker than a clamping joint is.  Or swaged nuts/standoffs, which grip the laminate and don't have much top side profile.

Mechanically I would be much more concerned about the tubes being loose in their sockets, that is, put in some kind of bracket and shock mount for them.  Then you can worry about the PCB.  At that point you can drop it off a ladder and I'm not sure what more you'd really worry about. :)

Tim

Thank you for the advice! I've never heard of lots of those technologies, they all seem super useful. Are they used in industry often?

With this PCB I actually shied away from the idea of using a socket for the IN-14 nixie tubes. I was planning on simply soldering the nixie tubes to the circuit board with the white spacers they came with. I designed the footprint around it, though if it turns out socketing is a better option I could probably use socket pins..? (Sometimes I wish I had an existing nixie tube clock to my side so I can see what they did. But they're extremely expensive!) Here is a picture of what those spacers look like (not my picture). I figured since the nixie tube leads were very similar to that of through hole component leads, like resistors, they would not be suitable for a socket, and it would be better to simply solder the leads of the nixie to the board. I've read concerns about soldering the tubes directly to the board and some suggested soldering the leads a little further out because the thermal shock could crack the tubes, but I figured the spacers should create enough distance between the nixie's glass body and the board that it shouldn't be an issue. I do not think the tubes should fail often enough in operation that the time and effort required to desolder one tube and solder a new one would be problematic, but if I want to make a polished version in the future and I wanted to sell it, I might want to switch to a socket so the user can easily swap out failed tubes themselves.


When making that decision, though, I did not consider the factor of mechanical shock. I can see how the tubes would be very vulnerable if the device were to be dropped. Since the tubes will be directly soldered to the board and therefore mechanically attached to it, my inexperienced guess would be that I should shock-proof mount the entire circuit board to protect the nixie tubes. If I were to use simple standoffs, could this be done with a rubber washer on either side of the board at each mounting point? I honestly do not have much of an idea of what I'm doing here (as you can probably tell :D)

Please be patient with all of my questions, this is the very first time I've designed a circuit board so I'm learning a lot here, thank you all for the help.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #50 on: March 27, 2020, 03:26:40 am »
Likely the tubes will handle shock just fine, as long as it's evenly distributed and not snapping leads off.  A bracket, screwed or glued to the board, and anchoring the tube (maybe it clips into it like a fuse holder?), would be great.  Or a spring loaded halo, clamping the top in place.  Those were used back in the day.

Sockets, right, those are leaded.  If you don't mind desoldering them if they ever need to change, that's not terrible.  Not like you can just shove them into sockets anyway, gotta trim and form the leads -- much nicer to change though.  Well, if you like, PC sockets are available, Mill-Max being the go-to.  Pricey.  Obviously the hold-downs will be much more important in this case, and shock mounting (most likely as rigid restraint) in the other case.

Wouldn't worry about shock-mounting the whole board, but if you want to go that way I would suggest a compact bracket to hold the board itself, then some rubber shocks probably to mount it to the enclosure proper.  Bracket has fins to keep the board rigid, so it all moves mostly as a single mass; this acts against the springy shocks as a lowpass filter.  And like an LC filter, it should be damped with lossy materials.  The rubber usually not having very good Q factor -- the mechanical equivalent of ferrite beads -- may be enough.

Wouldn't be so keen on smaller solutions like rubber grommets and washers; if you're worried about dropping it, the amount of displacement you need to absorb to make any useful difference, will easily bottom out such things.  You'd be better off making it more rigid and secure, versus not nearly springy enough. :-+

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #51 on: June 06, 2020, 07:27:37 pm »
Hey guys, it's been a little while, and I've decided to get back to this project. I wanted to update you guys on my progress and ask for a little bit more help. I think it would be fantastic if I could polish this up enough so that I might be able to sell it!

I soldered up the PCB. Here's what it looks like so far, haven't designed or built a wooden enclosure around it but that part shouldn't be so bad.


And here's the circuit again


It works great, except for a couple issues I somehow didn't catch when prototyping. I guess this is also a sort of prototype.

1. Apparently the pushbuttons I bought off amazon are garbage and the debounce circuit wasn't strong enough. The pushbuttons to set the minutes and hours, if you don't do a firm and solid push, increase the counter multiple times and it gets annoying. With the help of a scope, I figured out that if C3 and C8 are increased from 10nF to somewhere around 300nF, it'll work perfectly. Even 100nF is fine but the counters will count twice every once in a while if you lousily push in the button and it's good to have some margin. I was worried about the rise time becoming too great but it didn't seem to cause an issue - looking at the datasheet, the CD4017 has a max rise/fall time of... unlimited?? So I should be OK in that regard, no fancy Schmitt trigger shenanigans necessary thankfully. Just increasing the capacitance seems to be enough to deal with this issue.

2. When the circuit is first powered on, funky stuff happens and sometimes multiple digits display in the tubes themselves. This issue goes away once the counters are cycled through. I was aware this might be an issue when I was doing this for my senior project but the stress and imminent deadline made me ignore it. But now that I'm hoping to sell a couple clocks, this problem is unacceptable. I think this could be solved by pulsing the reset pins on the counters on startup. I drew up a circuit and wanted to get your thoughts on a couple things.

My first concern is with the diode (drawn in orange) that goes into the reset pins of U2 and U4. It will also go to the emitter of Q2. This means, on startup, there will be 4.4V present on the emitter of that NPN transistor while its base and collector are at 0v. I don't know enough about transistors to know whether this is will cause a problem. If this is bad what other options do I have available?

Also, I drew a little blue diode that goes into the reset pin of U12. I do not know if this diode would be necessary, since the signal sent from my orange drawn diode on the far right could go through D5 to reset U12. But then we're dealing with two forward voltage drops which brings the signal level right on the edge of CMOS levels. My guess is the blue diode is necessary.

And how long should the signal be on startup? I could throw in a 100k resistor and a 100nF capacitor to be consistent with the components I use and that should equate to the signal being high enough for a high CMOS signal (after diode voltage drop) for about 1.5 milliseconds. Maybe this is too long, maybe not ..



3. A third issue I noticed, and I only noticed it once but the fact it happened is a little concerning. I plugged it in once and the clock wasn't counting (no, I didn't have the disable switch on, in fact I haven't soldered on the disable switch yet so that's impossible). I plugged it in again and the same thing happened. But I tried once more a little while later and it fixed itself. Could this be caused by the lack of the ground plane around the crystal oscillator causing it to be unstable? Maybe adding back that ground plane could make this less likely, and also probably make the clock count a bit more accurately?


4. One more issue that I found was that the nixie tubes don't all face straight forward. I do not believe this is a PCB Layout error as they seem to be facing randomly off, a couple of them are close to straight on and a couple are a little more off. it's right at the point where if people looked close enough they might be able to notice it but otherwise it won't bother them. I don't think there's anything I can do about this as it's probably a manufacturing error when the tubes were first made.




Apart from those four issues there is a couple things I'd like to do to this circuit.
First, there's currently no input protection, and the board is powered by a simple barrel jack. Someone could easily accidentally plug in a 9 or 12V supply or, dare I say, a center-negative supply, and bam, there goes their fancy new clock. This is no good!
I could add some protection circuitry, maybe a voltage regulator and a MOSFET dealio to protect against the evil center-negative supply. But this adds complexity to a board that already has little space left to work with (it'd be nice to keep the board at or below 50mm x 200mm for price reasons, etc). One idea I had was to use USB power. USB-C is the new fad, right? With a USB-C port and two resistors for the USB communication deal, this board could receive power that is guaranteed to be 5V and not have the polarity reversed. And it might feel a little more premium than the barrel plug. And if they misplace the included power supply they could just snag a USB cord and charger brick and be done with it. Only issue is I'd have to source a USB cable and USB "brick" power supply, which could be a little pricey, and I'd have to find a source that is consistent.

Finally, one last thing, I used a pre-made 170V power supply module to save time. I bought this: https://nixie.ai/2017/08/06/nch8200hv-our-newly-designed-nixie-high-voltage-power-supply/ from their amazon page. It worked perfectly. Problem is, it's a little pricey at $20, and it doesn't make much sense to keep buying these modules if I want to sell clocks. I have the supply with me but I don't want to reverse engineer and copy their design, because then I wouldn't learn anything, and besides that seems like a rude thing to do. Can you guys tell just by looking at the website what kind of voltage booster circuit they used? From there I could probably dive in and learn about high voltage power supplies and probably design my own. That way I could learn, save some money, and really be able to put on my resume that I designed a nixie tube clock circuit (with the wonderful help of you all :D)


Thank you!
 


Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #53 on: June 07, 2020, 08:57:51 pm »
Do not reinvent the weel

https://www.aliexpress.com/item/32847864135.html?spm=a2g0o.productlist.0.0.5e694c6ffVDCCx&algo_pvid=16d22082-3298-4ee2-b011-11995a3feb26&algo_expid=16d22082-3298-4ee2-b011-11995a3feb26-12&btsid=0be3746c15915607242257086e6012&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

I appreciate the advice, but if you were to read the previous posts I have a working oscillator circuit already. Thankfully I do not have the time restraints to develop this like I did when I was making it for my high school senior project (since they cancelled the project because of the virus), so I have more time to delve in and learn the details. Learning how to make an oscillator circuit like this has taught me a lot, and I wouldn't have learned anything if I threw in one of those oscillator modules. Though I probably would have done that had I been aware of this option while I was under the pressure of the project deadline. At that point, my priority was more to finish the project in time.
Perhaps it's best if I start a new topic so there isn't confusion?
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #54 on: June 07, 2020, 10:21:50 pm »
For Nixie PSU you should check out... https://threeneurons.wordpress.com/nixie-power-supply/

That's the design I followed and it works great.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #55 on: June 08, 2020, 01:12:47 am »
For Nixie PSU you should check out... https://threeneurons.wordpress.com/nixie-power-supply/

That's the design I followed and it works great.

Thank you!
I've heard of that "Pile O' Poo" power supply and it does look fantastic. Out of the schematics I've seen for a power supply this seems like the best (to my untrained eye). I think Dave used it for his nixie project. Unfortunately, there are a couple of things that make me a little hesitant to use it. Namely the input voltage range. It looks like its input range is 9-18V. Right now my board is powered off 5V. With the Pile I would need to power the board with a 9V or 12V  or so supply and would need to add a voltage regulator to supply the logic circuitry with 5V, and I couldn't use USB power so I'd also need to add input protection for the clock as well. Or, I could use a 5V USB supply and boost it up to 9-18V before applying it to the "Pile o' Poo" but that seems a little much. Also, it seems to have a large footprint, as it requires 1/4W THT resistors. I could use it, but it would be fantastic if there was another design out there that could run off of 5v.

I looked around for a while and it really seems difficult to find a solid Nixie supply design that can be powered by 5V. Somehow this module I bought off Amazon (NCH8200HV) seems to work fine though, and it can use a 5V input. Not to mention it's very tiny. It's suspiciously simple, and I'm tempted to reverse engineer it, but on close inspection it appears as though the part numbers for the chips have been etched away!
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #56 on: June 08, 2020, 01:32:15 am »
There's a whole project on this, not mine: https://hackaday.io/project/162301-high-voltage-nixie-power-supply
You'll never break even but you might gain a lot of knowledge and appreciation if you wanted to make your own.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #57 on: June 08, 2020, 02:48:42 am »
Starting to dip my toes in these high voltage supplies, it's a scary world.
I'm quickly realizing designing a 5V-to-170V supply that works well is a major undertaking that requires a level of understanding in electronics that I don't think I have yet. Not to mention the time and the cost it takes to develop it - as I'll be attending college in the fall as a freshman I can't spend too much, and the numbers listed in that hackaday article the guy spent to develop his supply are a little concerning. Besides it's probably best to leave the design of a high-voltage power supply to those who know what they're doing if these clocks will ever end up in someone else's house.
Right now, if I want to reduce cost and power this with something cheaper than the $22 module, I think I'll just need to just suck it up and use the Pile o' Poo, even if it means complicating the rest of the power supply circuitry stuff. Really though, it shouldn't be too bad. An LM7805 circuit is stupid easy to power the 5V logic from 12V input, and I'm sure a zener, maybe a fuse is sufficient protection from somebody deciding to use the wrong barrel plug power supply.
But then it'll take up more space and I'd probably have to use two seperate PCBs to fit everything. Which could increase cost. Also I wouldn't enjoy the benefit of buying the components in bulk. At this point I'd doubt if I could beat the price of $22 for the supply used in my current design.

Here's another design I found interesting https://surfncircuits.com/2018/02/03/optimizing-the-5v-to-170v-nixie-tube-power-supply-design-part-2/ It looks like it can use 5V. Maybe if I want to switch to a different power supply I can look at trying to implement this.


Maybe I'm going a little far for something that won't bring much benefit. Maybe it's best of I just stick with what I have now and start selling stuff. I could probably spend years making this clock incrementally better and better and more cost efficient and never sell it once, but it's probably best to just sell it, move onto other things, and maybe once I know a little more through college (if I'd ever learn how to do anything like this, that is) I can come back and design my own proper power supply supply.

I'm not good about making these sorts of decisions. What do you guys think?
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #58 on: June 08, 2020, 10:27:04 am »
I would need to power the board with a 9V or 12V  or so supply...
Fair enough.  I do indeed supply from a 9V wall wart.

Checkout... https://0x7d.com/2017/nixie-tube-clock/   Seems to have a lot of info regarding a flyback design that can go down to 3V3 even!
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #59 on: June 08, 2020, 11:16:04 am »
One strategy I've read about making decisions is to flip a coin.

No, not to blindly follow what the coin says to do, but to reflect on your reaction if you had to follow the coin. At some point you may want to tie the bow on this project and move on. Is this the right time? Have a think.
 
The following users thanked this post: Mighty Burger, schmitt trigger

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2223
  • Country: mx
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #60 on: June 08, 2020, 04:28:47 pm »
Excellent advice.

I am going thru a difficult personal decision right now, and this made me reflect on the outcome...... :-+
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #61 on: June 08, 2020, 06:30:36 pm »
One strategy I've read about making decisions is to flip a coin.

No, not to blindly follow what the coin says to do, but to reflect on your reaction if you had to follow the coin. At some point you may want to tie the bow on this project and move on. Is this the right time? Have a think.

Thank you for this. This is really good advice that I'll have to hold on to, I'll probably end up using it a lot in my life.

I would need to power the board with a 9V or 12V  or so supply...
Fair enough.  I do indeed supply from a 9V wall wart.

Checkout... https://0x7d.com/2017/nixie-tube-clock/   Seems to have a lot of info regarding a flyback design that can go down to 3V3 even!
This is very interesting - a supply that uses 5V, is efficient and is small.
I added up the component price for all of those parts of the power supply, and they added up to $20.57, about the same as the $22 for the other module. That's if I buy enough components for one clock. For ten, the unit price would be $18.25, not much money saved for bulk (though 10 isn't really bulk).

Using greenpossum's advice. I've decided not to dabble with the power supply. If this kicks off well and I end up selling more than one or two clocks, hey, maybe I could come back and save a little more by rolling my own supplies but I'm not going to worry about that now. Thank you for the advice.

There's one little thing I'd like to fix before "tying the bow" on the circuit. That is just pulsing the reset pins on the counters on powerup. Should be very easy, only needing a resistor, capacitor and four diodes (see my schematic with orange hand-drawn stuff above). My only concern is if Q2 would be damaged. The datasheet for the MMBT3904 says the absolute maximum Veb (voltage between emitter and base) is 6V, so I will probably be fine with 4.4V but I'd just like confirmation. Once I do this to solve the problem of strange behavior occurring when the clock is powered on (e.g. multiple digits on in one nixie) I think I can call the circuit finished.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #62 on: June 09, 2020, 10:13:02 am »
...That is just pulsing the reset pins on the counters on powerup.
That's was 555's were invented for?
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #63 on: June 09, 2020, 07:46:38 pm »
...That is just pulsing the reset pins on the counters on powerup.
That's was 555's were invented for?
I did not know that!
Is there a reason why the resistor and capacitor combo wouldn't work just as well? I would think the only issue is the fall time, but I don't think it would really matter if the counters reset multiple times unpredictably on startup for a few milliseconds considering the application. Unless there's weird behavior when the reset pins are held high while the chips are starting up.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #64 on: June 09, 2020, 08:43:52 pm »
I'm no expert but here's something I was looking at earlier... its from a Commodore PET... but you will find the same power-on reset circuit in many arcade games etc of the same period.

The inverter is optional depending on the polarity of your reset. (and a bit unusual).

PS
 ;) I'm sure 555s were really invented for better reasons... but I see them all the time in power on resets.
« Last Edit: June 09, 2020, 08:47:49 pm by NivagSwerdna »
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #65 on: June 09, 2020, 09:06:52 pm »
I appreciate it. I did not know about the prevalence of 555 timers in powerup reset circuits.
I googled some application circuits for the CD4017 (the counter I'm using, and the only chip I need to reset on powerup) and many of them omit a 555 timer on startup, using just a resistor and capacitor. If I can substitute the 555 timer with just two tiny passive components I'd really like to do that. I'll probably have to experiment a bit.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #66 on: June 09, 2020, 09:10:43 pm »
Also, a little update on a question I had on page 2 about the brass fittings. One of my high school teachers was helping me work on my truck, and we got to talking about this clock, and he had a suggestion on how to make them that I thought was genious - take some copper tubing of the appropriate size, cut a tiny bit off the end and use a metal cone to flare it out. I'll have to give it a shot.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #67 on: June 09, 2020, 09:25:20 pm »
Heh, might even find a flare tool that size.  Also, try decorative bevel washers; not sure if you'll find any this big, and you'll probably have to drill or file out the inside, but may be something else.

Or compression fittings, the "olive" piece, but that's probably too steep to suit.

Old fashioned way to fabricate it, cut an arc out of sheet and roll it up.  Make a tight fitting butt joint, use silver solder (braze), and clean it up.  Lots of hammering, filing and sanding, but it can be done.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: Mighty Burger

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #68 on: June 10, 2020, 12:41:43 am »
Does anybody have any ideas for a metal cone I could use to hammer the copper pipe on to give it a taper? I thought it'd be easier to find something but I'm really coming up short. Would a 3D printed object with 100% infill be good enough? probably not..
To be honest I've never done metalwork apart from bending and cutting sheet metal.

Heh, might even find a flare tool that size.  Also, try decorative bevel washers; not sure if you'll find any this big, and you'll probably have to drill or file out the inside, but may be something else.

Or compression fittings, the "olive" piece, but that's probably too steep to suit.

Old fashioned way to fabricate it, cut an arc out of sheet and roll it up.  Make a tight fitting butt joint, use silver solder (braze), and clean it up.  Lots of hammering, filing and sanding, but it can be done.

Tim
Great ideas! I took a brief look at the bevel washers and the olive pieces of compression fittings and couldn't find anything suitable. I also don't have access to the tools required to fabricate it myself like that unfortunately.
I'm sure flare tools exist that fit the right size of pipe, but from what I could tell they all just create a tiny little curved flare at the end of the pipe that might not be large enough.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #69 on: June 20, 2020, 11:41:19 pm »
Hey all, I think I've just about got the polished circuit and I was wondering if you guys could check over my work. I think, if there aren't any issues, this is the circuit I will feel comfortable selling!

I've changed five things. I actually tested the first two mods on the board I have now and they seem to work great. The other changes are too difficult to test out by modifying the board. Schematic at the bottom.


1. I've upped the capacitors in the button debouncing circuits as the previous debouncers weren't enough.

2. Using a .1uF cap, a 100k resistor and a sprinkling of diodes I made a circuit that resets the counters on startup to prevent strange behavior. I've tested this one and it seems to work fine.

3. On the schematic I've modified the purpose of the power switch - now it only cuts power to the 170V voltage boosting module that lights the nixies. This way you can flip the switch to turn off the clock but it'll keep counting, so e.g. you could turn the clock off for the night and not have to set the time again in the morning.

4. I've switched the power source from a barrel jack to USB C.  This is my way of providing circuit protection in case the user plugs in a different power supply than the one provided, as USB power is standardized. This is one area where I have a couple questions.

     - I don't know much about USB C power delivery. I only need 2.8 Watts at 5V and from what I read online all I need to do in this case is to use two 5.1k pull-down resistors on CC1 and CC2, and I'm good to go. Confirmation on this would be appreciated.

     - Should I really connect the USB shield to circuit ground? My intuition is that it would definitely be a good idea if it was transferring data, but this is just for power. Maybe it doesn't matter.

     - I threw in a fuse. I chose a slow-blow one because I didn't want it accidentally blowing from inrush currents of various parts of the circuit, namely the high voltage power supply. I figured one amp is good, since I measured the circuit drawing 2.8W, or around .56A for a 5V supply, so I should have enough margin. My goal isn't really to protect the circuit components, it's to prevent a fire or something nasty from happening if a short occurs. Is this a good fuse to use?

5. Since considering selling this, I've been a little troubled with the fact this is only a 12 Hr. clock as there are people, including some in the US that I am friends with, who use and prefer the 24 hour clock (what we call "military time"). I just assumed adding a method to switch between 12 and 24 hours is too complex and could only be done practically with a microcontroller or some wacky shift register hackery. I was taking a shower the other day and I had an idea though.

The way I intend this to work is that there are three AND gates. Here's a little makeshift truth table.
A. If 12 Hour mode is enabled, and the first digit in the hours is 1, and the second digit is 3 == reset the hours to 00.
B. If 12 Hour mode is enabled, and the first digit is 0, and the second digit is 0 == increase the second hours digit by one, so it reads 01. (This should happen right after A.)
C. If the first digit is 2, and the second digit is 4 == reset the hours to 00. (I did not think it was necessary to have a condition that it is in 24 hour mode, as the digits could only ever reach 24 in 24 hour mode.)

Also, on transition from 24 Hour mode to 12 Hour mode, the reset pins of the hours counters are pulsed. This prevents the clock from getting stuck in an invalid state if, when the clock reads a time past 13 o' clock in 24 hour mode, it is set to 12-Hour mode.

To do this I would need three AND gates. Two of them would require three inputs, and one would require two inputs. I used the CD4073 chip, a triple three-input AND gate, and just tied one input of one of the gates to +5V to create a two-input AND gate.

Please tell me if you think this would work.

Any other thoughts?



Pinout of the CD4073:
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #70 on: June 22, 2020, 08:29:13 pm »
Smaller question for you guys hopefully this is a little easier to answer.

I'm using the ULN2803 as the HV darlington array. I was looking around out of curiosity and I found the ULN2003 as a potential alternative. It has one less transistor (7 instead of eight), but it looks like it comes in much smaller form factors and is significantly cheaper.

I think I'm missing something here. These are the only differences I could find. It looks like both chips have the important bits - they can handle 50V, have a "common" pin for a zener diode clamp, and can interface directly with 5V logic. Why, if the only downside is one less channel, is the ULN2003 smaller and significantly cheaper? ($1.26 for one ULN2083, $0.57 for one ULN2003) Could I swap in the ULN2003 and be OK, or is there a difference between the two chips I didn't notice that would make this a bad idea?

I'd probably try it out myself before asking, but I've already spent so much to develop this and I would love to jump on selling these clocks sooner rather than later.

Overall I would save $4.14 per clock to switch to the ULN2003. Not a lot for an expensive item - maybe this can wait. Probably just need to stick with what I have.

I guess my question is partly out of curiosity. I can't wrap my head around why one chip is so much larger and more expensive than the other.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #71 on: June 23, 2020, 10:25:31 am »
Prices are arbitrary, and don't submit to logic.  The most obvious factors are production scale and competition, but in small quantities, the price gets inflated by who knows what.  You can get an honest answer if you call up a manufacturer looking to buy a few million over the next couple years, but other than that, well...

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: NivagSwerdna, Mighty Burger

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #72 on: July 01, 2020, 01:25:10 am »
Alright guys, here's the final schematic. This is more of an update to show you guys what the circuit has turned into, rather than a request for help , though I wouldn't mind if you double checked the schematic, particularly the part with the AND gate I haven't been able to test.

In my adventures of looking into the ULN2003 as an alternative to the ULN2803, I found the SN75468. Small footprint like the ULN2003, in fact the two chips are pin compatible, and the price is somewhere between the ULN2803 and the ULN2003. The advantage with the SN75468, though, is that it can handle up to 100V, rather than 50V of the ULN chips. I had concerns that my previous circuit might not work consistently as the nixie tubes aged and change their electrical characteristics, but with this new chip and a higher voltage zener there can be much more margin. Not to mention the cathode leakage will be lower, and now the schematic should work just fine with different types of nixie tubes long as the power supply is modified to match the voltage and current demands of the particular nixie.

I plan on assembling a second clock with the revised schematic and the fancy wooden case and all, try selling it on Ebay or wherever, and if it works out, assemble a couple more clocks to sell. To save time and money, it would have been nice to get to this point before assembling the first version of the clock, rather than building an unpolished one and redesigning it, but at that point I thought my high school senior project presentation was due in only a month or two. I thought I didn't have time to polish it, and ah well, I could polish it later if I had the time. Which is what I'm doing now.
Overall I don't really regret anything and I've been having a blast. Thanks for the help everyone.

 
The following users thanked this post: oPossum

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #73 on: July 02, 2020, 10:28:41 pm »
Redesigning the board, and I have a quick question:

Is it bad if I set the copper pour clearance to 8mil for the ground plane, such that the ground plane will exist between the pads of the various IC's? What is standard practice?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #74 on: July 03, 2020, 01:29:26 am »
As long as there's soldermask covering it, and it meets the fab rules, it's fine.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7007
  • Country: ca
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #75 on: July 03, 2020, 03:50:20 am »
For the high voltage traces and pads, I would go larger than 8mil spacing. Although solder mask is an insulator, the coating properties and thickness are not well controlled. I would try for 25mils.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #76 on: July 03, 2020, 04:25:02 am »
As long as there's soldermask covering it, and it meets the fab rules, it's fine.

Tim
For the high voltage traces and pads, I would go larger than 8mil spacing. Although solder mask is an insulator, the coating properties and thickness are not well controlled. I would try for 25mils.

Thank you guys.
I'm using JLCPCB and it seems like they can manage it. I might as well, just so it's easier to get the ground plane better connected.

Also in KiCad I set all of the nets with a high voltage to have different clearances. The net that connects all of the common pins of the darlington arrays to the zener clamp, as well as all of the cathodes of the nixie tubes, will see as much as 90V relative to ground so I set its clearance to 25 mils, and the high voltage power supply for all of the nixies will be at 170V relative to ground so I set its clearance to 50 mils. Not sure if these clearances are excessive, I think I derived them from some online clearance calculator. But it looks like KiCad respects the clearances with the copper pours even if the pour itself has a small clearance, so I'll be fine.
« Last Edit: July 03, 2020, 04:27:26 am by Mighty Burger »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #77 on: July 03, 2020, 06:45:19 am »
Sounds good. Don't be stingy with vias, they're cheap.  It doesn't take many -- just in strategic places -- to get a ground plane almost as good as a multilayer board. :-+

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: Mighty Burger

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #78 on: July 06, 2020, 04:14:35 am »
I imagine routing this sort of circuit would be way easier on a four layer board, compared to a two layer board of the same size. It would probably make it radiate less junk I'm guessing?

Anyhow here's my design. I thought the product after being fully constructed with the wood case and all would look way better if the nixie tubes went right to the end of the board, so I chopped off the ends on the left and right side. I also moved the tubes to the middle of the board rather than the top, purely for aesthetics.
With those changes, as well as the new circuitry, there was more stuff that needed to be squished in less space. I found routing much more difficult this time around. I have lots of respect for the guys who route boards ten times the density of this one for a living.
I also used board-mounted switches and buttons, I thought this was better than having wires go to panel mounted stuff.

Let's talk about the weird oscillator part. I was tight on space so I put U11, the flip flop that takes the oscillator's 2Hz signal down to 1Hz, on the other side of the board. I figured it probably won't hurt anything, given the fact I didn't have a ground plane near the oscillator in my last design and it worked. Once I was done with the board I noticed there was a little bit of space around the oscillator section, enough to put a little fence around it. I've seen pictures of this sort of thing, where you have a strip of exposed ground plane (i think) in a ring around a sensitive part with some vias, and I think it's supposed to help block interference from going in or out?? I'm clueless about this stuff clearly, and I have no clue why exposing soldermask in a ring would do anything, but even if the fence isn't very helpful it shouldn't do any harm right?

One last thing. On the top right I have a PTH for soldering a wire labeled "Ground Connection". I think I am going to use a metal sheet on the bottom and rear of the clock and I'm pretty sure having it connected to circuit ground would be smart. Not only for potentially being a little safer and helping prevent interference (I think?), but also because I have the shield of the USB C port connected to ground, and I don't want intermittent weird stuff going on when that port comes in and out of contact with the metal sheet, connecting and disconnecting the sheet to circuit ground.

Thoughts?


 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #79 on: July 06, 2020, 07:36:33 am »
Oh, my first reaction was "you're going to put a shield can over that?!"

Exposed metal sinks surface leakage currents, but even with poor soldering and no cleaning, you can expect to work with megohms pretty confidently.  32k crystals are around 100s kohms so it's well inside of the range to worry about.

If it's a metal can crystal, add a pad to tack solder it, that takes care of a lot of capacitive coupling.  Again, increasing capacitance to the traces doesn't matter at all, as long as it's less than the total nominal load capacitance.  Just change the shunt caps to compensate.  More shielding (ground pour, covering metal, whatever) only improves immunity.

I think this can still be done in a single sided placement, but it would be even tighter then, as you say. ;)

I think I would place the tubes on the board where they fit best, and adjust the woodwork around them to keep it visually centered, but that's me.  I also don't have a model of what you're working with, and this might be the more pleasing solution, I don't know.

Keep in mind some tricks to reduce routing pressure.  For example that D2 can be duplicated between, say, every pair or triplet of drivers, so you don't have to route it around between all of them.

I think I'm seeing big gaps in ground support.  For example under "U14" (the label), a peninsula of ground dead-ends; on the other side, U13 has some ground nearby, but I don't think it extends up far enough, and in any case I don't see a via between them.  So the nearest ground, to any copper in that area, is either downwards (behind the chips) or all the way left or right, around the chips and associated routing, and on the top around the tubes as well, to that area.  It's a huge open loop, which can be a problem for EMI (again, unlikely in this case -- more as an example of best practice).

Oh, may want to revise those footprints, the pin-1 indicator -- it's only a circle underneath the chip.  How are you going to inspect that once it's placed? :D A dot beside the pin, say, below and to the left (again referring to U14 and friends), is a typical way to show that. Could also be a number (although then you have to orient it for every damn part that's turned, so it still reads right..?); or the outline drawn (currently just corners I guess) can stick out enough to be visible, and could show a semicircle on the pin-1 end, etc.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #80 on: July 06, 2020, 11:04:19 pm »
Thanks for the advice! I've revised the design.







Quote
Oh, my first reaction was "you're going to put a shield can over that?!"
Definitely not :P Are those guard rings normally used in conjunction with shields?

Quote
Exposed metal sinks surface leakage currents, but even with poor soldering and no cleaning, you can expect to work with megohms pretty confidently.  32k crystals are around 100s kohms so it's well inside of the range to worry about.
I'm assuming you mean it's in the range I don't have to worry about, i.e. the guard ring wasn't necessary? Sorry the language was a little unclear

Quote
Keep in mind some tricks to reduce routing pressure.  For example that D2 can be duplicated between, say, every pair or triplet of drivers, so you don't have to route it around between all of them.
This definitely would have made it easier.
I thought it'd be better to go ahead and route all the difficult jungley stuff before I do the simple, repetitive stuff like placing the bypass caps next to the chips and connecting all the darlington arrays to the zener because I thought it'd be easier - it wasn't. All it did was make the simple stuff hard, and it really didn't make a difference in how hard it was to route the stuff that was difficult in the first place. Good to know this for next time I route a board though!

Quote
I think I'm seeing big gaps in ground support.  For example under "U14" (the label), a peninsula of ground dead-ends; on the other side, U13 has some ground nearby, but I don't think it extends up far enough, and in any case I don't see a via between them.  So the nearest ground, to any copper in that area, is either downwards (behind the chips) or all the way left or right, around the chips and associated routing, and on the top around the tubes as well, to that area.  It's a huge open loop, which can be a problem for EMI (again, unlikely in this case -- more as an example of best practice).
So ground "peninsulas" are bad for EMI?
I took care of that particular example by shoving the traces above U13 (push and shove routing is really neat) and nailing down some vias.
I also looked around the board for a little bit and got rid of some peninsulas that were unnecessary, i.e. didn't connect to the GND pad of any component.
Also redid the via stitching to spread it out a lot more, rather than only have a few points where the planes are connected. Not sure if this is an improvement.

Thankfully, since everything outside of the oscillator area and the 170V power supply module runs at a frequency of 1Hz or less (unless someone has a field day with one of the buttons :P) I think I have plenty of room for error.

Quote
Oh, may want to revise those footprints, the pin-1 indicator -- it's only a circle underneath the chip.  How are you going to inspect that once it's placed? :D A dot beside the pin, say, below and to the left (again referring to U14 and friends), is a typical way to show that. Could also be a number (although then you have to orient it for every damn part that's turned, so it still reads right..?); or the outline drawn (currently just corners I guess) can stick out enough to be visible, and could show a semicircle on the pin-1 end, etc.
Oh gosh I had a mini heart attack when I read that first part, I thought I was about to have to redesign the board like when I got the nixie footprint wrong the first time around!
I just moved the circle to the outside of the chip.
I actually just modified the footprints from a digikey library I somehow ended up using (same one as last design so it works fine) and I think the footprints didn't even have a circle originally. If you look really closely you can see the corner with pin one has an extra line, and that's how pin 1 is indicated. A little too hard for me to see imo.

Thank you!
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #81 on: July 07, 2020, 12:41:41 am »
Definitely not :P Are those guard rings normally used in conjunction with shields?

Sorta -- SMT shield cans use a footprint like that.  Basically just the metal edge of an open (5-sided) box, butt-jointed to the PCB, or maybe a small flange.  Rectangular cans are usually stocked, so it's possible; but a weird outline like that would probably be custom.  Hence the reaction. :)


Quote
I'm assuming you mean it's in the range I don't have to worry about, i.e. the guard ring wasn't necessary? Sorry the language was a little unclear

Heh, yes... those words were not chosen well. :P The "bad" range is an open interval (e.g. > 1Mohm) so it feels "outside" while the safe range is closed (say -1M to 1M) which feels "inside", that's where that came from..


Quote
So ground "peninsulas" are bad for EMI?
I took care of that particular example by shoving the traces above U13 (push and shove routing is really neat) and nailing down some vias.
I also looked around the board for a little bit and got rid of some peninsulas that were unnecessary, i.e. didn't connect to the GND pad of any component.
Also redid the via stitching to spread it out a lot more, rather than only have a few points where the planes are connected. Not sure if this is an improvement.

Not so much that they're bad, just that they aren't doing anything for you, and generally mean there's a gap or loop nearby.

RF currents flow between a trace (signal current) and ground (image current).  Ground proximity is key.

A trace running across a slot or hole in the ground plane, is no longer close to its image.  The image current has to flow around the edges of the loop, taking a much longer distance, and coupling into a larger field -- potentially a radiating field, as an antenna.  (These are called "slot antennas" when made intentionally. Or unintentionally, too, I suppose.)

Note that, between the pairs of chips on top and bottom, there's a big hole in the ground plane.  You can train your eye to see positive space (traces and footprints) as negative space in the ground pour, and vice versa.

To the trace, the lack of ground proximity, manifests as an increase in its impedance -- or at low frequencies, as stray inductance.  So it has some effect on signal quality as well.

Again, hardly an issue with CD4000 family logic, with ~100ns edges (so slow, you need 10s of meters of cable to see any wave effects), and already high impedances (pin drivers ~250 ohms at 10V, compared to trace impedances being in the 50-150 ohm ballpark), but worth thinking about with microcontrollers and 74HC and faster logic; and mandatory if you find yourself working with the good stuff (fast CMOS, ECL, LVDS..). :)


You are swapping layers frequently (like, horizontally, between the pairs of drivers), and without a transparent view I'm not sure if that's necessary (there is stuff on the other side), or if it's, in part, an effort to get more ground fill?  But that's something that can help.  Downside is it does use up more vias for the signal traces.  (Which, I don't think is much of a reliability problem, and with stitching, you're using plenty of vias already, right?)

If you're not routing around components, it's fine to keep everything largely on the same layer (switching layers only where needed to cross traces, say); as long as there's ground available underneath it, you're golden.  Same-side ground doesn't do nearly as much as opposite-side ground does -- the edge-wise coupling between traces, or trace and ground fill, is fairly mild.


Quote
Thankfully, since everything outside of the oscillator area and the 170V power supply module runs at a frequency of 1Hz or less (unless someone has a field day with one of the buttons :P) I think I have plenty of room for error.

Interestingly enough, while edge rates do matter (and, again, are hardly an issue here because they're so slow!), a repeat rate that low is probably low enough that it might get away with a lot, even with a noisy design (fast logic family, poor layout).  The reason is, EMI testing is done with a certain receiver response, which averages over modest time scales; a crash of noise every second will average down to much less than a peak-detect receiver.  Also, if the receiver is doing scans faster than 1 sec per band, it might simply skip over -- that is, when it was measuring a frequency, no noise happened to coincide, so it reads really low, but the next sample say catches the whole peak or something.  The plot ends up spiky, but it's not because of harmonics!

Not that that's a good thing, the intermittent popping sound will still be just as irritating to affected radio channels.  One of those kind of "meets the word of [the law], but not the spirit" things. :)


Quote
Oh gosh I had a mini heart attack when I read that first part, I thought I was about to have to redesign the board like when I got the nixie footprint wrong the first time around!
I just moved the circle to the outside of the chip.

I probably shouldn't be playing the pronoun game either... >:D

Cheers!
Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #82 on: July 07, 2020, 02:25:40 am »
Quote
Not so much that they're bad, just that they aren't doing anything for you, and generally mean there's a gap or loop nearby.

RF currents flow between a trace (signal current) and ground (image current).  Ground proximity is key.

A trace running across a slot or hole in the ground plane, is no longer close to its image.  The image current has to flow around the edges of the loop, taking a much longer distance, and coupling into a larger field -- potentially a radiating field, as an antenna.  (These are called "slot antennas" when made intentionally. Or unintentionally, too, I suppose.)

Note that, between the pairs of chips on top and bottom, there's a big hole in the ground plane.  You can train your eye to see positive space (traces and footprints) as negative space in the ground pour, and vice versa.

To the trace, the lack of ground proximity, manifests as an increase in its impedance -- or at low frequencies, as stray inductance.  So it has some effect on signal quality as well.

Again, hardly an issue with CD4000 family logic, with ~100ns edges (so slow, you need 10s of meters of cable to see any wave effects), and already high impedances (pin drivers ~250 ohms at 10V, compared to trace impedances being in the 50-150 ohm ballpark), but worth thinking about with microcontrollers and 74HC and faster logic; and mandatory if you find yourself working with the good stuff (fast CMOS, ECL, LVDS..). :)

Whoa -- I had no idea about these sorts of effects!
While I understand the specific points you've brought up, overall I am in the dark in terms of RF, and how it works with PCB design. Hence me originally not having any ground plane, then putting a fence around the 32kHz oscillator :P Is there a place I can get started with learning the basics of RF black magic? Not that it's necessary for this particular project, but the topic just seems really interesting and it could come in handy for future projects where I need to worry about this kind of stuff. Or is this something that's too convoluted so I should just wait for college?

With the signal current and image current, and impedance stuff - is that the reason why some traces on a computer motherboard are squiggly? So the signal and image traces are the same length?
Here's an image of what I'm talking about



Quote
You are swapping layers frequently (like, horizontally, between the pairs of drivers), and without a transparent view I'm not sure if that's necessary (there is stuff on the other side), or if it's, in part, an effort to get more ground fill?  But that's something that can help.  Downside is it does use up more vias for the signal traces.  (Which, I don't think is much of a reliability problem, and with stitching, you're using plenty of vias already, right?)

If you're not routing around components, it's fine to keep everything largely on the same layer (switching layers only where needed to cross traces, say); as long as there's ground available underneath it, you're golden.  Same-side ground doesn't do nearly as much as opposite-side ground does -- the edge-wise coupling between traces, or trace and ground fill, is fairly mild.

Yes, I did switch layers often for that very reason, to get the ground fill everywhere. I should be fine without doing this in the future?
Looking back at the board, I think if I didn't do all of that layer switching as much the final board might've turned out better. Though I don't think it's worth changing it now unless I need to go back and do other major modifications to the board.
And yes, currently I have a grand total of 314 vias :) I don't think JLCPCB charges any extra for excess vias until they have to drill more than 1000 holes on a single board.
Also for your viewing (dis)pleasure here are the transparent views:



Quote
Interestingly enough, while edge rates do matter (and, again, are hardly an issue here because they're so slow!), a repeat rate that low is probably low enough that it might get away with a lot, even with a noisy design (fast logic family, poor layout).  The reason is, EMI testing is done with a certain receiver response, which averages over modest time scales; a crash of noise every second will average down to much less than a peak-detect receiver.  Also, if the receiver is doing scans faster than 1 sec per band, it might simply skip over -- that is, when it was measuring a frequency, no noise happened to coincide, so it reads really low, but the next sample say catches the whole peak or something.  The plot ends up spiky, but it's not because of harmonics!

Not that that's a good thing, the intermittent popping sound will still be just as irritating to affected radio channels.  One of those kind of "meets the word of [the law], but not the spirit" things. :)
Interesting stuff!
There's one major concern I have about selling this project - what if it somehow emits tons of EMI and starts messing with people's devices? I've heard that could land people in big trouble. But there's absolutely no way I'm going to spend ten grand for a product I'd be surprised (pleasantly) if I sold more than five units. Maybe I pull that one trick and market it as a pre-assembled kit, or something.
But then again, with the slow repeat rate and super slow edge rates (I was completely unaware that CD4000 logic was that slow, guess that's a good thing!) it won't emit more than a bee's dick of EMI
But then again again I kinda threw on a random 170V SMPS and I think it makes a slightly audible noise in operation, so that might be spewing out stuff continuously...


Well, do you think the board is good enough to be bought and put into use at this point?
I really appreciate all of the advice you've been giving me, thanks.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #83 on: July 07, 2020, 05:51:46 am »
Whoa -- I had no idea about these sorts of effects!
While I understand the specific points you've brought up, overall I am in the dark in terms of RF, and how it works with PCB design. Hence me originally not having any ground plane, then putting a fence around the 32kHz oscillator :P Is there a place I can get started with learning the basics of RF black magic? Not that it's necessary for this particular project, but the topic just seems really interesting and it could come in handy for future projects where I need to worry about this kind of stuff. Or is this something that's too convoluted so I should just wait for college?

Never too early to start thinking and reading about it.  Developing a feel for fields and waves is a valuable skill, and it won't come overnight!

I don't have any good book recommendations unfortunately, but perhaps others can chime in.


Quote
With the signal current and image current, and impedance stuff - is that the reason why some traces on a computer motherboard are squiggly? So the signal and image traces are the same length?
Here's an image of what I'm talking about


Sort of.  The fact that the board is multilayer, and the traces are routed over or between solid planes, and that they are of consistent width, and spaced adequately, is what's most important.  The squiggles are to match delays, so that the waves propagating down each trace in a bus arrive at their destinations at the same time.

As for the differential pairs, you want to route their traces identically -- first of all, obviously you want to avoid routing the pair over some disturbance, like a gap between planes, or underneath a noisy power converter.  If you can't avoid it, then you want the noise in each trace to match, so they get subtracted out at the receiver.  The fact that the waves created by those disturbances, arrive at the receiver at the same time, means they will be ignored.  At least while the disturbance is small (maybe a volt or less) -- it still has to fit within the receiver's voltage range.

Waves propagate along the traces at equal velocity (they're on the same PCB and have the same geometry), so it's just a matter of keeping the lengths matched, from the transmitter, to any noise source, to the receiver.


Quote
Yes, I did switch layers often for that very reason, to get the ground fill everywhere. I should be fine without doing this in the future?

I try to prioritize single side placement -- that saves an additional assembly step.  For a hand soldered assembly, meh, not a huge deal, but it's another buck here and there in commercial applications.

Then there's not much that obstructs the bottom side, and it can be used largely for ground.

If I am doing double sided placement, I want to ask myself some other minimization problem: how much board area do I need, to get a reasonable design (in terms of functional, thermal and EMI performance, say)?  How many parts can I group in what arrangement, without running out of routing area?

But, that is me, and I have plenty of time to think about things while I'm idly poking at a design.  Others, I know they just want the stupid thing done, damn the style; artwork, what's that?

Whatever level you're working at, you need to develop a toolbox of skills you are fluent with, and how to apply them.  A lot of EEs don't develop a feel for fields; that can be compensated with more time spent testing or iterating.  (Maybe not the least cost option, but that's for the managers to deal with...  :P )


Quote
Looking back at the board, I think if I didn't do all of that layer switching as much the final board might've turned out better. Though I don't think it's worth changing it now unless I need to go back and do other major modifications to the board.
And yes, currently I have a grand total of 314 vias :) I don't think JLCPCB charges any extra for excess vias until they have to drill more than 1000 holes on a single board.

Yeah, that's about right for something that size.  Like I said, I'd probably find a more optimal arrangement, preferably single sided, but barring something we've both missed -- you definitely have something buildable there.


Quote
There's one major concern I have about selling this project - what if it somehow emits tons of EMI and starts messing with people's devices? I've heard that could land people in big trouble. But there's absolutely no way I'm going to spend ten grand for a product I'd be surprised (pleasantly) if I sold more than five units. Maybe I pull that one trick and market it as a pre-assembled kit, or something.
But then again, with the slow repeat rate and super slow edge rates (I was completely unaware that CD4000 logic was that slow, guess that's a good thing!) it won't emit more than a bee's dick of EMI
But then again again I kinda threw on a random 170V SMPS and I think it makes a slightly audible noise in operation, so that might be spewing out stuff continuously...

Theory meets practice on law enforcement... :P  I've heard of products produced on the 10k unit scale that went without testing, and apparently without complaint, so it's not impossible... that doesn't mean they passed accidentally, just that no one a. had a persistent problem that was b. traceable to the product.

So, the way the law on this (in the US) works is, AFAIK:
- Sometimes the FCC drives around, listening for things.  With their budget and priorities these days, this doesn't happen very often.
- More often, a licensed user -- who takes legal priority, and has authority to file a complaint with the FCC, who then sends a C&D -- complains, and then most often the user simply stops using the offending thing.  Assuming they figure out the culprit of course, which may not be obvious.
- If it's persistent, it can escalate to fines and so on.
- And there are clauses for tracing it back to the supplier of an offending product.

So, you need the combination of a customer, and a potential victim that is licensed, and enough complaints to bring it back to you.  Or for Part 15 compliance, I honestly don't remember what the deal is, but I'm guessing?- a non-licensed user can complain of interference in relevant bands (broadcast radio for an important example; listeners are of course users of licensed bandwidth in that case), in which case the FCC may decide to investigate further, or may let it sit unless they get repeat complaints, etc.  (Rules are different by band, for example the Part 15 permitted unlicensed emissions in ISM bands (13.56MHz, 2.45GHz, etc.) are higher than elsewhere, but still limited to fairly harmless levels.)

Mind, this is not a professional assessment or recommendation.  It's a business decision, and like any other, incurs risk -- there's nothing life-changing about violating a law, it's just another cost of operation.  (Indeed, legal defenses -- whether vs. civil or state -- are accounted as just another operating expense.)

In short, I would be very, very surprised if this ended up so bad that someone just happened to complain about it, and it ultimately came back to you as a direct liability.

The HV converter is indeed the elephant in the board, and it might be cheap insurance for example to add an LC around it, both ends.  At best, jumper the L's and no-pop the C's; at worst, put in values large enough to deal with it.  The module being small means it shouldn't radiate too horribly, even if made badly.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #84 on: July 07, 2020, 08:53:14 pm »
Quote
Never too early to start thinking and reading about it.  Developing a feel for fields and waves is a valuable skill, and it won't come overnight!

I don't have any good book recommendations unfortunately, but perhaps others can chime in.
I'm hoping lots of the intuition I'm gaining will be helpful during college. I've heard EE is a tough curriculum for many students, and I'm already getting pretty weary of academia. Maybe having a little more focus on the interesting stuff will be helpful too.

Quote
Sort of.  The fact that the board is multilayer, and the traces are routed over or between solid planes, and that they are of consistent width, and spaced adequately, is what's most important.  The squiggles are to match delays, so that the waves propagating down each trace in a bus arrive at their destinations at the same time.

As for the differential pairs, you want to route their traces identically -- first of all, obviously you want to avoid routing the pair over some disturbance, like a gap between planes, or underneath a noisy power converter.  If you can't avoid it, then you want the noise in each trace to match, so they get subtracted out at the receiver.  The fact that the waves created by those disturbances, arrive at the receiver at the same time, means they will be ignored.  At least while the disturbance is small (maybe a volt or less) -- it still has to fit within the receiver's voltage range.

Waves propagate along the traces at equal velocity (they're on the same PCB and have the same geometry), so it's just a matter of keeping the lengths matched, from the transmitter, to any noise source, to the receiver.
This is really interesting stuff. What kind of signals are sent through differential pairs?
This is similar to the theory behind balanced XLR cables right?, where there are two copies of the same audio signal but one is reverse polarity, and since any induced noise will be identical it can be cancelled out by switching the polarity of that audio signal back again and summing them together. I thought that was the coolest thing when I read about it.

Quote
I try to prioritize single side placement -- that saves an additional assembly step.  For a hand soldered assembly, meh, not a huge deal, but it's another buck here and there in commercial applications.

Then there's not much that obstructs the bottom side, and it can be used largely for ground.

If I am doing double sided placement, I want to ask myself some other minimization problem: how much board area do I need, to get a reasonable design (in terms of functional, thermal and EMI performance, say)?  How many parts can I group in what arrangement, without running out of routing area?

But, that is me, and I have plenty of time to think about things while I'm idly poking at a design.  Others, I know they just want the stupid thing done, damn the style; artwork, what's that?

Whatever level you're working at, you need to develop a toolbox of skills you are fluent with, and how to apply them.  A lot of EEs don't develop a feel for fields; that can be compensated with more time spent testing or iterating.  (Maybe not the least cost option, but that's for the managers to deal with...  :P )
I do plan on hand soldering these, with just the iron (don't own a hot air station let alone a reflow oven), so just in terms of assembly double sided isn't too big of a deal.
For commercial applications, I'd imagine the savings from having components on only one side would far outweigh the extra cost of a slightly larger PCB ..
I'll be honest, I didn't really do much thinking when I shrunk the board, I just saw lots of green space and thought hey, it wouldn't hurt to shrink this, might even look nicer with the option of having the nixies go right to the edge of the device. I think I just googled images of nixie clocks and decided I liked the looks of the ones that had the tubes go to the edge.  I don't think any amount of woodworking trickery could pull that off with my previous design with the larger board. The tiny board size is just for aesthetics honestly.
There's definitely something to appreciate about doing a professional job the right way. It's nice to make things you can be proud of.

Quote
Yeah, that's about right for something that size.  Like I said, I'd probably find a more optimal arrangement, preferably single sided, but barring something we've both missed -- you definitely have something buildable there.
Awesome!! I'm excited.
Without increasing the board size I'd imagine I'd have to get pretty creative to fit everything in there on one side. With enough time, patience and careful routing I could probably pull it off, I'm sure it'd be a cakewalk for someone with more experience.

Quote
Theory meets practice on law enforcement... :P  I've heard of products produced on the 10k unit scale that went without testing, and apparently without complaint, so it's not impossible... that doesn't mean they passed accidentally, just that no one a. had a persistent problem that was b. traceable to the product.

So, the way the law on this (in the US) works is, AFAIK:
- Sometimes the FCC drives around, listening for things.  With their budget and priorities these days, this doesn't happen very often.
- More often, a licensed user -- who takes legal priority, and has authority to file a complaint with the FCC, who then sends a C&D -- complains, and then most often the user simply stops using the offending thing.  Assuming they figure out the culprit of course, which may not be obvious.
- If it's persistent, it can escalate to fines and so on.
- And there are clauses for tracing it back to the supplier of an offending product.

So, you need the combination of a customer, and a potential victim that is licensed, and enough complaints to bring it back to you.  Or for Part 15 compliance, I honestly don't remember what the deal is, but I'm guessing?- a non-licensed user can complain of interference in relevant bands (broadcast radio for an important example; listeners are of course users of licensed bandwidth in that case), in which case the FCC may decide to investigate further, or may let it sit unless they get repeat complaints, etc.  (Rules are different by band, for example the Part 15 permitted unlicensed emissions in ISM bands (13.56MHz, 2.45GHz, etc.) are higher than elsewhere, but still limited to fairly harmless levels.)

Mind, this is not a professional assessment or recommendation.  It's a business decision, and like any other, incurs risk -- there's nothing life-changing about violating a law, it's just another cost of operation.  (Indeed, legal defenses -- whether vs. civil or state -- are accounted as just another operating expense.)

In short, I would be very, very surprised if this ended up so bad that someone just happened to complain about it, and it ultimately came back to you as a direct liability.

The HV converter is indeed the elephant in the board, and it might be cheap insurance for example to add an LC around it, both ends.  At best, jumper the L's and no-pop the C's; at worst, put in values large enough to deal with it.  The module being small means it shouldn't radiate too horribly, even if made badly.
Fun fun. Hopefully this doesn't emit too much, someone with a vengeance notices, all the planets align and I end up in a bad spot, but it's reassuring to hear that that isn't likely.
One of Trump's things is reducing regulations, maybe this is something he can look at :P Really though, it'd be nice for people who don't have the means of EMI testing to not have to have that unlikely, but awful danger looming.

To be honest, I have no idea how I'd start designing that LC filter. If it helps, the HV converter already has two honkin capacitors:

With a quick continuity test, the one on the left is connected between the +5V input and GND, and the one on the right is between the 170V output and GND, just what you'd expect. I don't have a device that can measure their capacitance. If I could use those as part of the filter and just throw on a couple coils it'd probably save the price of a capacitor that can handle that voltage, though I don't know if those caps would be on the wrong side of the LC filter. I've never dealt with inductors or LC filters before and I have no intuition on what values to use. Would it need testing or do you know of some values that are likely to work well and suppress potential EMI?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #85 on: July 08, 2020, 05:17:55 am »
This is really interesting stuff. What kind of signals are sent through differential pairs?
This is similar to the theory behind balanced XLR cables right?, where there are two copies of the same audio signal but one is reverse polarity, and since any induced noise will be identical it can be cancelled out by switching the polarity of that audio signal back again and summing them together. I thought that was the coolest thing when I read about it.

Yeah, same thing, though audio doesn't have to worry much about light speed -- it takes a lot of cable length for 20kHz to go through much phase shift, and higher frequencies can simply be filtered out (though sometimes... or often... they aren't, and you hear random radio transmissions in your powered speakers, for instance?).

The kinds of signals, on a motherboard, are most likely PCIe.  This is a bit-serial protocol, so that the lanes don't have to be synchronized, they can arrive at somewhat different times.  Apparently the one pair has much less distance to cover than the other ones, so they had to put accordions in to make it longer; or the designer just felt like wiggling it around even though it was already within range (just to get it closer), who knows.

Or maybe it's not a PC motherboard at all, maybe it's an oscilloscope motherboard, which has differential pairs carrying the analog inputs from the front-end circuitry to the digital converter.  (Which don't really have to be matched, the delays can be tweaked in software -- most scopes have a feature where you can set this, to account for different length probes, for example.  But eh, maybe they still want matched lengths to be nice, or to get matched losses as well as delays?)

Shrug, there's a lot of give-and-take.  IC designers don't want to spend a lot of complexity fixing problems that PCB layouts should've solved in the first place; but sometimes they have to.  This has a long history, compare for example the pinouts of CD4000 and 7400 series logic ICs -- most CD4000 is made for easiest die layout, and the pins are just bonkers (see the sequence of outputs on the 4017 counter-decoder).  Earlier 7400 did better, but later 7400 improved even further: compare 74273 to 74LS574).  That's a pretty simple example, back from the days where die area was at a premium, for various reasons; nowadays, die area is relatively cheap (depends more on the process node you're using), and it saves a hell of a lot more space laying out a chip for an easy PCB layout.

Then again, there's so many MCUs with IO ports just fucking all over the chip (MSP430 and STM32 come to mind).  Who knows... ::)


Quote
To be honest, I have no idea how I'd start designing that LC filter. If it helps, the HV converter already has two honkin capacitors:
[image]
With a quick continuity test, the one on the left is connected between the +5V input and GND, and the one on the right is between the 170V output and GND, just what you'd expect. I don't have a device that can measure their capacitance. If I could use those as part of the filter and just throw on a couple coils it'd probably save the price of a capacitor that can handle that voltage, though I don't know if those caps would be on the wrong side of the LC filter. I've never dealt with inductors or LC filters before and I have no intuition on what values to use. Would it need testing or do you know of some values that are likely to work well and suppress potential EMI?

A filter needs three inputs:
Impedance (input and output)
Cutoff frequency
Sharpness (prototype and order, or some attenuation at some other frequency, etc.)

Nice thing is the cutoff doesn't have to be very precise for EMI.  You can basically toss on a 1uH 1A chip inductor and say it's probably fine, for the 5V side.  Maybe a 10uF electrolytic after that.  So, it goes C, L, converter.  Similarly, on the output, maybe it goes converter, 100uH, 10nF (maybe a 250V film cap, maybe with say 3.3 ohms in series with it).

There's a bit of algebra concerning input and output impedances, but the most important relation underlying it is Zo = sqrt(L/C).  Exactly which L and C you should pick, also depends (in the middle of a filter network, you generally have to bisect individual components -- think of it as, in a CLC filter say, half the L works with the first C, and half with the other).

Frequency of course is 1 / (2 pi sqrt(L C)), and you need to pick the right L and C by the same rules, of course.

If the capacitors on that module are quite large (seems an okay assumption for now), then if we use much smaller C's outside, we can ignore the module caps by saying they're just "large".  Treat it as an AC short circuit.  We have L and C in series off of it, a nice simple network.  No bisection we need to worry about.  L is L, and C is C. ;D

We don't want them to resonate, so we need an impedance to terminate them into.  This is pretty free; we generally want a low impedance -- since this is around the impedance seen by the rest of the circuit.  The nixies won't mind a few hundred ohms, of course, so we have a lot of freedom on that side; on the 5V side, we should keep it low, say less than 20% of the DC load equivalent (say if it draws 5V at 1A, that's 5 ohms, so 1 ohm would be fine).

By "impedance seen by circuit", consider a step change in voltage on the 5V rail, or 170V rail -- how much current is drawn in the instant surrounding that step change?  Z = dV/dI.  If you want tight supply regulation, you need a low impedance, so you want to design the filter for a low impedance in that case.

Ideally, we'd have a load resistor that serves as termination, but our load is probably higher impedance than the filter (partly due to the above suggestion), so what do we do?  If we leave it alone, it can resonate, and end up with a transmission peak around the cutoff point; that's not good!

If we simply put R in series with C, we can introduce damping resistance, without consuming DC current, and without relying on the load.

If we use the entire C as an R+C, we lose some high frequency filtering -- at very high frequencies, the capacitive reactance goes towards zero, so the equivalent circuit is an L dividing into an R -- a 1st order lowpass filter, not 2nd order.  (It's worse than that, for a number of factors, actually; we choose components small enough that these parasitic effects are either negligible, or expected to fall at a higher frequency than the converter creates.)

So a better option is using a smaller C in parallel with a larger C with loss, i.e., C || (R+C).  I don't think this is important here, but it's nice to know.  (Typically the lossy C is >= 3 times the parallel C; this gives good damping at the cutoff frequency.)

What's the significance of an electrolytic capacitor?  It comes with ESR for free, that's all.  A ceramic of the same value, with about 0.33 ohm wired in series, would also do. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #86 on: July 08, 2020, 07:22:26 pm »
Quote
To be honest, I have no idea how I'd start designing that LC filter. If it helps, the HV converter already has two honkin capacitors:
[image]
With a quick continuity test, the one on the left is connected between the +5V input and GND, and the one on the right is between the 170V output and GND, just what you'd expect. I don't have a device that can measure their capacitance. If I could use those as part of the filter and just throw on a couple coils it'd probably save the price of a capacitor that can handle that voltage, though I don't know if those caps would be on the wrong side of the LC filter. I've never dealt with inductors or LC filters before and I have no intuition on what values to use. Would it need testing or do you know of some values that are likely to work well and suppress potential EMI?

A filter needs three inputs:
Impedance (input and output)
Cutoff frequency
Sharpness (prototype and order, or some attenuation at some other frequency, etc.)

Nice thing is the cutoff doesn't have to be very precise for EMI.  You can basically toss on a 1uH 1A chip inductor and say it's probably fine, for the 5V side.  Maybe a 10uF electrolytic after that.  So, it goes C, L, converter.  Similarly, on the output, maybe it goes converter, 100uH, 10nF (maybe a 250V film cap, maybe with say 3.3 ohms in series with it).

There's a bit of algebra concerning input and output impedances, but the most important relation underlying it is Zo = sqrt(L/C).  Exactly which L and C you should pick, also depends (in the middle of a filter network, you generally have to bisect individual components -- think of it as, in a CLC filter say, half the L works with the first C, and half with the other).

Frequency of course is 1 / (2 pi sqrt(L C)), and you need to pick the right L and C by the same rules, of course.

If the capacitors on that module are quite large (seems an okay assumption for now), then if we use much smaller C's outside, we can ignore the module caps by saying they're just "large".  Treat it as an AC short circuit.  We have L and C in series off of it, a nice simple network.  No bisection we need to worry about.  L is L, and C is C. ;D

We don't want them to resonate, so we need an impedance to terminate them into.  This is pretty free; we generally want a low impedance -- since this is around the impedance seen by the rest of the circuit.  The nixies won't mind a few hundred ohms, of course, so we have a lot of freedom on that side; on the 5V side, we should keep it low, say less than 20% of the DC load equivalent (say if it draws 5V at 1A, that's 5 ohms, so 1 ohm would be fine).

By "impedance seen by circuit", consider a step change in voltage on the 5V rail, or 170V rail -- how much current is drawn in the instant surrounding that step change?  Z = dV/dI.  If you want tight supply regulation, you need a low impedance, so you want to design the filter for a low impedance in that case.

Ideally, we'd have a load resistor that serves as termination, but our load is probably higher impedance than the filter (partly due to the above suggestion), so what do we do?  If we leave it alone, it can resonate, and end up with a transmission peak around the cutoff point; that's not good!

If we simply put R in series with C, we can introduce damping resistance, without consuming DC current, and without relying on the load.

If we use the entire C as an R+C, we lose some high frequency filtering -- at very high frequencies, the capacitive reactance goes towards zero, so the equivalent circuit is an L dividing into an R -- a 1st order lowpass filter, not 2nd order.  (It's worse than that, for a number of factors, actually; we choose components small enough that these parasitic effects are either negligible, or expected to fall at a higher frequency than the converter creates.)

So a better option is using a smaller C in parallel with a larger C with loss, i.e., C || (R+C).  I don't think this is important here, but it's nice to know.  (Typically the lossy C is >= 3 times the parallel C; this gives good damping at the cutoff frequency.)

What's the significance of an electrolytic capacitor?  It comes with ESR for free, that's all.  A ceramic of the same value, with about 0.33 ohm wired in series, would also do. :)

Tim

Good stuff. Thank you.
I'll be honest, I had to read through this multiple times to understand. My limited electronics knowledge and intuition is starting to become a limiting factor.

Here's the updated power supply schematic:

C4 is electrolytic.
Is there a particular reason why C17 should be a film capacitor? Limiting to SMD parts and having a minimum purchase quantity no greater than 1, I was able to find equivalent ceramic capacitors that are 10nF and can sustain 250V for significantly less money on digikey than film capacitors.
Like you said, the nice thing about this is if it doesn't work somehow, I can just depopulate the caps (and R27) and jump the inductors.

If it matters, here are some digikey parts I found, I do not know if they have some fatal flaw I didn't notice:
- 1uH Inductor: https://www.digikey.com/product-detail/en/samsung-electro-mechanics/CIGT252010LM1R0MNE/1276-6939-1-ND/7041339
- 100uH Inductor: https://www.digikey.com/product-detail/en/tdk-corporation/MLZ2012N101LTD25/445-181376-1-ND/9740582
- 10nF 250V Film Capacitor: https://www.digikey.com/product-detail/en/kemet/LDEIB2100KA0N00/399-12880-1-ND/5731504
- 10nF 250V Ceramic Capacitor (Cheaper, but will ceramic mess things up?): https://www.digikey.com/product-detail/en/kemet/C1206C103JARACTU/399-7174-1-ND/3439312
- 10uF Electrolytic Capacitor: https://www.digikey.com/product-detail/en/panasonic-electronic-components/EEE-1CA100SR/PCE3878CT-ND/766254
- Might as well throw in the resistor: https://www.digikey.com/product-detail/en/vishay-dale/CRCW08053R30FKEA/541-3-30CCCT-ND/1962168

Since I honestly don't know very much about what I'm doing here, it feels like I'm shooting in the dark. Would there happen to be a college-student-friendly way to tell whether this is pumping out EMI? Maybe loop some copper and hook it up to my scope? Maybe turn it on and off next to a radio?? I don't know  :P
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #87 on: July 08, 2020, 10:30:25 pm »
Here's the updated power supply schematic:

C4 is electrolytic.
Is there a particular reason why C17 should be a film capacitor? Limiting to SMD parts and having a minimum purchase quantity no greater than 1, I was able to find equivalent ceramic capacitors that are 10nF and can sustain 250V for significantly less money on digikey than film capacitors.
Like you said, the nice thing about this is if it doesn't work somehow, I can just depopulate the caps (and R27) and jump the inductors.

Would rather film over ceramic at high voltages, because e.g. X7R capacitance drops off quickly with voltage -- even well below the rating.  Higher density types (X5R, Y5V, Z5U..) are even worse.  Lower density types are better (C0G is pretty much the ideal capacitor), but bigger, and much more expensive.

If it has to be SMT, heh, SMT chip film caps aren't terribly cheap themselves, and it's worth shopping for a ceramic alternative...


Quote
If it matters, here are some digikey parts I found, I do not know if they have some fatal flaw I didn't notice:
- 1uH Inductor: https://www.digikey.com/product-detail/en/samsung-electro-mechanics/CIGT252010LM1R0MNE/1276-6939-1-ND/7041339
- 100uH Inductor: https://www.digikey.com/product-detail/en/tdk-corporation/MLZ2012N101LTD25/445-181376-1-ND/9740582

1uH is good.

100uH, notice it's self-resonant around 20MHz (p.5, L(F) plot is usually stopped just before it goes bonkers), which is kind of low, but it's probably still got a lot of impedance at that point (kohms) which will do.  Oh, there's also a full impedance plot (p.10), so why even bother with the L(F) plot heh... Doesn't show any high order resonances (which seems maybe a bit suspicious, really?), but if that's really the case, it looks like a simple capacitance at high frequency, nice and predictable.

But what's sneaky is p.7, notice L drops off substantially (say -30%) at only 20mA, yet it's rated for 140mA!  (The table shows it as 30mA at 50%.)

Good thing we don't need much current here, so this is fine!


Quote
- 10nF 250V Film Capacitor: https://www.digikey.com/product-detail/en/kemet/LDEIB2100KA0N00/399-12880-1-ND/5731504
- 10nF 250V Ceramic Capacitor (Cheaper, but will ceramic mess things up?): https://www.digikey.com/product-detail/en/kemet/C1206C103JARACTU/399-7174-1-ND/3439312

Yeah,  pricey film.  Also those are hard to solder; the plastic softens at soldering temperature, I'm not sure it's a good idea, or even reliably possible, to do by soldering iron...

Ah, the ceramic has a link to its ratings, follow the K-SIM link -- in the Plot box, select DC bias.  It's about -32% at 170V, which is fine -- we're just looking for a ballpark here.

Also, I don't quite trust their plots, because they use that stupid piecewise curve -- notice the kink at 150V.  Nothing actually does that, and no one else plots their parts like that.  Likely the kick overestimates the actual response; whether that's compensated for underestimates elsewhere or what, I don't know.

Knowing isn't a terribly precise thing anyway, as we're talking about a 5% capacitor, with 10% tempco over rated range, plus 30% C(V) drop over desired range.  Plus there's yet another, maybe 20% drop, after some years, due to aging.

But that's still something, even if it were 5nF in the end, it's still something we can work with. :)


Quote
- 10uF Electrolytic Capacitor: https://www.digikey.com/product-detail/en/panasonic-electronic-components/EEE-1CA100SR/PCE3878CT-ND/766254
- Might as well throw in the resistor: https://www.digikey.com/product-detail/en/vishay-dale/CRCW08053R30FKEA/541-3-30CCCT-ND/1962168

Since I honestly don't know very much about what I'm doing here, it feels like I'm shooting in the dark. Would there happen to be a college-student-friendly way to tell whether this is pumping out EMI? Maybe loop some copper and hook it up to my scope? Maybe turn it on and off next to a radio?? I don't know  :P

Those are fine.  I'd prefer a cap that specifies ESR or impedance, but it's probably in the right ballpark.  It's also only 2000 hour life at 85°C; it should still last a goodly number of years near room temperature (this thing isn't going to warm up much at all, I think?).

Yes, you can do near-field probing with just waving around a scope probe (it has a low capacitance and high impedance, so it picks up ambient AC fields), or a loop of one or a few turns.

EMI is looking for signals on the order of mV, so it can be hard to see on a scope with a fractional mV noise floor.  Switchers, and digital circuits, generate impulsive noise, so expect to trigger on a peak somewhere, and see if you can get a measure of that.

On the upside, if you aren't seeing more than say 10s of mV up close, it's very unlikely there's much at a distance.  The best part is, with only the one cable, you should have very little common mode noise -- that is, AC imposed between cables (and thus acting as an antenna).  That's the main way you run into emissions.

If you'd like to test for common mode (conducted) emissions, you may be able to do that with a USB cable still, actually.  You use a ISN (impedance stabilization network) to couple the noise from one side into a detector (scope or spec), and decouple it from external noise sources (e.g. power supply).  See attached.

Uh, to meet the inductance they specify, you'll need quite a few toroids of high permeability; but, even if you're using just say 100uH, it's enough to do the job just at high frequencies.  (You don't need the 150 ohm termination; going direct to the scope, set to 50 ohm input, will do for representative purposes.)

Now, you won't have screened connectors on a USB cable -- well, you will if you add bulkhead connectors and stuff, but there's an easier way.  Just strip back some of the outer jacket, exposing the shield; solder that to the network shield or signal line respectively, and you've got it.  (Solder it quickly so the insides don't melt and short out.  No need for a big joint, just a tack or two of solder will do.)  A fully enclosed metal box is preferable, but a flat sheet (pick up some bare copper clad? use copper foil tape plastered over cardboard?) will do in a pinch.

You probably won't see much here, but it may be interesting to see what other things do.  USB hubs, peripherals, even turn it around (flip the connections, or add connectors anyway so you can plug in a USB host or device at either end) and measure a PC or laptop!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #88 on: July 08, 2020, 11:17:43 pm »
Thank you. There are so many more pitfalls and traps than I was aware of.
It was really interesting reading through your response and seeing your thought process for all the components.

Lots of these effects I wasn't even aware of. Like inductor self-resonance. Though this one seems like it should be fundamental knowledge of inductors. Clearly I don't know my inductors  :P
And I had no idea ceramic capacitors lost capacitance as the voltage increases! And if I did I would've assumed it wouldn't drop off until the voltage exceeded the capacitor's rating. Also, that is some sneaky business with that inductor current rating..

From what it seems like, those components, while not optimal, will work alright.

Here is an updated board. I added the new components and moved the +170V nixie anode power supply all to one side. I feel a little better this way knowing I'm not relying on vias to power the nixies anymore. It does mean the board will have to rely on via stitching to the top plane a little more, but I think there's plenty enough stitching ..
Note after taking these screenshots I moved the electrolytic capacitor a little bit away from the HV converter, in case the converter generates some heat. I'm not in the modern smartphone business - I want to avoid planned obsolescence!
It was also at this point when I discovered KiCad had a high-contrast display mode to make routing easier. If only I had known about this sooner..



 
The following users thanked this post: T3sl4co1l

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #89 on: July 09, 2020, 02:18:37 am »
Alright, think I'll buy the board and the parts!
Quick question - I have lots of leftover 0603 parts, but I thought they were a pain in the butt to handsolder so the new design has 0805 parts. I don't want to waste those leftover parts, do you think I could use them on 0805 pads?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #90 on: July 09, 2020, 02:43:49 am »
Yeah, you can force them on.  Even if it's not on the pads, you may be able to hold it in place with tweezers and drag a glob of solder up to it.  I've done 0402 this way.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #91 on: July 09, 2020, 02:45:26 am »
Great, thank you.
I'm almost thinking it might be easier to put 0603 chips on 0805 pads, with the larger pads to solder onto and everything.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #92 on: July 09, 2020, 03:04:15 am »
Just realized I made a mistake - the switch I chose can only handle 200mA! Oops.
Hopefully I can find something with the same footprint that can handle the current, if not changing the footprint shouldn't be too bad.
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #93 on: July 09, 2020, 10:55:29 pm »
I glanced at the datasheet for the crystal.
It says:
"Soldering the body of cylinder type crystal unit must be strictly avoided as it may cause significant deterioration in characteristics of the product. Rubber adhesive is recommended for mounting."
Here is the Digikey link:
https://www.digikey.com/product-detail/en/citizen-finedevice-co-ltd/CFS-20632768HZFB/300-8763-ND/2217074
I chose this crystal because of its +/- 5pmm accuracy. This is the same crystal I used in the first version and it worked fine.

Would it be better to just get rid of the exposed soldermask square and keep the ground plane underneath the metal body of the crystal?
« Last Edit: July 09, 2020, 11:03:10 pm by Mighty Burger »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21691
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #94 on: July 10, 2020, 01:11:03 am »
Ah, then better not to.  Can tie it in place with a jumper wire over the body, I've seen that.  Soldermask opening optional.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #95 on: July 10, 2020, 01:18:37 am »
Sounds good. I'll throw down a couple through holes for that jumper wire.
Might as well expose the soldermask for the entire outline of the crystal, it'll only help connect it to ground.
If that doesn't turn out, like you said, I could always just swap out those caps to compensate for the added capacitance. I do have some lower capacitance 0603 chips laying around.

If shorting the crystal's casing to ground makes it stop working, electrical tape is cheap.
« Last Edit: July 10, 2020, 01:50:09 am by Mighty Burger »
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #96 on: July 10, 2020, 02:10:32 am »
Final version! (I hope!)
Yes I know the date is slightly off. But freedom, you know..
And I couldn't resist the urge to put a little inside joke on the back of the board between me and some friends.

Also, for the power switch, I will be using a seperate, panel-mounted rocker switch, so I just added a couple holes to solder wires to in place of the switch.





 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #97 on: July 10, 2020, 04:47:56 am »
Ordered the parts and the board. It'll take a while to arrive but I'll keep yall posted when bits arrive and things are built. Crossing my fingers!
Thank you guys for all of the help. Especially Tim, you've helped a ton throughout this project and taught me a lot, thank you!!
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #98 on: July 21, 2020, 02:45:49 am »
Parts arrived! Ok, to be honest they arrived on Friday, but I've been slacking a little.  :P
Anyways, it's time to move on to the physical construction, which I hope will be significantly easier than the electronics.

One question - how thick of wood do you think I should use? 1/4 inch thick, or 3/8 inch? I plan on using Oak.
Advantages of 1/4 inch:
- Seems like I can buy 1/4 inch thick wood boards that are surfaced on four sides from Home Depot, I can't do the same for 3/8 inch thick meaning I'd have to buy 1/2 inch boards and plane them down. So 1/4 inch would be faster and cheaper.
- Would be smaller and would look slightly nicer
- With either thickness I will need to elevate the nixie tubes slightly above the PCB using 3D printed plastic discs in addition to the plastic bits that comes with the tubes. With 1/4 inch thick Oak I'd only need inserts that are 1/8 of an inch tall. With 3/8 inch thick oak I'd need to use 1/4 inch thick plastic inserts, making the tubes mount uncomfortably high above the boards.

Advantages of 3/8 inch:
- Sturdier. Given the fact Oak is a hardwood, would 1/4 inch thick be too flimsy?
- Since the top board is thicker, I may be able to screw the PCB directly to the top board, rather than using standoffs connected to a plate of sheet metal on the bottom of the clock. Intuitively this seems like it would be a sturdier method of mounting the PCB.

Thoughts?

Thankfully, I might've found someone who could help me with making the brass rings. If you don't know what I'm talking about this is sorta what I'm going after:


« Last Edit: July 21, 2020, 02:47:41 am by Mighty Burger »
 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #99 on: July 27, 2020, 02:46:34 am »
Soldered everything up with the exception of the nixie tubes and the 170V power supply, I'll put those one once I have the case built.
Sadly I ran into a couple issues..
One issue is minor - I was going to tie down the crystal with a copper wire, but I was unable to get it held down tightly. I likely need to move the holes closer to the crystal. I'd rather not have intermittent problems when the crystal comes in and out of contact with the GND plane so I put some electrical tape under it and used an insulated wire to hold it down. The oscillator works, thankfully. Not sure if using 15pF capacitors rather than 22pF would be better to give me more margin, but it seems to work perfectly fine right now.

A slightly more significant issue - the 12 Hour mode does not work. The way it is supposed to work is, when it is in 12Hr mode, the hours counters go from 1 to 12. I am using AND gates to do the following:
When the digits are 1,3: reset the digits to 0,0;
When the digits are 0,0: set the digits to 0,1 by pulsing the clock pin of U5

So, when the clock hits 13 o'clock it sets itself to zero o'clock then immediately sets itself to 1 o'clock.

What happens in reality is, when it hits 13 o'clock, it gets set to zero o'clock and becomes stuck. The counter's clock pin is stuck high.

I have a vague idea of what is causing the issue. With these CD4000 counters, the reset pin can sometimes mess with the counter pin. If RESET is held high, pulsing the CLK pin will do nothing - it will stay set at 0.
If, and I think this is the relevant bit for this circuit, if first RESET is held high, then CLK goes high, then RESET goes low, the clock will still not count, no matter how long the CLK pin is held high. CLK has to go low then high again for the counter to increment.

So what I think is happening is, when it hits 13 o'clock, the RESET pin goes high and the clock goes to 00. Then the counter's clock pin goes high with the intention to make it increment by one, but the RESET pin is somehow still high at this point so nothing happens!!
I thought the RC network between R7 and C7 would create enough of a delay but alas.

I've tried lots of different shenanigans including increasing the value of R7 to 100k, to increase the time it takes before the CLK pin is pulsed, decreasing the values of R2 and R9 to 10k, and even using a BJT transistor to prevent the CLK pin from going high when the RESET pin is high, but somehow nothing seems to be working. I was wondering if you guys had any ideas.

 

Offline Mighty BurgerTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #100 on: July 28, 2020, 11:07:40 pm »
After many hours of frustrated troubleshooting I nailed down the issue and found a fix for it, including three diodes, three resistors and a BJT. Implementing it on the PCB requires cutting one trace. I thought 13 diodes was enough for one circuit but I guess not - with this addition now there's SIXTEEN stinkin diodes in this small circuit  :palm:

If you're curious, the issue was NOT necessarily the CD4073 circuitry's fault. The problem happens when the hours increment through either the minutes counters when they reach 60, or from manually pressing the hours button. Both of these sources keep the clock pin high for multiple milliseconds, which is plenty of time to mess everything up on transition from 13 o' clock to 1 o' clock.

The solution? Using a resistor and an NPN transistor I pull down the CLK pin when the RESET is high. Then, when RESET goes low, the CLK pin goes high again, incrementing the counter by one as intended. It's a little more nuanced than that, e.g. the transistor only switches on in 12 hour mode, otherwise it would increment the counter by one in 24 hour mode as well, essentially eliminating zero o'clock from existence.
Getting this to work was a major headache.

If this one I'm making now sells and I end up making a third one to sell again, I'm almost wondering if it's worth buying new PCBs with a fixed design rather than spending the time to modify the boards I have now.

Not sure how this issue slipped through the cracks in my prototyping, it's a little frustrating.
 

Offline fmzambon

  • Contributor
  • Posts: 41
  • Country: it
Re: 32.768kHz Pierce Crystal Oscillator?? For Nixie clock.
« Reply #101 on: August 12, 2020, 03:58:05 pm »
Hello,

personally I'd opt for a different solution for the hours issue:

If you look at the truth table in the datasheet, when the "select" pin is low, the MUX's outputs mirror the A inputs. When the "select" input is high, the outputs switch to following the B inputs. You can wire the MUX to be "transparent" when "select" is low (i.e. to pass the outputs of the 4017s unaltered to the drivers), and to force the value "12" when "select" is high.

More specifically:
  • connect U3's Q0 and Q1 outputs go into two of the MUX's A inputs;
  • connect U5's Q0 and Q2 outputs to the MUX's other A inputs;
  • connect the outputs of the MUX to the drivers;
  • connect the "select" input of the mux to the output of the AND gate that sniffs the "00" value;
  • wire the MUX's B inputs high or low to force the corresponding outputs to represent "12";
  • wire the MUX's disable pin low.

It's one more chip, but it feels a "cleaner" solution to me. And perhaps it could end up taking up less board area than a handful of discretes.

Hope this helps,

Andrea
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf