Author Topic: first PCB design with mcu, some questions  (Read 3677 times)

0 Members and 1 Guest are viewing this topic.

Offline minionTopic starter

  • Contributor
  • Posts: 21
  • Country: si
first PCB design with mcu, some questions
« on: August 27, 2016, 05:42:18 pm »
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
« Last Edit: August 27, 2016, 06:10:22 pm by minion »
 

Offline minionTopic starter

  • Contributor
  • Posts: 21
  • Country: si
Re: first PCB design with mcu, some questions
« Reply #1 on: August 27, 2016, 06:10:52 pm »
fixed, tnx
 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: first PCB design with mcu, some questions
« Reply #2 on: August 27, 2016, 06:21:04 pm »
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 means rise/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 reply

the 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?
 
The following users thanked this post: minion

Offline homebrew

  • Frequent Contributor
  • **
  • Posts: 293
  • Country: ch
Re: first PCB design with mcu, some questions
« Reply #3 on: August 27, 2016, 06:28:15 pm »
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.
« Last Edit: August 27, 2016, 06:31:17 pm by homebrew »
 
The following users thanked this post: minion

Offline minionTopic starter

  • Contributor
  • Posts: 21
  • Country: si
Re: first PCB design with mcu, some questions
« Reply #4 on: August 29, 2016, 02:00:03 pm »
tnx for the replies, guys :)

With 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 :)
 

Offline Edsoncan

  • Newbie
  • Posts: 8
  • Country: br
Re: first PCB design with mcu, some questions
« Reply #5 on: August 29, 2016, 02:24:21 pm »
Is it a metal screw near the Wifi Antenna?
 
The following users thanked this post: minion

Offline minionTopic starter

  • Contributor
  • Posts: 21
  • Country: si
Re: first PCB design with mcu, some questions
« Reply #6 on: August 29, 2016, 02:52:29 pm »
yes it is. how bad is it? :D
 

Offline Edsoncan

  • Newbie
  • Posts: 8
  • Country: br
Re: first PCB design with mcu, some questions
« Reply #7 on: August 29, 2016, 04:23:49 pm »
Try, and If you think  better use a nylon screw, not a plastic.

From Cypress http://www.cypress.com/file/136236/download

Guidelines 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. Commonly
used PCB antennas are variants of a monopole antenna. Monopole antennas need solid ground for proper
operation.
? 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 than
air. 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 a
shield, 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 is
maximized 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 must
have 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 provision
for a PI or T network of three components, with 0 ohms populated in series components and no load for shunt
components. 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 trace
length 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 in
typical use case scenarios. For example, verify a mouse with its plastic held on the hand and placed on a mouse
pad, plastic, wood, metal, or floor.
« Last Edit: August 29, 2016, 04:52:24 pm by Edsoncan »
 
The following users thanked this post: minion

Offline minionTopic starter

  • Contributor
  • Posts: 21
  • Country: si
Re: first PCB design with mcu, some questions
« Reply #8 on: August 29, 2016, 06:08:02 pm »
very useful link, tnx
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf