Author Topic: STM32F103 min system with USB-TTL converter?  (Read 6929 times)

0 Members and 3 Guests are viewing this topic.

Offline bjdhjy888Topic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ca
Re: STM32F103 min system with USB-TTL converter?
« Reply #25 on: August 16, 2019, 01:47:55 am »
I have followed your suggestions and managed to re-do the layout.
Parts are now much closer to the STM32, resulting in way more vias used. Is this normal? I was concerned when I used extra vias. And, is my overall layout normal? Or, too messy?
I did not change my schematic.
Will pour copper once there's no issues.
Below please find my latest layout. Please let me know if they are okay. Thank you!!!




« Last Edit: August 16, 2019, 07:06:29 am by bjdhjy888 »
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7040
  • Country: ca
  • Non-expert
Re: STM32F103 min system with USB-TTL converter?
« Reply #26 on: August 16, 2019, 09:19:22 pm »
Parts are now much closer to the STM32, resulting in way more vias used. Is this normal? I was concerned when I used extra vias. And, is my overall layout normal? Or, too messy?

C3 and C4 can be swapped to remove one via.
But yes its normal to use vias, there is no cost to you to use an extra via. If you are really lazy, your layout will look autorouted and have a lot of vias, but really, if it works its not too important for hobby use.

Your layout is a lot cleaner now.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline bjdhjy888Topic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ca
Re: STM32F103 min system with USB-TTL converter?
« Reply #27 on: August 19, 2019, 03:25:22 am »
The board's a bit of a mess...
Get your oscillators closer to the ICs ... get your capacitors closer to the oscillators/crystals.
I'd leave space to lay the 32kHz crystal flat on the board... maybe solder it to a third pad with a bit of solder, or have a loop of wire keep it from vibrating or hitting the board.
careful with 1117 regulators.... some are unstable if the output capacitance has too low ESR ... some 1117 linear regulators require ESR on output between 0.1 and 1 ohm ... a ceramic capacitor on output will have too low esr... so either add a tiny resistor in series with the output capacitor , something like 0.22... 0.47 ohm or whatever, or just use a regular electrolytic capacitor (ex a 10..100uF 10v electrolytic )
or just use a better linear regulator.
add some decoupling capacitors between vin and ground on your micro ... a 100nf ceramic (0.01uF)
200 ohm is kinda non standard value... no need for such value for a status led... i'd say just use 330 ohm or even 470 ohm... more common value.
I wouldn't use surface mounted electrolytics (c9)... i'd suggest plain boring through hole, or polymer surface mount

Thank you for your reply.
I just ordered some SMD resistors that are of 220 ohm. I guess this voltage divider would be fine?

p.s.: my schematic pictures seem gone. What happened?
 :-[
 

Offline bjdhjy888Topic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ca
Re: STM32F103 min system with USB-TTL converter?
« Reply #28 on: August 20, 2019, 06:00:19 am »
I have decided to add MPU-6050 to my STM32 min. system, before I send it to my PCB fabrication facility.
Since I have never designed anything for MPU-6050, I did a research.

What I've learned:
- I need to draw a schematic for my MPU-6050, as per Invensense's datasheet on page 22 at https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf
- I need to add this MPU-6050 circuit to my exisiting STM32 schematic
- I need to use I2C to connect my STM32 with my MPU-6050, which only requires 4 wires to be connected: VCC, GND, SDA, SCL
- I need to flash a .hex file to my STM32, which contains serial port codes. So, I will be able to read MPU data through STM32, via my microUSB cable, then visually see the data in my Serial Port software on my PC's monitor.

Questions:
1. Are my above logic correct?
2. Is my schematic below for my MPU-6050 correct?



I supposed this was correct, so I updated my schematic, by adding this MPU. I also wired 4 pins of my header.

Would anyone please help me review my schematic and layout? I need to get it manufactured once it's free of mistakes. Thanks so much!



« Last Edit: August 20, 2019, 12:38:26 pm by bjdhjy888 »
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7040
  • Country: ca
  • Non-expert
Re: STM32F103 min system with USB-TTL converter?
« Reply #29 on: August 20, 2019, 09:25:45 pm »
You can use PB8 and PB9 on the STM32 but then you will have to use software control for the I2C pins.
If you want the option of hardware/software I2C, then you can use PB10/PB11 (SCL SDA as you can see on your schematic symbol).

Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5134
  • Country: ro
  • .
Re: STM32F103 min system with USB-TTL converter?
« Reply #30 on: August 20, 2019, 10:18:32 pm »
Layout wise i would have some suggestions

try to have traces coming out of pads from the center of the side of a pad and try to get them perpendicularly. For example:
* traces coming out of C2 in your picture are fine... in the middle of pads
* trace coming out of C1 comes out of the corner directly at 45 degrees ... not nice
* traces on R2 and C5 coming out the edge of a pad... not cool
* two traces coming out of same side on R1 ... and you have that trace betwen the pads of the resistor when it could come from a side
* see two traces coming out of the 1117 ldo .. also consider thicker traces for  higher current

consider flipping c2 to shorten and simplify traces
 consider rearranging c2,c5,r2 to simplify traces there you have pcb area so its not a must to have them all 3 in line ... you can move the silkcreen or remove the actual values or move the values in legend somewhere you don't have parts

you could move the main crystal a few mm lower (shift the regulator lower or to the sides a bit) and make room for the 32.768 kHz oscillator above the main crystal and save a couple of traces on the bottom of the chip.

not liking those long diagonal traces on the bottom layer... i'd suggest planning for having a big ground copper fill on the bottom, so aim for using vias just to sort of create jumpers, to jump over top traces by placing small segment on the bottom. break that big ground fill as little as possible.

you could move mpu 605 and c12 higher, to shorten those 2 traces going to the header
also what's with the c13 , those red traces, are those supposed to cross over or is that an error ?
same nitpicking about vias coming out of pads weirdly ..see c14 and c15

CHK resistor can be placed by the led and this way you don't need that trace that goes around the connector...after all it's supposed to go to ground, so from resistor you'd have a via to the bottom ground fill and you're done.

you have a trace from c3 looping all the way around the headers on left and going to c5 .... i guess that's ground or something for both ... use a via to make a shorter trace or get them both to bottom ground fill through vias

you could flip the serial chip horizontally ( rotate 180 degrees) ... this way the 5v and ground would go easier to pads on chip ... maybe you would have to use a via for one of the data wires to step over the other one or you may be able to get them both through the center.
The ground pad of the chip can be connected to ground fill on other side through a via.

if it makes it easier for you ... draw a thick trace on the bottom layer that goes almost from one side to the other of the board and from that thick trace, route traces out of it which then go through via to top side and connect to pads that are supposed to go to ground.
When you'll do a ground fill, that trace and small traces from vias to it will become invisible, lost inside the ground fill.

later edit: probably not needed but since you have so much room, maybe leave a small island of copper fill around the tab of the 1117 regulator to act as a heatsink?
As i said before 1117 is kinda bad choice due to that low esr on output issue, but another problem is the tab is usually output voltage so you can't use vias to connect that tab pad directly to the bottom ground fill for better cooling.
maybe consider replacing it with a regulator that uses the tab for ground or uses the bigger dpak package (to-252 to-263) etc etc.
examples :
LF33  https://www.digikey.com/product-detail/en/stmicroelectronics/LF33CDT-TR/497-1532-1-ND/592050  (requires electrolytic on output)
NCP5501 https://www.digikey.com/short/p5d1tc  (stable with ceramic caps only on output)
MC3327 https://www.digikey.com/short/p5d1c0 (stable with ceramic caps only on output)



maybe remove the actual values of components and move the values in legend somewhere you don't have parts (could be on bottom side over ground fill)
« Last Edit: August 20, 2019, 11:15:26 pm by mariush »
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7040
  • Country: ca
  • Non-expert
Re: STM32F103 min system with USB-TTL converter?
« Reply #31 on: August 20, 2019, 11:10:48 pm »
There is no problem with traces coming out of pads at an angle. Try not to overwhelm the guy with information.

But good suggestions either way.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline bjdhjy888Topic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ca
Re: STM32F103 min system with USB-TTL converter?
« Reply #32 on: August 30, 2019, 10:52:05 am »
Unfortunately, my project failed again. It really broke my heart!
p
The issue is, when I plug my board to my PC, via a microUSB cable, windows 10's Device Manager would show an exclamation mark and read "Unknown USB Device(Device Descriptor Request Failed)"

I'm sure my power is ok, cuz the LED by the mircroUSB plug is working. AM1117 is fine, cuz I used my multimeter and confirmed its voltages were all correct.

CH340C must be the issue.
I checked the voltage between its pin 4 and pin 18, which was only 1.8V. It is supposed to be 5V.

So what is causing the issue?  I tried to solve it but failed.

I did check my schematic many times before I sent it to my PCB factory. 

Any ideas on how to solve this issue?

many thanks!
« Last Edit: September 01, 2019, 12:27:22 pm by bjdhjy888 »
 

Offline Fire Doger

  • Regular Contributor
  • *
  • Posts: 208
  • Country: 00
  • Stefanos
Re: STM32F103 min system with USB-TTL converter?
« Reply #33 on: August 30, 2019, 11:33:07 am »
CH340 work without crystal? :o
Make sure it's the correct model.
Also C12 must be 100n not 100p. Datasheet says 0.1uF
Also D+ D- doesn't look like differential routing.
« Last Edit: August 30, 2019, 11:43:14 am by Fire Doger »
 
The following users thanked this post: bjdhjy888

Offline bjdhjy888Topic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ca
Re: STM32F103 min system with USB-TTL converter?
« Reply #34 on: August 30, 2019, 11:52:59 am »
CH340 work without crystal? :o
Make sure it's the correct model.
Also C12 must be 100n not 100p. Datasheet says 0.1uF
Also D+ D- doesn't look like differential routing.
Thanks for your reply. But I copied someone else's schematic and I bought his board and his board is designed exactly like mine, aka, his schematic. His board works fine and it works on my PC. But mine does not, on the same PC.
So I must be wrong.
Could it be my PCB routing? The width of my wires? (I did use Altium's check funtion and found no errors! strange)
Should I delete my copper pour and get it manufactured again, using the method of elimination?
« Last Edit: September 01, 2019, 12:26:48 pm by bjdhjy888 »
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7040
  • Country: ca
  • Non-expert
Re: STM32F103 min system with USB-TTL converter?
« Reply #35 on: August 30, 2019, 09:44:41 pm »
Can you post their schematic? Or compare yours and theirs and see what the difference is in terms of USB/CH340.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: bjdhjy888

Offline bjdhjy888Topic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ca
Re: STM32F103 min system with USB-TTL converter?
« Reply #36 on: August 30, 2019, 10:48:22 pm »
OMG!!!!!!!!!!!!
my project is working!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;D ;D ;D ;D ;D ;D ;D
2 issues degbugged!
1. CH340C's pin 4 and pin 16 are now powered at 3.3V, instead of 5V, thanks to another schematic found on the internet.
2. Reset button must be pressed before flashing, while boot 0 is on

man, i'm thrilled!
thanks for you guys' help!
debegging is painful, but it's worth it!

thanks again, bros!!!
;D ;D ;D ;D
« Last Edit: September 06, 2019, 07:55:42 am by bjdhjy888 »
 
The following users thanked this post: thm_w

Offline bjdhjy888Topic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ca
Re: STM32F103 min system with USB-TTL converter?
« Reply #37 on: August 31, 2019, 01:23:50 am »
My next step is to connect an external MPU-6050 module with my board.
In order for the module to communicate with my board, I need to use two wires for an I2C connection between MPU-6050 and my STM32.
The thing is, there is no room around PB6 and PB7 of my STM32.
I will need to put two vias inside my STM32. Is this unprofessional? I tried to avoid putting vias inside any IC's.
Please let me know. Thanks!
« Last Edit: August 31, 2019, 01:26:24 am by bjdhjy888 »
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5134
  • Country: ro
  • .
Re: STM32F103 min system with USB-TTL converter?
« Reply #38 on: August 31, 2019, 12:01:46 pm »
Well, i wrote two long posts with suggestions and you seem to have ignored everything i said, or even acknowledge what I wrote.... so why would i bother giving you more advice or tips?

just the first thing that comes to mind is.... for example at least two people told you that those oscillators/crystals/whatever should be close to the chip and those small ceramic capacitors should also be close, yet your parts are still centimeters away from your chip.
 

Offline bjdhjy888Topic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ca
Re: STM32F103 min system with USB-TTL converter?
« Reply #39 on: August 31, 2019, 09:57:34 pm »
Well, i wrote two long posts with suggestions and you seem to have ignored everything i said, or even acknowledge what I wrote.... so why would i bother giving you more advice or tips?

just the first thing that comes to mind is.... for example at least two people told you that those oscillators/crystals/whatever should be close to the chip and those small ceramic capacitors should also be close, yet your parts are still centimeters away from your chip.
Though I did appreciate your reply, I had the right to not follow yours.
I followed most people's replies.
If you feel uncomfortable, please do reply my posts again.
I don't like being overwhelmed or reading huge paragraphs with no capitalizations or logic.
I had trouble reading your English as well.
Sorry.
« Last Edit: August 31, 2019, 10:34:52 pm by bjdhjy888 »
 

Offline eliocor

  • Supporter
  • ****
  • Posts: 522
  • Country: it
    • rhodiatoce
Re: STM32F103 min system with USB-TTL converter?
« Reply #40 on: August 31, 2019, 11:08:13 pm »
mariush's suggestions are perfectly clear, valid and sound: it would be better if you follow them!
Your current layout can be defined in a few words: what a mess!
 
The following users thanked this post: Kilrah

Offline bjdhjy888Topic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ca
Re: STM32F103 min system with USB-TTL converter?
« Reply #41 on: September 01, 2019, 04:18:14 am »
mariush's suggestions are perfectly clear, valid and sound: it would be better if you follow them!
Your current layout can be defined in a few words: what a mess!
Not if someone like you who cannot read the forum's user code of conduct.
Just stay out of my thread if you can't be nice to beginners. Thanks, bro, or... ahem... PCB layout PhD.
Oh! Your English suffers from capitalization deficiency as well.
« Last Edit: September 01, 2019, 04:33:51 am by bjdhjy888 »
 
The following users thanked this post: eliocor

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18009
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: STM32F103 min system with USB-TTL converter?
« Reply #42 on: September 01, 2019, 08:33:44 am »
Perhaps you should calm down a bit. No one learnt to lay boards out overnight. I did not read all of the suggestions but when I looked at the picture I too thought: but I thought you were told not to do that.

Do you know why we use bypass capacitors? because there is no room to put those capacitors in the chip itself! That is how important placement is. You are not building a nice housing estate, you are using everything you can to your advantage. Every trace no matter how wide is an inductor and a resistor. When I put bypass capacitors next to a chip the positive pad points to the chip and gets as close as possibe to the pin it connects to, yes I will put the positive pad on a ceramic capacitor 1mm away from the pad of the chip. The negative of the chip goes to a ground plane as does the negative of the IC.

Nothing in this world is ideal, you can only but approach ideal as much as possible. The other thing is that you can use this forum to host images, that way they won't keep dissapearing or have watermarks all over them.

I hope I capitalized everythig correctly for you so that you can read it OK.
 
The following users thanked this post: bjdhjy888

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: STM32F103 min system with USB-TTL converter?
« Reply #43 on: September 01, 2019, 08:58:07 am »
Just stay out of my thread if you can't be nice to beginners.
Being a beginner is perfectly fine. Being a beginner who doesn't listen to the good advice they received after asking for it, and going after those who take time to try and help them usually doesn't end well for them. That has nothing to do with being a beginner in the first place.
« Last Edit: September 01, 2019, 09:00:06 am by Kilrah »
 
The following users thanked this post: bjdhjy888

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5134
  • Country: ro
  • .
Re: STM32F103 min system with USB-TTL converter?
« Reply #44 on: September 01, 2019, 10:11:08 am »
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+board

Look 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-pcb

Bring 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)
 
The following users thanked this post: rhodges, bjdhjy888

Offline bjdhjy888Topic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ca
Re: STM32F103 min system with USB-TTL converter?
« Reply #45 on: September 01, 2019, 12:32:47 pm »
Thanks, guys. My bad.
If you saw my initial layout, you would be surprised how much worse it was. It was very very bad. I cannot even look at now. That's why I did appreciate your replies.
I'm gonna re-do the layout from scratch and improve my schematic, again!  :palm:
Thanks again. Bless you, mariush!
 ;)

p.s.: Though I've been following Dave on YouTube, it wasn't until today that I noticed that his vlog has some videos on PCB layout. I just started to watch them. Hope I can improve my PCB layout skills.
« Last Edit: September 02, 2019, 08:24:28 am by bjdhjy888 »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18009
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: STM32F103 min system with USB-TTL converter?
« Reply #46 on: September 01, 2019, 05:59:44 pm »
No coponent is in physics what it is labeled as and we are basically playing with physics at a higher abstracted layer. The higher you go in frequency the more heed you pay to actual physics.

No passive component is purely a resistor, capacitor or inductor. Every one is a tuned circuit with a dominant characteristic. All other components have R, C, & L in them too. Every pin of a chip has capacitance, gates of MOSFET's are capacitors, sure you can pick a bigger MOSFET with lower Rds_on that will make less heat when conducting, but now it will have more input capacitance and take longer to turn on and off which means making more heat....
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7040
  • Country: ca
  • Non-expert
Re: STM32F103 min system with USB-TTL converter?
« Reply #47 on: September 03, 2019, 10:58:17 pm »
Being a beginner is perfectly fine. Being a beginner who doesn't listen to the good advice they received after asking for it, and going after those who take time to try and help them usually doesn't end well for them. That has nothing to do with being a beginner in the first place.

Sure, and he should be appreciative. But advice given should match, to some extent, the skill of the OP. If its the guys first board and you whip out a laundry list of mostly non-critical criticisms, its going to overwhelm or discourage them.

eg "acid traps" and such are really not a thing any more, a lot of PCB design advice is from times past when PCB manufacturing was not as well refined as it is these days. Some recommendations that used to be "good practice" have become obsolete, although some still have value in terms of clean layout/etc.


My next step is to connect an external MPU-6050 module with my board.
In order for the module to communicate with my board, I need to use two wires for an I2C connection between MPU-6050 and my STM32.
The thing is, there is no room around PB6 and PB7 of my STM32.
I will need to put two vias inside my STM32. Is this unprofessional? I tried to avoid putting vias inside any IC's.
Please let me know. Thanks!

Yes you can put via's under the IC, there is nothing wrong with this. Just keep it far from the pads (to avoid solder shorting where you cant see it), and not if the part in question has a metal pad in the middle (this STM32 does not).
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: bjdhjy888


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf