Author Topic: [Review Request] Newbie here, can someone review my PCB before I order it?  (Read 1254 times)

0 Members and 1 Guest are viewing this topic.

Offline AmeliaBunsTopic starter

  • Contributor
  • Posts: 28
  • Country: ca
Hi! This is a 12v(10A-15A)/24v(10-15A) PTC heater controller for a filament drybox. It uses an ST7335 TFT module and an encoder to function. I regret putting the heaters on the bottom (the PCB's bottom layer will be facing the user).

I chose a random capacitor bank (220uF + 470uF) purely based on instinct, I'd love a second opinion on that, the issue from my understanding is that PTCs draw more current with lower voltage (which is strange!) and I expect an inrush current at the turn on event. I chose to keep my PWM frequency to about 10hz-1hz (based on feelings again...) but I know voltage doesn't rise instantly, I can't afford a current probe/differential probe for my scope to do testing myself. so I just sorta went with this. Any thoughts? Am I overthinking this? Part of me thinks even without any electrolyte caps on the inputs it'll still function more than fine and be more compact :P

More importantly, will the PCB even work? I'm awful at laying out components and tracing them, Any tips or gentle criticism?

Thanks :)

EDIT: I just noticed the warnings for the silkscreen, sorry! ignore those, my footprints are apperntly too small for JLCPCB? Maybe I configured my silkscreen wrong... but that's not important right yet!
« Last Edit: March 26, 2024, 08:34:41 pm by AmeliaBuns »
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6389
  • Country: ca
  • Non-expert
Looks good, some notes:
- Fuse on gnd instead of positive input where it would normally be
- Could have a cap on TH0_IN to manage noise and ESD
- Could have caps on the encoder to make software a bit easier, though not necessary
- Could add some test points on spare pins in case you need more IO after the board is made
- Silkscreen could show polarity of inputs where important (eg Vin +/-)
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline zilp

  • Regular Contributor
  • *
  • Posts: 206
  • Country: de
thm_w already mentioned the fuse in GND. But also, I think I would separate the fuse for the heater from the fuse for the electronics, as a 15 A fuse won't do anything if something in the electronic part shorts out.

As for the power filter caps: Well, if you don't know the cold current of the PTC, nor the inductivity of the cable from the power supply, nor the regulation (?) speed of the power supply ... it's hard to say what you need there. But 690µF is not much for 12 V/10 A.

I think I would consider putting a diode plus (maybe slightly larger) cap in front of the regulator, because voltage stability probably isn't that important for the heater, but it is for the µC, so, if the heater can't suck the buffer for the µC empty, you don't have to worry about voltage sagging due to heater switching that much.

Also, depending on the resistance curve of the PTC, a higher switching frequency might be better to not let the temperature and thus the resistance drop too much, so that you avoid unnecessarily strong current spikes. I mean, 10 Hz might be enough for that, 1 Hz might be a bit low ... depends on the thermal mass, too, of course.

Potentially, you could also try to to "pre-heat" the PTC with lower current, i.e., lower gate voltage (but carefu about SOA!) or a separate path with a series resistor, in order to reduce current peaks.

It all depends on details of the PTC and the power supply, of course.

Also, chances are you don't really need discrete pull-ups on the I²C. Unless you need particularly high clock speed, the internal pull-ups of the µC probably should work just fine.
 

Offline AmeliaBunsTopic starter

  • Contributor
  • Posts: 28
  • Country: ca
Looks good, some notes:
- Fuse on gnd instead of positive input where it would normally be
- Could have a cap on TH0_IN to manage noise and ESD
- Could have caps on the encoder to make software a bit easier, though not necessary
- Could add some test points on spare pins in case you need more IO after the board is made
- Silkscreen could show polarity of inputs where important (eg Vin +/-)

all excellent ideas! Although I have two questions,
Firstly, do you mean a capacitor on the encoder's button side? or all sides?
also why would the fuse be on positive instead?
« Last Edit: March 27, 2024, 02:50:53 am by AmeliaBuns »
 

Offline AmeliaBunsTopic starter

  • Contributor
  • Posts: 28
  • Country: ca
thm_w already mentioned the fuse in GND. But also, I think I would separate the fuse for the heater from the fuse for the electronics, as a 15 A fuse won't do anything if something in the electronic part shorts out.

As for the power filter caps: Well, if you don't know the cold current of the PTC, nor the inductivity of the cable from the power supply, nor the regulation (?) speed of the power supply ... it's hard to say what you need there. But 690µF is not much for 12 V/10 A.

I think I would consider putting a diode plus (maybe slightly larger) cap in front of the regulator, because voltage stability probably isn't that important for the heater, but it is for the µC, so, if the heater can't suck the buffer for the µC empty, you don't have to worry about voltage sagging due to heater switching that much.

Also, depending on the resistance curve of the PTC, a higher switching frequency might be better to not let the temperature and thus the resistance drop too much, so that you avoid unnecessarily strong current spikes. I mean, 10 Hz might be enough for that, 1 Hz might be a bit low ... depends on the thermal mass, too, of course.

Potentially, you could also try to to "pre-heat" the PTC with lower current, i.e., lower gate voltage (but carefu about SOA!) or a separate path with a series resistor, in order to reduce current peaks.

It all depends on details of the PTC and the power supply, of course.

Also, chances are you don't really need discrete pull-ups on the I²C. Unless you need particularly high clock speed, the internal pull-ups of the µC probably should work just fine.

Resistors are cheap so why not! I did a light test with my scope on the I2C and although it functioned just fine at 100khz, the signals looked really awful and had terrible rise times!
 

Offline zilp

  • Regular Contributor
  • *
  • Posts: 206
  • Country: de
also why would the fuse be on positive instead?

For one, that's just the convention. But also, that is the convention because ground tends to have alternative paths into the device that would bypass any fuse in the power input. Like, if you happened to run the programmer from the same power supply as your device, and the fuse blew, the current would continue to flow through the programming interface's ground connection, and subsequently would probably blow some PCB traces or something. Or if the power supply's rgound was earthed, and the PC that the programmer is connected to, is also earthed ... same problem.

So, it's not necessarily wrong to put the fuse in GND, but it is very unusual, and really should only be done if absolutely necessary, and making sure that other ground connectiosn of the device can't bypass the power supply connection (i.e., you are sure that no other ground pin ever will get galvanically connected to the power supply's ground).

 
The following users thanked this post: tooki

Offline zilp

  • Regular Contributor
  • *
  • Posts: 206
  • Country: de
Resistors are cheap so why not! I did a light test with my scope on the I2C and although it functioned just fine at 100khz, the signals looked really awful and had terrible rise times!

Well, it's really more the effort of routing the PCB and soldering if you want to solder it by hand than the cost of the resistors why I would potentially leave out the resistors.

But also ... "awful" rise times are good, because lower emissions! I mean, within limits, obviously, and also, too high a pull-up impedance can increase susceptability to interference, so ... it depends.
 
The following users thanked this post: AmeliaBuns

Offline Revky27

  • Contributor
  • Posts: 22
  • Country: gb
Looks good, some notes:
- Fuse on gnd instead of positive input where it would normally be
- Could have a cap on TH0_IN to manage noise and ESD
- Could have caps on the encoder to make software a bit easier, though not necessary
- Could add some test points on spare pins in case you need more IO after the board is made
- Silkscreen could show polarity of inputs where important (eg Vin +/-)

all excellent ideas! Although I have two questions,
Firstly, do you mean a capacitor on the encoder's button side? or all sides?
also why would the fuse be on positive instead?

Well good design is to have protection as close to the source. Also, typically you want to have as good of a current return path as possible with the lowest impedance. If you have a fuse, you cannot achieve this because you add the fuse resistance to the 0V resistance, and you would also for example in board have to narrow all paths to connect to this fuse pad. This can increase the voltage on the ground relative to the supply 0V and can cause issues in your electronics.

Secondly due to safety reasons. If your circuit is inside a machine and your fuse blows the circuit still has voltage applied to it but no return path so someone could try and repair, it and get an electric shock.

These are good practices and in your case probably not going to make a difference so if you get used to bad practices when it comes to it you will just waste time to troubleshoot.
 
The following users thanked this post: AmeliaBuns

Offline ksjh

  • Contributor
  • Posts: 18
  • Country: de
EDIT: I just noticed the warnings for the silkscreen, sorry! ignore those, my footprints are apperntly too small for JLCPCB? Maybe I configured my silkscreen wrong... but that's not important right yet!

I could not help but also look at these error markers, sorry. From the 3D rendering, it looks like there is silkscreen over the pads. Some PCB manufacturers might correct this automatically, but I would not rely on that. KiCad allows to select the option "Subtract soldermask from silkscreen" to circumvent this error. I suggest to use this option when generating the Gerber files at least. It would be even better to modify the footprint to avoid the need for this completely.
 
The following users thanked this post: AmeliaBuns

Offline zilp

  • Regular Contributor
  • *
  • Posts: 206
  • Country: de
Well good design is to have protection as close to the source.

The fuse is directly at the input terminal, so it is as close to the source as possible.

Also, typically you want to have as good of a current return path as possible with the lowest impedance. If you have a fuse, you cannot achieve this because you add the fuse resistance to the 0V resistance, and you would also for example in board have to narrow all paths to connect to this fuse pad.

That is a nonsensical argument, as all paths will unavoidably narrow down to the power supply wires. Whether that narrow point is located a few millimeters further to the right than without the fuse is irrelevant. Also, that argument would apply equally to the non-GND connection. There is nothing special about the ground side as far as effects of high impedance supply paths within the circuit are concerned.

This can increase the voltage on the ground relative to the supply 0V and can cause issues in your electronics.

No, it can't. Also, the fuse in the non-GND connection equally has resistance and will change the potential on the non-GND supply rail. That also doesn't cause problems in your electronics. Also, both power supply wires have resistance and make it so that the potential of both supply rails on your PCB have a potential that is different from the respective potentials inside the power supply. That also doesn't cause problems in your electronics.

The only reason the potential shift due to the fuse's resistance can cause problems is if there are alternative paths from the power supply's respective pole into the device that bypasses the fuse, because that then changes the I/O voltages on those connections, causes power supply currents through those other connections, and causes the fuse to be ineffective (because it blowing doesn't stop the current through the alternative paths ... and also, potentially, it doesn't blow in the first place because it doesn't see all the current in the first place).

But that in principle applies to either side. It's just that usually there is only one potential that is the reference potential for all connections into a device, which then is what we usually also call ground, which then, if those other connections could ever end up connecting to the power supply's ground, is why one shouldn't place a fuse on that rail. But the point is that if there aren't ever any alternative (low impedance) paths from the power supply ground to device ground, then there is nothing special about whatever supply rail we declare "ground" within the circuit that would cause any problems ... and also, if for whatever reason, there could be alternative paths to the non-GND rail of the power supply, then the same problem arises.

Putting the fuse in the non-GND is the convention because the vast majority of circuits don't have alternative paths from their non-GND supply rail to the power supply non-GND rail, and also, if there are alternative paths from a device supply rail to the respective power supply rail, that's almost always the ground rail. But fundamentally, what matters is that there are no paths that bypass the fuse. If there aren't, you can in principle put the fuse on either side, doesn't matter as far as correct function and safety are concerned. If there are, it doesn't matter which rail it is, you have a problem.

Secondly due to safety reasons. If your circuit is inside a machine and your fuse blows the circuit still has voltage applied to it but no return path so someone could try and repair, it and get an electric shock.

If someone repairs a device that could have dangerous voltages inside without disconnecting the power supply "because the fuse is blown" ... they're an idiot.
« Last Edit: March 27, 2024, 10:43:27 am by zilp »
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5912
  • Country: es
- Thin 3.3V rail traces.
- U3 can be placed much better, see attachment.
- Some unnecesary close traces like in SWD and R5.
- Avoid GND traces like in R6, just place a via to the bottom plane.
- You can do better under STM32 to not break the bottom plane.
- Place test pads for unused STM32 pins so you can make easy mods when you realise about the screw-ups :).
- I would add a top GND plane connected to the bottom with via stitching, is normally a good idea for better shielding and power dissipation.
- Enable teardropping, will smoothen transition between large pad and thin trace, making it more resilient.

« Last Edit: March 27, 2024, 11:22:16 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: AmeliaBuns

Offline AmeliaBunsTopic starter

  • Contributor
  • Posts: 28
  • Country: ca
- Thin 3.3V rail traces.
- U3 can be placed much better, see attachment.
- Some unnecesary close traces like in SWD and R5.
- Avoid GND traces like in R6, just place a via to the bottom plane.
- You can do better under STM32 to not break the bottom plane.
- Place test pads for unused STM32 pins so you can make easy mods when you realise about the screw-ups :).
- I would add a top GND plane connected to the bottom with via stitching, is normally a good idea for better shielding and power dissipation.
- Enable teardropping, will smoothen the transition between large pad and thin trace, making it more resilient.


I didn't put my IC like this because I've heard Vias are terrible at emitting EMI and that the clock signal of an i2c line will emit a ton of it, so I thought I rather keep my vias to power inputs/outputs etc.

why is the GND trace bad? I thought fewer vias might reduce my BOM but I think I'm just really paranoid tbh  ;D

there's not much space but i'll definitely add the test pads, a great idea!

Thank you everyone :) I think after these changes i'll place the order for the PCB, and since the parts will be only 5$ extra for 4 day shipping and I'm broke, I'll do 2 week shipping for the PCB and order the parts next month :P
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5912
  • Country: es
There's a LOT f space to put some 1mm pad  :-DD
I2C is slow, doesn't emit such a lot of EMI, and in any case this is DIY.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline zilp

  • Regular Contributor
  • *
  • Posts: 206
  • Country: de
why is the GND trace bad? I thought fewer vias might reduce my BOM but I think I'm just really paranoid tbh  ;D

That particular one for the power LED ... I don't see how that could be a problem.

But more generally, a long thin trace will have higher resistance than a short via, thus potentially causing a difference in ground potential, which can cause weird effects (think a part that has defined input signal thresholds that suddenly are shifted up vs. the rest of the circuit), plus, a ground trace generally can't have a smaller loop area than just a via to the ground plane, but is very likely to have a larger loop area, so it's going to increase inductance, thus also shifting around your ground potential when it sees high speed signals, with similarly weird effects.

So, it's not always bad to have a ground trace, but it's a good general rule to keep connections to ground short, and vias usually are the shortest path to ground if you have a ground plane.
 

Offline AmeliaBunsTopic starter

  • Contributor
  • Posts: 28
  • Country: ca
There's a LOT f space to put some 1mm pad  :-DD
I2C is slow, doesn't emit such a lot of EMI, and in any case this is DIY.

wdym by a 1mm pad?
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11546
  • Country: ch
There's a LOT f space to put some 1mm pad  :-DD
I2C is slow, doesn't emit such a lot of EMI, and in any case this is DIY.

wdym by a 1mm pad?
You said there wasn’t much room for test pads. He’s saying there’s plenty of room for 1mm test pads, which is definitely true. Your board isn’t even close to running out of space.
 

Offline AmeliaBunsTopic starter

  • Contributor
  • Posts: 28
  • Country: ca
There's a LOT f space to put some 1mm pad  :-DD
I2C is slow, doesn't emit such a lot of EMI, and in any case this is DIY.

wdym by a 1mm pad?
You said there wasn’t much room for test pads. He’s saying there’s plenty of room for 1mm test pads, which is definitely true. Your board isn’t even close to running out of space.

I'm just really bad at this :P managed to find some way to put testbeds! can't wait for the PCB to arrive! ordered within the holidays but hopefully, it'll arrive soon!
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5912
  • Country: es
I mean something like this. More pads can be added by optimizing nearby traces/parts.
Doens't need to be 1mm, also 0.5/0.75mm pads can be easily soldered with thin wires.
« Last Edit: April 03, 2024, 09:14:09 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf