High Pin Count QFP Alignment Tool

Apr 3, 2025
I tried this guide. But over 36 pins on a side, proper alignment is an issue 
  1.  initial alignment was difficult
  2. correct placement on all four edges (36 pins x 4)
  3.  holding the correct alignment difficult  
I came up with a process to create a 3D-printed alignment tool
In Kicad 
  1. Add 2 or more alignment holes near the chip. 
  2. Find a proper 3D model for IC 
  3. Verify Kicad 3D model in the viewer 
  4. Scale chip 3D model 1.03% (or more) so that the fit of the IC is not too tight
  5. Export Kicad 3d model of board & chip model 
 
Modify Kicad export 
Fill in areas under the pin for the next step.  I used Tinkercad. 

Create a model of a hold-down block 
  1.  Import the 3D Kicad model with extra fill 
  2.  Create a rectangle that will partially cover QFP  model and alignment holes. 
  3.  Position so that the rectangle goes to the bottom of the chip package (usually a small space is between the board on the package). May need to add alignment pins that go through the board's alignment holes. 

  4.  Subtract the 3d Kicad model from the block of step #2. 
 


3D print alignment block 
  1. Very fine layers like 0.1mm, 30% fill. 
  2. Print 
  3. Clean up the alignment pins and test fit to the PCB
  4. Check with QFP part
Usage.
1. Press the QFP part into the alignment block. I will be tight, but should not warp the pins
2. Best if the pin 1 location is visible.
3. There are two ways that QFP can be positioned in the block, but only one way will align with the footprint properly.
4. Solder down the exposed pins while holding down QFP before removing the alignment block.
Read more ...

FEMM Analysis for Power Planes

Jan 7, 2021


Instructions for using FEMM program to analyze current densities of PCB Planes/Traces.  Only useful for a single plane as multiple power planes of the same signals cannot be analyzed.

 

Export from PCB Layout

1.       Fill all planes/copper shapes for PCB.

2.       Select the layer to be exported including Board Outline, 2D Lines, Copper Pours or Planes, Traces.

3.      Export to DXF format 


Import into FEMM

1.       In FEMM create a new project File->New

2.       Select “Current Flow Problem” in the “Create a new problem” dialog

3.       Import DXF file using File->Import DXF

a.       Select file that was exported from PADS Layout

b.       Use default “Tolerance for DXF Import”

4.        Wait for import to complete (complex designs will take longer)

5.       Simplify the imported design

a.       Delete unnecessary point (ones not being analyzed)

b.       Reduce Arc complexity by selecting arc points, pressing “Space Bar” and make Max Segments filed to 45 degrees.

c.       Check that polygons are closed (most likely for planes)

Setup Materials

1.       Setup material for Copper and Air select Properties->Materials and create new properties

a.       Copper (sigma = 59600000)



                                

b.       Air (sigma = 0)

                               

Setup Conductor Properties

Output Voltage and Input Currents

1.       Setup Conductor Properties of copper, select Properties->Conductors

2.       Create a property for each signal Source and Sink points; <SIGNAL NAME>_<{SOURCE,SINK}> (ie: V28_POS_SOURCE)

a.       Source has a Fixed Voltage (nominal)

b.       Sink has a Fixed Negative Current (max)

c.       Ground/Return Source has Fixed Zero Voltage

d.       Ground/Return Sink has a fixed Positive Current (max)

Assign Copper and Air Plane Areas

1.       To assign and area as Copper or Air Material, select the “Operate on Block Label” button 

2.       Left click in a copper plane area to set a Block Label with default label <None>.

3.       Right click on this label to select it.

4.        Press Space Bar to bring up “Properties for selected block” to modify Block type


5.       From the “Block type” drop-down, select “Copper” and click OK button

6.       Use the PCB Layer in PADS Layout to assign the Copper Block type to all the areas of Copper, including component pads and all the copper areas.

7.       Add Block Labels and Assign Block Types to areas that are not Copper Planes/Traces/Pads, but select “Set as default block label” check box in the Properties for selected block

Assign Conductors

1.       To assign Conductors to Sources and Sinks, select the “Operate on nodes” button

2.       Right click on a Square Box Node in the Drawing area to select it

3.       Press space Bar to bring up “Specify Nodal Property” dialog box to assign a Conductor.


4.       From the “In conductor” drop-down, select to Source or Sink that that point belongs to.  Generally, a pad or through-hole would be as source/sink and all Nodes (Square Box) need to be assigned

5.       To select multiple points of a pad or trace use one of these buttons  to draw a box or circle to select the points then use Space Bar for “Specify Nodal Property”

6.       Every Conductor Source and Sink needs to be defined as part of a node for the analysis to be done.

General Setup for Analysis.

1.       Setup parameter for analysis select the Problem menu and a Problem Definition dialog will open


2.       Set Length Units to Mils

3.       Set Frequency, Hz to 1 (DC analysis)

4.       Set Depth to Layer Thickness (from PADS Layout)

               

½ oz

0.7 mils

1 oz

1.4 mils

2 oz

2.8 mils

3 oz

4.2 mils

4 oz

5.6 mils

5.       Create the analysis mesh select menu Analysis->Create Mesh after a few minutes (<10mins) a mesh of triangles will be created and the status will be shown


6.       Verify that Copper Planes are defined in Yellow.  If they are not double check that Materials and Conductors are properly assigned. Check that the shapes are closed.

Run and View Analysis

1.       To run the analysis, select menu Analysis->Analyze

2.       A Status dialog will appear and a progress meter will appear below “BiConjugate Gradient Solver”.  After a few minutes (<10mins) it will complete and close. If it takes too long simplify the design after importing the DXF, also double check proper settings for “Conductor Properties”

3.       To view the results, select the menu Analysis->View and a new window tab will open with a color gradient map for the Plane Areas.

4.       Select menu View->Density to change to the Current Density dialog.

5.       Set Plotted Value to “RE(J) (A/m^2)”

6.       Set Lower Bound to “0”

7.       Set Upper Bound to “15500000” (approx. double the recommended current density for copper)


8.       To the Right of the window is the Legend

9.       The recommended Current Density for Copper (unless otherwise specified by the PCB manufacturer) is 5mA/mil2 or 77500000A/m2.  The Planes will have varying density but should be below 7.750e+006 (Sunny Yellow) in the legend.

10.   This tool cannot analyze multiple planes at the same time.


Remedies

These are general guidelines.

1.       Increase the Plane thickness (1/2 oz -> 1oz copper) and adjust in Problem Definition and re-run Analysis.

2.       Add additional layers, but FEMM cannot analyze more than one at a time and the current share between planes is not equal.  If a plane is double, adjust the Problem Definition Depths times two.

3.       Remove cutouts and obstacles in the plane (re-import the new DXF file).

4.       Make a plane wider (re-import the new DXF file).

 

 


Read more ...

SlowerFire SoC

Aug 6, 2020
Perhaps you've heard of PolarFire Soc by Microchip.  It's a very capable Risc-V SoC with an FPGA component, but it will set you back nearly $500.

If you don't have that kind of cash and don't think you need the superior capabilities of that system, I present "SlowerFire SoC". The "SlowerFire Soc" is based on the DE0-Nano Altera Cyclone IV board that is loaded with the Linux-on-Litex-Vexriscv bits.

There are five components
Parts List:
DE0 Connections:
  • SPI Serial flash is SF_xxxx
  • I2C SEEPROM is at I2C_xxx
  • Serial is at SERIAL_xx
  • ENC28J60 is at E_xxxx
  • eclk25 is a 25MHz clock (for the ENC28J60 if it doesn't have an onboard clock)

GPIO_1FPGA PINDescription
_10F13SERIAL_RX
_11T15SERIAL_TX
_13T13SF CSN
_15T12SF MISO
_17T11SF MOSI
GND--GND
_19R11SF CLK
_111R10
_113P9
_115N11
_117K16E RST
_119L15I2C SCL
_121P16I2C SDA
_123N16E CSN(LED0)
GND--GND
_125P14E CLK
_127N14E MOSI
_129L13E MISO
_131K15E INT
_133J14eclk25

Follow the Linux-on-LiteX-Vexrsicv instruction to boot system

Login is root/root

Features & Specifications

  • PolarFire SoC (MPFS250T-FCVG484EES)SlowerFire
    • 600 50 MHz clock
    • 1 x RV64IMAC core by SiFive RV32I core by VexRiscv
    • 4 x RV64GC core by SiFive
    • 254K  22K (14.6K remaining) logic elements non-volatile fabric
    • 784 132x math block (18 x 18) (9x9)
    • 4 x 12.7 Gbps SERDES
    • Secure boot
  • Memory
    • 2 GB LPDDR4 x 32 32MB SDRAM x16
  • Storage
    • 1 Gb 16 MB SPI flash
    • 8 GB eMMC flash or SD card slot (multiplexed)
  • Networking
    • 2 x Gigabit  1x 10/100 Ethernet (runs about 350kb/s)
  • Expansion Interfaces
    • Raspberry Pi-compatible 40-pin header
    • mikroBUS socket
    • PCIe gen2
    • Micro USB 2.0 Hi-Speed OTG
    • 4 1 x UART (via TTL single micro USB)
    • 2 x CAN
    • SPI
    • I²C
  • Power
    • 12 5 VDC / 1A Mini-USB  5 A barrel jack input
    • On/off switch
    • I²C power monitor measuring four power rails
  • User Interfaces
    • 4 x User push button
    • 4 3 x User LED
    • 4 x Power status LED
  • Programming & Debugging
    • UART via micro USB
    • Onboard JTAG connector or embedded FlashPro6 (multiplexed)
    • 52 x test points
Read more ...

Verilog Mem File from Compiled ELF

Oct 22, 2019
I've seen many ways to convert a compiled ELF file (like a.out) to a Verilog Mem file.  Some of the ways to use Python or some custom converter program or shell script or ????.  What if you want to move between Linux and Window without have to recompile the converter program or install the heavyweight Python.

The trick is to use the SRecord program.  There are three steps

0. Install the SRecord program for Linux, Windows, etc.
1. Compile your program (make or whatever gets that ELF output)
2. Make a binary file with objcopy -O binary a.out aout.bin
3. Final convert is srec_cat aout.bin -binary -byte-swap 4 -O mem.init -Lattice_Memory_Initialization_Format  32 -Data_Only

Explanation of the srec_cat command
aout.bin: the binary from objcopy (use cross-compiler if needed)
-binary: format of the input file
-byte-swap 4: little-endian (leave out if big-endian)
-O mem.init: output file name (doesn't have to be mem.init)
-Lattice_Memory_Initialization_Format 32: seems to format the output correctly
-Data_Only: leave off the header information normally in the Lattice Mem format

This can all be done with a Makefile that can be used anywhere SRecord (srec_cat) command is available.

Read more ...

Safer Sparkfun Pro Micro

Sep 7, 2019
I needed an Arduino type board that had these requirements
  1.  Fused
  2.  Protected digital outputs.
  3.  IO was 3.3V
  4.  Rugged USB.
Fused
I didn't want the Arduino to consume all the power if there was a short.

Protected Digital Outputs
If an output was directly connected to ground I didn't want that pin to be shorted out and fail.

IO 3.3V
Everything is 3.3V now.  Sensors, serial ports, Bluetooth is all 3.3V.  I didn't want to have to put level translators everywhere.

Rugged USB
I needed a through-hole well-supported USB connector for repeated plugging and unplugging.

Sparkfun produces the Pro Micro in a 3V/8MHz variant, but its small form factor did not allow any fusing or other protections.

So I made my own based on firmware provided by Sparkfun for the Pro Micro 3V/8MHz.


Highlights:
  • Fused to 750mA
  • Dx IO protected by 100-ohm resistor
  • 3.3V operation
  • All IO fully broken-out
  • Programming Header
  • Through-hole USB B full size
  • All components on Top side and had solderable
  • All the standard IO broken out to Dual Female Header for two connections per pin
  • 5cm x 5cm board (dirtypcb.com compatible) two-layers only


I left off the Reference Designators for the part because of the end-user.  There aren't many different components so building it isn't too difficult.

To program the bootloader, use my previous post Program Raw Atmeg32u4 to Sparkfun Pro Micro 3V/8MHz Bootloader

To program with Arduino IDE use Sparkfun Pro Micro 3V/8MHZ Installing the Arduino Addon.

I have extra PCBs that were made but not used.  Contact me through the Contact page

Read more ...

Gigis Flashlight

Feb 5, 2019

It's a flashlight App.  ON turns it on OFF turns it off.

The missing features are numerous:

  • no registration
  • no contacts harvesting
  • no ads
  • no bitcoin mining
  • no Snapchat, Facebook or Twitter anything.

Since this isn't a Google Play Store app and you need to install it manually.  First, go to Androids Settings and check "Unknown Sources" (probably in Security tab).  Second, Download Apk and after downloading, follow the install from "Unknown Sources" instructions.  After done installing, you can uncheck "Unknown Sources"

Other App: San Diego Parking Meters
MIT App Inventor
Read more ...

Using Arrow Electronics to Source Parts

Dec 18, 2018


The trick of any DIY electronics project is to get parts reasonably cheaply and reasonably fast.

In the 1980s getting parts was tricky unless you lived in a city that had a number of electronics suppliers.  My town had one supplier and its store was about 2000sqft. They were able to keep a lot in the back storage and would bring it out when you asked, but they did not have everything.

In the 1990s, phone/catalog suppliers started online stores. Usually quirky parts with some typical electronics parts.

In the 2000s, more online suppliers and eBay. Ebay had a lot of "stuff", but the cheapest came from China via the slow boat.  

Lately, I've been using Arrow for my electronic part supply after getting fed up with long delivery times from China and the lost shipments. I've used Digikey in the past to order parts, but I've lately been going to Arrow to search for parts, fill a shopping cart and making an order.  I'm using Arrow because:
  • Seem to have what I need.
  • Free shipping recently
  • Fast shipping
  • Comparable prices with Digikey


I did a comparison between Arrow, Avnet and Digikey.  With shipping for Avenet and Digikey, a small order would be significantly more and individually, the parts I needed were a little more expensive. This is not a complete analysis of all the suppliers (not intended to be) and if you were ordering 3000 parts, you would get a significant discount
*Digikey part was a different manufacturer

So far this year, the Arrow "free shipping" seems to be sticking around and when they are shipped, it is very quick.  I have found the free 2-day shipping, starts when your parts are boxed and ready to be shipped; I usually have parts within 4-5 days.  Shipping packaging is astronomically wasteful, but it's recyclable.

So far, I've been very pleased with the orders from Arrow and plan to continue to use them (hope free shipping sticks around).

9/10/2019: Seems to be Free Shipping on $50+ now.

Read more ...