Here, I'll try to summarize what I wrote in the posts above in a more concise and clearer way.
Note that some of the below may not be rules, but they're good practice.
1. Try to make the whole bottom of your circuit board a copper fill, which is connected to ground. This way, you don't need to have long traces connecting the ground pins/pads of various components on the top of your circuit board. You can simply use a via to connect the top pad to the ground copper fill on the bottom.
This bottom ground fill will also act as a sort of shielding, insulator, and also as a heatsink if you so choose to use it. In order to improve the effectiveness of this bottom ground fill, make a sustained effort to have as short traces as possible on the bottom ... think of those traces as "jumper links" or 0 ohm resistors.
2. It seems you adjusted the layout of some components and some traces in a negative way in order to not cover the silkscreen, the printed text. One of the problems I see is that you added the value of components to the text, which makes the printout much longer.
This is not regularly done, as you often have revisions or tweaks (for example changing a 10pF ceramic capacitor for the time crystal to 18pF) and then there's a mismatch between what's soldered and what's printed. As you have a very big circuit board, my advice is to make a small "legend" box in a corner of your circuit board, where you can print the values of each component, in a nice table.
Alternatively, you could sign up for Github (owned by Microsoft now) or Gitlab (the "open source" Github replacement) or other free repository websites, create a project URL for your circuit board and then simply print the short URL on your circuit board. Maybe use a nice QR code that links to your project, where people can download the schematic or at least read the component values for various revisions of your circuit board.
If this printing of component values is a must, just make an effort to ignore it and route traces under the text. You can also check the options of your board layout software to move the position of that text on another side of the component.
3. It's very important for components to have decoupling capacitors, as close as possible to the Vin and GND pins/pads of those components. When we're saying as close as possible, we mean it... at most a few millimeters. If it's not possible to have traces directly from Vin and GND, you should have at least a very tiny trace from Vin and then the other pad connected directly to the bottom GND copper fill using a via.
Traditional values for decoupling capacitors are 0.01uF (100nF) but this value is not critical, you can use other values as long as it's +/- 30% or something like that around that value. For higher frequency chips, sometimes they use multiple decoupling capacitors in parallel to cover different frequencies... so for example, they'd have a 0.01uF, a 0.047uF and a 0.1uF capacitor.
Traces have inductance and resistance, and decoupling capacitors help smoothing out and stabilizing the energy going into chips. Without them, the circuit may work fine but you could randomly have resets or glitches and you would have a hard time figuring out the problem.
4. The crystals / oscillators should be closer to the chips that need them. I would say no more than 1cm away from the chip. In your design, the crystals are too far away. Also, the trace lengths should be as matched as possible, and the traces going to the two ceramic capacitors should be of relatively equal length. Keep in mind that 1 cm of trace can add 1-2 pF of capacitance, so your timing may be off if the ceramic capacitors are too far away from the actual crystal.
Also, it's not a good idea to have the 32 kHz crystal sitting vertically on your circuit board. It's much better and common practice to lay these crystals horizontally and have them locked to the circuit board using glue, selastic material, a blob of solder or even a wire. I've recommended adding a small pad (to solder the can to the pad) or two through holes (so you could have a wire loop over the body of the crystal) on the circuit board near crystal footprint the holes. If you don't know how to make a custom footprint or you're too lazy, then just leave room on your circuit board for the footprint of the crystal and use a drop of glue to keep it locked down.
If it sits vertically, it can be subjected to vibrations which can affect the timing. Also, it's a good idea to have a few mm of leads as a sort of natural spring, don't put strain on the rubber or whatever material is at the bottom of the crystal, and prevent solder from going up the leads into the package.
You can check out this link :
https://www.google.com/search?q=32.768+kHz+circuit+board&oq=32.768+kHz+circuit+boardLook at how many pictures have the crystal horizontally and locked through some mechanism and how may don't. If you don't believe me, maybe believe everyone else. Also see :
https://electronics.stackexchange.com/questions/158383/why-are-32-786khz-crystal-cans-soldered-to-pcbBring your oscillator / crystals closer to the chip.
5. While it's not really bad, it's a good practice to always make traces curve at 45 degree angles and to come out of pads and through holes at 90 degrees (perpendicular to pad walls). Don't go directly 45 degrees out of pads, go out a few mm out of the pad and then make the angle to curve your trace.
Smaller angles can cause solder to be caught between the traces, or can etching material to be caught there and corrode traces and make them thinner... and there's lots of reasons why narrow angles are not a good idea.
Traces coming out of corners of pads are not a good idea for other reasons. It's better practice to have the traces coming out of pads as wide or slightly thinner than the actual pads.
I used the * lines to give you some examples of good and not so good.... again, it's not really bad, it works, but it's not a good practice. If you learn now to them right, it will be automatic to you and you'll do it right in the future.
Do what I said in point 1. and take advantage of bottom ground fill (use vias to the bottom ground) to simplify your design.
6. I've suggested to rotate some components 90 degrees or even 180 degrees, in order to shorten the traces going to them or to reduce the number of vias going to them, or to reduce the number of bottom traces. As examples, I gave you C2 and the serial IC. Even in the last design, you use vias to route the traces on the bottom and making those traces pointlessly long, and not equal in length : in your particular case, considering the small bitrate, the mismatch in length is not going to cause an issue, but it's good practice to make USB traces as equal in length as possible.
7. Your input voltage regulator may cause you problems.
7a. Output capacitor:
I've mentioned that 1117 is a very cheap linear regulator but care must be used when working with it. By design, the majority of 1117 regulators (I say majority because 1117 is so generic and it's made by so many manufacturers in so many versions...) require an output capacitor and in order to be stable and output a clean voltage, the ESR of this output capacitor MUST be between 0.1 ohm and 1 ohm (again, for most circuits).
Some datasheets don't mention this at all. In some datasheets you will see example circuits and text mentioning only tantalum or electrolytic capacitors. This is on purpose : ceramic capacitors have the ESR way below 0.1 ohm, tantalum capacitors traditionally have a high ESR, somewhere around 0.2-0.5 ohm. Electrolytic capacitors will typically have an ESR value above 0.1 ohm at low capacitance (100uF or lower) and low voltage rating (let's say 25v or less) but you have to pay attention to the series of capacitors you use. Some ultra low series of capacitors like Panasonic FM or FR series, or Nichicon HW series can have very low ESR even at such low capacitance+voltage combinations.
For linear regulators, you don't need very low ESR capacitor series, you can do just fine with more "middle of the road" choices. For example, Panasonic FC, FK, or Nichicon HD etc etc..
If you don't want to use an electrolytic capacitor on the output for various reasons (maybe it's a height issue for example) you can add a ceramic resistor in series with the ceramic capacitor in order to increase the total resistance. For example, add a 0.47 ohm resistor or wire two 1 ohm resistors in parallel (to get 0.5 ohm) and then place the ceramic capacitor in series with these resistors. You could have footprints for 1 or two resistors on the circuit board and then simply populate only one footprint, or even use a 0 ohm resistor (or a blob of solder) to eliminate the two resistors completely.
7b. Input capacitor:
As for input, a lot of datasheets will say that an input capacitor is not required... however, most assume the energy comes from a small distance away, a few centimeters at most, produced on the same board (for example, a switching power supply outputs 5v and then two 1117 linear regulators are used to produce 3.3v and 2.5v or 1.8v for some components).
When the input power comes from an outside source, through a cable that may be 1-2 meters long, there can be problems, as those long cables have their own inductance and resistance. Therefore, it's important to have some amount of capacitance on the input.
You're using a 0.1uF capacitor, which can work as a decoupling capacitor and a relatively small "bulk storage" capacitor.
7c. Thermal considerations:
The 1117 series is also a somewhat bad choice because the TAB which dissipates heat is connected to Vout. In most configurations of linear regulators, the tab or big pad that typically connects to a heatsink, is connected to GROUND.
In your particular case it probably doesn't matter as your circuit doesn't use a lot of power, but it's good to know for the future: it may be worth to use a linear regulator that has the tab connected to ground, because this could allow you to connect the big top pad to which you solder the tab to the big ground copper fill on the bottom, using a few vias. This way, a big part of the bottom copper fill will also act as a heatsink for your component.
Again, your circuit uses very little power so overheating is unlikely to be a problem. For the future, it's important to know that the difference between input and output voltage is dissipated as heat on the chip, and the chip can only dissipate so much heat through its body and through the pads and traces.
Datasheets will have some numbers about how much heat the chips can handle, but those numbers are usually valid only if the tab of the chip is connected to approximately 1 square cm of copper. Your pad is barely as big as the actual tab, so it won't help with heat dissipation.
I've suggested those DPAK or TO-253 linear regulators because majority of those regulators have the tab connected to ground and they're bigger packages that don't heat as fast as the smaller regulators. Some of the models I suggested are also guaranteed to be stable with ceramic capacitors on the output, reducing the need for a big electrolytic capacitor which may break off the board if subjected to mechanical stress.
-
Review my previous posts with the information in this post. I hope it's written nice enough for you to understand - I've even installed the grammerly extension (but it's useless on this forum)