jump to navigation

Creating a UserForm from an Excel Spreadsheet April 1, 2006

This is a work in progress, but it allows you to create a UserForm based on the cells in an Excel spreadsheet. The data can then be edited in the UserForm and copied back to the spreadsheet. The VBA code could use a few more features, but I thought I would post this as-is in case anybody wanted to pick it up from here. Please let me know if you improve on this.

File: userform-from-spreadsheet-2.xls

Creating a UserForm from an Excel Spreadsheet_image001.png

PCB Via Calculator March 12, 2006

This Javascript web calculator calculates the resistance, voltage drop, and power loss of printed circuit board vias. Note that vias are made out of plated copper which typically has a resistivity of 1.7E-6 to 2.2E-6 Ohm-cm. The calculator has an input box for the resistivity which defaults to 1.9E-6 Ohm-cm.

Updates:
May 22, 2006 - Added thermal resistance calculation.
January 19, 2007 - Minor Clarifications.
March 28, 2007 - Updated resistivity. See comment 12.
June 21, 2007 - Added estimated ampacity. See comment 17.

Inputs:

Finished Hole Dia
Plating Thickness
Via Length

Optional Inputs:

Applied Current Amps
Plating Resistivity Ohm-cm

Electrical Results:

Resistance Ohms
Voltage Drop Volts
Power Loss Watts
Estimated Ampacity Amps

Thermal Results:

Thermal Resistance Deg. C/Watt

Notes:
Resistance = Resistivity*Length/Area
Area = pi*(Inner_dia + Plating_thk)*Plating_thk
Resistivity = 1.9E-6 Ohm-cm (plated copper)
(plated copper is much more resistive than pure copper)
Copper Thermal_Resistivity = 0.249 cm-K/W (at 300K)
Est_Ampacity [Amps] = k*(Temp_Rise [deg C])^b*(Area [mils^2])^c
For IPC-2221 external layers: k = 0.048, b = 0.44, c = 0.725

References:
[1] "Constructing Your Power Supply - Layout Considerations", by Robert Kollman
http://focus.ti.com/lit/ml/slup230/slup230.pdf
[2] "Current Carrying Capacity of Vias", by Doug Brooks and Dave Graves
http://www.ultracad.com/articles/viacurrents.pdf

Calculator Wish List March 3, 2006

If there is a calculator that you feel would be a good addition to this site, please add it to the comment section of this post and we’ll do what we can to implement them.

Creating UserForms Programmatically February 7, 2006

Creating UserForms Programmatically
and Handling Events with a User-Defined Class

This post contains an example Excel VBA file that demonstrates creating a UserForm programmatically and handling events with a user defined class. This is especially handy for creating forms with many similar controls. The file contains examples with Buttons, ComboBoxes, and TextBoxes. The figures below show the form with a button grid and the response of the event handler. Download the Excel file: UserFormProgEvents2.xls

ButtonGrid Event

Reference:
This is an extension of work found here:
http://www.j-walk.com/ss/excel/tips/tip44.htm

PCB Trace Width Calculator January 31, 2006

This Javascript web calculator calculates the trace width for printed circuit boards based on a curve fit to IPC-2221 (formerly IPC-D-275). Also see the via calculator.

New features:

Inputs:

Current Amps
Thickness

Optional Inputs:

Temperature Rise Deg
Ambient Temperature Deg
Trace Length

Results for Internal Layers:

Required Trace Width
Resistance Ohms
Voltage Drop Volts
Power Loss Watts

Results for External Layers in Air:

Required Trace Width
Resistance Ohms
Voltage Drop Volts
Power Loss Watts

Notes:

The trace width is calculated as follows:

First, the Area is calculated:

Area[mils^2] = (Current[Amps]/(k*(Temp_Rise[deg. C])^b))^(1/c)

Then, the Width is calculated:

Width[mils] = Area[mils^2]/(Thickness[oz]*1.378[mils/oz])

For IPC-2221 internal layers: k = 0.024, b = 0.44, c = 0.725

For IPC-2221 external layers: k = 0.048, b = 0.44, c = 0.725

where k, b, and c are constants resulting from curve fitting to the IPC-2221 curves

For geometry diagrams, click on the pictures below.

pcb-trace-geometry-2.png     pcb-trace-geometry-1.png

For frequently asked questions, see the comments.

PCB Trace Resistance Calculator January 24, 2006

This online web calculator finds the resistance of copper PCB traces (a.k.a. tracks) of given width, thickness, length, and temperature. It can also be used for copper bars (e.g. bus bars). Several choices of common units are available. Enter the Width and Thickness below. Optionally, enter the Temperature and Length, or just leave the default values. (To find the needed trace width based on current, see the PCB Trace Width Calculator.)

May 17, 2006 - Added (lateral) thermal resistance calculations.
January 18, 2007 - Clarified equations.

The Calculator
(more...)

Best Free Circuit Simulator January 21, 2006

I have been using LTspice (a.k.a. SwitcherCAD III) for about 3 years as my main circuit simulation tool and have been very happy with it. Linear Technology has generously made it available free on their web site, and it is full-featured, fast, and seems to converge very well. I’ll be posting some of my simulation tips and tricks, so I highly recommend that you download it and get familiar with it. They also have a great user’s group to help get you going.

Find Standard Resistor and Capacitor Values

This javascript calculator finds the closest standard resistor (or capacitor) value in each of the IEA series. Use this, and get rid of that tattered old standard decade resistance table taped to your cubicle and put a nice photo there instead!

Desired Value:

IEA Series Closest Value Error
E6
E12
E24
E48
E96
E192

Which IEA series applies to the various component types?

Health Calculator

This post includes an online calculator that calculates how many calories you burn per day and your Body Mass Index (BMI).

Calories/Day
Your Basal Metabolic Rate (BMR) is the calories needed for basic body function without any activity. Total Daily Energy Expenditure (TDEE) your BMR plus calories burned from activities. These can be helpful in planning food intake, diet, etc.

Body Mass Index (BMI)
The National Heart, Lung, and Blood Institute suggests the following:

The Calculator
(more...)

Dynamic Excel Chart Colors January 17, 2006

Did you ever want to have the colors of an Excel bar chart change dynamically with the values of the chart? The code below gives results like those shown below.

ColorChart

Just place this code (more…)

« newer posts |