3 Level Cascaded H Bridge Inverter

Buy This Project

Hello Friends, i hope you all are fine and enjoying. Today i am going to share my new project tutorial which is 3 level cascaded H bridge Inverter. I also have explained inverters in detail in one of my previous tutorial which was Introduction to Multilevel Inverters. In this tutorial i am going t o explain a new application of cascaded H-bridge inverters and we will design a 3-level cascaded H bridge Inverter through it.

Before going to that, first of all lets recall some basics of Inverters from our previous posts. Inverters or commonly known as power inverters and A dc-to-ac converter whose output is of desired output voltage and frequency is called an inverter. Inverters are also called as counter devices of rectifiers. Rectifiers are those devices which are used to convert Alternating current (AC) into Direct Current (DC). Based on the type of operation, inverters can be divided into 2 major classes named as:

  • Voltage Source Inverter (VSI)
  • Current Source Inverter (CSI)

A voltage controlled inverter or VSI is one in which independent controlled ac output is a Voltage waveform. On the other hand, a current source inverter or CSI is one in which independent controlled ac output is Current waveform. Since my today's tutorial title is 3-level cascaded H-bridge inverter, A three level inverter is better than a two level inverter and the reason is that in 3 level inverter, we are dealing with three output voltage or current levels and the beauty of these type of inverters is that, they give better output and current sinusoidal waveforms and Threshold values are much better. Now i am done with the introduction and basics of inverters, now lets move towards the actual working of my project tutorial. You can also buy the complete simulation of this project and we have kept very small price for it which is only $10, only to meet our design costs.

 

3 level Cascaded H-Bridge Inverter

  • We have designed the 3 level cascaded H-bridge inverter in MATLAB Simulink and the complete diagram of the circuit is shown in the image given below:
  • The above figure seem like a complex one but it is very simple to understand and has a large no of applications. So lets explain each and every parameter one by one.
  • In the first stage, signal comes to a common junction and in MATLAB it is known as 'Bus Selector'. It can accept no of inputs and outputs simultaneously. It has 1 input signal and 2 output signals.
  • The output from this junction is going to 2 blocks named as 'A9' and 'A10'.
  • In order to explore these blocks, you can simply double click on the and a new window will open. That window is shown in the image given below:
  • Every block is infact a H-bridge( it contains 4 small blocks which are arranged in H form). It needs a DC supply to operate and at input and output we have apply scopes to monitor its input and output waveforms.
  • Now if you want to explore it more then simply go to any small box, double click on it and a new window will open, which is shown in the image below:
  • When you will double click on that small box then a new and very informative window will open which will represent, what is fabricated in that small box.
  • If you carefully read the top lines then it reads that a gto transistor is fabricated in parallel with a series RC circuit. GTO means a Gate Turn Off transistor.
  • GTO is a special type of transistor and a high power semi conductor device. The difference between a GTO and any other type of transistor is that the other transistors need a Gate pulse to turn ON and when you will remove the Gate pulse they will still remain in ON state.
  • To turn it OFF you have to apply some alternate means like apply reverse voltage and when transistor tends to go into other direction we remove these reverse voltages.
  • Unlike any other type of transistor, the beauty of GTO is that it can be turned ON & OFF only through gate control, which makes it a very important electrical component to implement.
  • In ON state, GTO has some particular values of Resistance and Inductance.
  • In OFF state, it has infinite internal impedance and no current passes through it in OFF state.
  • Now in the circuit we have arranged 6 blocks. We have 3 sets of blocks and each set contains 2 thyristor blocks arranged in parallel with each other.
  • In input supply from source is coming to every block in 3 sets. The output from each block goes to a ideal voltage measurement block representing as VC.
  • When you will run the simulation, and to monitor the output voltage results, you will double click on this block and it will be giving complex values.
  • After these voltage measurement blocks, we have Fourier analyzer block. This block Fourier analyzes the input signal over a running window of one cycle of fundamental frequency component.
  • First and second output returns the Magnitude and Phase angle of the signals under consideration respectively. Here we are dealing with fundamental harmonic component so, i have kept its value 1.
  • All this can be seen in the image shown below:
  • If you have connected all the blocks in their exact positions and all the connections are OK then, when you will run the simulation and the waveforms on the scope will like:

OUTPUT WAVEFORMS

  • The output results of scope#1 are shown in the image given below:
  • You can see that in the above image, we have output square waves of three different colors which are green, yellow and pink.
  • As i explained earlier that we are designing a 3 level inverter and we will be dealing with 3 output waveforms, which verifies our conclusion.
  • The output graph of scope#3 is shown in the image given below:
  • If you look closely then, the output graph of scope#1 is similar to that of scope#3 but the output curves of scope#3 are bit contracted.
  • The output graph of the scope#2 is shown in the image given below:
  • The output of scope#2 represents sinusoidal square waves and bu taking the mean of every part of square wave, we can generate a AC curve.
  • The output of scope#5 is similar to that of scope#2 and it is also shown in the image given below:
  • The output of scope#5 is s bit purified and much similar to sinusoidal AC signal.
Alright friends, that's all from my today's post. It was a bit lengthy but very technical and easy to understand. I hope you have learned something new today. If you have any questions regarding this, then don't feel shy to ask and i will try my best to make you understand the problem. Stay tuned for more project tutorials. Until next tutorial Take Care !! :)

11-Level 3-Phase Capacitor Clamped Inverter

Buy This Project

Hello friends, hope you all are fine and enjoying. Today i am going a new project tutorial which is 11-level 3-phase Capacitor Clamped Inverter. In my previous post 11 Level 3-phase Cascaded H-Bridge Inverter, we have designed the simulation of 3 phase 11 level inverter but the only difference was the method used in that project was cascaded H Bridge but today we are gonna see How to design an 11 level 3 phase inverter using clamped capacitors.

Now i am going to share a new and advanced bulk of knowledge about inverters with you people. Since we are going to design a 3-phase capacitor clamped inverter so, we need to design some algorithm which should be able to invert DC into AC at some High voltages and after inverting these DC voltages into AC, we will create a phase sequence and most importantly phase polarity between these three phases so they should be able to feed the load and must supply load current. It is a very interesting but a bit complicated project and now-a-days it has got a large no of industrial applications. The study about inverters and their implementation is the back bone of Modern Renewable Energy and it is the future of Power Generation. It is a MATLAB simulation based project so, any kind of hardware is not included in this tutorial. So what actually we are going to do is to design the complete simulation of the project and we will discuss every component and also each sub-component which will be used in Simulink MATLAB. So let's get started with 11 Level 3 Phase Capacitor Clamped Inverter:

11-level 3-Phase Capacitor Clamped Inverter

  • Capacitor Clamped inverters are commonly known as Flying Capacitor Technology and they were first purposed by Meynard and Foch.
  • Flying Capacitor includes no of series combination of Capacitor Clamped Inverter Switching Cells and these capacitors are used to get high voltages.
  • The general concept related to flying capacitor is that it can charge up to one-half of the DC voltages and then within the circuit they can automatically increase or decrease the voltages, according to our requirement.
  • The block diagram of the complete simulation of capacitor clamped inverter in MATLAB is given in the image below:
  • The complete block diagram of the Capacitor 3-phase clamped inverter is shown above. In this image, you can notice that we have 30 input pulses numbered as no.1 to no.30 .
  • So we can say that we have 30 DC input pins and these DC voltages will be inverted to get High Voltage AC.
  • If you double click on any input pulse then, a new window will open and it will be showing that source from which we are gaining input DC voltages.
  • We are gaining DC voltages from DC generators and a no of generators are connected in parallel to get HIGH voltage DC.
  • The block to which all the inputs are connected is in fact a Capacitor Clamped Bank.
  • In this bank, no. of capacitors are connected in series. Since a charged capacitor behaves as a voltage source and these capacitors are connected in series and their voltages adds up and in this way we get, HIGH voltages.
  • To look inside the block then double click on the block and a new window will open and it will be showing all the components which are fabricated in that block.
  • The internal structure of the block for capacitor clamped inverter is shown below in image:
  • In the above shown image, you can see that within the block, we have a no. of sub-blocks which are connected with each other.
  • To see what is in that small box, double click on that and a new window will open, which will be showing the internal structure of the each small box.
  • The internal structure of sub-block is shown in the image given below:
  • In the above given figure you can see that, in every block we have a MOSFETS which are connected with antiparallel diodes for capacitor clamped inverter.
  • Ideal IGBT or GTO transistors can also be used but as I explained the properties of MOSFET in the beginning, that we give pulse to its base and it becomes operational.
  • Once MOSFET has been triggered it keep conducting and in order to stop it, we will have to provide reverse voltage on its base to bring it to rest state.
  • Since we are going to generate High Voltages 3-phase AC, so we have applied 3 big blocks and from each block, only one phase will be generated.
  • After each big block, we have a summing junction on which voltages arrives and then we have applied two different types of voltage measuring devices.
  • One device measures the phase voltages of inverted AC voltages. It can also be seen from the above given block diagram that the meter on the above side, measures phase voltages of all the three phases appearing on the summing junction.
  • Now if you look closely then, you will observe that only one wire from each summing junction is coming to the meter and we also know that in order to measure phase voltages, we also need a neutral wire.
  • We can get neutral wire from common ground of the system and the voltage difference between a phase and a neutral wire will give us Phase voltages.
  • The below meter measures line voltages. Line voltages means the voltage difference between 2 phases. In our system we have three phases which are A, B and C respectively.
  • To measure line voltages, this meter measures potential difference between phases and NO neutral wire is included in it.
  • The line voltages will be AB, BC and CA.
  • The Phase voltages and Line voltages have much difference between them and each have their own applications.
  • For example to run the single phase House-Hold load we need phase voltages (voltage difference between a phase and a neutral wire).
  • Whereas in industries, we need Line voltages to run the 3-phase load.
  • Now run the simulation of this capacitor clamped inverter, and after completion now click on the scope for Line Voltages and you will get the below results:
  • Now for Phase voltages of capacitor clamped inverter, click on the scope for phase voltages and you will get the below results:

APPLICATIONS

All type of Inverters have a large no of applications and now a days they are focus of Research and modern studies. Inverters have also made us able to get power from Renewable energy sources like solar panels, wind mills etc. Some industrial based applications of inverters are given below:
  • The biggest advantage of inverters are that they give good power quality.
  • Due to good power quality motors can reach at High speed at High voltages without producing any harmonics.
  • They are used in power supply circuits.
  • Now-a-days inverter Air Conditioners are also available in market and due to their High Efficiency and low power rating their demand is much High.
  • ECU( electrical control unit) which carries out in-vehicle control also carries inverted circuits and it's demand is also accelerating these days.
Alright friends, that was all from today post. I hope you have learned something new today. If you have any question then don't hesitate to ask in comments. Stay tuned for more beneficial project tutorials. Until next tutorial Take Care !!! :)

11 Level 3-phase Cascaded H Bridge Inverter

Buy This Project

Hello friends, i hope you all are fine and enjoying. In this post i am going to share a new project tutorial, in which we will see how to design an 11 Level Cascaded H Bridge Inverter. If you recall my previous tutorial, in which we saw the design and working applications of 11 Level 3-phase Capacitor Clamped Inverter, then you can see its exactly the same project but only we are having a different approch in it, instead of using Capacitor clamped we are using cascaded H bridge Inverter in this project.

In this project we again are going to design an inverter but the only difference is The Implementation Technique. In that project we used Capacitor Clamped technique to get High Voltages inverted AC and now in this project, we will use Cascaded H-Bridge technique to design an Inverter. We have designed this Cascaded H bridge Inverter project in Simulink MATLAB. So i will explain this project tutorial in steps. First of all we will discuss the block diagram of the project, which we have made in Simulink. Then we will discuss the internal structure and the components which are implemented in the block diagram. And in the end we will see the applications of the cascaded H-Bridge inverters. I think this was enough for introduction and Now let's get practical and without wasting any time i think we should move towards the designing of the cascaded H Bridge 3-phase inverter.

11 Level 3-Phase Cascaded H Bridge Inverter

  • A cascade H Bridge Inverter is a power electronic device, built to synthesize a desired AC voltage from several level of DC voltages.
  • Cascaded H Bridge inverter can be implemented by using only a single DC source or capacitors or multiple DC sources.
  • A standard cascade multilevel inverter requires 'n' DC sources to produce '2n+1' levels.
  • The beauty of this system is that it can allow us to gain the desired levels of AC without using any type of Transformer.
  • It allows us to simultaneously maintain the DC voltage level of the DC source and choose a fundamental frequency switching pattern to produce a nearly sinusoidal AC output.
  • The block diagram of the Cascaded H Bridge Inverter designed in Simulink MATLAB is shown in the image given below:
  • From above figure, you can see that we have on the extreme left side we have inputs of the systems and they are numbered as 'pulse'.
  • Since we are going to design a multilevel inverter, which is a 11 Level inverter and to get that much levels, we also need multiple DC inputs.
  • In this system, we have 30 DC inputs and they are numbered as 'pulse1-pulse30'.
  • From the title of the project, you can understand that we are going to design a 3-phase inverter and for that we must have 3 control units to get three phase voltages.
  • All the inputs are going to three big blocks which are named as ' Cascaded H-Bridge Inverter'. If you double click on that block then, a new window will open which will show the internal mechanism of this big block.
  • This window is shown in the image given below:
  • The above figure is very important and it is showing what actually is happening in that block. Since the components encrypted in each block are large so the above figure is showing half of the components.
  • 10 inputs are connected to each block and in the above shown block we have 5 inputs.
  • Every input is connected to a H shape bridge. In every H-shaped bridge, we have 4 sub-blocks. In order to under the mask of the sub-blocks, Double click on them and a new window will open, which will be representing the internal structure of sub-block.
  • That small window is shown in the image given below:
  • Now from the above figure, you can see that every sub-block contains an ideal IGBT, Gto or MOSFET and antiparallel diodes.
  • In these H-bridges we have implemented MOSFET transistor for switching. Reason is that they have mush fast response and are capable to perform switching at high speed.
  • Below are some parameters of transistors, which are fabricated in sub-blocks.
  • An important thing to note here is that for MOSFET 'Snubber Resistance (Cs)' is infinite in OFF state. This is because in OFF state it doesn't allow the current to pass through it.
  • Once MOSFET is triggered then it will keep on conducting and after that we will have to stop it manually.
  • Now if you again focus the first block diagram then, you will observe that each block is giving only value of phase voltages at its output.
  • From three blocks, we get three phase voltages and then to measure these voltages, we have 2 types of measuring devices.
  • First type of voltmeter will measure the phase voltages and you can see that all the three phases are connected to that instrument.
  • Phase voltage is the potential difference between a single phase and neutral wire. Since no neutral wire is connected to this instrument and the meter will take the system's neutral wire to measure the voltages.
  • The other meter measures the Line voltages. Line voltages are the potential difference between any two phases. At our meters input we have Line Voltages like AB, BC and CA.

RESULTS

  • We have connected two different types of voltmeters in our system. One will give the graphical representation of phase voltages and the other will give the graph of Line voltages.
  • The graph of phase voltages is given below in the image:
  • The above graph is representing the phase voltages of all the three phases, which we have generated in our system.
  • You can see that all the three phases are at an angle of 120 degrees to each other.
  • The graph of line voltages is shown in the image given below:
  • The above graph is showing the 3-phase line AC voltages.
  • You can see that some cornered square wave is obtained at output. Corners are appearing in output wave due to switching of MOSFET transister, we have used in our project.
  • A proper filter circuit can eliminate this flaw and a fine AC can been obtained at output.

Alright friends, that was all from today's post. I hope you guys have enjoyed this H Bridge Inverter. If you have any question then ask in comments and i will try my best to resolve the issue. For more tutorials stay tuned. Till next tutorial Take Care !!! :)

Analysis of Sinusoidal Pulse Width Modulation of AC Signal

Hello friends, hope you all are fine and enjoying. Today I am going to share a very interesting tutorial which is Analysis of Sinusoidal Pulse Width Modulation of AC signal. I will try to explain this tutorial in parts. I will explain the code step by step and at every step we will see that what are the purpose of commands, which are written in that particular code. Before doing that first of all let me explain what is meant by Pulse Width Modulation.

Pulse Width Modulation or PWM is a technique which is used for getting Analog Results with digital means. We can say that some Digital Control or some Electronics algorithm is used to generate square waves. Square wave is in fact a signal which is generated through switching between ON & OFF states. There are no of ways to generate PWM. For example in modern electronics projects PWM is generated through some type of micro controllers or 555 Timers. If you recall my previous project tutorials, in which I have generated PWM through 555 timer. Since in this tutorial we are working with-in MATLAB premises so we will only discuss CODE and no hardware design involved in this tutorial. Now without wasting any time, I think we should move towards the CODE of the project. Stay tuned and believe me you will learn something new from this project.

You should also read:

Analysis of Sinusoidal Pulse Width Modulation of an AC Signal

  • First of all open your MATLAB software and a command window will appear. Now first thing to do is to clear the command window and remove all the previous variables or functions from MATLAB.

  • This is done through MATLAB language and we have commands to do this. The commands are given below:

clc clear all disp('Sinusoidal Pulse Width Modulation of AC Signal') disp(' ')
  • 'clc' and 'clear all' command will clear the command window and remove all the variables already existing.
  • Then the next command is 'disp(' ')' , and this command is used to display anything in command window. In dispaly command i have written the title of my project, which is "Sinusoidal Pulse Width Modulation of AC Signal" .
  • Now coming towards part 2, which is to enter some information from user side. Since we are analyzing the PWM of AC signal and we need to enter the data of that particular signal, which we are going to analyze.
  • The code to do all this is given below:
Vrin=1; f=input('The frequency of the input supply voltage, f = '); Z=1; ma=input('the modulation index,ma, (0<ma<1), ma = '); phi=input('the phase angle of the load in degrees = '); Q=input('The number of pulses per half period = ');
  • The first command is 'Vrin' which is RMS value of the supply voltage in Per Unit. As you know that the maximum value of Per Unit is one, so i have kept its value equals to 1.
  • In the next steps, you can see that i have given the 'input' command. This command is used at that place if we need data from external source, which means if user will enter that data according to the input signal.
  • As you can see in the above code that Firstly it is asking frequency then comes the variable 'Z', which is load impedence in per-unit and we have kept its value 1.
  • 'ma' is the modulation index and its value varies from 0 to 1.
  • 'phi' is the phase angle of load in degrees.
  • 'Q' is the no. of pulses per half period of the given cycle. MATLAB code will ask these values from user to enter them manually according to the that signal, which is under consideration.
  • Coming towards the Third part of the CODE, which is to calculate load parameters. The parameters of the load signal which we have entered in the above commands (part 2).
  • MATLAB Commands to calculate phase angle, Resistance and Inductance of the the load are given below:
phi=phi*pi/180; R=Z*cos(phi); L=(Z*sin(phi))/(2*pi*f);
  • 'phi' is the load phase angle in degrees. while the other 'pi' is a built-in MATLAB function. In MATHEMATICS pi has a constatnt value which is '2.14' .
  • Next 2 formulas the used to calculate Resistance(R) and Inductance(L) of the load respectively.
  • Up till now we have entered the known values of the signal under examination. No in the next part of the tutorial, we are going to calculate the no of pulses per period of the sine wave or AC Signal under consideration.
  • MATLAB command to calculate the period of an AC signal is given below:
N=2*Q;
  • This is a simple product formula. 'Q' is the no of pulses per half period and when we will multiply it with 2, we get no of pulses in full period, which is 'N'.
  • Period of an AC cycle can be defined as the time taken by the AC voltage to complete its one cycle. Period is reciprocal of Frequency. Frequency can be defined as the no of waves passing through a particular point in one second. Both these terms are necessary to explain AC signal.
  • In the next part of the code, we are going to develop a function to generate a saw-tooth voltage from the given input parameters of the signal.
  • In each period of the sawtooth, there is one increasing and decreasing part of the sawtooth, thus the period of the input supply is divided into into 2N sub-periods. The function to develop this sawtooth voltage is given below:
for k=1:2*N for j=1:50 i=j+(k-1)*50; wt(i)=i*pi/(N*50); Vin(i)=sqrt(2)*Vrin*sin(wt(i)); ma1(i)=ma*abs(sin(wt(i))); if rem(k,2)==0 Vt(i)=0.02*j; if abs(Vt(i)-ma*abs(sin(wt(i))))<=0.011 m=j; beta(fix(k/2)+1)=3.6*((k-1)*50+m)/N; else j=j; end else Vt(i)=1-0.02*j; if abs(Vt(i)-ma*abs(sin(wt(i))))ma*abs(sin(wt(i))) Vout(i)=0; else Vout(i)=Vin(i); end end end beta(1)=[];
  • The above part code seems to be bit lengthy but it is not that difficult to understand. Since in the previous part we have generated a saw-tooth voltage and we need to calculate its period.
  • To calculate period, we have introduced some counters in our code named i,j and k. 'i' is the generalized counter.
  • 'k' is the counter, used to count sub-periods and 'j' is the counter inside these sub-periods. From the beginning of the above part, we have defined a generalized counter, then we have calculated supply voltages through modulation of index.
Few MATLAB Projects:
  • Then i have written a conditional loop consisting of 'if' and 'else' and we have generated a saw-tooth waveform from it.
  • In the end, the final value of this saw-tooth voltage is saved in variable named 'beta'.
  • Up-til now we have generated a saw-tooth voltage and we have calculated the beginning value (alpha) ,ending value (beta) and the period (width) of this saw-tooth voltage.
  • Now in the next part we will write the command to display all these values of the saw-tooth voltage curve. Part of CODE is given below:
disp(' ') disp('......................................................................') disp('alpha beta width') [alpha' beta' (beta-alpha)']
  • In this step, we will simply display the values of the saw-tooth voltage, which we have generated in the above code.
  • Now we will write a CODE to plot the graphs of the the voltage curve, we have generated above:
a=0; subplot(3,1,1) plot(wt,Vin,wt,a) axis([0,2*pi,-2,2]) title('Generation Of The Output Voltage Pulses ') ylabel('Vin(pu)'); subplot(3,1,2) plot(wt,Vt,wt,ma1,wt,a) axis([0,2*pi,-2,2]) ylabel('Vt, m(pu)'); subplot(3,1,3) plot(wt,Vout,wt,a) axis([0,2*pi,-2,2]) ylabel('Vo(pu)'); xlabel('Radian');
  • The title of this graph is generation of output voltage pulses and it will plot the graphs.
  • In next step, we will examine the output voltage curve. Its RMS value. HARMONIC components present in it and THRESHOLD value. CODE to examine all this is:
Vo =sqrt(1/(length(Vout))*sum(Vout.^2)); disp('The rms Value of the Output Voltage ') Vo y=fft(Vout); y(1)=[]; x=abs(y); x=(sqrt(2)/(length(Vout)))*x; disp('The rms Value of the output voltage fundamental component = ') x(1) THDVo = sqrt(Vo^2 -x(1)^2)/x(1);
  • The formulas to calculate all these parameters of output voltage curve are given in the above code.
  • Uptil now, we have calculated all the parameters of output voltage curve and now i am going to calculate the current parameters of the output curve. The algorithm to calculate the output current wave-form is given below:
m=R/(2*pi*f*L); DT=pi/(N*50); C(1)=-10; i=100*N+1:2000*N; Vout(i)=Vout(i-100*N*fix(i/(100*N))+1); for i=2:2000*N; C(i)=C(i-1)*exp(-m*DT)+Vout(i-1)/R*(1-exp(-m*DT)); end
  • Now we are going to calculate all the parameters of the current waveform, which we previously explained for the output voltage waveform. Now we are going to calculate the RMS value, Harmonic component and Threshold value of the output current. CODE to do all this is given below:
for j4=1:100*N CO(j4)=C(j4+1900*N); CO2= fft(CO); CO2(1)=[]; COX=abs(CO2); COX=(sqrt(2)/(100*N))*COX; end CORMS = sqrt(sum(CO.^2)/(length(CO))); disp(' The RMS value of the load current is') CORMS THDIo = sqrt(CORMS^2-COX(1)^2)/COX(1);
  • All the above data and results were to monitor output parameters.
  • Now we are going to calculate the current parameters of input supply voltages.
  • first of all, i will find the input supply current and then i will analyze this supply current. Find its RMS value, Find its Fourier series, its displacement factor and Threshold value of the input supply current. The CODE to perform all this work simultaneously is given below:
for j2=1900*N+1:2000*N if Vout(j2)~=0 CS(j2)=C(j2); else CS(j2)=0; end end for j3=1:100*N CS1(j3)=CS(j3+1900*N); end CSRMS= sqrt(sum(CS1.^2)/(length(CS1))); disp('The RMS value of the supply current is') CSRMS CS2= fft(CS1); CS2(1)=[]; CSX=abs(CS2); CSX=(sqrt(2)/(100*N))*CSX; THDIS = sqrt(CSRMS^2-CSX(1)^2)/CSX(1); phi1 = atan(real(CS2(1))/imag(CS2(1)))-pi/2; PF=cos(phi1)*CSX(1)/CSRMS;
  • Up till now we have calculated all the parameters and now we are going to draw a table in MATLAB and it will show all the results simultaneously.
  • The combined code to display all the parameters on the output window is given below:
disp(' Performance parameters are') THDVo THDIo THDIS PF a=0; figure(2) subplot(3,2,1) plot(wt,Vout(1:100*N),wt,a); title(''); axis([0,2*pi,-1.5,1.5]); ylabel('Vo(pu)'); % subplot(3,2,2) plot(x(1:100)) title(''); axis([0,100,0,0.8]); ylabel('Von(pu)'); subplot(3,2,3) plot(wt,C(1900*N+1:2000*N),wt,a); title(''); axis([0,2*pi,-1.5,1.5]); ylabel('Io(pu)'); subplot(3,2,4) plot(COX(1:100)) title(''); axis([0,100,0,0.8]); ylabel('Ion(pu)'); subplot(3,2,5) plot(wt,CS(1900*N+1:2000*N),wt,a); axis([0,2*pi,-1.5,1.5]); ylabel('Is(pu)'); xlabel('Radian'); subplot(3,2,6) plot(CSX(1:100)) title(''); axis([0,100,0,0.8]); ylabel('Isn(pu)'); xlabel('Harmonic Order');
  • In the above code 2 commands are used in excess. First one is 'plot', which is used to plot any particular function in MATLAB and the second command is 'subplot' which is used to draw multiple plots like 2 or 3 plots in the same window.
  • When you will write all this CODE and you will run it then, graphs will appear according to the data you entered to examine that particular signal.
 

RESULTS

  • The graphical results of all the above tutorial will be displayed in this section. First of all, when you will run the M-file then command window will appear and it will ask you give some input values of the supply voltages.
  • Such command window is shown in the image below:
  •  After inputing these values, the above given algorithm will start plotting the graphs, the firsst graph is shown in the below figure:
  •  Next plot is shown below, the graphs are labelled that's why I am not explaining them much.
  • It will also give some other values in the MATLAB's command window, a screenshot of these values is as follows:
  • Here's the complete programming code for this project:
clc clear all disp('Sinusoidal Pulse Width Modulation of AC Signal') disp('  ') Vrin=1; f=input('The frequency of the input supply voltage, f = '); Z=1; ma=input('the modulation index,ma, (0<ma<1), ma = '); phi=input('the phase angle of the load in degrees = '); Q=input('The number of pulses per half period = '); phi=phi*pi/180; R=Z*cos(phi); L=(Z*sin(phi))/(2*pi*f); N=2*Q; for k=1:2*N for j=1:50 i=j+(k-1)*50; wt(i)=i*pi/(N*50); Vin(i)=sqrt(2)*Vrin*sin(wt(i)); ma1(i)=ma*abs(sin(wt(i))); if rem(k,2)==0 Vt(i)=0.02*j; if abs(Vt(i)-ma*abs(sin(wt(i))))<=0.011 m=j; beta(fix(k/2)+1)=3.6*((k-1)*50+m)/N; else j=j; end else Vt(i)=1-0.02*j; if abs(Vt(i)-ma*abs(sin(wt(i))))<0.011 l=j; alpha(fix(k/2)+1)=3.6*((k-1)*50+l)/N; else j=j; end end if Vt(i)>ma*abs(sin(wt(i))) Vout(i)=0; else Vout(i)=Vin(i); end end end beta(1)=[]; disp('  ') disp('..........................................') disp('alpha    beta    width') [alpha'  beta'  (beta-alpha)'] a=0; subplot(3,1,1) plot(wt,Vin,wt,a) axis([0,2*pi,-2,2]) title('Generation Of The Output Voltage Pulses ') ylabel('Vin(pu)'); subplot(3,1,2) plot(wt,Vt,wt,ma1,wt,a) axis([0,2*pi,-2,2]) ylabel('Vt, m(pu)'); subplot(3,1,3) plot(wt,Vout,wt,a) axis([0,2*pi,-2,2]) ylabel('Vo(pu)'); xlabel('Radian'); Vo =sqrt(1/(length(Vout))*sum(Vout.^2)); disp('The rms Value of the Output Voltage ') Vo y=fft(Vout); y(1)=[]; x=abs(y); x=(sqrt(2)/(length(Vout)))*x; disp('The rms Value of the output voltage fundamental component = ') x(1) THDVo = sqrt(Vo^2 -x(1)^2)/x(1); m=R/(2*pi*f*L); DT=pi/(N*50); C(1)=-10; i=100*N+1:2000*N; Vout(i)=Vout(i-100*N*fix(i/(100*N))+1); for i=2:2000*N; C(i)=C(i-1)*exp(-m*DT)+Vout(i-1)/R*(1-exp(-m*DT)); end for j4=1:100*N CO(j4)=C(j4+1900*N); CO2= fft(CO); CO2(1)=[]; COX=abs(CO2); COX=(sqrt(2)/(100*N))*COX; end CORMS = sqrt(sum(CO.^2)/(length(CO))); disp(' The RMS value of the load current is') CORMS THDIo = sqrt(CORMS^2-COX(1)^2)/COX(1); for j2=1900*N+1:2000*N if Vout(j2)~=0 CS(j2)=C(j2); else CS(j2)=0; end end for j3=1:100*N CS1(j3)=CS(j3+1900*N); end CSRMS= sqrt(sum(CS1.^2)/(length(CS1))); disp('The RMS value of the supply current is') CSRMS CS2= fft(CS1); CS2(1)=[]; CSX=abs(CS2); CSX=(sqrt(2)/(100*N))*CSX; THDIS = sqrt(CSRMS^2-CSX(1)^2)/CSX(1); phi1 = atan(real(CS2(1))/imag(CS2(1)))-pi/2; PF=cos(phi1)*CSX(1)/CSRMS; disp(' Performance parameters are') THDVo THDIo THDIS PF a=0; figure(2) subplot(3,2,1) plot(wt,Vout(1:100*N),wt,a); title(''); axis([0,2*pi,-1.5,1.5]); ylabel('Vo(pu)'); % subplot(3,2,2) plot(x(1:100)) title(''); axis([0,100,0,0.8]); ylabel('Von(pu)'); subplot(3,2,3) plot(wt,C(1900*N+1:2000*N),wt,a); title(''); axis([0,2*pi,-1.5,1.5]); ylabel('Io(pu)'); subplot(3,2,4) plot(COX(1:100)) title(''); axis([0,100,0,0.8]); ylabel('Ion(pu)'); subplot(3,2,5) plot(wt,CS(1900*N+1:2000*N),wt,a); axis([0,2*pi,-1.5,1.5]); ylabel('Is(pu)'); xlabel('Radian'); subplot(3,2,6) plot(CSX(1:100)) title(''); axis([0,100,0,0.8]); ylabel('Isn(pu)'); xlabel('Harmonic Order');
  That's all for today. I have tried my best to explain it in detail but still if you get into some trouble then ask in comments.

Fault Detection of Gas Turbine in MATLAB

Buy This Project

Hello friends, I hope you all are fine and enjoying. Today i am going to share a new project which is Fault Detection of Gas Turbine in MATLAB. In this project, i will try to elaborate that, What is a Gas Turbine? What are the operating parameters of a Gas Turbine? Mostly what type of Faults and Vibrations comes in Gas Turbine system during its operation? Gas Turbine is also called a Combustion Turbine. It has Four Basic components which includes Compressor, Combustion Chamber, Turbine and Alternator.

Generally compressor is installed upstream and the Rotating turbine is connected downstream and the Combustion Chamber is connected in between both of them and at the end of line we have Alternator which is also connected on the same shaft.Gas Turbine operates on "Brayton Cycle". Gas Turbine can be divided into 2 main sections, COLD Section and HOT Section, as shown in the above feature image. COLD Section includes Compressor and the HOT Section includes Turbine and and Exhaust portion. First of all, Compressor in-takes the Fresh atmospheric air and after compression it gets to high pressure, next comes the Combustion Chamber in which fuel is sprayed continuously and ignites the air so that combustion generates a High-Temperature Flow. In the next stage, this high temperature and high pressure gas enters into turbine and it releases its energy to turbine blades and the Turbine starts to rotate. A synchronous generator is also connected on the same shaft of the Turbine and when turbine gets to its rated rpm, then synchronous generator starts to generate electricity. Gas Turbines are of different Sizes and Ratings. The operation of Gas Turbine includes to monitor a large no of parameters. For example During the operation of Gas Turbine, a large no. of equipments are operating simultaneously and there are always chances  of some fault occurrence and some abnormal vibrations. Although we also have a large no of primary and secondary protection equipments installed but we still need very careful monitoring of the system for its safe operation. Gas turbines are widely used in aircraft engines, trains, ships and coupled with electrical generators to generate electricity.

It was quite a tough job of design the Model of Gas Turbine in Simulink and it includes a lot of our team efforts, so we haven't made it a open source and we have placed a very small amount for this which is, 10$ only. You can click on the above button to purchase the complete control model of Gas Turbine in Simulink. Above was a small introduction about the basic components of Gas Turbine and their operation. Now lets move towards the designing of the Fault Detection of Gas Turbine in MATLAB.

You may also like to read:

Fault Detection of Gas Turbine in MATLAB

  • In order to observe the Fault Detection of Gas Turbine in MATLAB, we are gonna use Simulink which is available in MATLAB.
  • The complete Simulink model of Gas Turbine is shown in the image given below:
  • First of all fresh air from atmosphere is entered into the system and and next to that we have a  'Reference Filter', which removes dust particles from air.
  • Next to that, we have a Mu- Law compressor and to see the other properties of this compressor you will select that icon and then right click on it, a window will open and then you will click on option 'look under mask' .
  • When you will click that option, a new window will open in Simulink and it will be representing the actual parameters of Mu-Law compressor.
  • You can see that in the figure given below:
  • The output of Mu-Law compressor comes to a summing junction and at this junction, we also have another input which is of Combustor Heat.
  • The output of the summing junction goes to the combustor delay and exhaust delay.
  • The output of combustor delay and the exhaust delay is connected to a scope.
  • The purpose of scope is to see the actual output graphical parameters of the of the combustion delay and exhaust delay and we can also check some abnormalities through it.
  • The output of combustor relay goes to Gas Turbine Dynamics. It is Gas Turbine built in function and it is used to observe the dynamic behavior of Gas Turbine. The Gas Turbines Dynamics control are shown in the image below:
  • The output of Gas Turbine goes to 'Throttle and Manifold' control. This control is observing the air intake dynamics of the gas turbine.
  • If you double click on it, then a new window will open which will be showing the embedded close loop system of 'Throttle and Manifold ' control, which can be easily seen in the image given below:
  • First comes the throttle angle control of gas turbine. It has three inputs.
  • First input is the Throttle angle 'Theta' and this angle is measured in 'degrees'.
  • Second input is of the atmospheric pressure which is measured in 'bar', as you can see in the above image.
  • Third input is of the 'Manifold Pressure' and it is also measured in bar.
  • Manifold is actually the output of second control system which is also embedded in the same system.
  • From above image, we see that on the next stage, output of 'Throttle Control' is actually the the input of 'Manifold Control' system and second input of manifold system is Engine Speed which is actually the speed of Gas Turbine and it is measured in rad/sec.
  • The whole output of all the system is Air Charge. As i described earlier that when fresh atmospheric air is burned in the combustion chamber then High Temp and High Pressure Air charge is produced.
  • Now this High Temp and High Pressure Air charge goes to the next control system which is 'Induction to power stroke Delay'. In order to observe the properties of this system, you simply double click on the function and a new window will open, which is shown in the image given below:
  • As you can see in the above image, we have 2 inputs to this system. First one is Air charge and second one is running speed of the turbine.
  • If you closely observe the image then, you will notice that we have place 2 inputs to control model  named as 'Divide1'. It is actually a comparator and it is continuously comparing the actual running speed of the turbine and the constant reference value.
  • Whenever speed will deviate from its reference value then error will be generated.
  • Both these inputs goes to the next control box which is, 'variable time delay'. It continuously monitors the ratio of air charge flowing into the system and the corresponding turbine speed. For example, whenever the pressure or temp of the inlet steam will vary then, turbine speed will vary and this control model will generate an error, which will tell us that some abnormalities are going on in the system.
  • Next comes the 'Engine Torque Control' . It has 2 inputs. First input is of the Air Charge and the second input is the speed of the Turbine. If you double click on this control model then, a new window will open representing its properties. That window is shown in the image below:
  • Engine Torque is defined by 4 input parameters. First is Air charge and you can see that Air Charge input also goes to the Stoichiometric Fuel burning mechanism of combustion chamber. This is because the combustion chamber burns the fuel according to already existing temp and pressure of the charged air.
  • If the temp of the air entering the combustion chamber is much low then, it will have to burn more fuel to get the proper temp and pressure of the air.
  • Third input is of the 'Spark Advance'. It monitors that either spark plug is igniting the fuel with proper timing or not. If the spark plug doesn't ignite the fuel on exact time then, unburnt fuel particles will comes through exhaust hole. and engine will not run smoothly.
  • Fourth input is of the speed of the turbine. Engine Torque control also monitors the existing speed of the turbine. and turbine is not running with the proper speed then, it will decide either it has to open more fuel to get it to proper speed or there is some issue going with spark ignition system.
  • All these parameters define the Engine's torque and if there is any problem with any of the input then output torque will also vary accordingly.
  • All these system's output goes to the Function Block Parameters and this block converts angular velocity to rpm. It is in fact a techogenerator.
  • Techogenerator is in fact a sensor, which is mounted in the shaft of any rotating mechanism and it records the angular speed of the shaft and generates a electrical signal in form of RPMs. It continuously monitors the angular speed of the turbine and then it converts it to RPM.
  • In the next stage, output of techogenerator goes to the summing junction. This junction has 2 inputs. First input is from techogenerator and the second input is from external disturbance.
  • External Disturbance has a very important role in defining the safe operation of any system. It not only disturbs the system but in severe conditions, it can also collapse the system.
  • In the next and final stage, we have a Gear Box model of the Gas turbine. If we double click on it then a new window will open, which will be representing its internal parameters. The internal detail of this control model is shown in the image given below:
  • It is the most important control model of Gas Turbine. It has only one input which is rpm of turbine and this input is coming from techogenerator.
  • As you can see in the above given image that, it monitors RPM, Vibrations, Over Vibrations, Dangerous Vibrations and Bearing factor errors.
  • Now if you note from the above given image then you will see that RPM, we have connected a scope and the factors which needs continuous monitoring are over vibrations and Bearing Factor error.
  • When we will run the simulation, the the system will monitor it completely from first stage to final stage (which is from inlet fresh air to RPM of Gas Turbine) . If any problem comes in the system then turbine speed will vary.
  • Dear friends, the beauty of any project's simulation is that we can put abnormalities in our system and then, we can monitor the system's behaviour under these abnormalities. This thing helps in improvising new technology and also lead us to a better design of the system.
  • Now in the above figure, we hava a control model named 'variation of the system'. when you will double click on that then, a third small window will open, which is shown in the image given below:
  • If you look closely the option named "Constant value" then here we can change the vibrations inserted in the system. Here we change the value according to our own choice and we will start from 1 and then go to maximum value (12) and observe the behaviour of Gas Turbine.
  • Now i am going to create some abnormalities on the above system's and we will see their results and then we will conclude either they are dangerous or not.

RESULTS

  • We have seen the detailed explanation of "Fault Detection of Gas turbine in MATLAB" and I hope till now you got much familiar with how its operating. So now lets have a look at the results of this simulation.
  • First of all, i am going to keep vibrations of the system at 1 then i will play the simulation then the Gear Box will generate the following results, as shown in the image below:
  • Now we can see that as we have set the vibration value to 1 so there's no errors gennerated by the simulation. In other words, our gas turbine is running smoothly and is not generating any erros.
  • Now i am going to increase the vibrations of the system and i am going to keep its value 10.Then the generated results are given as:
  • From above figure, you have seen that System is generating over speeding error and Bearing Factor error but they are not Dangerous yet and system can also run under these conditions.
  • In the next stage, i am going to increase the vibrations of systems a little more and i will make its value 12. Now we will observe the output of the system from the below figure:
  • From above figure, we can easily see that i have increase the vibrations of the turbine upto that extend that it has generated the Dangerous alarm. Now we must immediately stop the system and if we didn't do that, then the system will collapse.
  • Now i am going to share the graphs of the no. of Scopes we have added in our system.
  • Output graph of "Scope # 1" is given in the figure below:
  • Above graph is of scope#1 and it is representing the curves of 'Combustor Delay' and 'Exhaust Delay'.
  • The output graph of the next scope, added in the system is given in the image below:
  •  The above figure is showing the curves of 2 different functions. First is Thermocouple Transfer Function and the next is of Temperature Reference.
  • The output graph of the scope#2 is shown in the image below:
 
  •  In the above graph, we have 3 curves. Straight curve is of HEAT. Since turbine is running at normal temp and no over heating is produced in it.
  • The green curve is of Combustion delay and Exhaust Delay. This is a very abrupt curve. To make it smooth,we have added another control model named as "Transfer Function 1". That's why the yellow curve is the final curve and it is rather smooth than the other two.
  • Now in the end, i am going to share the output curve of scope#5, which is shown as below:
  •  The above graph is of the RPM of the turbine. As we can see that in the begining, when the simulation was OFF then, curve was at zero. Then we started the simulation and the infact turbine started and it started to accelerate and it gained it max speed which is 10,000 rpm within 10 seconds. which can be verified from above image.
Alright Friends, the above tutorial was a little bit lengthy but it was very interesting and have a large no of industrial applications. If you have any questions regarding above tutorial then, don't hesitate to ask and i will try my best to satisfy you. Follow us to get the whole simulations straight in your inbox. Till next tutorial Take Care !! :)

How to create a GUI in MATLAB ?

Hello friends, I hope you all are fine and enjoying life. Today i am going to share a new project tutorial which is How to create a GUI in MATLAB ? First of all, lets have a little introduction that what is meant by GUI? How it is created and what are the uses and applications of GUI? GUI stands for Graphical User Interface. We all know the basics of MATLAB that it is used for creating complex algorithms and to create Simulink simulation, but we don't know that it aalso has another feature which is to create GUIs. The algorithms developed in MATLAB works on the background and do their tasks while MATLAB also emphasis on the user interaction that's why it has also provided us with GUI so that we can create a user friendly front end interface for our algorithm.

So, in today's post, we are gonna have a look at How to create a GUI in MATLAB so that we could also give a user friendly front end to our algorithms. MATLAB GUI has an extensive database with a lot of functionalities, which I can't cover in one post but atleast today, I will make you able to create a simple GUI and will also explain How to control buttons and edit/text boxes etc. After performing this tutorial, you will be able to try GUI on your own.

So, today we will create a simple project in which we will create a simple GUI as shown in below image. The functionality of this GUI will be that when you click on this START button then the text,you have written in the white edit box will appear at the text box above, as shown in figure below. Let's get started with the implementation of this GUI. Follow the steps carefully and ask in comments if you got into any trouble.

You may also like to read:

You can download this GUI by clicking on the below button, but first read the tutorial completely aand try to pratice it by yourself,don''t just download the run the applicationas it won't give you any help.

Download Simple GUI Project in MATLAB

How to Create a GUI in MATLAB ?

  • First of all, when you will open your MATLAB software then, the first window opened will look like as shown in the image below.This is the simple workspace of MATLAB, now in order to open theGUI toolbar, you have to write "guide" in the workspace as I did below:
  • After writing the "guide" in command window, hit ENTER and a new small window will open up as shown in the below image, from here we will start creating our GUI.
  • As you can see in this small window, there are two tabs, one tab is named as Create New GUI, which has the options for creating your GUI for the first time while the second tab is named as Open Existing GUI, which is used for opening the already designed GUIs and as we haven't designed any GUI yet so we will remain in the first tab and will select blank GUI from the list and hit Enter.
  • Then press "OK" button and as you will complete the action, a new window will immediately open and it will look like as shown in the image given below:
  • This is the place where we are gonna create our GUI. The left side toolbar is showing the controls which we will drag aand drop in the main window and will design our GUI.
  • Let's first have a look at the left side toolbar controls. On the top left side of the bar, the first button is to select 'cursor' . Below curser button we have icon of 'Push Button'. Next to that we have 'side scroll bar'. Then comes 'Radio Button' and 'Check Box'. Then we have most important buttons which are 'Edit text bar' button and 'Static text bar' button. Below are also some other buttons and you can also explore them by simply clicking on them.
Other MATLAB Projects:
  • Now we are going to make a very small and simple interface, in which we will first select a 'button' and then we will select 'Edit text bar' and 'static text bar' and we will make the arrangement in such a way that, when we will press the button then, data will move from Edit text box to Static text box.
  • Now click on the 'button' icon and the next thing which will happen on the window will be like as shown in the image below:
 
  • Now if you want to change the properties of the button, either you want to change its name or you want to change its setting then, simply double click the button and a new window will open, which will be as:
 
  • As you can see in the above image that a new window has been opened and it has a large no of options.
  • To change the name of push button, go to 'string' option and here you can change its name.
  • In above image, you can clearly see that, i have replaced the name 'Push Button' by 'Start'.
  • Now click on the Play icon in the top toolbar which is used to run the GUI. After doing that, a new window will open, which is shown in the below image:
  • This new window in above figure is the back end programming of this GUI created automatically by MATLAB, here we are gonna add all the codes for our ontrols.
  • Now we want to add a static text box and we will select it from tool bar manually.
  • And if you again want to change its name then, we will double click on that. Go to slide option and and write whatever you want to write there.
  • All this process is shown in the below image:
 
  • Now i want to write our official site address, which  is "www.TheEngineeringProjects.com" .
  • And when i will press OK button then our GUI window will look like as shown in the below image:
  • This time, I have not only changed the name of this text box but have also changed the font size and color that's why it is appearing now in light blue color and its font size has also increased. So, now you must have the idea that you can control all the properties and can make it literaly a new thing. The only thing stopping you is your imagination. :)
  • In the same manner we will select edit text box.
  • Now by doing all this, actually i want to write some data in Edit Text Box and when i will press Start button then, data will move from Edit Text Box to Static Text Box.
  • To implement this logic we need to load a function code in 'Start' button. To load the code, right click on the Start button and a new window will open as shown in the image below:
  • As shown in the above image when you will go to the 'view callbacks' option and a next window will open direct to it and then click on the 'call back' button.
  • After that a new window will open which will be representing the code which has been uploaded in the 'Start' button.
  • This window is shown in the below image:
  • Now code has been uploaded and the very next window which will open, will be of 'Edit Text Box' .
  • Here you can write anything which you want to Display in 'Static Text Box'.
  • So in this window, i am writing my tutorials title, which is "How to create a GUI in MATLAB".
  • It can be seen in the below image:
  • When you will press Enter then, immediately an-other button will open which will be representing that our data has been moved to 'Static Text Box'.
  • As you have seen that our Final Display is same. Which means we have moved data from Edit Text Box to Static Text Box.
  • The code added in the button CallBack is as follows:
 x = get(handles.edit1,'String'); %edit1 being Tag of ur edit box if isempty(x) fprintf('Error: Enter Text firstn'); else set(handles.text2,'String',x) end
  • Have a look at this below video in which we have explained in detail How to Create a GUI in MATLAB:
Alright Friends, that was all from today's post and i hope you have learned something new. Don't feel shy to ask anything in comments. Till next tutorial take care !! :)

How to use Capacitive Touch Sensor in Proteus ISIS ?

Hello friends, I hope you all are fine and enjoying. Today i am going to share my new project's tutorial which is How to use Capacitive Touch Sensor in Proteus ISIS. It is a very interesting project, and we will be using a 555 Timer while designing this project. If you recall our previous project tutorial which was Angle Control of Servo Motor using 555 Timer in Proteus ISIS, in which 555 timer was generating PWM and was controlling the rotating angle of servo motor.

Now in this project, we have a little different context and now we will be using a 555 Timer in collaboration with Capacitive Touch Sensor. First of all, lets have a little introduction of Capacitive Touch Sensor. Well, if we talk broadly then, in Electrical Engineering Capacitive Touch Sensing is a Technology used in Capacitive Coupling. Capacitive Coupling is a technology which takes Human Body's Capacitance as an input and it measures anything which has a potential difference or  which is conductive or any static object which has a dielectric difference from that of air. While designing this technology, one side of the insulator is coated with the conductive material and a very small voltage is applied to this conductive layer. Now after applying the voltages to the conductive layer, a uniform electrostatic field is formed. After that if any conductor (suppose human finger) will come within the vicinity of this field or it touches the other non coated layer of the insulating material then a capacitor will be dynamically formed and if potential difference between both bodies is HIGH then the current will start to flow. That was a little introduction of Capacitive Touch Sensor, and now lets be practical and move towards the Hardware of the Above described tutorial.

You can download the complete simulation of above described project by simply clicking on the button given below:

Download Simulation Files

How to use Capacitive Touch Sensor in Proteus

  • In this project, we are using 555 Timer in collaboration with Capacitive Touch Sensor. A 555 timer is an 8 pin IC. Pin # 6 is called threshold pin and for 555 timer threshold level is 5 volts.
  • So, 555 timer will trigger above 5 volts and it will generate output which can be collected from pin # 3 represented as ‘Q’ which is output pin of 555 timer.
  • While moving toward the simulation of project, first of all place all the components in the proteus workspace, as shown in the image given below:
  • First of all we have place Capacitive Touch Sensor and after that we have placed a NPN transistor, then 555 Timer will come and at the output of 555 Timer we have added a LED. The complete circuit diagram ready for simulation is shown in the image given below:
  •  As long as the finger is out of the vicinity of the electrostatic field, no potential difference occurs and the LED remains in the OFF state.
  • Now if we move the finger towards Capacitive Touch Sensor, then and when the potential difference reaches up to 0.6 volts, then 555 triggers and it generates output voltages across LED which are 5 volts but in some cases voltages are lost due to series connected resistances. This phenomenon is shown in below image:
  • Now if we further move the finger and take it completely near the sensor, then at this point max potential difference will occur between both point (finger and conductive layer). An important thing to note here is that, we have change the location of our interrupt ( finger) but, same voltages are appearing across LED which are 4.91 volts in this case. It can also seen in the figure given below:
  • Now, if we summarize the whole project, then we have seen that the movement of finger is in fact controlling our output. When the finger was out of vicinity of the sensor, then LED was OFF. When we moved the finger in forward direction and came in the vicinity of Electrostatic field, then Sensor gives signal to 555 Timer and Timer makes LED to glow.
  • Here's a video demonstrating Capacitive Touch Sensor in Proteus ISIS.

Applications Of Capacitive Touch Sensor

Capacitive sensing touchscreens are now a days commonly used in Digital Audio Players, Mobile Phones and Tablet Computers. Capacitive touch sensors also have the ability to replace Mechanical Buttons. Back in 1928 Russians invented a music instrument known as "Theremin" , in which The Instrument Player was able to control the volume and pitch of the sound without physically touching the instrument. Capacitive Touch Sensors are of basic level but they are back bone of large industrial projects and are widely used in designing some other sensors like:

  1. Position sensor.
  2. Humidity sensor.
  3. Fluid or Water level sensor.
  4. Proximity sensor etc..

Alright friends, that’s all for today, I hope I have conveyed some knowledge and helped you people in some way. If you have some queries, then ask in comments. Subscribe us via email to get these tutorials straight in your inbox. Till next tutorial, take care and be safe !!! :)

Arduino Projects

Hello friends, I hope you all are fine and having fun with your lives.Today I am not gonna post a new topic or tutorial, instead I am going to arrange all my Arduino Projects and tutorials in this post, as its better to have all of them in one place. I recently posted a PIC Microcontroller Projects post and it was highly appreciated by the followers so I thought to do the same with Arduino as well because I have posted more Arduino projects as compared to PIC Microcontroller. I will post all the Arduino Projects & Tutorials links below in sequence i.e. from easy to pro level so if you are a new user and want to get command over Arduino projects then read all of them one by one. Moreover, I will also keep on updating this post whenever I am gonna add any new Arduino Project or Tutorial. If you feel problem in any of the below tutorials then ask in comments and I will try my level best to solve your queries. As I always say learning is all about practise and patience. So while doing Arduino Projects, you have to be patient and practical, don't just read these articles, always test these arduino Projects and tutorials. Because when you practically perform some project then you will do mistakes and get the chance to learn from them. You should also have a look at these Arduino Project for Beginners.

Arduino Introductory Tutorials

If you have already run your first code on Arduino then you can skip this section. This section is for the beginners who don't know anything about Arduino. I have explained in detail how to get started with Arduino board and at the end of this section, you will have the complete idea of how Arduino works and how to program arduino. You must visit the Official Arduino Site and join their forum because they have posted a lot of Arduino Projects there.
Arduino Tutorials - Basics
What is Arduino ??? Here's our first tutorial where I have explained the very basics of Arduino i.e. what is Arduino and how to use it? Arduino Vs Raspberry Pi In this tutorial, I have explained the difference between Arduino and Raspberry Pi in detail. I have discussed their Pros and Cons in detail. So, give it a try if you are confused in choosing between them. Installation of Arduino driver in Windows When you run your Arduino board for the first time on your laptop or computer then you have to install Arduino drivers. Without installing Arduino drivers, you can't upload your Arduino code in Arduino board. How to get Hex File from Arduino ??? When you are using Proteus software for simulating your Arduino Projects then its necessary to upload Hex File in it. How to Upload Bootloader in Atmega328 ??? Arduino UNO board uses Atmega328 microcontroller so if you wanna use Arduino as a programmer and want to upload code in your Atmega328 microcontroller then you need to upload the Bootloader in it, which is explained in this post. Getting Started With Arduino Software Now I suppose that you have installed the Arduino drivers in previous tutorial so now you are ready to get an overview of Arduino software. Getting Started with Arduino Programming In this tutorial, I have mentioned basic concepts of Arduino Programming and have also written a very small code to get you familiar with Arduino Programming. How to Reset Arduino Programmatically ??? In some Arduino projects we have to reset the Arduino board programmatically instead of manually so I have shared this small trick in this tutorial.
Arduino Boards - Introduction
Here I am gonna give you the basic Introduction of all Arduino boards one by one. I would suggest you to at least read that one, on which you are working. I have shared detailed Pinouts, Pin Description and features. Introduction to Arduino UNO In this tutorial, I have discussed the detailed overview of Arduino UNO alongwith its Pinout. That's the most commonly used Arduino Board. Introduction to Arduino NANO In this tutorial, I have discussed the detailed overview of Arduino NANO alongwith its Pinout. It is used because of its small size. Introduction to Arduino Pro Mini In this tutorial, I have discussed the detailed overview of Arduino Pro Mini alongwith its Pinout and design. That's the smallest Arduino Microcontroller board. Introduction to Arduino Mega 2560 In this tutorial, I have discussed the detailed overview of Arduino Mega 2560 alongwith its Pinout. It's famous because of its large number of I/O Pins. Introduction to Arduino DUE In this tutorial, I have discussed the detailed overview of Arduino DUE alongwith its Pinout. If you are working on it, then must read that tutorial. Introduction to Arduino Lilypad In this tutorial, I have discussed the detailed overview of Arduino Lilypad alongwith its Pinout. That's the most stylish Arduino board. :) Introduction to ATmega328 Atmega328 is the Microcontroller used in Arduino UNO, NANO and Pro Mini. So I would suggest you to read about it as well.
Arduino Libraries

I always advise students to work on simulation first. If you are working on Arduino Projects, then Proteus is the best software for simulations. You should have a look at these New Proteus Libraries for Engineering Students, but here I have only posted Arduino Libraries, which are free to download directly from our site.

[TEPImg17]Arduino Library For Proteus Using this Arduino Library for Proteus, you can easily simulate your Arduino boards in Proteus software and can easily design any Arduino Project in Proteus. This Library includes five Arduino boards. Arduino UNO PCB Design for Proteus ARES In this post, I have shared the PCB design of Arduino UNO board in Proteus ARES, which you can easily download from this post and then can import it in your Proteus ISIS software. Arduino Lilypad Library For Proteus This Library includes the Arduino Lilypad Library for Proteus. Using this library you can easily simulate your Arduino Lilypad board in Proteus ISIS. This Library contains only the Arduino Lilypad board.

Arduino Projects

Now you know the basics of Arduino board and also have the idea how to use arduino software and write code in it. So, now let's get started with Arduino Projects. I have divided this section in several sections depending on which Arduino board I am using in the project. These arduino projects are designed by our team and are designed after quite a lot of efforts but are free here for the readers, so if you wanna share them then do mention us. :)
Arduino Tutorials - Basic
These are few basic Arduino Tutorials, which are very essential for you, if you are a beginner. So, follow them one by one and also design their basic Proteus simulations so that you learn more. So, let's get started with them:
Arduino UNO Projects
  • Circuit Designing of LCD With Arduino in Proteus .? Now you have understood the basics of Arduino board and have also installed the Proteus Library of Arduino board so now you are ready for designing small Arduino Projects.In this tutorial, I have interfaced LCD with Arduino baord and I have done it in Proteus ISIS software.
  • Interfacing of Keypad with Arduino in Proteus ISIS.? After the interfacing of LCD, next thing you should interface with Arduino is Keypad which is done in this tutorial. So, in this tutorial I have interfaced the Keypad with Arduino and then have shown the keypad characters on LCD.
  • Display ADC value on LCD using Arduino in Proteus ? Now that we have interfaced the LCD with Arduino so now its time to display something on it. So, for that purpose I have displyed the ADC value of Arduino analog Pin on LCD. This Project is also designed in Proteus ISIS software.
  • Ultrasonic Sensor with Arduino Simulation in Proteus ? In this tutorial, I have interfaced Ultrasonic Sensor with Arduino board in Proteus ISIS software.Remember, we have installed the Ultrasonic Sensor Library for Proteus in the previous section. So, using that Library now I have interfaced this Utrasonic Sensor with Arduino Board.
  • Interfacing of Ultrasonic Sensor with Arduino ? In this tutorial, I have interfaced the Ultrasonic Sensor with Arduino in hardware. I have designed a circuit on Vero Board and then tested it. Distance of obstacle from Ultrasonic Sensor is displayed on LCD in cm.
  • Interfacing of Multiple Ultrasonic Sensors with Arduino ? In the previous tutorial, I have interfaced single ultrasonic sensor with Arduino but in this post I have interfaced multiple ultrasonic sensors with Arduino board and displayed their values via Serial Terminal in Proteus ISIS.
  • Interfacing of Temperature Sensor 18B20 with Arduino ? In this project, I have interfaced the Temperature Sensor 18B20 with Arduino and displayed the atmospheric temperature on LCD. Its a one wire Temperature sensor and gives quite accurate value.
  • How to use Temperature Sensor 18B20 with Arduino in Proteus ISIS ? In this project, I have interfaced the Temperature Sensor 18B20 with Arduino and displayed the atmospheric temperature on LCD. Its a one wire Temperature sensor and gives quite accurate value. This Arduino Project is designed in Proteus ISIS.
  • Interfacing of Temperature Sensor LM35 with Arduino ? In this project, I have interfaced the Temperature Sensor LM35 with Arduino and displayed the atmospheric temperature on LCD. Its an analog Temperature sensor and gives quite accurate value. This Arduino Project is designed in Proteus ISIS.
  • Interfacing of Seven Segment With Arduino in Proteus ? In this project, I have interfaced the Seven Segment Display with Arduino and displayed different alphanumeric value on this Seven Segment Display. This Project is also designed in Proteus ISIS software.
  • Interfacing PIR Sensor with Arduino ? In this project, I have interfaced the PIR Sensor with Arduino. I have used the PIR Sensor Library for Proteus in order to design this Arduino Project. PIR Sensor is used for motion detection and it displayed the results on LCD.
  • Interfacing of Flame Sensor with Arduino ? In this project, I have interfaced the Flame Sensor with Arduino and used it for Fire Detection. Its an analog Sensor used for Flame detection, on the basis of which we decides whether there's Fire or not. This Arduino Project is designed in Proteus ISIS.
  • Interfacing of NRF24L01 with Arduino ? In this project, I have interfaced the NRF24L01 RF module with Arduino and designed two nodes among which data is transferred wirelessly. First Node acted as a Transmitter while the second node acted as a Receiver. This was one of the toughest Arduino Projects.
  • NRF24L01+ with Arduino - Response Timed Out ? While using NR24L01, I have encountered a problem named as Response timed Out and in this post I have shown a small trick on How to remove this error and after that it worked perfectly fine. If you are working on NRF24L01 then you must check it out.
  • Interfacing of RFID RC522 with Arduino ? In this project, I have interfacedRFID RC522 with Arduino and detected different RFID cards with this RFID module. I have designed it on hardware as this sensor is not yet available in Proteus ISIS.
  • Arduino Bluetooth communication using HC-05 ? In this project, I have done a Bluetooth communication using HC-05 bluetooth module. This bluetooth module was connected with Arduino board and then data is sent from Arduino to mobile via Bluetooth.
  • Control Servo Motor with Arduino in Proteus ? In this project, I have controlled the Servo Motor with Arduino in Proteus ISIS. Its quite a quick tutorial but is very hepful if you are working on Servo Motors. Servo Motors are controlled via single Pin and are used in Arduino Projects where accuracy is required.
  • Traffic Signal Control Project Using Arduino ? Its a small Arduino Project which is normally designed by students in their first or second semesters. In this Project I have modeled a complete Traffic Signal Control. This Project is designed in Proteus ISIS.
  • Scrolling Text on LED Matrix 8×8 using Arduino in Proteus ISIS ? In this project, I have interfaced LED Matrix 8x8 with Arduino and then I have displayed a scrolling text on these LED Matrices. This Project is designed in Proteus ISIS.
  • Intelligent Energy Saving System ? In this Arduino project, I have designed an Intelligent Energy Saving System. In this project, the system automatically turns ON or OFF the lights & Fans depending on presence of person in the room. Its YouTube video is also given in this tutorial.
  • USB Communication between Android and Arduino ? In this project, I have communicated between Arduino & Android via USB. The Android phone is connected with Arduino via USB cable and then data is sent from Android phone to Arduino via USB.
  • Home Automation Project using XBee & Arduino ? In this project, I have designed a complete Home Automation Project in which the Loads of a room are controlled via remote. For wireless communcation between remote and the loads I have used XBee module.
  • GSM Based Home Security System ? In this project, I have designed a Home Security System and used seven sensors for security purposes and when any of those sensors gave warning then a tet message is sent over to user's mobile phone.
GSM Module (SIM900) With Arduino: EasyVR Shield With Arduino:
  • Voice Recognition Project Using EasyVR Shield ? Its a series of tutorials on EasyVR shield and its the first tutorial in this series. In this tutorial, I have given an overview of the Project named as Voice Recognition Project using EasyVR Shield.
  • Getting Started with EasyVR Commander ? Its the second tutorial in the series of EasyVR Shield. In this tutorial, I have explained how to get started with EasyVR Commander which is a software for uploading voices in EasyVR shield.
  • Interfacing of EasyVR Shield with Arduino UNO ? Its the third tutorial in the series of EasyVR Shield. In this tutorial, I have interfaced EasyVR shield with Arduino UNO and then recognized the commands said by the user. It's quite an interesting Arduino Project.
  • How to solve Training Error: Recognition Failed in EasyVR ? Its the fourth tutorial in the series of EasyVR Shield. While working on EasyVR shield I encountered this error so I thought to share its solution with your guys. So, if you encountered such error then check this tutorial.
XBee Module With Arduino: Pixy Camera With Arduino: Motor Interfacing With Arduino:
Arduino Wifi Projects
Arduino YUN Projects
These Arduino Projects and tutorials I have yet posted on my blog, I hope these will help you in some way. I will keep on updating this post with more Arduino Projects. So stay tuned and remember me in your prayers. Take care!!! :) [/vc_column_text][/vc_column][vc_column][/vc_column][vc_column][/vc_column][/vc_row]

Access Linux Server of Arduino YUN with Putty

In today's post we are gonna see how to connect Arduino YUN with Putty and access the files on Linux OS in Arduino YUN. In my last post Getting Started With Arduino YUN, I have explained in detail about basics of Arduino YUN. I am recall few important things here. Arduino YUN is a very powerful board with two processors on it. One is Arduino microcontroller used to control the output / input pins. The other processor is named as Atheros and it has Linus operating system on it, so one can easily run python scripts on it and can do any server or client side coding in it.

So, today we are gonna see ow to access this Linux operating system of Arduino YUN using Putty software in Windows. Putty is a third party software used for accessing serial terminal, perform telnet or SSH communication etc. So using this software we can easily access the Linux OS on Arduino YUN. So let's have a look how we are gonna do this.

Access Linux Server of Arduino YUN with Putty

  • First of all, download the putty software.  Its a free software and you can download it quite easily using google.
  • After downloading the software, open it and you will have a screen similar to below image:
  • Now first of all select the SSH, which is shown in above figure by # 2, then give the IP address of your arduino YUN and Port will remain 22. If you don't know how to get the IP address of Arduino YUN then read Getting Started With Arduino YUN.
  • After adding this information, click on the Open button and for the first time, it will show a window similar to below image, simply click on YES.
  • This above Window will appear only when you are using putty for the first time, it won't appear afterwards.
  • After clicking YES, the below Window will open up asking for Login as:
  • When it asks for login, give log in as "root" and the default password is "arduino".
Note:
  • If you have changed the password in first tutorial Getting Started With Arduino YUN, then give that password now.
  • When you will be typing the password, nothing will appear on putty that's common so you just simply type the password and hit ENTER.
  • Now once you entered the password, it will get connected and you will get the below window.
  • Now you are in the root folder of your Arduino YUN Linux operating system, now its just like a command prompt or Linux Command Line.
  • Let's write some commands and test it out. Check out the below image:
  • In the above figure, you can see the first command sent is "cd .." to go into previous folder.
  • After that I send the command "cd mnt/sda1" to access the sd card, its the default folder for sd card.
  • Next command I sent is "ls", it will show all the files or folder present in the sd card. Currently I have just one folder in my sd card named as Shell.
  • After that I updated the opkg package by giving command "opkg update".
  • As I am connected with internet on my Arduino YUN sield, so its automatically downloaded and updated and finally I got "Signature check passed".
  • Next I installed a new package named as nano. In order to install it I used the command "opkg install nano". Nano is kind of notepad in Linux.
  • Now we are gonna write a python script, so I typed "nano TEP.py", and after entering this command the below window will open up.
  • In this window, you can write your python script and press Cntrl+X to Exit and it will ask for the save. Hit Y to save and N to No, and when you press Y then it will be saved.
  • Let's check it out whether its saved or not, and in order to do so we have to again send the same command "ls" and it will give us the folders and files as shown below:
  • You can see now we have TEP.py as well along with Shell folder.
  • So, today we have seen how to connect Arduino YUN with putty and access the Linux side of YUN. Afterwards we tested few commands and also check how to write a python code in YUN.
That's all for today, in the coming post of Arduino YUN I will show you how to connect Arduino YUN automatically with Wifi using python scripts. Till then take care and have fun. :)

How to use LDR Sensor in Proteus

In today's post, I am gonna share how to use LDR sensor in Proteus. Proteus, as we all know, is a very handy software and is used for circuit and PCB designing. It is also used for circuit and programming testing. It is normally used by engineers in their projects and contains a vast list of built-in components. I have posted a lot of tutorials on Proteus and I have got quite a positive feedback from the reader about these tutorials. So, I thought to share another component in Proteus which is quite hidden and I haven't seen much posts on it available online.

So, in today's post, first I am gonna explain what is LDR sensor? and we will see where it is used and how it is used. After that I will design a simple circuit in Proteus in which I will turn control a LED using LDR sensor andwill make it ON and OFF. So, as usual let's start from the beginning so that the newcomers could also get benefit from it.

What is LDR Sensor?

  • LDR is an abbreviation of Light dependent resistor. It is also known as photoresistor or photocell.
  • Its symbol is shown in the below figure:
 
  • LDR Sensor is used for the detection of light, internally it has a resistance which is sensitive to light as shown in the symbol.
  • Whenever light falls on the LDR sensor, its resistance start decreasing and when it comes to dark then its resistance start increasing. Using the value of resistance one can easily detect whether there's light or not.
  • It is normally used in light activated switches.For instance, you have seen the automatic street lights, which go ON when its night and automatically go OFF when its day time. In those street lights, LDR sensors are used.

Working of LDR Sensor

  • As I explained above, it has an internaal resistance which is very sensitive to light intensity and varies according to it.
  • So, one thing is quite clear that LDR sensor is an analog sensor. It gives us different values depending on the light intensity falling on it.
  • Let's have a look on the simplest circuit of LDR sensor, which is shown in the below figure:
  • Now if you check the above image you can see we have placed a resistor in series with the LDR sensor and have applied a voltage source across them.
  • Now when the light will fall on the LDR sensor, its resistance will go LOW and in return the voltage across the LDR will also go LOW and as the LDR will come in dark, the resistance will go HIGH and in return the voltage will also go HIGH.
  • Its the simplest working phenomena of LDR sensor. Now if you are using the LDR sensor with some microcontroller then what you need to do is simply give this intermediate connection of resistor and LDR to microcontroller.

Circuit Designing of LDR Sensor in Proteus

  • Now we know the basics of LDR sensor and have also seen how it works so now let's design its circuit in Proteus.
  • There are two types of LDR sensors available in Proteus which are exactly the same in functioning but are different in operating. Both are shown in the below figure:
  • The first one has a digital display along with it on which the voltage value is displayed while the second one a bit more animated and has a torch with it, so when you press the up arrow the torch will come closer and in other words the light is falling on the LDR and when you press the down arrow the the torch will go away and your LDR is in dark now.
  • Both of these states are shown in below figure:
  • Now you can see both the states quite clearly, in the first state torch is away so LDR is in dark while in second state, torch is close so LDR is ON.
  • So, now let's design their circuit to control a LED with LDR Sensor in Proteus. In order to do so, design this simple circuit in Proteus as shown in below figure:
Note:
  • I have also designed this circuit on hardware and tested, it works perfectly as shown in the simulation.
  • Its a very simple circuit in which I am using a comparator and then giving output to LED. When the LDR is in dark then the LED will remain OFF and when the LDR will go into light then the LED will turn ON.
  • Both of these states are shown in below figure:
  • Now you can see when the voltage on the digital display of LDR were LOW then the LED was OFF and when Iincreased the voltage then the LED went ON.
  • Now let's check both of these states with the second LDR sensor in Proteus, which are shown in the below figure:
  • Again quite obvious, when the torch was away then LDR was in dark and the LED was OFF but in second state when I moved the torch close the LED went ON.
  • Here's the Proteus Simulation of LDR sensor attached below, download and play with it. :)

Download LDR Sensor in Proteus Simulation

That's all for today, if you have any problem ask in comments and I will reply them. Take care and have fun !!! :)

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir