Uploaded by kingforester11

PCB-notes

advertisement
PCB Design
__________________________________________________________________________________
Video: https://www.youtube.com/watch?v=C7-8nUU6e3E
Uses: STM32F405xx microcontroller, MP2359 step-down (Buck) converter, USBLC6 Electrostatic
Discharge protection chip.
MICRO-CONTROLLER SECTION:
Use STM32 Cube MX to set which pins will be programed. This program also lets you know what the
pins are capable of. (Look up this section and do it at home)
(transfer important generated names over to KiCad and use global tags for them)
KiCad section, you know all this until
VDDA is DC analog supply voltage/reference. (Want to use a power source with ‘A’ at the end, and to
do filtering on this power source)
VBAT is Voltage back up (typically tied to a battery)
Can use C_Small capacitors for a smaller schematic footprint.
BOOTO pin (look up specific chip for manual) but typically tells microprocessor what mode it is
booting in, I.e. programming mode (HIGH) or run mode (LOW).
(Never want to pull a Boot pin directly to ground or Voltage Supply, so use a resistor to limit current)
SWITCHES: - SPST single Pole, Single Throw
-
DPDT Double Pole, Double Throw
Can use the insert key to pace a object directly below the current object in KiCad to speed up the
process.
Filtering supply:
Want to use individual capacitors on for each pin and a large main capacitor for them all. See below
For analog VDDA you would want to also use an inductor to help smoothen the voltage.
PCB Design
__________________________________________________________________________________
Crystal: Check data sheet for information on specific crystal layout and try to match it to your
schematic footprint.
Load capacitors: For crystal depend on the pcb layout, on stray capacitance, and on parameters that
are given on the crystal datasheet.
To calculate the load capacitance, follow this formula: C_Load = 2*(CL – C_Stray) NOTE: CL is load
capacitance of the crystal, and C_stray is the stray capacitance of the circuit; typically, between 2
pico farads all the way up to 10 pico farads. So just choose what you think the board might create.
Resitor is a drive resistor. It limits the amount of current that drives the crystal to prevent overdrive
of the crystal and resulting harmonics to be created. You can put a zero-ohm resistor in place of this
resistor so that you later have the pads available to determine the required resistance for your chip.
(Trial and error method is used)
SideNote: try to avoid 4 terminal junctions as its hard to tell if they a wire running through that
junction is actually connected.
LEDS: Nice to have a status LED and to label what color LEDs are, for future reference and to ease of
telling what current LED is running at.
BUCK CONVERTOR SECTION:
Find specific regulator chip you want, for all the values you need for each external components, you
can calculate them from formulas that are nearly always given on the data sheet for the specific
chip.
Note: It’s useful to make your own schematic footprints for unique components.
PCB Design
__________________________________________________________________________________
Voltage protection: useful to add a fuse on your supply input for your device.
You should also add reverse polarity protection, this can be done by using a Shockley diode, but a
better way to do this is to use a P-Channel MOSFET.
Ferrite bead acts as a resistor at high frequencies.
For buck enable, use a simple voltage divider, but make sure to use large resistor values as we don’t
want a large current to be drawn.
A way to minimize costs for purchasing PCBs is to use basic components for JLPCB as they don’t add
any extra cost to your board!!
Gather rest of values required to your buck boost from the data sheet:
PCB Design
__________________________________________________________________________________
CONNECTORS:
SWD Debugger typically use 10-pin connectors
Use an odd even connector and follow and described in diagram above
Note: when doing pull ups for I^2C lines, in fast mode at 4kHz, 3.3V; 2k ohm resistors are suitable.
(Look up what is required for your standard and voltage, but if not sure just use 10k ohms)
Also note: JLPCB does not support through hole at the moment.
USB connection:
Very important to add ESD protection for USB connectors as humans are built up with static
electricity, and will be unplugging and plugging in connectors that transmit that charge over to your
device.
Adds option for 5V power from USB, investigate in final schematic.
He leaves the shield floating, rather than connecting to ground (with resistor and capacitor) as the
ground doesn’t share a common connection to the case… as there is non.
Doesn’t need ID pin as he’s just using the device as a device not a host.
Calls USB D + and - …’CONN’… to distinguish between the device side and the connector side.
As for connecting the __ chip to 5V and ground allows for all spikes to be shunted back to the power
supply.
Once completed: Always do an electrical rules check using the ‘lady bug’ debugger.
PCB Design
__________________________________________________________________________________
Component selection:
Add mounting holes to schematic, and make sure to ground them.
Look at what components JLPCB has available and choose appropriate components.
You know pretty much all this stuff moving forward as you’ve suffered through it.
Best to go for a larger footprint for smd resistors, as you may want to experiment with values
sometimes.
You can generate a netlist before you go into pcb editor, or it will just generate when you go into the
pcb editor.
PCB DESIGN:
Not much more expensive to add 4 layers.
Determine basic layout around microprocessor as it’s the most important (do so for whatever is the
most important for you).
Move each section into the same area with one another.
To save space you can move the designators of passive and less important components to the
fabrication layer (Then when placing components, just look at the diagram on your computer).
Place decoupling capacitors next to the micro controller (less wire and interference between the
two)
Also, best to place pull up/down resistors next to host device instead of slave.
Add boundary lines (Cut lines) at the end.
Best to give fuses a bit of space, just encase you may have to replace them.
If you click on an item and press space, it zeros everything. So, you can easily measure distance
between items.
Add C U R V E S (on your cut layer).
Make ground connection lines BIGGA
Anything highspeed and critical should be routed first.
Don’t make mass distributions (large traces on one side then tiny ones on the other side) too
uneven, otherwise you could get a thing called ‘tombstoning’ happening to your board.
Aim for 2-3x track width spacing to avoid cross talk between signal cables.
Using fill zones is big brain 100 for connecting area, especially in power sections.
PCB calculator is very useful for determining how much current a trace can handle.
You get lower inductance from thicker traces.
Differential pairs are amazing if you have components with symmetry.
I you drop a via onto something that has a net it will adopt the net that it was placed upon.
PCB Design
__________________________________________________________________________________
It is very useful to add a ground keep out area around the crystal and its traces, so that it does not
receive any interference (is VERY sensitive).
Press ‘b’ to refill all the ground pours.
On silk screen its more useful to label area and things with what they actually do, instead of what
components they are.
Indicating the first pin of things using a circle is very good (or number). Also using a plus and minus
for polarities.
Having on and off is also good.
Double click on custom logos, and set as lock, so that each time you update your board, you won’t
lose it.
Write JLCJLCJLCJLC on your board (preferably hidden and that is where they will print their assembly
code), rather than having it somewhere random on your board.
YOU NEED A FEW TOOLING HOLES FOR JLCPCB, also there is specific ways your need to package your
files before you send them off to JLPCB. Rewatch section on video.
Download