In my previous post, I started documenting the process of designing my own custom carrier board for the AMD Kria™ K24 SOM. The K24 SOMs are a great choice for edge computing applications like my autonomous Lego robot (in car form), so I wanted to have a carrier card tailored more so for that use since the current carrier boards I've seen on the market so far just don't quite fit my preferences.
My goal is to create a carrier board with the same form factor and peripherals as a Raspberry Pi so that, 1) a smaller power supply could be used with my K24 SOMs and, 2) I could use my existing Raspberry Pi HATs as needed in future projects.
I found that AMD provides documentation in the form of a design guide for laying out your own carrier card for K24 SOMs. There are also user guides explaining the details of the functionality for Kria SOM boards like the AMD Kria KD240 Drives Starter Kit, AMD Kria KR260 Robotics Starter Kit, and AMD Kria KV260 Vision AI Starter Kit.
As a quick recap: I used the aforementioned documentation to start the schematic design for my "Pi Carrier Board" for the K24 SOM specifically. I chose the K24 SOM since it is able to operate on a lower wattage power supply compared to the AMD Kria K26 SOM. The footprint of the K24 SOM was also the right size to fit within the Raspberry Pi form factor, compared to the K26 SOM that is slightly too large.
My last post focused on the parts of my carrier board that are required for any K24 SOM carrier board, which are the power supply, power-on/reset sequence, and the boot mode configuration for the custom-built AMD Zynq™ UltraScale+™ device featured in K24 SOM. This post will dive more into my specific carrier card's peripherals and layout.
I'm using KiCad 6.0 (I know I need to update) and I plan to send the design out to PCBWay for fab and assembly since I'm using lots of parts that are either impossible to hand solder, or it would take me 10 years to solder one board.
Peripheral SelectionGiven that I want my carrier card to basically just be a Raspberry Pi with the processor circuitry swapped out for the K24 SOM, this gave me an easy starting point for a list of peripherals:
- 40-pin GPIO header
- USB PHY with 4 peripheral ports and 2 ports for JTAG/Power
- FTDI for JTAG & UART over USB
- 1G Ethernet PHY + RJ45 port
- K24 SOM connectors
- SD card slot + PHY
I did decide to skip the video/audio related peripherals for this first revision until I see how tight the layout is. I also don't need to give my procrastination any more reasons to flare up.
Now I have to admit that my schematic organization isn't the best, but luckily that doesn't impact the functionality of the final board, so I'll just make the resolution to do better next time.
AMD Kria™ K24 SOM ConnectorsI decided to start with the easiest thing that is ultimately the source/sink of all signals on my schematic: the K24 SOM’s 240-pin connector (ADM6-60-03.5-L-4-2-A-TR) and 40-pin connector (ADM6-10-03.5-L-4-2-A-TR). I grabbed the part from UltraLibrarian, then used the KD240 Drives Starter Kit schematic for reference to create ports for each of the signals for the K24 SOM.
Since I had a bit of space left on this sheet, I went ahead and added the boot mode circuitry and the mounting holes for both the K24 SOM and the standoffs for the carrier board itself.
For those that aren't familiar with UltraLibrarian, it's an absolute lifeline when doing schematic design/PCB layout. While you could create your own symbol/footprint/3D model for each part you want to use that's not in the library of your IDE (in my case, KiCad) by default, I don't have enough time, patience, or experience in PCB layout to be efficient doing it all myself.
UltraLibrarian is a site that is a giant repository of library parts for just about every part on the market. A good chunk of the parts I ended up using weren't in KiCad 6's default library, and I was able to find a symbol with footprint for every single one on UltraLibrarian. 3D models are the only thing that are a bit hit or miss, but I was able to find 3D models for about 90% of my needed components.
Just look up the part number including the relevant packaging info part of the part number, then select the format for the schematic tool being used. The 3D model is a separate check box, so be sure to select it as well before clicking "Download".
The only drawback I found was that when I went to run DRC on my schematic, many of the pins in the parts I got off UltraLibrarian were left as "Unspecified", so it was a bit of a tedious time going back to change them all so my schematic had no DRC errors.
Next I added the Ethernet PHY chip/circuitry and RJ45 connector connected to GEM0 of the K24 SOM's MIO. This is another circuit I chose to just copy+paste from the KD240 Drives Starter Kit schematic since the parts like the Ethernet PHY (ADIN1300BCPZ) are in stock and don't appear to be near the end of their lifecycle from a manufacturing perspective. Plus, with my custom reset logic and power supply circuitry, I wanted as much "known good" circuitry as possible for the rest of the design.
This ethernet PHY is also a 4/4 full duplex part capable of up to 1Gbps speeds which should be plenty for any of my applications.
JTAG/UART over FTDIThe same thing goes for the FTDI circuity for UART and JTAG over a dedicated microUSB port. This was another copy+paste circuit from the KD240 Drives Starter Kit schematic.
I did decide to go ahead and add the 14-pin Molex connector common for AMD JTAG programmers as a direct connection to the K24 SOM's JTAG lines just in case I did have an error somewhere in the FTDI circuitry.
The UART interface routed through the FTDI connects to one of the UART ports in the K24 SOM's MIO.
For those that may not be familiar, it is common practice for FPGA boards to utilize FTDI chips to convert/combine commonly needed FPGA functionalities into a single USB bus. Most commonly, FPGA development boards will use an FTDI PHY chip like the FT4232 or similar part to combine the UART communication port and JTAG programming interface of the FPGA into a single USB port for user convenience.
In some instances, the input power supply is also drawn from this USB bus the FTDI chip is using, (the Digilent Arty Z7, Trenz Zynqberry, etc. are examples of FPGA dev boards that do this). I would like to do this for my Pi carrier board in a future rev, but for this first rev I have them on separate USB connectors until I prove the power supply circuit isn't going to create magic smoke.
Peripheral USBNot to be confused with the FTDI USB PHY, a separate USB PHY chip is needed for the peripheral USB ports to connect to. I went with USB 3.0 type A ports for a simpler layout on this first rev, but I'd like to change these out for USB C ports in a later rev as well.
The peripheral USB ports are also routed to the K24 SOM's MIO, as is the SD card interface. This just leaves the final peripheral: the 40-pin Raspberry Pi-compatible GPIO header.
40-Pin GPIO HeaderI had originally planned to also route each respective SPI, UART, and I2C interface to the K24 SOM's MIO and the GPIO to the EMIO, but then I realized that would leave me with no flexibility in terms of reconfiguration and no access to the programmable logic of the K24 SOM.
So I routed all of the GPIO signals (leaving the respective 5V, 3.3V, and GND signals in place) to the programmable logic of the K24 SOM because I can always use the AXI peripherals for SPI, UART, and I2C to route as needed, but I also have the option for a fully custom design with all GPIO available to the programmable logic.
Finally, the SD card circuitry was also a copy+paste from the KD240 Drives Starter Kit schematic since there isn't a whole lot of room to reinvent the wheel here. It's also definitely an important enough peripheral that I want to start with known-good circuitry for it anyways.
As a final note here, since I talked about connecting things to the K24 SOM's MIO, it's worth pointing out the SOM MIO Design Considerations section of UG1091 outlines which MIO pins are available to the carrier board versus which pins are not able to be modified by the carrier board and why, so this is a must-read section of the design guide.
Along with the design guide, UG1091, there is a checklist available (XTP748) for the schematic design of a custom carrier board that can be filtered for the K26 SOM or K24 SOM specifically.
I found that walking through the checklist both before and after creating my schematic was helpful, particularly with the power supply and power-on/reset sequence design. There were several details I caught with the checklist that I had previously missed, like the fact that I don't need the coin cell battery rail (VBATT) since my carrier board is not implementing any battery-backed RAM or real-time clock (RTC) circuitry.
It also has a tab with a visual representation of the MIO pins available to the carrier card vs what's used on the SOM board itself as a supplement to the SOM MIO Design Considerations section of UG1091:
With the schematic design complete and verified through the checklist and relevant circuit simulations, the final part was the layout.
The toughest part of this layout, and the thing I was worried about the most taking multiple revisions to get right, was the spacing of the 240-pin and 40-pin connector for the K24 SOM.
The Board to Board Connector PCB Layout for K24SOM section of UG1091 provides the spacing dimensions for the two connectors, along with the spacing for the four mounting holes:
So I started by drawing the perimeter of my Pi carrier card in the edge cuts layer as a rectangle the same size as a Raspberry Pi 2/3/4, then I used the bottom left hand corner of the rectangle in the edge cuts layer (since the coordinates in KiCad start in the lower left and corner of the sheet) to base the coordinates of the SOM connectors relative to each other.
I also drew a rectangle on the silkscreen layer of the dimensions of the K24 SOM as a visual "keep out" zone for myself to make sure I had enough clearance when placing the peripheral connectors:
Then I placed the carrier board's mounting holes in the same locations as on the Raspberry Pi using the mechanical drawing available for the Pi 2/3/4 on the Raspberry Pi website (this is where I got the aforementioned perimeter dimensions as well).
Since the AMD Kria™ K24 SOM takes up the majority of the room on the top layer, this pushed pretty much all of my circuit components to the bottom layer.
To make things a bit easier, I added most of the connectors to the schematic first and pulled them into the PCB layout to arrange physically before completing the rest of the schematic and pulling in all of the components into the layout.
Which needless to say, it still left me with a super tight layout that I'm still navigating. I already found that I had to replace the two separate USB type A connectors with one stacked version of the connector so that I had room for the DC jack for the 12V input power.
Lest I forget, I'm still a noob when it comes to layout, and my ego 100% threw me in the deep end here. However, that's the fastest way I learn. I'm currently up to four layers for this board and hoping I can squeeze it in, but I'll have to extend this series!
AMD sponsored this project. The opinions expressed in this project are those of Whitney Knitter. All opinions are provided by Whitney Knitter and have not been independently verified by AMD. Performance benefits are impacted by a variety of variables. Results herein are specific to Whitney Knitter and may not be typical.
AMD, the AMD Arrow logo, Kria, UltraScale+, Zynq and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other product names used in this project are for identification purposes only and may be trademarks of their respective companies.
Comments