Designed my first high-current (4A) PCB design, looking for feedback

Hi there o/,

I’m designing an LED driver board based around spare parts I found in my boxes. It features 8 channels at 4V with up to 0.5A each, and 4 channels with 3.3V at up to 0.2A. The LEDs are PWM-switched using a BC337 (for the 0.5A channels) or a 2N2222A (for the 0.2A channels), driven by 2N2369 which are driven by an off-board microcontroller (STM32F103).

The voltage is regulated by a PTN78020 (4V rail), LMO78_03-1.0 (3.3V rail) and LMO78_05-0.5 (5V rail for off-board microcontroller) respectively. I’m using 12V as input voltage for all of these, coming in through a 2.6A fuse.

I chose the track widths for low voltage drop and I intend to have this two-layer board made with 35μm copper. I’ll fill the board with GND (should I maybe fill with the 4V rail instead? or split it in 3.3VP and 4V depending on the location?)

The PWM frequency is ~7.8 kHz (64 MHz MCU clock straight to the timer, which then counts up to 8191), with pulse widths down to 31ns or 125ns (depending on what I can squeeze out of the final wires). (In a breadboard-based test setup, I noted that the BC337 isn’t really quick in turning off when switching 0.5A (up to 2us delay!), possibly because of the capacitance of the LEDs themselves. I intend to compensate for that in software using temporal dithering and other mitigations.)

The high frequency could also pose issues at some places I suppose. I plan to add some staggering to the timers to avoid hitting the regulators with the LEDs switching on at the same time always. In addition, I added extra capacitance close to the BC337/2N2222A driving the LEDs (I’m not yet sure what size that capacitance will be, I may experiment a bit if soldering SMD (my first time!) isn’t going to be too much of a hassle).

So, boiling this down, I appreciate any feedback you might want to give, in particular around the following:

  • Ease of SMD soldering – I never did it before, so if there’s anything I can do to simplify this re trace layout, please let me know.
  • High-current + High-frequency PCB: Anything I should change here?

Quick tour: top half are the 0.5A channels, lower right are the 0.2A channels, lower left / left third are connectors and regulators. I tried to keep the +V tracks on the back. I hope you can appreciate the symmetry :-).

Happy to share the PCB and schematics files if that helps anyone understanding this (the forum won’t let me upload them at this stage, so I’ll have to find someplace else).

Looking forward to your input!

A “good” review is easier if you zip and upload the whole project, but I’m not in the mood lately to spend much time on this forum anyway, so I’ll just post a few remarks.

First, Without looking too deep at it, the PCB looks quite decent, but there are always some things that could be improved.

  • When PWM-ming big currents, you want big buffer capacitors, so the current pulses are kept (mostly) away from the power supply and power supply wiring.
  • BJT’s are slow to get out of saturation. If you use them as emitter followers, then they’ll just amplify the current and without getting into saturation. Efficiency will be a bit less, but switching is quicker (Try it on a breadboard).
  • Why use THT? It’s getting quite old fashioned. These day’s there are plenty of small SOT-23 MOSfet’s that can switch a few amp without getting hot. I also find it easier to work with. You don’t have to cut leads to size, and don’t have to turn the PCB for soldering, so the parts won’t fall of all the time. Ceramic SMT parts such as resistors and capacitors can be fragile though. They can break when the PCB is bent, for example during screwing in the wires with a screwdriver.
  • Having a big GND plane, preferably over a whole layer is always a good idea for a few reasons:
    • It lowers voltage drop over the GND.
    • It reduces EMC emissions.
    • It’s easier to design, you can just use a zone instead of drawing (copying?) all those tracks.
    • Almost all (non GND) tracks on the red layer can be pushed to the blue layer. With this you have an (almost) continuous GND layer.
  • Why are there ratsnest lines from the mounting holes to the GND net? Make up your mind. Either connect the holes to GND, or use “no-connect” crosses in the schematic for the holes.
  • Add some logos (“Made with Kicad”?), your name, the project name and/or a revision number or date. This makes it easier to find the project if you have a lot of projects and want to make some modifications at some time in the future.
  • Have you used footprint for metal can transistors? Gosh. But double & triple check if the pinout of all used footprints is correct. I do use KiCad’s default libraries (they’re quite nice), but I always verify pinouts, and when you’ve checked them, you can optionally put them in a library with “house parts” that you’ve checked and prefer. This makes it easier for your next project.
  • Sometimes there can be small differences in footprints. For example some connector types can have a 5mm or a 5.08mm pitch. The difference is too small to see, but if you put 16 pins of such a connector in a row, then it won’t fit it there is a mismatch.

    0.08*16 = 1.28 mm

  • Have you drawn a PCB outline? (Lines on the Edge.Cuts layer). I do see zone boundaries, but I’m not sure if there are lines on Edge.Cuts.
  • I prefer to never put zone boundaries on top of each other, and usually use some weird shape such as a pentagon or parallelogram. This makes it easier to select a zone by it’s boundary, and it also shows up immediately in the gerbers if zone boundaries are not properly clipped by the Edge.Cuts lines.
  • Have you run ERC and DRC? Are there any warnings or errors left?
1 Like

Thanks a lot for your reply! I got a couple of questions while I am going through everything and making sure I take it into account.

In the meantime, here’s the full project if you’d like to see more: https://sotecware.net/files/noindex/pwrboard.zip

  • When PWM-ming big currents, you want big buffer capacitors, so the current pulses are kept (mostly) away from the power supply and power supply wiring.

What kind of “big” are we talking about? I have up to 100nF SMD capacitors at hand (and they’re planned for between the Vcc and GND close to the BC337/2N2222A BJTs).

  • BJT’s are slow to get out of saturation. If you use them as emitter followers, then they’ll just amplify the current and without getting into saturation. Efficiency will be a bit less, but switching is quicker (Try it on a breadboard).

I built this (plus a 3.3k on PWM_IN actually) on my breadboard:

It didn’t work at all. On the scope, I saw that the voltage across the LED went up to ~2.4V, but never beyond. That might be the threshold voltage of the diode. I tried putting a 4.7k resistor in parallel, but that didn’t change the behaviour. The current through the base is in the order of 0.5mA at that point, which is interestingly also the amount of current going through the resistor if I add it, which seems to indicate that nothing at all is coming from the collector. Not sure how that can happen…

  • Why use THT? It’s getting quite old fashioned.

Yeah. I know. I just am not experienced at all with SMD and I’d like to keep the SMD parts to the absolute minimum. Plus, I already have those BJTs around, so no extra costs, delivery times etc. for me :).

  • Having a big GND plane […]

Check. (I cleared the fills to make the image easier to decipher before taking the screenshot) This is also why there’s rats nest lines from the holes to GND – they’re gone once I fill. For all other things, though, I prefer explicitly drawing the GND traces to ensure that enough track width is available everywhere.

  • Add some logos (“Made with Kicad”?) […]

Good idea!

  • […] But double & triple check if the pinout of all used footprints is correct. […]

Also very good idea, I should definitely do that. I just relied on the pinout for BC337 and 2N2222A to match with my parts, but that’s probably not a given…

  • Sometimes there can be small differences in footprints.

Yep, the connectors do have me nervous. I checked the spacing there quite a few times already and probably will for another time before sending it off…

  • Have you drawn a PCB outline? (Lines on the Edge.Cuts layer).

Yep, identical to the zone boundaries.

  • Have you run ERC and DRC? Are there any warnings or errors left?

Should definitely do that, thanks!

So, if your PWM in is at +4v, then the collector of the 2N2369 will be 0.7v below that, so 3.3 volts. Ignore any voltage drop across the resistor, then the base of the BC337 is also at 3.3v, and its collector will be at 3.3 - 0.7 = 2.6 volts, which kinda matches what you said.

I love using the 2N7000 FET, and the way I would do the above would be like this:

image

(depending if the input needs to be inverted or not)
(if you insist on using NPN’s, then stick R in base line!)

I’m not saying the 2n7000 is right for your needs, it IS deemed to now be obsolete, but datasheet is here: https://www.st.com/resource/en/datasheet/cd00005134.pdf. The 2N7000 has an on resistance of well under 10 ohms.

NOTE: you MUST MUST MUST put a resistor somewhere in series with the LED, otherwise the LED becomes an “audio device”, and goes “pfut” - just once though! Modern LEDs need 10 to 20mA, so for 4 volts, you’d be looking at:

Vres = 4v (power rail) - 2v (led) = 2 volts (ignore the FET, it’s close to being a switch!!)

R = V / I = 2 / .02 = 100 ohms.

So, if your PWM in is at +4v, then the collector of the 2N2369 will be 0.7v below that, so 3.3 volts.

Actually, the PWM is at 3.3V; the collector of the 2N2369 is at the 4V supply. But what you’re saying still roughly makes sense to me; I did not take into account the fact with BJTs, the V_BE also constrains the emitter voltage…

So I guess I’ll stay with keeping the LEDs on the collector side of the BC337. It works well enough anyway, I think the lagginess can be compensated for in firmware.

Regarding the series resistor for the LEDs: Thanks for reminding me :slight_smile: (better say this once too often). This will be part of the other side of the connector (hence missing from the PCB), as different LEDs will need different resistors, and I simply forgot to include it in the schematics (because I don’t see it on the breadboard).

Four of the channels will be loaded with chains of 50 LEDs in parallel, which amounts to up to 500 mA of on-current per channel. My beloved 2N7000 are unfortunately not rated for 500 mA continuous current (which would be the case when the LEDs are turned up to full power); I could thus use it for the low-amp channels (200mA) only, but then I’d still be exactly at its absolute maximum rating which doesn’t seem safe. In addition, due to the high currents, I want to keep the LED resistors really small valued (otherwise, they emit significant amounts of waste heat) and then the Rdson is actually a bit much and the variance may start to be a problem.

Thanks for your insights though, that clarifies the BJT situation a lot (I never designed with BJTs before, only ever FETs because they are simpler to use.

best regards!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.