Interfacing of LM35 with Arduino in Proteus ISIS

Hello friends, I hope you all are fine and enjoying yourself. Today I am going to share a new project titled Interfacing of temperature sensor LM35 with Arduino UNO in Proteus ISIS. So far, I have only worked on temperature sensor DS18B20 for temperature measurements and I have also uploaded a tutorial on Interfacing of Temperature Sensor 18B20 with Arduino.

Recently I got a chance to work on a project regarding temperature sensing but the condition of this project was that to use only LM35 for temperature detection. Then, I get to know much about LM35, its operating conditions and features. So I thought I should also upload its tutorial as it will also be advantageous for engineering students. Because learning new things is always a charm.

An excellent thing about LM35 is that it's quite cheap as compared to other temperature sensors. And as it's cheap, that's why it's not very reliable, if you personally ask me then I will prefer DS18B20 over LM35 because of its accurate readings. Now, let's move towards its interfacing and its practical applications. First of all, let's have a quick look at the introduction of LM35 and then we will design it in Proteus ISIS.

Where To Buy?
No.ComponentsDistributorLink To Buy
1LM35AmazonBuy Now
2Arduino UnoAmazonBuy Now

Introduction of LM35 Temperature Sensor

  • LM35 is an embedded sensor, used to measure the temperature of its surroundings and is famous because of its low cost.
  • Its output is generated in the form of an Electrical signal and this electrical signal is proportional to the temperature, which it detects.
  • Lm35 is much more sensitive than other temp measuring devices (not accurate).
  • The internal circuitry of this embedded sensor is sealed inside a capsule.
  • LM35 is a 3 pin IC and it is used for temperature detection. The physical appearance of LM35 is shown in the image given below:

  • As you can see in the above image that LM35 is a 3 pin IC:
    1. The first pin is Vcc, so it should be connected to 5V.
    2. The center pin is its Data Pin and LM35 gives its output when it measures temperature.
    3. The third pin is GND and should be connected to the ground of the battery/source.

LM35 Arduino Interfacing

  • As my today's tutorial is about interfacing LM35 with Arduino so let's start it.
  • I have connected LM35 with Arduino microcontroller and it is shown in the image given below:

  • As you can see in the above image, I have connected an LM35 sensor with Arduino UNO.
  • The VCC pin of LM35 is connected to +5V of the Arduino board.
  • Since LM35 generates an analog value at its output pin that's why I have connected this pin to the 'A0' pin of the Arduino board.
  • This pin of Arduino board is used to receive analog data from an external source.
  • And the last pin is connected to the GND pin of the Arduino board.

Arduino Code for LM35

  • After connecting the circuit, now upload the below code to your Arduino board.
#define TempPin A0

int TempValue;

void setup()
{
  Serial.begin(9600); // Initializing Serial Port
}
void loop()
{
  TempValue = analogRead(TempPin); // Getting LM35 value and saving it in variable
  float TempCel = ( TempValue/1024.0)*500; // Getting the celsius value from 10 bit analog value
  float TempFarh = (TempCel*9)/5 + 32; // Converting Celsius into Fahrenhiet

  Serial.print("TEMPRATURE in Celsius = "); //Displaying temperature in Celsius
  Serial.print(TempCel);
  Serial.print("*C");
  Serial.print("    |    ");

  Serial.print("TEMPRATURE = "); // Displaying Temperature in Fahrenheit
  Serial.print(TempFarh);
  Serial.print("*F");
  Serial.println();
  
  delay(1000);

}

LM35 Arduino Simulation in Proteus ISIS

  • Now let's do this project in Proteus. Proteus also has an LM35 sensor in its database which we are going to use here.
  • Moreover, we also know about Arduino Library for Proteus V2.0, so using that library we are going to interface LM35 with Arduino in Proteus ISIS.
  • First of all, design the same circuit as shown in the above figure in Proteus software as shown below:
  • It's the same circuit as we designed before, the only addition is the virtual terminal. We are using it to check the values.
  • It's simply like the Serial Monitor we use in Arduino software.
  • So, now using the above code, create the hex file and upload it in Proteus.
  • Now hit run and if everything goes fine then you will get results as shown in the below figure:
  • You can see the Virtual Terminal is showing the same value as shown on the sensor which is 33 in Celsius and later I converted it to Fahrenheit.
It's quite simple and I have also commented on the code but still if you find trouble then ask in comments and I will resolve them. Will meet in the next tutorial, till then take care!!! :)

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 !!! :)
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