0% found this document useful (0 votes)
271 views2 pages

555 IC Timer Output - MATLAB Answers - MATLAB Central

evfgftrbrg

Uploaded by

Sudip Mondal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
271 views2 pages

555 IC Timer Output - MATLAB Answers - MATLAB Central

evfgftrbrg

Uploaded by

Sudip Mondal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MATLAB Answers™

Related Content
MATLAB Answers

number of element are not


equal

1 Answer
 Vote if else loop is not working can
Follow 0 you tell me what is the problem
555 IC timer Output? here

Asked by PR585 on 17 Mar 2016 1 Answer


Latest activity Commented on by PR585 on 17 Mar 2016
39 views (last 30 days) how to overcome this error?
 IC1.JPG  IC2.JPG
1 Answer

Entire Website
Just having some trouble starting off the problem . Any expertise regarding how to solve this problem would be
greatly appreciated.
Estimate Model Parameters
Per Experiment (Code)

Documentation

 3 Comments Battery

Documentation
 John BG on 17 Mar 2016
Estimate Model Parameters
What is it that you are really after?
Per Experiment (Code)
1.- you have have access to Simscape Electronics, or any other Orcad circuit design tool, and
you want to save the building of a 555 clock circuit that generates the signals you show Documentation
attached.
If this is the case, please build the circuit and attach the file to a comment.
2.- you don't have absolutely no way to use any circuit design tool, and you just want to model
Tags
the charge/discharge of the a capacitor? in a basic oscillator circuit? all you have to do is to
555
build the signals.

homework

 PR585 on 17 Mar 2016

Discover
What a waste

what
 PR585 on 17 Mar 2016 MATLAB®
If you run my code you will see my output is a bit wrong . How can I fix that? can do for
if true your career.
% code
% Program Description: Opportunities for recent
% The purpose of this program is to Write a Matlab script file that creates engineering grads.
% a graph of the 555 IC timer output as shown below.
% Clear the command window and all variables and close figure windows clc % clc clears the  Apply Today
contents of the command window clear % clear, clears all defined variables from the Matlab
workspace
% Output of the title and author to the command window. fprintf('Output for Program_08_2
written by Pamineo Richards.\n\n')
% User inputs values Vs = input('Input the source voltage in Volts :\n '); Cap = input('Input the
capacitace in farads :\n\n '); Rc = input('Input the charging resistance in Ohms :\n '); Rd =
input('Input the discharging resistance in Ohms :\n '); NumberOfTimeConstants = input('Enter
the number of Time Constants to Track Output :\n ');
% Define time constant and also determine time increment(at least 1000 % values) Tc =
((Rc+Rd)/2).*Cap; MaxTime = Tc.*NumberOfTimeConstants; Td(1)=0;
for n = 2:1001 Td(n) = Td(n-1) + (MaxTime/1000); end
% n and m will be an index for our vectors n=1; m=1;
% while capacitor is charging Vc can be found using this VcCharging = (1/3)*Vs+(2/3)*Vs*(1-

MATLAB Answers exp(-(Tc(n)/(Rc*Cap))));

% Once Vc exceeds (2/3)*Vs it begins to discharge


VcDischarging = (2/3)*Vs*(exp(-(Td(m)/(Rd*Cap))));
Ouput(1) = 5;
Vc(1)=0;
t=1;
%Tracking the time constants conditions will be determined on whether it
%is charging or discharging
while t <= NumberOfTimeConstants
while (1/3)*Vs + (2/3)*Vs*(1-exp(-(Td(m)/(Rc*Cap)))) <= Vs*(2/3) && n<=1001
Vc(n) = (1/3)*Vs + (2/3)*Vs*(1-exp(-(Td(m)/(Rc*Cap))));
Ouput(n)=5;
n=n+1;
m=m+1;
end
m=1;
while (2/3)*Vs*(exp(-(Td(m)/(Rc*Cap)))) >= Vs*(1/3) && n<=1001
Vc(n) = (2/3)*Vs*(exp(-(Td(m)/(Rc*Cap))));
Ouput(n)=0;
m=m+1;
n=n+1;
end
m=1;
t=t+1;
end
% Create plot (Voltage vs Time) plot(Td,Vc,'color','b') title('555 IC Time Output')
xlabel('Time(sec)') ylabel('Voltage(V)') %axis([0 tMax 0 Vs.*(2/3)]) axis([0 0.04 0 8]) hold on
plot(Td,Ouput,'linestyle','--','color','r') legend('Capacitor Voltage','555 Timer
Output','Location','southeast') end

Sign in to comment.

 0 Answers

Sign in to answer this question.

mathworks.com
© 1994-2018 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See mathworks.com/trademarks for a list of additional
trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

You might also like