### A Precision Arduino Thermocouple Measuring System

This post provides Arduino enthusiasts with the technical framework to develop a high quality Arduino Thermocouple measuring system. It also provides the basics to encourage young Arduino users to get a project up and running. We keep the topics as brief as possible to encourage our young friends. The more advanced topics such as thermocouple linearity, cold junction compensation, ADC range/resolution, filters and calibration will be examined subsequent posts.

### Precision ADC for Arduino and AVR with amplifier

A Precision ADC for Arduino and AVR with amplifier provides users with a complete solution to acquire high resolution signal fast. The SC1-24-75 is Precision ADC for Arduino and AVR with amplifier for local or remote sensing. As shown in the figure, the signal to be recorded is sent to the ADC, amplified, digitized. The signal can remain on the module or transmited to a computer. You can change the gain of the amplifier from 0.1 to 10000 X which allows acquisition of signals from 100 volts down to uV. In this post we explain features of the amplifier, connecting the hardware, setting up the library and a brief discussion on noise to maximize the resolution of the ADC.

### Finite Element Method Application in Electrical Engineering

This paper deals with Finite Element Method (FEM) of analyzing different types of physical systems. Mathematical systems of equations that describe physical systems are often too complex for analytical solving. FEM is a numerical method used for solving these systems. It breaks up the system into the group of elementary elements, called “finite elements”. Then, it analyses each finite element separately. After obtaining information from calculations for each finite element, the results are once brought back together in a single system of equations in order to get data of the system.

### The DC to DC Converter and its Applications

This paper is for amateur engineers who are introduced to the design and development of a project at a component level abstraction. In this paper, we will discuss briefly about a DC-to-DC converter and its uses. By looking at the simplified model of the converters and linear regulators, it would be possible to foresee areas in which efficiency can be greatly enhanced. We will also discuss and examine the selection criteria for some applications.

### DC to DC Converter Performance Testing

In this application note, we introduce the important performance characteristics of DC to DC converters and testing methods. The testing circuits and operation are also discussed. Note that the importance of each performance characteristic is dependent on the end application. As such, more detailed testing and methods may be warranted. This is left to the user to decide. For specific question regarding your application, you may contact us or simply comment at the bottom.

### High Performance Heat-spreader for Heatsink

Using heat sink specification provided by manufacturers requires understanding of thermal design. Most design engineer not trained in heat transfer can erroneously rely on the published specifications for heat-sink selection. The heat flux present at the semiconductor transfer surface can reduce the published performance specification due to thermal resistance of the material at the mating surface. This reduction in heatsink performance can easily be mitigated by careful selection of  heat-spreader.

 Matlab generated thermal image. Thermal system without optimization. Matlab generated thermal image. Thermal System with optimization

Finite element or more accurately, the finite difference method provides a powerful and flexible method of optimizing the performance of the entire heatsink. Most CAD provide powerful simulation features with intuitive user interface to simulate the performance of thermal system. However, optimizing these thermal system in CAD may require tens or even hundreds of simulations. By modeling the system in Matlab, engineers can easily run these simulations by creating a loop and varying parameters of the design. The basics of finite difference modeling is introduces and the complete model is developed and simulated to show the performance increase by adding a heat spreader to the system.

Shiraz Macuff, Nesh Basnet, Subash Shrestha, Anil Rajpatei, Francisco Santos,

## Example heat sink

Figure 1 and figure 2 above shows an example of two configurations of the same heatsink. The TO-247 transistor in figure 1 and the  TO-220 in figure 2 both dissipate the same amount of power. However the absence of a high performance heat-spreader on the heatsink results in the TO-220 transistor in figure 2 running at a higher temperature due to the higher heat-flux at the mating surface.

Two versions of the heat-sinks are examined. One without a heat spreader and one with a high performance heat-spreader made of phase change system. The problem is simplified for two dimensional analysis  by looking at the heat-sink from the top face. Only thermal conduction is considered since we are only varying the performance of the heat-spreader which contributes to conduction performance. Mounting screws and mounting flange are omitted since they will be held constant while comparing the two models. Because of the limitation of analytic method,  finite difference method is used instead to build a foundation for other irregular geometries. References 1 and 2 are highly recommended for thermal studies.

## Heat flux

The heat flux present at the mating surface of the transistor is given by  where   is the mating area given by  . From this we see that given the same power dissipation in both the TO-220 and TO-247 transistor, the heat flux will be much more on the TO-220 transistor. The thermal resistance of the heat-spreader material will produce a thermal gradient parallel to L1  and parallel to W1 at the base  of the transistor. This thermal gradient reduces the efficiency of the entire system.

### 2D view of the problem

Reducing the problem to 2D requires that we examine the top face of the assembly as shown in figure 3. The heat spreader and the heat-sink are considered to be the same material in this case aluminum. The superimposed grid allow us to formalize the equations for analysis. The thermal gradient from nodes   to   is given by .

Similarly the gradient between nodes surrounding node (m,n) are given by:

to

to

to  .

#### Taking the second derivative

Two dimensional heat conduction equation is given below with the finite difference approximation Making  results in

1.0)

For the four nodes surrounding  , the four remaining equations are:

1.1)

1.2)

1.3)

1.4)

Using the method shown above, a system of equation is derived and solved for the nodal temperatures. Note that this does not account for heat generation nor does account for convection at the edges.


% This is an example of two dimensional heat distribution
% on a square plate. For illustration,
% the number of nodes are limited 12.Reference [1] and [4] used.
% The figure below shows a square plate with the
% nodes at the boundaries held at specific temperatures
% temperatures. The temperatures at internal nodes 1
% trough 4 is solved for in the code below.
%
%
%                     T=500C
%         o---------o---------o--------o
%         |         |         |        |
%         |         |         |        |
%         |         |         |        |
%         o--------o1--------o2--------o
%         |         |         |        |
%  T=100C |         |         |        |  T=100C
%         |         |         |        |
%         o--------o3--------o4--------o
%         |         |         |        |
%         |         |         |        |
%         |         |         |        |
%         o---------o---------o--------o
%                     T=100C
%
% the equations for the four nodes are given below
% Node1) -4*T1+T2+T3+0*T4=-600
% Node2) T1-4*T2+0*T3+T4=-600
% Node3) T1+0*T2-4*T3+T4=-200
% Node4) 0*T1+T2+T3-4*T4=-200
% clear all previous variables
clear all
%clear the screen
clc
% load matrix with coefienct of the equations
M= [-4 1 1 0;
1 -4 0 1;
1 0 -4 1;
0 1 1 -4];
% load vector B with the right hand side of the equations
B=[-600;-600;-200;-200];
% multiply the inverse of M with B to solve
%for variables T1 though T4
X=inv(M)*B;
Results:&lt;/pre&gt;
250 250 150 150
&lt;pre&gt;

The example above does not include convection and heat generation

#### The 2D problem with convective heat transfer and heat generation at the boundaries.

To include convective heat transfer and heat generation at the boundaries we need to modify the nodal equation above. For the three nodes surrounding node (m,n)  , where the right side is exposed to convection, the energy balance for node m,n is given below. Setting  and simplifying the equation leads to 3.0)

Convective heat transfer at the corner node is slightly different from the equation derived above. We move the node to the corner in this figure. setting and simplifying the above equation results in 4.0)

#### Heat generation at the boundary

The heat generated by the transistor  at node (m,n) is in  unit. The heat flux at the mating surface of the transistor with area   is in units  . This figure shows the grid super imposed on the image of the system to be analyzed. Nine nodes (1,1) through (3,3) are used for brevity. The energy balance at node   is given by At steady state  and the heat transferred to the system by the transistor is given by . The heat transfer equations for  and are For node , the heat transfer equation is substituting these equations into the energy balance equation above and simplifying the equation results in

# maple code for algebraic manipulation&lt;/pre&gt;
# restart; # NULL; eq1 := q[1]+q[2]+q[3]+q[4]+q[5] = 0;
q[1] := (1/2)*k*dy*(T[m-1, n]-T[m, n])/dx;
q[2] := (1/2)*k*dy*(T[m+1, n]-T[m, n])/dx;
q[3] := k*(dx*1)*(T[m-1, n]-T[m, n])/dy;
q[4] := q[gen]*dx/k; q[5] := 0; dx := dy;
2*collect(eq1, T[m, n]); 

Thermal model for finite difference method using conduction , convection and heat generation equations we develop a thermal model for finite difference method solution below.

% This is an example of two dimensional heat distribution
% on a square plate. For illustration,
% the number of nodes are limited 9.Reference [1] and [4] used.
% The figure below shows a square plate with the
% nodes at sides and top exposed to convective heat transfer.
% Heat enters the system at node T_3,2
%
%
%                     T_inf
%           o(T_1,1)----o(T_1,2)----o(T_1,3)
%           |           |           |
%           |           |           |
%           |           |           |
%           |           |           |
%           o(T_2,1)----o(T_2,2)----o(T_2,3)
%           |           |           |
%           |           |           |
%           |           |           |
%           |           |           |
%           o(T_3,1)----o(T_3,2)----o(T_3,3)
%                     q in
% Nodel equations for heat transfer of the system above
%
%
% clear all previous variables
clear all
Tinf=20;
h=10;k=200;dx=0.025
g=((h*dx)/k)+2;
g1=2*(((h*dx)/k)+1);
g3=((h*dx)/k)*Tinf;
q=100;
%clear the screen
clc
% load matrix with coefienct of the equations
% T_1,1 T_1,2 T_1,3 T_2,1 T_2,2 T_2,3 T_3,1 T_3,2 T_3,3
M= [g1      -1       0      -1       0      0       0       0       0;
-0.5    g       -0.5    0       -1      0       0       0       0;
0       -1      g1      0        0      -1      0       0       0;
-0.5    0       0       g        -1     0       -0.5    0       0;
0       1       0       1       -4      1       0       1       0;
0       0       -0.5    0        -1     g       0       0      -.5;
0       0       0       -1       0      0       g1      -1      0;
0       0       0       0        2      0       1       -4      1;
0       0       0       0        0     -1       0       -1      g1];

% load vector B with the right hand side of the equations
B=[2*g3;
g3;
2*g3;
g3;
0;
g3;
2*g3;
(-2*q*dx)/k;
2*g3;];
% multiply the inverse of M with B to solve
%for variables T1 though T4
%X=inv(M)*B;
X=inv(M)*B

% X =
%
%    21.4264
%    21.4276
%    21.4264
%    21.4287
%    21.4305
%    21.4287
%    21.4311
%    21.4371
%    21.4311
x(1,1:3)=X(1:3);
x(2,1:3)=X(4:6);
x(3,1:3)=X(7:9);
% standard interpolation is used for visualization only
B = imresize(x, 1000);
image(B,'CDataMapping','scaled')
% users may be ininterested in the following commands
% for further analisys
% C =  rand(4,2);
% image(,'CDataMapping','scaled')
%[x,y] = meshgrid(0:.2:2);
%Z = X.
% [X,Y] = meshgrid(0:.2:2);
% Z = X.*exp(-X.^2 - Y.^2);
% figure
% contour(X,Y,Z)
% hold on
% quiver(X,Y,DX,DY)
% hold off


Matlab generated thermal image

# maple code for algebraic manipulation&lt;/pre&gt;&lt;/pre&gt;
restart;

NULL;
q[a] := (1/2)*h*dx*(T[inf]-T[1, 1])+(1/2)*h*dy*(T[inf]-T[1, 1]);
q[2*a] := (1/2)*k[1]*dy*(T[1, 2]-T[1, 1])/dx;
q[3*a] := (1/2)*k[1]*dx*(T[2, 1]-T[1, 1])/dy;
eq[1, 1] := q[a]+q[2*a]+q[3*a] = 0;
NULL;

q[b] := (1/2)*k[1]*dy*(T[1, 1]-T[1, 2])/dx; q[3*b] := (1/2)*k[1]*dy*(T[1, 3]-T[1, 2])/dx; q[2*b] := k[1]*dx*(T[2, 2]-T[1, 2])/dy; q[4*b] := h*dx*(T[inf]-T[1, 2]);
eq[1, 2] := q[b]+q[2*b]+q[3*b]+q[4*b] = 0;
NULL;

q := (1/2)*h*dx*(T[inf]-T[1, 3])+(1/2)*h*dy*(T[inf]-T[1, 3]); q[2*c] := (1/2)*k[1]*dy*(T[1, 2]-T[1, 3])/dx; q[3*c] := (1/2)*k[1]*dx*(T[1, 2]-T[1, 3])/dy;
eq[1, 3] := q+q[2*c]+q[3*c] = 0;
NULL;

q[d] := h*dy*(T[inf]-T[2, 1]); q[2*d] := (1/2)*k[2]*dx*(T[3, 1]-T[2, 1])/dy; q[3*d] := (1/2)*k[2]*dy*(T[2, 2]-T[2, 1])/dx+(1/2)*k[1]*dy*(T[2, 2]-T[2, 1])/dx; q[4*d] := (1/2)*k[1]*dx*(T[1, 1]-T[2, 1])/dy;
eq[2, 1] := q[d]+q[2*d]+q[3*d]+q[4*d] = 0;

NULL;

q[e] := (1/2)*k[2]*dy*(T[2, 1]-T[2, 2])/dx+(1/2)*k[1]*dy*(T[2, 1]-T[2, 2])/dx; q[3*e] := (1/2)*k[2]*dy*(T[2, 3]-T[2, 2])/dx+(1/2)*k[1]*dy*(T[2, 3]-T[2, 2])/dx; q[2*e] := k[2]*dx*(T[3, 2]-T[2, 2])/dy; q[4*e] := k[1]*dx*(T[1, 2]-T[2, 2])/dy;
eq[2, 2] := q[e]+q[2*e]+q[3*e]+q[4*e] = 0;

NULL;

q[f] := (1/2)*k[1]*dy*(T[2, 2]-T[2, 3])/dx+(1/2)*k[2]*dy*(T[2, 2]-T[2, 3])/dx;
q[2*f] := (1/2)*k[2]*dx*(T[3, 3]-T[2, 3])/dy; q[4*f] := (1/2)*k[1]*dx*(T[1, 3]-T[2, 3])/dy; q[3*f] := h*dy*(T[inf]-T[2, 3]);
eq[2, 3] := q[f]+q[2*f]+q[3*f]+q[4*f] = 0;
#
#
#
#
#
NULL;

q[g] := (1/2)*h*dy*(T[inf]-T[3, 1]); q[2*g] := (1/2)*h*dx*(T[inf]-T[3, 1]); q[3*g] := k[2]*dy*(T[3, 2]-T[3, 1])/dx; q[4*g] := k[2]*dx*(T[2, 1]-T[3, 1])/dy;
eq[3, 1] := q[g]+q[2*g]+q[3*g]+q[4*g] = 0;
NULL;
q[h] := k[2]*dy*(T[3, 2]-T[3, 3])/dx; q[2*h] := (1/2)*h*dx*(T[inf]-T[3, 3]); q[3*h] := (1/2)*h*dy*(T[inf]-T[3, 3]); q[4*h] := k[2]*dx*(T[2, 3]-T[3, 3])/dy;
eq[3, 3] := q[h]+q[2*h]+q[3*h]+q[4*h] = 0;
#
#
NULL;

#
eq[3, 2] := q[i]+q[2*i]+q[3*i]+q[4*i] = 0;

eq[1, 1];
eq1 := subs({T[1, 1] = T1, T[2, 1] = T2}, eq[1, 1]);
NULL;#
#
A := LinearAlgebra[GenerateMatrix]([eq[1, 1], eq[1, 2], eq[1, 3], eq[2, 1], eq[2, 2], eq[2, 3], eq[3, 1], eq[3, 2], eq[3, 3]], [T[1, 1], T[1, 2], T[1, 3], T[2, 1], T[2, 2], T[2, 3], T[3, 1], T[3, 2], T[3, 3]], augmented = true);
#
#
A2 := subs({h*dx = m2, h*dx = m7, h*dy = m3, h*dx*T[inf] = m9, h*dy*T[inf] = m8, k[1]*dx/dy = m1, k[1]*dy/dx = m4, k[2]*dx/dy = m6, k[2]*dy/dx = m5}, A);
with(CodeGeneration);
A3 := Matlab(A2);

#
&lt;pre&gt; 

Matlab generated thermal image

Matlab code
% This is an example of two dimensional heat distribution
% on a square plate. For illustration,
% the number of nodes are limited 9.Reference [1] and [4] used.
% The figure below shows a square plate with the
% nodes at sides and top exposed to convective heat transfer.
% Heat enters the system at node T_3,2
%
%
%                     T_inf
%           o(T_1,1)----o(T_1,2)----o(T_1,3)
%           |           |           |
%           |           |           |
%           |           |           |
%           |           |           |
%           o(T_2,1)----o(T_2,2)----o(T_2,3)
%           |           |           |
%           |           |           |
%           |           |           |
%           |           |           |
%           o(T_3,1)----o(T_3,2)----o(T_3,3)
%                     q in
% Nodel equations for heat transfer of the system above
%
%
% clear all previous variables
% clear all
clc
clear all
%set the boundary conditions and calculate some of the coeficients used in
%the matrix. See maple code.
Tinf=20;
h=10;k(1)=200;dx=0.025;dy=0.025;k(2)=500;
m1=k(1)*(dx/dy);
m2=h*dx;
m3=h*dy;
m4=k(1)*(dy/dx);
m5=k(2)*(dy/dx);
m6=k(2)*(dx/dy);
m7=h*dx;
m8=h*dy*Tinf;
m9=h*dx*Tinf;
tr=1;
q(tr)=100;
% load matrix with coefienct of the equations
% T_1,1 T_1,2 T_1,3 T_2,1 T_2,2 T_2,3 T_3,1 T_3,2 T_3,3
A=[
-m3 / 0.2e1 - m2 / 0.2e1 - m1 / 0.2e1 - m4 / 0.2e1 m4 / 0.2e1 0 m1 / 0.2e1 0 0 0 0 0 -m9 / 0.2e1 - m8 / 0.2e1;
m4 / 0.2e1 -m1 - m4 m4 / 0.2e1 0 m1 0 0 0 0 0;
0 m1 / 0.2e1 + m4 / 0.2e1 -m3 / 0.2e1 - m2 / 0.2e1 - m1 / 0.2e1 - m4 / 0.2e1 0 0 0 0 0 0 -m9 / 0.2e1 - m8 / 0.2e1;
m1 / 0.2e1 0 0 -m6 / 0.2e1 - m3 - m4 / 0.2e1 - m1 / 0.2e1 - m5 / 0.2e1 m5 / 0.2e1 + m4 / 0.2e1 0 m6 / 0.2e1 0 0 -m8;
0 m1 0 m5 / 0.2e1 + m4 / 0.2e1 -m5 - m4 - m1 - m6 m5 / 0.2e1 + m4 / 0.2e1 0 m6 0 0;
0 0 m1 / 0.2e1 0 m5 / 0.2e1 + m4 / 0.2e1 -m6 / 0.2e1 - m3 - m4 / 0.2e1 - m1 / 0.2e1 - m5 / 0.2e1 0 0 m6 / 0.2e1 -m8;
0 0 0 m6 0 0 -m3 / 0.2e1 - m5 - m6 - m2 / 0.2e1 m5 0 -m9 / 0.2e1 - m8 / 0.2e1;
0 0 0 0 m6 0 m5 -0.2e1 * m5 - m6 m5 -q(tr) * dx / k(2);
0 0 0 0 0 m6 0 m5 -m3 / 0.2e1 - m5 - m6 - m2 / 0.2e1 -m9 / 0.2e1 - m8 / 0.2e1;
];

% % split matrix with right hand side and left hand side equations
% left hand side of equations
A2(1:9,1:9)=A(1:9,1:9);
% rigth hand side
B=A(1:9,10);
% calculate unknown temperature
X=inv(A2)*B;
% creat image of calculated temperature
x(1,1:3)=X(1:3);
x(2,1:3)=X(4:6);
x(3,1:3)=X(7:9);
% resize image to improve visualization
B = imresize(x, 100);
C=image(B,'CDataMapping','scaled')
%imwrite(C,strcat('img\',num2str(j),'.png'))
%

References: [1] Heat transfer  Tenth edition J.P. Holman [2] Advanced Engineering Mathematics 10th edition Erwin Kreyszeg [3] Heat Transfer Essentials Third Edition Latif M. Jiji [4] Elementary Mathematical and Computational Tools for Electrical and Computer Engineers Using Matlab. Jamal T. Manassah



### Introduction to stepper motor specifications and voltage mode drive

Nesh Basnet,  Shiraz Macuff,  Subash Shrestha,  Lhakpa Dhondup,  Lobsang Lekshey,

Anil Rajpatei,  Francisco Santos,  Adrian Serrano

## Abstract

This application note gives a brief introduction to stepper motor specification and voltage mode drive method. We look at drive requirements once the motor has been chosen and give several application examples. A method for increasing the stepping speed is also examined. Motor selection based on mechanical requirements is not included.

## Introduction

Designing any complex system requires an iterative process. Top down design where requirements are defined and then solved is most favored by seasoned engineers because it reduces the probability of rework later in the design process. However to leverage the benefits of top down design, the design engineer has to be aware of the state of art of and non-ideal characteristics of these subsystem.

## Torque produced by a stepper motor

The torque produced by a stepper motor is a function of the current through the winding and the position of the rotor. This torque is known as the static torque and is supplied by the motor’s manufacturer. A simplified graph is shown in Figure 1.0 [1]. The graph shows the torque produced on the vertical axis as a function of the rotor position on the horizontal axis. Looking at the horizontal axis, one complete step is from zero to C in clockwise direction. The center of the horizontal axis labeled C, is when the rotor tooth and stator pole are completely aligned. The points labeled A and B, is when the rotor tooth is exactly between two of the stator poles. So we see that maximum torque is developed when the rotor tooth is at half of the step angle. Each winding or phase has a resistance and inductance associated with it. The specifications of the motor are normally given in amp per phase and maximum torque. Also, the resistance and inductance of the motor coils are provided.

## Methods of driving the phase of a stepper motor

There are two ways to drive the phase of a stepper motor. One is by controlling the current in the winding and the other is by applying the correct voltage across the winding. The latter (voltage mode) is the simplest and most cost effective way. Using the winding resistance, the steady state current can be controlled by carefully selecting the appropriate voltage. If the appropriate voltage is unavailable, resistors can be placed in series to reduce the steady state current. That is to use the winding resistance and the maximum winding current to determine the applied voltage. The disadvantage of the voltage mode is that stepping speed and resolution are compromised. Another disadvantage is the vibration produced by the motor. With the voltage mode, the maximum stepping speed is determined by the inductance of the coil. The maximum stepping resolution is half stepping. Current mode drives have the advantage of higher stepping speeds, and if provided by the driver, higher resolution by micro stepping. With micro stepping, vibration can also be reduced to a point where it’s unnoticeable. The disadvantage is higher cost when compared to voltage mode motor driver.

## Voltage mode example

The mechanical requirements of the motor allows us to select a motor with required torque and stepping resolution. Once the motor is selected, the drive method has to be selected so that it meets the performance and cost requirement. For systems that would require micro stepping, the voltage mode driver cannot be used.

### Calculating the voltage requirements

The voltage requirement is determined by the amp per phase rating and the winding resistance. The voltage requirement is simply . That is the maximum current supplied to the coil at steady state.

### Calculating the maximum stepping speed in voltage mode

The maximum stepping speed at the maximum torque requires that at each step, the maximum current is reached. This is determined by the transient response of the system. When a step pulse is applied to the winding, the current in the winding will gradually increase at a rate determined by the resistance and inductance. The complete response is given by

Where  is

###### Eq.1.1

From the equation above we see that the transient part will eventually go to zero and be left with the steady state current .

###### Fig.2.0

Note that was determined previously , and are determined by the motor that was selected based on the mechanical requirements. Based on all this information, the equation above can be solved for . However, setting equal to maximum current which is would result in the transient part . Solving this would result in an infinite step length . The industry standard is to set the maximum current to 0.632 of its steady state value. That is . Adjusting the maximum current and substituting the values into the equation above results in .
solving for .

###### Fig. 3.0

Equation 2 gives us the time it would take for the current to reach 63% of its stead state value when the step pulse is applied to the coil. When the step pulse is removed, the current in the stator coil decays at a rate determined by the inductance and resistance of the coil. A complete cycle requires .

## Example 1

The mechanical requirements have been determined and the two most relevant requirements are listed below.

• 1.8 deg full step. No micro stepping needed due to lead screw pitch.
• holding torque min =20 oz-in

Two motors have been selected so they meet the mechanical requirements and their specifications are listed below.

 Motor A Motor B maximum current :0.14 Amp/phase resistance : 240 ohms/phase inductance : 420 mH/phase maximum current :1 Amp/phase resistance :4.3 ohms/phase inductance : 5.5 mH/phase steady state voltage requirements  is Volts. Solving for the maximum stepping speed results in resulting in steps per second steady state voltage requirements  is Volts. Solving for the maximum stepping speed results in  resulting in steps per second

### Introduction to Stepper Motors

Nesh Basnet, Subash Shrestha, Lhakpa Dhondup, Lobsang Lekshey, Shiraz Macuff

Abstract

This document provides an introductions to stepper motors. The major types of stepper motors, their construction and required drive signals are explained. A comparison of each type of stepper motor and their application is also explained. Drive method for accurate load positioning and selection criteria for drive circuits is examined.

## Introduction

Stepper motors are used where accurate load positioning, high speed positioning and fast acceleration is required without any position feedback control. However, feedback control is sometimes used to improve the characteristics of these motors. Permanent magnet (PM), variable reluctance (VR) ,  and hybrid stepper motors form the major groups of stepper motors in the industry. The permanent magnet motor have a permanent magnet as the rotor(rotating part) and the variable reluctance motors have a slotted  soft iron rotor. The rotor of the hybrid motor is a permanent magnet enclosed by laminated- slotted soft iron. The stator (stationary part) of the stepper motor is made from laminated iron and coils of magnet wire. Note that it is not the number of poles on the rotor that determine the type of motor but rather the way the motor is built and the way it operates.

 Fig.1 PM Stepper motor rotor Fig.2 VR Rotot Fig.3 Hybrid stepper motor Rotor

## The stator-rotor assembly and operation.

Fig. 4

The permanent magnet (PM) stepper motor consist of the rotor above and the stator assembly. A simplified schematic of a PM two phase stepper motor is shown . The phase of the motor will become apparent later. The magnetic poles of the rotor is labeled north (N) and south (S) which is encircled by the four stator electro-magnets. The stator magnets are wound and connected such that the magnetic field produced by a current flowing in one pair would be pointing in the same direction.Step 1 requires that the current entering the A+ terminal would produce a magnetic field pointing to the left. As a result the rotor would be held in the horizontal position.

Fig.5

Stepping (step 2) the motor requires stator coil A be de-energized and stator coil B be energized such that the magnetic field would point upwards. By allowing current to enter the B+ terminal (source) and exit the B- terminal (sink), the magnetic field would be pointing upwards. The change in magnetic direction will produce a torque on the rotor in the clock wise direction. This torque is what steps the rotor.

The third step requires that stator A be energized again. Now the current is reversed such that it enters the A- terminal. The current entering the A- terminal produce a horizontal magnetic flux pointing towards the right. This again produces a clock wise torque on there rotor which produces a step.

Subsequently (step 4) the magnetic field is rotated again by de-energizing the horizontal coil and energizing the vertical coil such that the magnetic field would point downwards. This again produces a 90 degree rotation due to the toque imposed on the rotor. This sequence is repeated to step the rotor in the clockclockwise direction. To rotate in the counterclockwise direction , the sequence is reversed. That is step4,step3,step2,step1,step4 is executed for counter clockwise rotation.

It is important to note that the motor depicted above is generalized and simplified. In reality the number of rotor pole can be two as shown above or there can be many more. Motors designed for high speed have less pole than those designed for high torque.

### Variable reluctance stepper motor

Fig.6 VR motor

The variable reluctance stepper motor shown in figure 6 has as slotted soft iron  rotor encircled by electromagnetic stator coils which are wound on the stator teeth. The stator teeth that are geometrically opposing each other are wound to have a common magnetic field pointing in the same direction. The magnet field produced by the stator seeks a path of least resistance (reluctance). The magnetic path is provided by the rotor teeth and as a result couples to the teeth. A force is produced which is composed of two components. A tangential Ft and a normal force Fn. The tangential force produces a torque on the rotor which causes it to turn. The VR stepper motor is stepped like the PM stepper motor by energizing the coils in sequence. The difference here  is that the torque is result of the magnet field seeking a low reluctance path hence the name variable reluctance motor. Fig. 7 and Fig.8 both shows coils B and C energized sequentially producing  steps in the clockwise direction. Fig 9 shows coil A energized again but with the magnetic field pointing in the other direction when compared to figure 6.

 Fig. 7 Fig. 8 Fig. 9

### Hybrid stepper motors

Fig. 10

Hybrid stepper motors combine both the characteristics of permanent magnet forces and magnetic reluctance forces.  Hybrid motors also differ in that the magnetic field produced by the permanent magnet on the rotor points not radially but lateral through the rotor. A closed magnetic loop is formed from the front- north pole of the rotor, laterally through the rotor, going radially through the soft iron front end bell, laterally through the soft iron stator body, through the soft iron rear end bell and back to the rotor’s south pole. The stator is wound to encourage the magnetic field lines from the stator poles to the rotor based on the required step.

### Unipolar and bipolar motors

Fig.11

The direction of the magnetic field produced by each stator coil has to be reversible to get complete rotation of the rotor. The two ways that is accomplished is by 1) changing the direction of the current flowing the coil or 2)  by having two coils on the same stator pole wound in different direction and alternately energizing them for the required magnetic direction. When motors are constructed such that the direction of the current has to be revered, the motor is called a bipolar motor. Likewise a motor wound with

Fig.12

dual coils on the same pole with different direction is called a unipolar motor. Driving a phase of the bipolar motor requires the use of four switched configured as an H-bridge as shown in figure 11. Turning on switches Q1 and Q 4 results in current flow trough the phase as indicated by i1. Likewise turning on switched Q2 and Q3 results in current i2. The uni-polar phase winding is shown in figure 12. By turning on switch Q1, the current flowing from VDD to VSS would create a magnetic field pointing to the right. Likewise turning on Q2 would produce a magnetic field pointing to the left. Note that the drive circuitry for a uni-polar motor is significantly simpler compared to the bipolar circuit. Only half of the winding is used on the unipolar when compared to the bipolar motor. This results in the unipolar motor only having half the current handling capacity than the bipolar motor of the same size.

As mentioned before stepper motors are generally used where accurate mechanical load positioning is required . They can be stepped in three major ways: full stepping , half stepping and micro stepping. A controller can have one , two or all three types of stepping capabilities. Full stepping the motor requires that one phase be completely energized while the other is de-energized as shown previously. A motor with  200 steps per revolution would would turn 1.8 degree with each full step. Half stepping requires that the two of the phases be turned on some of the time. Half stepping results in 0.9 degree turn on a motor with 200 steps per revolution. With micro stepping a finer resolution is attained per micro step. The resolution is determined by the resolution of the driver and is published in the driver’s data sheet. Selecting the correct driver is based on the end application requirements. For example a printer head that is driven by a stepper motor attached to a toothed belt, would certainly require micro stepping since the longitudinal increment may need to be as high as  100 discrete positions per inch or higher. A lead screw assembly on the other hand that gives a longitudinal movement of 1 mill per 20 degree of turn may not even required half stepping! The end application determines the best driver based needed based on the actual requirement. For example , while designing a drive train for the lead screw assembly mentioned above, it would be wise to select a driver with correct set of features. Over-designing by using a driver for a laser cutting head assembly with micro-stepping would add little to the product’s value while adding substantial cost. Instead, a driver with built in feedback control, over current protection, motor temperature measurement and full step only features would add significantly more value to the end application . Some of these features are explain later and the others are explained in subsequent application notes.

### Open and closed loop control

Open loop control systems are systems where the controller would send an instruction and the controller would not check that the system has executed instruction properly. On the other hand the closed loop system would check to see if the instruction was executed and if not, it would automatically adjust the next instruction to compensate for the error. Stepper motors are initially selected because of the ease at which they can be implemented as open loop control. In many cases the initially open loop design would show a need for some verification that the motor has actually moved the required number of steps. This happens as a result of the application engineer not factoring in the variation in rotor position when it’s loaded for example. Another aspect that is overlooked very easily is the impact of the system missing a step during a sequence of instruction. For a system that is being design to operate without human attendance for long periods of time would require closed loop control.

References:

1: AVR446 Linear speed control of stepper motor  from ATMEL
2: Electromechanics by James H.Harter
3: Stepping Motors by D.P Atherton and G.W. Irwin
4: Application note AN469 by ST Thomas Hopkins
5: www.shinano.com

### Cutting slots and holes on Instrument Enclosure

The design of an instrument panel can render your design a huge success or make your design extremely difficult to use, regardless of the function or the performance of your design. As such care should be taken when designing the user interface. However, user interface (UI) design is beyond the scope of this paper and only the methods will be examined. For many designers, the best time and place to work on the UI layout can be anytime and anywhere and most of us have used from sketch paper to napkins for the initial layout. Once beyond the brainstorming phase, the need to use software increases since alignment, measurements and reviewing proportions in software becomes easier. Cutting slots and drilling holes on finished electronic encloses can be a trial and error endeavor for engineers at the prototyping stage. In this paper we look at the simple and convenient method to get the prototype up for review as fast possible while maintaining a professional finished look. The layout software used can vary from high end specialized layout and cad software to your basic paint software program. Tools used are kept to the bare minimum. MORE

Sujan Dhonju, Rojaya Maharjan, Mahendra Shrestha,