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 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.
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.
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...
)
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.
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...
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