Review Request - FPGA 36 Channel Addressable LED Driver with ESP32
This is a control board to drive 36 channels of WS2812-like addressable LEDs. The MCU is an ESP32 S3. The LED's data lines are controlled by a GOWIN GW1NR-9 FPGA, which receives commands and data from the ESP32 via SPI.
On the bottom assembly you'll see some poorly placed SMD pin headers, these ideally would have been placed further apart, but the other board that this is meant to plug into was already fabricated with a different solution for this board in mind. (oops)
There's also an SD card reader for reading animation data from an micro SD card, and a USB-C connector to program the ESP32 and for a virtual serial port. I would have like to add a JTAG programmer on the board, but I figured the FPGA won't need updates once it's done.
Also, as far as I can tell, this FPGA has no "startup sequence" requirements for which voltage rails get powered on first or what not, but correct me if I'm wrong.
I've also included 4 LDOs with two of them being 3.3v. That's probably overkill, but I separated the ESP and FPGA / Level Shifter's 3.3v on separate rails. In my experience ESP32s can have high peak current draws.
The board will be powered from the 5V pin on the bottom. Ideally there would be more ground return pins connecting to the other board, but again I'm a little constrained since the other board is already manufactured.
Let me know what I've done wrong please!
ESP32, USB, and SD Card Connector
Level Shifters and Header Pins
Posted Jan 31, 2023, 7:03 AM UTC · edited
Can't really comment on the FPGA, I haven't used this one yet.
However, I wonder - how are you planning to power all those LEDs? I hope not from the 5V rail here? Because if yes, that looks rather woefully undersized. Even if each channel was just one LED, that's a lot of current to drive (these smart LEDs are notorious for being power hogs) - and you likely have a string of several there. Such large array would require external power.
And a general comment - I would strongly suggest to add copious amounts of silkscreen labels to your board. Label every connector (and connector pin, esp. since you are using unpolarized headers), every important signal, every voltage rail.
Also add labeled testpoints to all important signals and sufficient amount of ground tie points/loops for clipping a logic analyzer or scope probe to. It doesn't cost anything and will save you a lot of hassle during debugging the design.
Don't forget to put the name of the board and mainly its revision number somewhere - it will save your bacon if you will need to check which respin of the board this is in the future.
I am a bit concerned about the ESP32 antenna - you have made a cutout in the PCB around it but you still have ground pour right next to it. I would either make the cutout larger or pull the ground back so that there is enough space. If you don't do that, it will still detune the antenna - at 2.4GHz for that antenna type the 1/4 wavelength is almost 3cm and near field is about 1cm! Obviously that's not practical in your case and your antenna will be compromised no matter what but you will want to minimize it - esp. since there is nothing at that edge of the board that would require the ground there.
The ESP32 hardware design guide recommends 15mm of clearance to either side of the antenna, so there really isn't enough room to pull it back enough before the SD slot becomes the problem. OP would be best off hanging the antenna over the side of the board, or just using an ESP32 module with an external antenna connector, depending on enclosure requirements.
The SD slot doesn't really care whether or not it has copper under the metal cage holding the card. That copper could be removed. The FR4 alone won't cause issues.
The same with the copper under the ESP32 itself. That's obviously not ideal (it has GND pins at the front close to the antenna) but having a thick GND track there is better than a full copper pour.
I'm more concerned that the SD cage itself is a big chunk of conductive metal inside the recommended antenna keepout area (remember, 15mm to each side), likely tied to GND.
That's a very legitimate concern. There are companies selling ESP32 boards with 18650 battery holders on the backside of the board, and people found quickly that the closeness of the metal battery contact in proximity to the Wi-Fi antenna meant the Wi-Fi performance was abysmal. (Wemos/Lolin briefly was selling them, and stopped -- apparently from that issue -- but a lot of knock-off manufacturers in China are still making them.)
Ah yes, of course. I didn't think about that.
No point in removing the ground when there is that big hulking sheet of metal there.
So instead of a full ground pour under the body of the ESP, I should just run a single trace along the border of the ESP and the antenna? I can't imagine that would make much of a difference, but I think I'm misunderstanding what you're saying.
That would make a lot of difference because you have a lot less grounded copper next to the antenna. You don't need to remove all the copper under the ESP32 but pull it a bit back from the antenna side.
Ultimately you need to decide what you want - if you don't care about wifi/Bluetooth performance because your gizmo is going to sit right next to the access point anyway or only use wifi/BT to talk to a phone that someone holds right next to it, it likely doesn't matter.
But if you want/need decent range then this is a problem, along with the metal cage of the SDcard slot. See my other reply for explanation.
Yeah I've seen the design guidelines for ESP's and 15mm of clearance is a lot to ask for unless they antenna is just hanging over the PCB (which I don't want to do because I want the PCB to protect the antenna). I'm going to peel the ground pour back as much as I can and hope for the best.
The LEDs will get sufficient power, and this board will be powered from their supply. As far as the ESP goes, I agree it'll be better to make some more clearance around the antenna, but I'm definitely going to keep the fiberglass to mechanically protect the antenna. Thanks for the suggestions!