Professional Documents
Culture Documents
Project Components:: Linear Control Systems (EE-333)
Project Components:: Linear Control Systems (EE-333)
(EE-333)
PROJECT COMPONENTS:
Arduino UNO - Microcontroller
IR sensor
DC Motor
Weight: 54 grams
Features 2 threaded mounting holes
Can be operated in either direction, simply reverse power supply
polarity
PROJECT WORKING:
Motor is connected to supply.
Microcontroller is connected by PC which is operating on a given
code.
A motor with a two pole armature and magnetic stator.
The + and – signs shows where the current is applied to the
commutator which supplies the current.
IR sensor takes input from the motor and give output to the
arduino.
Code processes, output rpm on serial monitor
USED PINS:
1: vcc+5
2: ground
3: Connected to arduino
4: not connected – analog output
LabVIEW:
CODE:
//EE_wave
//RPM_meter
double rpm ;
unsigned long oldtime =0;
unsigned long t;
const int dataIN = 2;
boolean something;
boolean prev;
void setup()
{
pinMode(dataIN,INPUT);
Serial.begin(115200);
attachInterrupt(0,isr,CHANGE); //attaching the interrupt
}
void loop()
{
//delay(1000);
}
TRANSFER FUNCTION:
K/(TS+1)
K=DEL(Y)
K=(5000-0)
K=5000
Y(t)=0.63(K)+Yo
Y(t)=0.63(5000) +Yo
Y(t)=3510
From graph
At,
y-axis:Y(t)=3510
X-axis=0.6
T=t1-t0
T=0.6-0
T=0.6sec
T.F=5000/(0.6S+1)
Flow Chart:
START
T = mills-
oldtime()
if(serial.available()
>0)
if(inbyte = = ‘D’)
RPM
MATLAB:
close all
clear all
a=xlsread('lvtemporary_113904.tmp.xlsx')
x=a(:,1)
y=a(:,2)
num=[5000]
den=[0.6 1]
g=tf(num,den)
step (g)
hold on
plot(x,y)