capacitor plot charging and discharging for 555 astable multivibrator
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hi guys
I want to plot the waveform for vc for an astable multivibrator. The problem is that the graph should be surrounded by (1/3 and 2/3) from the voltage source. Another problem is that for some resistors values the plot is weird. I will the function code and some plots
function vcplot_Callback(hObject, eventdata, handles)
ra = str2num(get(handles.edit1,'string'));
rb = str2num(get(handles.edit2,'string'));
c = str2num(get(handles.edit3,'string'))/1000000;
vcc = str2num(get(handles.edit4, 'string'));
tc = 0.69*(ra+rb)*c;
td = 0.69* rb*c;
t = 0.693*(ra+(2*rb))*c;
d = (tc/t)*100; % duty cycle
[v1, t1] = vcfunction(vcc, ra, rb,c);
figure(1);
m=5; % Repetition
n=numel(t1);
tt=0:0.01:n*m*0.01-0.01;
vv=repmat(v1,1,m);
plot(tt,vv)
grid on
% Add labels
ylim([-15 15]);
xlabel('Time(s)')
ylabel('Amplitude(V)')
title('Waveform of 555 Timer as an Astable Multivibrator')
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!