Get Continuous Data From COM Port in LabView
Hello friends, hope you all are fine and enjoying good health. Today's post is my first post on LabView Software. I have worked on LabView quite a lot in past but these days I am continuously working on LabvView so I thought to write some tutorials on it. In today's tutorial, I will explain in detail How to get continuous data from COM Port in LabView software. LabView is a very handy tool for the engineers. One can easily plot graphs and can work on different hardware modules with it. One of the best feature of LabView is its extensive help desk. There are many examples present in it which are ready to run and can help a lot, moreover their online is also very extensive. I got into many problems while working on it and I never get stuck, I just searched online and got the solutions for my problems. So, my suggestion is, if you are working on LabView then give Google a chance to help you out, if you stuck in something.
Let's start today's post, in today's post we will receive data from serial port and show it in LabView software. In order to do so, first of all you need to download LabView software, you can easily download it from their official website. They offer a trial period of around 45 days for the students and after that you have to buy it. Now, follow the below steps carefully and if you find any trouble anywhere, let me know in comments and I will try my best to sort them out.
Steps to Follow
- First of all, you need to download the NI VISA driver.
- NI VISA driver is used for serial communication, without downloading this software you can't communicate with the serial port of your computer in LabView.
- LabView has extensive list of drivers, whenever you want to communicate with any hardware in LAbview then you have to download its driver, NI VISA is the driver for communicating with serial port.
- After downloading this driver, install it and now run your LabView software.
- When you run LabView, it will appear as shown in the below figure:
Note:
- I have given the complete working vi to download at the end but I suggest that you should design it by yourself so that you learn how to design.
- Now, click on the Create Project Button and the below Window will pop up.
- Now click on the Blank VI Template and click Finish.
- A blank vi will open up, we will design the complete project in this vi.
- These are two windows, one is called the Block Diagram, where we will place all the components and the second one is Front Panel, where user can interact with LabView i.e. the Serial data coming will be displayed in the Front Panel.
- Another small window will also be there, this window is used for getting blocks.
- Now design a vi as shown in the below figure:
- In this vi, we are receiving data from Serial port and then separating it on the basis of "," character and then placing it in a Data 1D and as well as in Response box.
- The Front Panel is shown in the below figure:
- Before running the vi, first of all select the COM Port from which your data is coming.
- Now click on RUN button in top toolbar, but still you won't receive anything, now hit the Start Reading button and you will start receiving the data, as shown in the below figure.
Note:
- If you don't select the correct Com Port then it will give error and won't run so select the correct COM Port name.
-
- Now, the COM Port I am using is COM5 and you can see Start Reading button is also ON.
Response is showing the complete data whatever is coming from the Serial Port, while the Data 1D is splitting the data and showing each data in each box and the separation character I selected is "," (comma).That's all for today, now play with the vi and I hope you will find it really amusing. In order to download the complete working vi click on the below button.
Download Labview Simulation
In the next post, I have discussed how to Display Serial Data on Real Time Graph in Labview.Displaying data on graph is usually required in most of the projects. So have a look at it.
Introduction to Arduino YUN
Hello everyone, I hope you all are doing great. In today's tutorial, I am going to give you a detailed
Introduction to Arduino YUN, and we will also have a look at its basic functionalities. Arduino YUN is a latest microcontroller board, manufactured by Arduino. It's the most advanced and highly stylish arduino board. The beauty of Arduino YUN lies in having two on board processors, which I haven't seen yet in any other
Microcontroller board. One of them is simple Arduino processor which is similar to that of Arduino Leonardo while the second processor is Atheros AR9331. Atheros supports Linux server, which is the new thing in Arduino YUN. Because of these two processors, one now can do anything in the world of automation as well as web servers. You can say it's kind of a replica to
Raspberry Pi 3.
Arduino YUN can be used as a server, you can also run python scripts quite easily on it, which we will cover in coming posts of this tutorial. You can run the Telnet session on it, can access the FTP servers, in short you can do anything with it quite easily. Let me give you an example, around 3 months ago I have designed a project on Arduino YUN in which the sensors data attached to the YUN were uploading directly on the web server via FTP and were saved in the sql database and I did all of it, just by using Arduino YUN alone. No computer was attached for FTP connection as python scripts in the Arduino YUN were doing this task. Now, I think you have gotten better idea of capability of Arduino YUN.Arduino YUN also have built in Wifi, Ethernet, USB host and SD card slot.
One another unique feature of Arduino YUN is that you can upload Arduino sketches in it wirelessly without any cable connection, if your computer and Arduino YUN are connected with the same Wifi connection. Now, let's have a look at how to manually connect the Arduino YUN with available wifi connection, which should be your first step after buying an Arduino YUN.
Manually Connect Arduino YUN with Available Wifi Connection
Now I suppose that you have got your Arduino YUN. After getting the Arduino YUN, open your box and plug the mini usb cable into your Arduino YUN and the other side of cable in your computer. I am also assuming that you are plugging it first time with your computer via usb cable.
Note:
- You should download the Arduino software version 1.5.5 instead of 1.0.3 because Arduino sketches will be only compiled in 1.5.5 version which is specifically designed for Arduino YUN. In this tutorial, we will not use Arduino software.
- After plugging the Arduino YUN, open your Wireless Network connections and wait for the Arduino YUN to appear as shown in below figure. It will take some time to appear so be patient.
- In the above figure, you can see YUN connection is available, now the question is why is it available?? It is available because it is not connected to any wifi connection rite now and is acting as an access point. In other words, its just similar to a Wifi router having no wifi connection.
- So, what we need to do is to connect with this YUN so click on YUN wifi connection and hit connect, so you will get disconnected with previous connection and will get connected with Arduino YUN as shown in below figure.
- After connecting with Arduino YUN, yur computer has came in the same network with YUN.
- YUN has a built-in page saved in it from where you can quite easily configure its properties.
- So, opne your browser and write http://192.168.240.1/ and hit enter, its the current IP adress of Arduino YUN, so when you hit enter, a page similar to the below figure will open up asking for the password.
- The default password for this page is "arduino" so insert this password and click on Log in as in above figure.
- After log in, you will be directed to a page similar to one shown in below figure and you can see in the below figure different properties or values of Arduino YUN like current ip address, netmask etc.
- For Wifi, it is giving connected but for Ethernet, it is showing disconnected because we haven't yet connected with Ethernet.
- Now click on the Configure button shown in the above figure.
- After clicking on the configure button, you will be directed to the configuration panel of YUN shown in below figure and you can see there are many fields which are ready for configuring.
- First one is YUN NAME, which I have gven is TEP, you can give it any name which you can easily remember.
- Second field is password, the default password as we have seen before is "arduino" so if you want to change that password then add a new password here, which I dont want, so I have left it blank.
- Next is TIMEZONE, select our time zone from drop down list.
Note:
- If your project involves time log or date, then its very important to select your time zone so that you get your local date and time.
- Next are wireless parameters, where we are gonna select the wifi connection with which we want to connect our Arduino YUN.
- Select the SSID of your network with which you wanna connect, its a drop down list which will have all the currently available networks, so you just need to connect with the one you want and also give its password and hit Configure & Restart button.
- That's all, when you hit this button, the below screen will appear which will say Configuration Saved and the YUN is restarting.
- It will take around 10 to 15 minutes to get completely restarted meanwhile, what you need to do is to connect with that wifi connection with which you have connected your Arduino YUN. In my case its SALAM so I connected my computer with SALAM.
- After restart, now your Arduino YUN will be connected to the wifi connection and you won't see it in the local wireless connections as we have seen in the start.
- So now your Arduino YUN and computer both are connected with the same network, which in my case is SALAM.
- So, now open your Arduino 1.5.5 software and click on Tools and then Port and you can see below Aduino YUN is available and named as "TEP at 192.168.1.1" , where TEP is the name of Arduino YUN board which we have given in above steps and the ip address is the current ip address of Arduino YUN.
- By selecting this 4th option shown in above figure, you can burn any sketch in your Arduino YUN wirelessly without any cable unless your computer and YUN are connected with the same wifi connection.
- I don't think it was much difficult connecting YUN with the wifi connection, but quite interesting, isn't it?
- So, give it a try and have fun. I will post more tutorials on YUN soon so stay connected and have fun. :))
Sensorless Speed Estimation of Induction Motor in MATLAB
Buy This Project
Today I am going to show you Sensorless Speed Estimation of Induction Motor in MATLAB. In order to control and estimate the speed of Induction motor, there are many methods proposed by different scientists. The method I have selected in my project is Adaptive method. Using this method, I have controlled the speed of Induction motor using MATLAB software. Matlab software is used for simulation design. The simulation is designed in simulink and the MATLAB version used for designing this project is MATLAB 2010. It is also tested on MATLAB 2012 and 2013. All the details of this project are mentioned below.
If someone wants to buy this project then click on the button shown on right side. Its quite difficult to implement and is designed because of the efforts of our team that's why we haven't made it open source but we have placed a very small purchase amount because mostly it is asekBefore going into the details of Induction motor, let’s first have a look on the mathematical derivations. Few of the well-known methods are:
- Adaptive Method.
- Least-Squares Method.
- Non Linear Method.
So let's get started with Sensorless Speed Estimation of Induction Motor in MATLAB:
Mathematical Derivation - Sensorless Speed Estimation of Induction Motor
In order to apply the adaptive method on the Induction motor, there was a need to first design the induction motor on Simulink. For designing the Induction motor on Simulink, mathematical calculations were required. So, my first task was to derive the complete mathematical equations for all the variables of Induction motor.
The basic mathematical model also known as the a-b model (or two-phase equivalent model) of induction motor is given as:
Where,
- ? is the rotor angular velocity.
- ?Ra& ?Rb are the rotor magnetic fluxes.
- iSa and iSbare the stator currents.
- s = 1 – M2/ LR LSalso known as leakage parameter.
Adaptive Method Calculation
The approach used in this report is to consider the speed as an unknown constant parameter. The reason for choosing this parameter is that it changes slowly as compared to all the other electrical parameters and as it changes slowly so it can be controlled more effectively. The adaptive method techniques are applied on the speed parameter and thus estimated it. This adaptive method approach on speed parameter was first implemented by Shauder and are further enhanced and researched by Peng and Fukao. Using the last two equations of the system (1), I derived the below equations:
Where,
- ?maand ?mb are the magnetic fluxes and are thus known quantities.
Now take the second and third equations of system (1) and divide them by M / LR and then differentiate them w.r.t time and the below equations are obtained:
Where,
- d? / dt = 0 as we have already assumed in this approach that the speed will remain constant.
System (3) gives us the derivative of magnetic fluxes. In order to calculate the error dynamics induced in the system, we need to calculate the estimated values of these magnetic fluxes and then subtract them from the system (3). The estimated values of the magnetic fluxes are as follows:
Now the error dynamics in the system will be calculated by subtracting system (4) from the system (3), which is calculated as:
Now, according to the Lyapunov function,
V (ema, emb) = ½ (e2ma + e2mb)
Using the above equation and the values of ema and emb, we get:
Now after putting the value of ?and then applying Popov’s criteria, we get:
These are the mathematical equations used in the modeling of this system in MATLAB. In the next part, we will check the simulation designed in MATLAB using these set of equations and will study that model in detail.
Modeling in Simulink
The model designed in MATLAB is shown in the figure 1. This model is performing the simulation of motor moving in both the directions i.e. clockwise and anti-clockwise. It contains four main blocks, which are:
- 3-Phase Input Voltage with variable Frequency.
- Vabcto stationary frame conversion block.
- Motor system block.
- Speed estimation block.
All these four blocks are discussed below in detail:
Figure 1: Model Designed in MATLAB for Induction Motor
3-Phase Input Voltage with variable Frequency
This block, as the name depicts, is used for generating variable frequencies. In the start, the first model, I generated, was for fixed frequency of induction motor and was also showing just one direction of motor. So, I did few modifications in the model and added this block so that the motor could move both in positive and negative directions and can also move at different frequencies.
Figure 2 shows the parameter block for this block and from this block one can set the frequency of this motor quite easily. From this parameter block, one can set:
- Amplitude of the input signals.
- Phase difference between the input signals.
- Frequencies of these input signals.
By default, I have taken two frequencies, for which the motor will rotate during a cycle.
Reverse Direction of motor
In order to change the direction of the motor, I have used the phase change. When the voltage applied to the motor reverses its direction, the direction of the motor also reverses. For this simulation, the motor will rotate in clockwise direction when:
- Phase of Va = 0
- Phase of Vb = -2*pi/3
- Phase of Vc = -4*pi/3
And it will reverse the direction, when:
- Phase of Va = 0
- Phase of Vb = -4*pi/3
- Phase of Vc = -2*pi/3
i.e. Vb and Vc are changing their positions. In order to do so I added a phase change in this block and thus for the first 5 sec the motor will move in one direction and for the last 5 sec it will move in the opposite direction automatically.
Figure 2: Parameter Block
Vabcto Stationary Frame Conversion Block:
This block is separately shown in the figure 2. This block takes Vabc as an input and gives output in the form of V(alpha) and V(beta). This conversion is known as Clarke Transformation. This transformation is used in order to simplify the implementation of three phase systems as in Clarke Transformation, a reference signal is obtained. V (gamma) becomes zero in Clarke Transformation that’s why it becomes very easy to use.
Figure 3: Vabc to Stationary Frame Conversion Block
In Clarke Transformation, the relation between Vabc and V (alpha) and V (beta) is given as:
The above equation is implemented in the sub system named as Vabc to stationary frame in figure 2 and is shown in the below figure 3.
If we closely examine the figure 3, then it is shown that inputs coming are Va, Vb and Vc. After that the above equations are applied on these input signals and the output received is V (alpha) and V (beta). In simple words, figure 3 is implementation of Clarke Transformation.
- Va, Vb and Vc are simple sine waves with amplitude of 2300 and frequency of 50 rad/s.
- As it’s a three phase system so all these three signals have a phase difference of 120o.
Figure 4: Implementation of Clarke Transformation
- V (alpha) and V (beta) obtained after the Clarke Implementation are shown in the Figure 4.
Figure 5: Graphical Representation of V (alpha) & V (beta)
Motor System Block:
Motor system block is the practical implementation of set of equations shown in the system (1). It is the basic mathematical model of Induction motor shown in figure 5. It is taking V (alpha) and V (beta) as an input along with the load applied on Induction motor. In other words, I can say that this block is the actual Induction motor and I need to apply the adaptive method technique on this block in order to estimate and control its speed.
V (alpha) and V (beta) applied here are the same obtained in the Clarke Transformation explained in the previous section. Outputs of this function are the states which we will study in detail in the fourth section and the derivatives of currents Isa and Isb.
Figure 6: Induction Motor System Block
Let’s double click this motor system block and check the functions it’s calculating. The functions of this sub system are shown in the figure 6. As I told earlier, this block is the simulation of system (1), which is also shown below:
Figure 6: Motor Block Functions
As shown in the figure 6, motor block is implementing all the five equations of system (1), which are:
- First block in Figure 6 is calculating d?Ra/dtwhich is the equation 2 of the system 1.
- Second block in Figure 6 is calculating d?Rb/dtwhich is the equation 3 of the system 1.
- Third block in Figure 6 is calculating d? /dtwhich is the equation 1 of the system 1.
- Fourth block in Figure 6 is calculating usawhich is the equation 4 of the system 1.
- Fifth block in Figure 6 is calculating usbwhich is the equation 5 of the system 1.
All these functions are shown in the figures 7(a-e).
Figure 7a: Implementation of equation 2 of system 1
Figure 7b: Implementation of equation 3 of system 1
Figure 7c: Implementation of equation 1 of system 1
Figure 7d: Implementation of equation 4 of system 1
Figure 7e: Implementation of equation 5 of system 1
- Graphical representation of all these systems are shown in the figure 7(f, g, h, i).
Figure 7f: Graphical Representation of equation 2 of system 1
Figure 7g: Graphical Representation of equation 3 of system 1
Figure 7h: Graphical Representation of equation 4 of system 1
Figure 7i: Graphical Representation of equation 5 of system 1
After the implementation of all these equations, a complete model of Induction motor has been obtained. Now there’s a need to apply the technique of adaptive method on it so that the speed could be controlled without the help of sensor, which is done explained in detail in the next section.
In order to change the parameter of this system, I have added a parameter block in it shown in the below figure:
Speed Estimation Block:
Let's have a look at the Speed Estimation Block of Sensorless Speed Estimation of Induction Motor in MATLAB. Speed Estimation is the place where adaptive method technique is applied to estimate the speed of Induction motor. This block is actually implementing the system (3) and system (4) and thus calculating the real speed and the estimated speed of the Induction motor respectively. After the calculation of these speeds, it is further calculating the error dynamics by subtracting the estimated speed from the real speed.
Figure 8: Speed Estimation Block
Speed Estimation block is shown in the figure 8. Inputs coming to the speed estimation are the same obtained in the first and second block i.e. V (alpha), V (beta), Isa, Isb, dIsa/dt and dIsb/dt. The functions implemented by this subsystem are shown in the figure 9.
Figure 9: Functions Implemented by System Estimation Block
System (3) and system (4) are implemented in the figure 9, which are as follows:
- First green block in the figure 9 is implementing the equation 2 of the system 3.
- Second blue block in the figure 9 is implementing equation 1 of the system 3.
Thus the outputs of these two blocks will give us the real speed values.
- Third green block in the figure 9 is implementing the equation 2 of the system 4.
- Fourth pink block of the figure 9 is implementing the equation 1 of the system 4.
So, the output of these two blocks will give us the value of estimated speed. The internal functions of all these four blocks are shown in figures 10a, 10b, 10c and 10d respectively.
Figure 10a: Implementation of Equation 2 of System 3.
Figure 10b: Implementation of Equation 1 of System 3.
Figure 10c: Implementation of Equation 2 of System 4.
Figure 10d: Implementation of Equation 1 of System 4.
After the calculation of all the four values, the speed estimator block then implemented the system (5), which is:
Implementation of this system 5 is separately shown in the figure 11, which finally gives us the value of estimated speed.
Figure 11: Implementation of System (5)
Graph of both the estimated speed and the actual speed is shown in the figure 12.
Figure 12: Graph of Estimated Speed and Actual Speed
Conclusion:
Let's have a look at the conclusion of Sensorless Speed Estimation of Induction Motor in MATLAB. Figure 12 shows both the actual and estimated speed induction motor. In the start, the motor is moving at the speed of around 25 rpm, after that the speed is increased to 50 rpm, and the motor starts to rotate in the opposite direction that’s why the graph shows the negative value. Now, it’s moving at 50 rpm in the opposite direction and lastly, it is moving at 25 rpm in the opposite direction. Figure 13 shows the graph for estimated errors. It is quite obvious from the error graph that whenever the speed of the motor fluctuates the error goes quite high. In other words, the acceleration produced in the motor causes the error to increase while the error remains zero when the motor is moving at constant speed, regardless of direction.
Figure 13: Estimated Error Dynamics
So, that's all for today. I hope you have enjoyed Sensorless Speed Estimation of Induction Motor in MATLAB. Will meet you guys in the next tutorial. Till then take care and have fun !!! :)
PCB Designing in Proteus ARES
Hello friends, today's the last post of this Proteus tutorial. I have tried my best to explain everything but knowledge is limitless so explore this software, play with it and you will know many new things. Today's topic is about the PCB designing in Proteus. When you install Proteus, you have seen that along with ISIS there's also another package named as Proteus ARES. This Proteus ARES is used for PCB designing. You should also check the Arduino UNO PCB Design for Proteus ARES.
In order to design the PCB in Proteus ARES, first you need to make the circuit of that PCB in Proteus ISIS. You can also make PCB directly but I recommend that use Proteus ISIS first, its quite the easy approach as you don't need to do anything in it and the software intelligence helps you throughout the designing. Here's the list of Top 10 PCB Design Software. So let's get started with PCB Designing in Proteus ARES:
PCB Designing in Proteus ARES
- As in this tutorial, I just want to give you an idea of How to design PCB that's why I haven't taken difficult circuit, just a simple PIC basic circuit.
- First design your circuit in Proteus ISIS as shown in below figure:
Components Used:
These components are used while designing this simulation:
Working Principle:
- After you got sure that your circuit is perfect and ready for designing, then click on the Tools and then Netlist to ARES as shown below:
- After clicking, Proteus ARES will be opened.
- Now in Proteus ARES, select the block option from left toolbar and also make sure that you selected Board Edge in the below drop down menu as shown in below figure:
- Now make a rectangular block in the workspace, this block is actually the boundary of your PCB.
- You can set its proper dimensions and can also re-size it manually using the mouse.
- Now select the component option from the left toolbar, it will show all the components used in your circuit.
- Place all these components in the workspace one by one as shown below. These green lines shown in the below image is actually the software intelligence.
- Using the circuit, it gives us the routes automatically and we don't need to panic any more just need to follow these route, if we are doing manually routing.
- Now there are two ways of adding routing, first method is auto routing.
- To do auto routing, click on Tools and then Auto Router and a property box will open where you can set many different option for routing like the width of route and the PCB layers etc.
- After selecting your properties just click on Begin Routing.
- And then a magic will start and you PCB will become ready as shown in below figure:
- Second method is manual routing, you can do manual routing by clicking the edges just like we connect wires in Proteus ISIS. For manual routing select the option shown in below figure and start routing.
That's it. I don't think its much difficult. I am gonna stop this tutorial here. I have tried my best to share my knowledge about Proteus. IF you guys having any problem in part of this tutorial, feel free to contact me. Take care.
Component Designing in Proteus ISIS
Hello friends, hope you all are having fun in your life.
Today's tutorial is about the component designing in Proteus ISIS. This tutorial actually deals with the presentation of your project. Usually when students give presentation of their projects, then it is asked that add the circuit diagram of their project. Now when students open Proteus in order to design their circuit, they found out that the components they have used in their project are not available in the Proteus Directory. Now what to do ?
In that case, there's a need to design your own component in Proteus and place it in the circuit. Although, this new designed component won't work as the real component but for presenting the circuit, it will be enough. ofr example, we don't have Arduino boards in Proteus software. so, I have designed some of the Arduino baords myself for Proteus which you can download from
Arduino Library for Proteus.
Similarly, it usually happens to me during my freelancing work to design some circuit and when I don't find the required component in the Proteus library then I simply design it on my own and then create its PCB. We will check the PCB designing of such components in the coming posts of this tutorial. So, now let's get started with component designing in Proteus ISIS.
Component Designing in Proteus ISIS
- Now I am going to design a simple component having 4 pins.
- First of all select the 2D Graphics Box Mode as shown in the below figure.
- Now click on the workspace and drag the cursor to create a box, as shown in the below figure.
- We have created the body of our component, now there's a need to add pins in it.
- For this, click on the Device Pins Mode as shown in the below figure and click on the workspace.
- It will add a small pin, attach this pin with the box as I did in the below figure.
Note:
- The pin has a small green bubble on it. Make sure that this end is not connected with the box as this bubble end is for the wire.
- I have added four pins with the box. Now there's a need to name these pins. For this purpose, double click any of the attached pin and the properties box will open up as shown in the below figure.
- Mention the Pin Name and the Default Pin Number, it will appear on the component and then click on Next.
- When you click Next, it will ask for the same things for the second pin and so on.
- When you fill these info for all the four pins then click OK.
- Now when you click the ok button, your component will now look as shown in the below figure.
- I have given my pins the names as Vcc, GND, Output, Signal.
- We have completed all the info of our product, now there's a need to add this component in our library.
- For this purpose, select the whole component and then right click and select Make Device.
- When you click on this option a new dialog box will open up as shown in below figure.
- In this dialog box, you just need to give info of your new component so that you can search it easily in your Proteus library.
- Just fill the Device Name in it and click Next. I have given the name Test Device to my component.
- Now click Next and go on clicking Next, unless you reach at the below page.
- Here you need to place your component in the category. Choose the appropriate category for your product and click on OK.
- That's it. Now your component has been added to the library. Open your part list and search for the component like in my case I search for Test Device and the below component appeared in my list.
That's all for today. If you have any questions regarding this tutorial, ask in comments and I will reply them. Take care.
How To Use Oscilloscope in Proteus ISIS
Hello friends, today I am going to post the next lecture of Proteus Tutorial. I am receiving quite a positive response about this Proteus tutorial. In the previous post, we have seen
How to use Virtual Terminal in Proteus and today I am going to explain How to use Oscilloscope in Proteus ISIS. This oscilloscope is just the same which you have seen in your electronic or electrical labs. Oscilloscope is basically used to monitor signals or waveforms. Particularly when you are not much aware of the circuit and you need a little debugging then you use oscilloscope.
In oscilloscopes, we can visualize the electrical properties of waveforms, like we can check whats the frequency of electrical signal, what's its voltage or current. Digital oscilloscopes have vast range of features in it like RMS value calculation etc. So, in short when you want to visualize or research your available signal then oscilloscope is the first and right most option for you. In today's tutorial, first of all, I am gonna design a simple Pure sine wave circuit and then we will visualize its properties using oscilloscope in Proteus ISIS.
Pure Sine Wave Circuit Design
- First of all, design a circuit as shown in the below figure.
- This circuit is a simple pure sine wave inverter which is inverting the DC Signal into AC signal.
- I have also encircled the components so first of all, find these components in the Proteus database and then design the circuit as shown in the figure. (Right click on the image and then open it in new tab to get the clear view).
- When I was designing my Pure Sine Wave Inverter Simulation in Proteus then I have to use oscilloscope quite a lot.
How to use Oscilloscope in Proteus ISIS ???
- Now in order to add the oscilloscope in the circuit, first click on the Virtual Instruments Mode as shown in the below figure.
- In that mode the first option will be the Oscilloscope which I highlighted as Click # 2 in the below figure.
- Now drag that oscilloscope and place it in the workspace, as you can see below this component has total four legs means you can view total four different types of signals using this oscilloscope and cal also compare them, if you need to.
- Now what I want to check in my circuit is, whether I am getting the pure sine wave at the output or not.
- So in order to check that I have attached the two ends of the bulb which is acting as a load with the two probes of oscilloscope i.e A & B as shown in the below figure.
How to Monitor Oscilloscope
- Now in order to monitor the oscilloscope, run / play the Proteus circuit and then double click on the oscilloscope and a new window will open up as shown in the below figure.
- As you can see in the below image there are total two curves are showing i.e. Channel A & B.
- Now, if you check the right side of the above figure, you can see there are total four channels, each channel represent each probe.
- Like we have attached our curves with A & B now I can change settings of A & B channel and the output curves will be changed.
- Play with this tool and you will how easy it is to use. Change the position of circular know and the amplitude unit will be changed, then change the linear know of each channel and the dc offset will be added in the curve.
Note:
- This Proteus file has been emailed to all the subscribed members, if someone needs it kindly Subscribe to our Newsletter and it will be emailed to you.
Video Tutorial
- Here's the complete video tutorial of above discussion, better for understanding.
That's all for today, hope you guys have enjoyed today's tutorial nad have got the clear idea of How to use oscilloscope in Proteus ISIS. In the coming tutorial, I have explained
How to Design a DC Power Supply in Proteus ISIS. So, let's meet in the coming tutorial. :)
How To Use Virtual Terminal in Proteus ISIS
Hello everyone, I hope you all are doing great. In today's tutorial, we will have a look at How to use
Virtual Terminal in Proteus ISIS. It's our 5th tutorial in Proteus Series. I will first explain what is virtual terminal and then we will have a look at its uses and performance in Proteus ISIS.
Virtual Terminal is an important tool available in Proteus and it comes quite in handy while working on serial modules i.e. GSM, GPS, XBee etc. So, let's get started with Virtual Terminal in Proteus.
What is Virtual Terminal ?
Virtual Terminal is a tool in Proteus, which is used to view data coming from
Serial Port (DB9) and also used to send the data to Serial Port. In windows XP, there's a built in tool named
Hyper Terminal, which is also used for the same purpose but in windows 7 there's no such tool, so for windows 7 users this virtual terminal is quite a great comfort. If you guys don't know about serial port then I would suggest you to read this tutorial to get better idea of serial port:
I have posted many tutorials on my blog in which I have communicated over Serial port using different software. For example, you can check this
Serial communication in MATLAB and can also have a look at
Serial Communication in Visual Studio 2010. As serial communication is too common, so almost every microcontroller supports Serial communication. Arduino UNO has builtin single serial port at its pins 0 and 1, while Arduino Mega 2560 has built in four Serial ports in it. Similarly,
PIC Microcontroller also supports Serial port and it is also available in
8051 Microcontroller.
Uses of Virtual Terminal
Virtual Terminal in Proteus, as I explained above, is used to send or receive data to or from a serial port. Serial port is a 9 pin port which is mostly find on the computers and is used in
Embedded System Projects for data communication. Normally in student projects, data is sent from hardware to computer via serial port and then user design some application on their computer to view that data in some represent-able form.
Now, in projects there are some testing steps which are quite helpful, if we use them properly, and these testing steps require some tools in order to test the process. Like, suppose some student have designed the hardware to send the data to the computer and have also design its application to receive it and now when he tests it he didn't receive any data. At that point student got tensed and don't know where's the error so at that point there's may be some error in the hardware or may be in the software.
Now, in order to be sure he need to test both of them separately and here is the point where virtual terminal is used. First connect your hardware with the computer and then run the hardware and check whether you are receiving data on the virtual terminal or not. If you are receiving it, means your hardware is okay and the problem is in software side and if you are not means your hardware is not so good.
Whenever I start working on some projects, I always make sure that I am going in right direction like if I have to made this project then after completing my hardware, I will first check it via this virtual terminal and once I got sure that my hardware is okay then I will move to the software part. If you are gonna design the hardware then I think you must check
Serial communication with 8051 Microcontroller, which is also designed in Proteus ISIS software and the data is displayed using the same virtual terminal.
There are also many other applications of this terminal like suppose you wanna design some circuit in Proteus which involves serial port then you can add this terminal on your circuit and can test it before going to the hardware, which we will shortly see below. So, now let's get started with Virtual Terminal in Proteus.
How to Use Virtual Terminal in Proteus ISIS?
- First of all open the Proteus ISIS and click on the P button to search for the components, as we seen in previous tutorials.
- Now in the search box type "COMPIM" , when you search this a result will show up as shown in the below figure:
- After Selecting this, click OK to add this component in the database.
- COMPIM is the serial port in Proteus and using its properties we can assign any COM pin of our computer to it and it will behave like that pin. We will change the properties shortly.
- Now, click on the Virtual Instrument Mode and then on the Virtual Terminal as shown in the below figure and add it in the Proteus workspace.
- Now join the TXD pin of COMPIM with the TXD pin of Virtual Terminal and RXD with RXD as shown in the figure below:
- Now, double click on the COMPIM to open the Properties menu and set the properties as shown below:
- I have selected COM1 and my baud rate is 9600, you can set it whatever you want like if you are using the COM3 then set the port to COM3 and baud rate of your own choice.
- Similarly open the properties of the virtual terminal and make sure that the baud rate is same in both the cases.
- Now connect your hardware with the computer and play the simulation. Again make sure that the port which you have selected for the COMPIM is same port with which you have attached your hardware.
- After you play the simulation a black window will open up which will show the data coming from your hardware to the COM1 pin as shown below:
- This black box is actually the Virtual Terminal which is showing data coming from my hardware.
- If you play the simulation and this Virtual Terminal doesn't pop up then right click on the Virtual Terminal Component and then click on Virtual Terminal which will be at the end in the options and this black window will open up.
I think you guys have got much of the idea of this Virtual Terminal in Proteus ISIS. If you have any problem anywhere, ask in comments and also subscribe to our newsletter via email to get these amazing tutorials right into your mailbox. In the next tutorial, I have explained
How to use Oscilloscope in Proteus ISIS. Thanks, take care.
Knowing About Components Available in Proteus ISIS
Hello friends, hope you all are fine and enjoying good health. In this tutorial, my actual plan was to cover the mostly used components in Proteus like to give users an overview of component selection as there are many components in Proteus which are quite hidden and hence quite difficult to find. But, now I have changed my mind as I have received a lot of emails regarding this tutorial in which mostly have asked to elaborate this tutorial and explain other circuits as well just like the LCD one. So after that I thought of making separate tutorial for many different circuits.
These are the parts in which I have divided this tutorial and as you can see I have added the news topics as well which are requested by the readers. If you guys need any tutorial then let me know via
Contact Form, and I will try to post that as well.
So, now in this tutorial, we are gonna see different circuits designed in Proteus. I will explain them step by step so that the users get the better idea of them and also there are many different components in Proteus which are very handy but users mostly don't know about them and I will also explain them to you. I have divided this part of the tutorial into following different parts:
- How To Use Virtual Terminal in Proteus ISIS.
In this tutorial, I will design a simple serial port circuit and then get the data on the Virtual Terminal. Virtual Terminal is quite same as the Hyper Terminal in the windows XP. It shows the data coming from serial port and also sends the data to the serial port.
- How To use Oscilloscope in Proteus ISIS.
Oscilloscope is great functionality in Proteus and it works as same as the oscilloscope you have seen in your electronics lab. It shows waveforms and using it you can make variations in your model and can get the desired output.
- DC Motor Drive Circuit in Proteus ISIS.
In this tutorial, we will check the DC Motor circuit with microcontroller and will drive it.
- Stepper Motor Circuit in Proteus ISIS.
In this tutorial, we will check the Stepper Motor circuit with microcontroller and will drive it.
- Servo Motor Circuit Design in Proteus ISIS.
In this tutorial, we will check the Servo Motor circuit with microcontroller and will drive it.
- How to use Serial Registers in Proteus ISIS.
In this tutorial, we will use serial registers with microcontroller. Microcontrollers have limited I/O pins but what if you need 50 pins, which happens mostly in LEDs, then there's a need to increase the pins of microcontroller and for that purpose we use serial registers.
That's what I have planned so far, I may add few more tutorial in it depends on the suggestions os keep inform me with your suggestions. Thanks.
Circuit Designing of LCD with PIC
Hello friends, hope you all are fine and enjoying good health. Today I am posting the next part of Proteus tutorial which is Interfacing of LCD with PIC Microcontroller. . In the previous post of this tutorial, we have seen the basics of Proteus and discussed various functions of Proteus ISIS. If you are new to Proteus then I would recommend that before starting this tutorial, you should first read the first part so that you get the better idea of Proteus as I wont go in detail in today's post. Today, we will first design a circuit of LCD with PIC on Proteus ISIS which includes
PIC Microcontroller and then we will see how to burn the microcontroller in Proteus and at the end we will run our circuit and will display some text on the LCD. It will be quite a fun so let's start.
If anyone having any problem at any point, ask in comments and I will try my best to resolve them. So, let's get started with Interfacing of LCD with PIC Microcontroller.
Circuit Designing in Proteus
- First of all, open the Proteus ISIS software.
- In the start, it will look exactly the same as in below image.
- Now click on button P as shown in below figure.
- When you click this button a new window will pop up as shown in below figure.
- This is the place where we search our components, like as I want 7805 so I searched for this component and the Proteus has given me the related components.
- Once you get your desired component, simply double click on it and it will be added in your database so that you can use them.
- The below image shows the components which we are gonna use in this project, so simply search for all the components and then double click on them and finally you will get all the components as shown below:
- Now place these components in the Proteus workspace and connect them.
- Design exactly the same circuit as shown in the below figure for interfacing of LCD with PIC Microcontroller.
Now our circuit in
Proteus is ready to use, the next step is to write a code for the PIC Microcontroller 18F452 and then burn it into the Proteus and check its working.
Code of LCD with PIC18F452
- There are different compilers to write the code for PIC Microcontroller. Here I am using MikroC Pro for PIC. You can get it easily from the official site of MikroC.
- I am not going in the details of coding as its beyond the scope of this tutorial, but still I am posting the code.
- So now create a new project in the MikroC Pro For PIC and copy the below code and paste it in the project and compile.
- When you compile the project, it will create a .hex file in the same folder where you have saved this project. We will use this hex file shortly.
// LCD module connections
sbit LCD_RS at RD2_bit;
sbit LCD_EN at RD3_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D7 at RD7_bit;
sbit LCD_RS_Direction at TRISD2_bit;
sbit LCD_EN_Direction at TRISD3_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;
// End LCD module connections
char txt1[] = "www.TheEngineeri";
char txt2[] = "ngProjects.com";
char i; // Loop variable
void Move_Delay() { // Function used for text moving
Delay_ms(500); // You can change the moving speed here
}
void main(){
Lcd_Init(); // Initialize LCD
Lcd_Cmd(_LCD_CURSOR_OFF); // LCD Cursor Off
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Out(1,1,txt1); // Write text in first row
Lcd_Out(2,1,txt2); // Write text in second row
Delay_ms(2000);
while(1);
}
Burn the Code in PIC Microcontroller in Proteus ISIS
- Now we have the hex file, we need to burn this hex file in the microcontroller in Proteus.
- So, double click on the Microcontroller in Proteus and it will open up the properties menu of PIC microcontroller.
- Now click, as shown in the below figure, and browse for the hex file and click OK.
- We need to add this hex file in Proteus here and also select the oscillation frequency which I have selected 16MHz.
Note: Make sure that the oscillation frequency remain same both in the MikroC and the Proteus.
- After adding the file in the Proteus now click OK and play the simulation, ifeverything goes fine, you will get the results as shown in below image.
Note:
- Proteus ISIS simulation file and the .hex file has been emailed to all the subscribed members. If anyone need it, subscribe to our newsletter via email and it will be emailed to you as well.
That's all for today, I have tried my best to explain everything on
Interfacing of LCD with PIC Microcontroller, but still if someone having problem ask in comments and I will try to resolve. In the next part, we will discuss various components of Proteus which are commonly used like motors, serial port, hyper terminal etc. So stay tuned and also subscribe us via email so that you get all the tutorials straight into your mail box. Have fun. Take care.
Complete Guide on Proteus ISIS & ARES
Hello friends, I hope you all are fine and having fun. In today's tutorial, I will provide you a
Complete Guide on Proteus ISIS & ARES. I will start from very basics & will gradually move towards complex projects. I have already shared a lot of tutorials on Proteus software on my blog, I will add their links in today's tutorial as well, in the projects section.
If you guys have any problem anywhere, ask in comments and I will try my best to resolve your issues and also subscribe to our newsletter so that you get these burning tutorials rite in your mail box. I will continuously update this list of tutorials so that we have all tutorials at one place.
Course Content of Proteus Guide
I have divided this tutorial in few sections and you have to follow them in sequence and at the end of this course, I hope you will be able to create any simulation in Proteus ISIS & also design its PCB model in Proteus ARES. These sections are as follows:
- In the 1st section of this course, we will have a look at few basic concepts in Proteus, which are necessary for a beginner to understand.
- In the 2nd section, we will discuss various components available in Proteus. I know there's countless components in its database and we can't discuss them all but we will have a look at most commonly used components i.e. DC motor, servo motor, serial port, etc. We will design some simple electronics circuits in Proteus to get better understanding.
- In the 3rd section, we will have a look at How to simulate different Microcontrollers in Proteus ISIS, and we will also simulate different sensors in it. Moreover, I will guide you How to Install 3rd Party Proteus Libraries.
- In the 4th section, we will first have a detailed introduction to Proteus ARES & then we will design different PCB boards in it, both single layered and multi-layered.
- In the 5th section, we will see how to design a component in Proteus along with its PCB footprint, if it's not already in Proteus database. Its important, especially when you need to design a PCB in Proteus.
- In the 6th section, we will simulate different final year complex projects.
Complete Guide on Proteus ISIS & ARES
- I have created above mentioned sections and added respective links in sequence.
Section 1: Basics of Proteus ISIS
So, let's get started with Basics of Proteus ISIS, these are very basic tutorials, so if you have worked on Proteus before, then you can skip this section. Although, I would recommend you to read them once:
Section 2: Components Available in Proteus ISIS
Proteus has a wide range of components in its database. Using these components you can design almost any kind of circuit and can test and debug it. Below tutorials mention few of these components, which are most commonly used while working on Proteus.
Components Libraries for Proteus
Proteus has a wide range of components available in its database. But it happens quite a lot that you search for some component in Proteus but you can't find it in Proteus database. For such cases, Proteus has given a method using which you can design your component in Proteus and can add all of its features in it. Its quite a lengthy process and needs a lot of effort as it involves creation of DLL files using C++ and VSM. We have designed few components libraries for Proteus, using which you can simulate that component or module in Proteus. Here's the list:
Arduino Projects in Proteus
Arduino is most widely used Microcontroller board these days, which is famous for its flexibilty and ease of use. Arduino board is not available in Proteus but we have provided with Arduino libraries using which you can quite easily use Arduino in Proteus and can test your circuits in Proteus before implementing them in hardware. Below are the tutorials and projects in which we have used Arduino in Proteus.
PIC Microcontroller Projects in Proteus
PIC Microcontroller is another microcontroller which is used by engineers in engineering projects. This microcontroller is available in Proteus so we have designed few projects on it which are mentioned below:
8051 Microcontroller Projects in Proteus
8051 Microcontroller is another microcontroller series which is quite popular and is used in engineering projects quite a lot. 8051 Microcontrollers are also available in Proteus and most normally used 8051 Microcontrollers are AT89C51 and AT89C52. I have shared many projects on 8051 Microcontroller, which are as follows:
Sensors simulation in Proteus
[dt_gap height="7"]
Proteus has a wide range of sensors available in its database. We have designed simulations of few of these sensors which are mentioned below. Ultrasonic sensor is not available in Proteus so we have provided its library so thaat students can easily interface and test it in Proteus. These sensors' simulations are mentioned below:
555 Timer Projects in Proteus
555 Timer is known as the king of electronics projects after microcontrollers. 555 timer is used in a lot of electronics projects where you need to ddo control or generate some timing or PWM pulse. 555 Timer is available in Proteus and have designed a lot of tutorials on it, which are mentioned below:
PCB Designing Tutorials in Proteus ARES
Proteus not only provide the capability of circuit designing and testing but also provide the facility of designing a PCB. Proteus comes with two packages one is named as Proteus ISIS in which we design our circuits and the other one is Proteus ARES which is used for PCB designing. Here we have post tutorials on How to design PCBs in Proteus.
So these are the tutorial on which I have written. If you guys stuck at any point, feel free to ask in comments and I will try my best to satisfy you as much as I can. Moreover subscribe to our mailing list so that you get these tutorials rite into your mail box. Stay blessed & take care.