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 ...

Hi-speed Arduino IDE FTDI programmer

Aug 22, 2018
If you were able to program using  Program RawATMEGA32u4toSparkfun Pro Micro directions, then add it to the Arduino Tools->Programmer menu.

This will also allow you to upload your sketch into the entire memory (without the bootloader) with command Sketch->Upload Using Programmer

Modify file "programmers.txt" in C:\Program Files (x86)\Arduino\hardware\arduino\avr
## FTDI BitBang
ftdislow.name=FT232R Low Baud Programmer
ftdislow.protocol=ftdi
ftdislow.speed=4800
ftdislow.program.extra_params=-B 115200 -P ft0
ftdislow.program.tool=avrdude

Move your avrdude.exe from the last post to 
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin

Move your avrdude.conf from the last post to
C:\Program Files (x86)\Arduino\hardware\tools\avr\etc



Program with Upload with Programmer

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cftdi -B 115200 -P ft0 -Uflash:w:C:\Users\jeremyh\AppData\Local\Temp\arduino_build_127873/REV-B.ino.hex:i 

avrdude: Version 5.10, compiled on Dec 19 2010 at 22:24:28
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : ft0
         Using Programmer              : ftdi
         Setting bit clk period        : 115200.0
avrdude: BitBang OK 
avrdude: pin assign miso 3 sck 1 mosi 0 reset 4
avrdude: drain OK 
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    10     8    0 no       1024    8      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : ft245r
         Description     : FT232R BitBang Programmer

 ft245r:  bitclk 115200 -> ft baud 57600
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% -0.00s

avrdude: Device signature = 0x1e9587
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
 ft245r:  bitclk 115200 -> ft baud 57600
avrdude: reading input file "C:\Users\jeremyh\AppData\Local\Temp\arduino_build_127873/REV-B.ino.hex"
avrdude: writing flash (5648 bytes):

Writing | ################################################## | 100% 2.39s

avrdude: 5648 bytes of flash written
avrdude: verifying flash memory against C:\Users\jeremyh\AppData\Local\Temp\arduino_build_127873/REV-B.ino.hex:
avrdude: load data flash data from input file C:\Users\jeremyh\AppData\Local\Temp\arduino_build_127873/REV-B.ino.hex:
avrdude: input file C:\Users\jeremyh\AppData\Local\Temp\arduino_build_127873/REV-B.ino.hex contains 5648 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.00s

avrdude: verifying ...
avrdude: 5648 bytes of flash verified

avrdude done.  Thank you.


---------------------------------------------------------------------------------------
Burn Bootloader 
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cftdi -B 115200 -P ft0 -Uflash:w:C:\Users\jeremyh\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.10/bootloaders/caterina/Caterina-promicro8.hex:i -Ulock:w:0x2F:m 

avrdude: Version 5.10, compiled on Dec 19 2010 at 22:24:28
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : ft0
         Using Programmer              : ftdi
         Setting bit clk period        : 115200.0
avrdude: BitBang OK 
avrdude: pin assign miso 3 sck 1 mosi 0 reset 4
avrdude: drain OK 
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    10     8    0 no       1024    8      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : ft245r
         Description     : FT232R BitBang Programmer

 ft245r:  bitclk 115200 -> ft baud 57600
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
 ft245r:  bitclk 115200 -> ft baud 57600
avrdude: reading input file "C:\Users\jeremyh\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.10/bootloaders/caterina/Caterina-promicro8.hex"
avrdude: writing flash (32758 bytes):

Writing | ################################################## | 100% 13.67s

avrdude: 32758 bytes of flash written
avrdude: verifying flash memory against C:\Users\jeremyh\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.10/bootloaders/caterina/Caterina-promicro8.hex:
avrdude: load data flash data from input file C:\Users\jeremyh\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.10/bootloaders/caterina/Caterina-promicro8.hex:
avrdude: input file C:\Users\jeremyh\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.10/bootloaders/caterina/Caterina-promicro8.hex contains 32758 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 11.51s

avrdude: verifying ...
avrdude: 32758 bytes of flash verified
avrdude: reading input file "0x2F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x2F:
avrdude: load data lock data from input file 0x2F:
avrdude: input file 0x2F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified


avrdude done.  Thank you.
Read more ...