first PCB design with mcu, some questions - Page 1
Forum section: electronics / beginners

author: minion
author_rank: Contributor
timestamp: August 27, 2016, 05:42:18 pm
content: hey guys,I am designing a PCB for a project at the faculty. I have attached images of the design. MSU is STM32F103.I thing crystal and buck converter are routed OK and input protection is from prasimix and hist PSU design.1. What I am wondering is, if it is OK, to route on the bottom ground plane, under the MCU. I know, that ground plane shouldn't be interrupted, especially under MCU, but the line, that I worry most about is the one, that goes from near the crystal to the bottom right of MCU. it is nRST line. Is it interrupting the ground plane too much, or is it ok?2. connecting power to MCU: I have 3.3V source at the top right corner and as you can see, I routed it to three decoupling capacitors all arount the pcb and at the same time, I created the small power plane on top layer under MCU. Essentially I created two loops with 3.3V Is this OK? Also, one of the decoupling capacitors is connected to 3.3V only thought small power plane under MCU, not directly. It shouldn't matter, right?Other than that, is decupling done OK? Should I also connect GND pins to GND plane under microcontroler?3. Two big connectors under WIFI module, are for SPI. They are connected to the same interface on MCU. I don't need any fast transfer speedst, but still: should I terminate them or I don't have to?I think, (or rather hope) the design would work as it is, but I am just trying to make it as good as possible.tnx

author: minion
author_rank: Contributor
timestamp: August 27, 2016, 06:10:52 pm
content: fixed, tnx

author: JPortici
author_rank: Super Contributor
timestamp: August 27, 2016, 06:21:04 pm
content: yeah, the images!but with a stm32f103 you can't do too much damage, even with messy layouts.. it's too slow.unless you need to go full 24/36 MHz on the spi i suggest you keep it slower and limit the pin bandwidth to avoid reflections.remember that signal integrity problems don't come from the signal fundamental frequency but from its frequency content (this is a pulse wave so it meansrise/fall time). to keep power consumpion low i'd suggest source termination based on my experience but my experience with such board also tells me that it's always a software problem if i can't handle the full peripheral throughput in these chips. a good dource (hah) on termination can be found by googling "SPI termination", the stackexchange link with the very long replythe nRST being under the MCU is not ideal but it shouldn't be too much a problem, you are not toggling the reset all the time, are you?

author: homebrew
author_rank: Frequent Contributor
timestamp: August 27, 2016, 06:28:15 pm
content: Well, it is always difficult to do proper ground planes and power distribution on a two-layer board.Therefore I always flood-fill the top layer too and use a large amount of vias to connect the planes at as much places as possible.But Assuming that this board has mains input, I would be rather worried by the small distances between line and earth traces with respect to the vias and THT holes.

author: minion
author_rank: Contributor
timestamp: August 29, 2016, 02:00:03 pm
content: tnx for the replies, guysWith signal integrity, I was mostly woried, that in the worst case scenario (in theory, at least), when signal bounces back, you can have your voltage nearly doubled, which can destroy your chip,if there are no protection diodes. I Didn't know you can change driving strength in software in stm32 which effectively lowers your rise time. Defenetly gona use that.I tried filling the top layer with GND, but I think that I have too many traces, so plane would be split into much smaller chunks. I can connect them with vias, but the effect would probably still be negligible?About the distance between mains lines: I fixied it up a bit, so now there is at least 2mm between different mains lines. I measured some distances in pcb design of prasimix and lowest value was also 2mm. Houpfuly it is enough? The mains connector is a 5mm one.And between mains and low voltage section is at, least 7mm. More comments on this, would be appriciated

author: Edsoncan
author_rank: Newbie
timestamp: August 29, 2016, 02:24:21 pm
content: Is it a metal screw near the Wifi Antenna?

author: minion
author_rank: Contributor
timestamp: August 29, 2016, 02:52:29 pm
content: yes it is. how bad is it?

author: Edsoncan
author_rank: Newbie
timestamp: August 29, 2016, 04:23:49 pm
content: Try, and If you think better use a nylon screw, not a plastic.From Cypresshttp://www.cypress.com/file/136236/downloadGuidelines for Antenna Placement, Enclosure, and Ground Plane? Always place the antenna in a corner of the PCB with sufficient clearance from the rest of the circuit.? Always follow the antenna designer’s/manufacturer’s recommended ground pattern for the antenna. Commonlyused PCB antennas are variants of a monopole antenna. Monopole antennas need solid ground for properoperation.? Never place any component, planes, mounting screws, or traces in the antenna keep-out area across all layers.The actual keep-out area depends on the antenna used.? Do not place the antenna close to the plastic in the industrial design. Plastic has a higher dielectric constant thanair. Proximity of the plastic to the antenna results in the antenna’s seeing a higher effective dielectric constant.This increases the electrical length of the antenna trace and reduces the resonant frequency.? The battery cable or mic cable must not cross the antenna trace on the PCB on the same side of the antenna.? The antenna must not be covered by a metallic enclosure completely. If the product has a metallic casing or ashield, the casing must not cover the antenna. No metal is allowed in the antenna near-field.? The orientation of the antenna should be in line with the final product orientation so that the radiation ismaximized in the desired direction.? There must not be any ground directly below the antenna. See Figure 14.? There must be enough ground at a distance (ground clearance) from the antenna and this ground plane musthave a minimum width. See Figure 10, Figure 15, and Figure 20.? Plan to have a provision for an antenna matching network because a lot of parameters in the antenna’s proximity(plastic, ground variation, substrate differences, and other components) can vary its impedance, and therefore,the antenna may need retuning. If the impedance of the antenna is unknown, it is preferable to have a provisionfor a PI or T network of three components, with 0 ohms populated in series components and no load for shuntcomponents. This helps you to populate any topology needed for a matching network later.? When using the matching network values provided by the antenna manufacturer, ensure that you use the tracelength from the antenna to the matching network specified in the manufacturer datasheet or reference design.? Always verify the antenna matching network with the final plastic enclosure in place and the product placed intypical use case scenarios. For example, verify a mouse with its plastic held on the hand and placed on a mousepad, plastic, wood, metal, or floor.

author: minion
author_rank: Contributor
timestamp: August 29, 2016, 06:08:02 pm
content: very useful link, tnx