Hello guys, in the last post I have explained the Basics of Inverters along with its types and also the inverters topology in other words working of inverters, then we discussed the Major Components of Inverters. Now in this post I am gonna explain the pure sine wave inverter and how to create it. I have used AVR microcontroller int his project. The reason I am using random microcontrollers is that so you guys get a taste of each one. Before starting on sine wave inverter read this article again and again as I have also mentioned the problem i got while making it. You should also read the Modified Sine Wave Design with Code.
I have divided this tutorial into four parts which are shown below. This is a step by step guide to design and build an inverter and I hope at the end of this tutorial you guys will be able to design your own inverter. I tried my best to keep it simple but still if you guys got stuck at any point ask in comments and I will remove your query. This project is designed by our team and they put real effort in getting this done so that's why we have placed a small fee on its complete description. You can buy the detailed description of this project along with the complete code and circuit diagram, by clicking on the below button:
Buy This Project Note:#include <stdlib.h> #include <avr/io.h> #include <util/delay.h> #include <avr/interrupt.h> #include <avr/sleep.h> #include <math.h> #include <stdio.h> 0x80, 0x83, 0x86, 0x89, 0x8C, 0x90, 0x93, 0x96, 0x99, 0x9C, 0x9F, 0xA2, 0xA5, 0xA8, 0xAB, 0xAE, 0xB1, 0xB3, 0xB6, 0xB9, 0xBC, 0xBF, 0xC1, 0xC4, 0xC7, 0xC9, 0xCC, 0xCE, 0xD1, 0xD3, 0xD5, 0xD8, 0xDA, 0xDC, 0xDE, 0xE0, 0xE2, 0xE4, 0xE6, 0xE8, 0xEA, 0xEB, 0xED, 0xEF, 0xF0, 0xF1, 0xF3, 0xF4, 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFA, 0xFB, 0xFC, 0xFD, 0xFD, 0xFE, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0xFE, 0xFD, 0xFD, 0xFC, 0xFB, 0xFA, 0xFA, 0xF9, 0xF8, 0xF6, 0xF5, 0xF4, 0xF3, 0xF1, 0xF0, 0xEF, 0xED, 0xEB, 0xEA, 0xE8, 0xE6, 0xE4, 0xE2, 0xE0, 0xDE, 0xDC, 0xDA, 0xD8, 0xD5, 0xD3, 0xD1, 0xCE, 0xCC, 0xC9, 0xC7, 0xC4, 0xC1, 0xBF, 0xBC, 0xB9, 0xB6, 0xB3, 0xB1, 0xAE, 0xAB, 0xA8, 0xA5, 0xA2, 0x9F, 0x9C, 0x99, 0x96, 0x93, 0x90, 0x8C, 0x89, 0x86, 0x83, 0x80, 0x7D, 0x7A, 0x77, 0x74, 0x70, 0x6D, 0x6A, 0x67, 0x64, 0x61, 0x5E, 0x5B, 0x58, 0x55, 0x52, 0x4F, 0x4D, 0x4A, 0x47, 0x44, 0x41, 0x3F, 0x3C, 0x39, 0x37, 0x34, 0x32, 0x2F, 0x2D, 0x2B, 0x28, 0x26, 0x24, 0x22, 0x20, 0x1E, 0x1C, 0x1A, 0x18, 0x16, 0x15, 0x13, 0x11, 0x10, 0x0F, 0x0D, 0x0C, 0x0B, 0x0A, 0x08, 0x07, 0x06, 0x06, 0x05, 0x04, 0x03, 0x03, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x0A, 0x0B, 0x0C, 0x0D, 0x0F, 0x10, 0x11, 0x13, 0x15, 0x16, 0x18, 0x1A, 0x1C, 0x1E, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2B, 0x2D, 0x2F, 0x32, 0x34, 0x37, 0x39, 0x3C, 0x3F, 0x41, 0x44, 0x47, 0x4A, 0x4D, 0x4F, 0x52, 0x55, 0x58, 0x5B, 0x5E, 0x61, 0x64, 0x67, 0x6A, 0x6D, 0x70, 0x74, 0x77, 0x7A, 0x7D void InitSinTable() { Page | 42 //sin period is 2*Pi const float step = (2*M_PI)/(float)256; float s; float zero = 128.0; //in radians for(int i=0;i<256;i++) { s = sin( i * step ); //calculate OCR value (in range 0-255, timer0 is 8 bit) wave[i] = (uint8_t) round(zero + (s*127.0)); } } void InitPWM() { /* TCCR0 - Timer Counter Control Register (TIMER0) ----------------------------------------------- BITS DESCRIPTION NO: NAME DESCRIPTION -------------------------- BIT 7 : FOC0 Force Output Compare BIT 6: WGM00 Wave form generartion mode [SET to 1] BIT 5: COM01 Compare Output Mode [SET to 1] BIT 4: COM00 Compare Output Mode [SET to 0] BIT 3: WGM01 Wave form generation mode [SET to 1] BIT 2: CS02 Clock Select [SET to 0] BIT 1: CS01 Clock Select [SET to 0] BIT 0: CS00 Clock Select [SET to 1] Timer Clock = CPU Clock (No Pre-scaling) Mode = Fast PWM PWM Output = Non Inverted */ TCCR0|=(1<<WGM00)|(1<<WGM01)|(1<<COM01)|(1<<CS00); TIMSK|=(1<<TOIE0); //Set OC0 PIN as output. It is PB3 on ATmega16 ATmega32 DDRB|=(1<<PB3); } ISR(TIMER0_OVF_vect) { OCR0 = wave[sample]; sample++; if( sample >= 255 ) sample = 0; }
No. | Proteus Tutorials |
---|---|
Give Your Suggestions !!! | |
1. | Basics of Inverters With Topology |
2. | Major Components of Inverter |
3. | Pure Sine Wave Inverter Design With Code |
4. | Modified Sine Wave Design With Code |
Hello guys, in the last post I have explained the basics of inverters along with its types and also the inverters topology in other words working of inverters. Now in this post I am gonna explain the major components required for making an inverter. This post is not giving you any technical knowledge about inverter but to workout with inverters its necessary to go through its basic components.
I have divided this tutorial into four parts which are shown below. This is a step by step guide to design and build an inverter and I hope at the end of this tutorial you guys will be able to design your own inverter. I tried my best to keep it simple but still if you guys got stuck at any point ask in comments and I will remove your query.
No. | Proteus Tutorials |
---|---|
Give Your Suggestions !!! | |
1. | Basics of Inverter With Topology |
2. | Major Components of Inverters |
3. | Pure Sine Wave Inverter Design With Code |
4. | Modified Sine Wave Design With Code |
Hello friends, hope you all are fine and enjoying good health. I have recently posted a project of my friend named as Design & Development of Hybrid Renewable Energy System, which is a pure electrical project.After that project, I thought of sharing some common electrical modules.
So first of all, I am gonna explain all about inverters. I have divided this tutorial into four parts which are shown in the table. This is a step by step guide to design and build an inverter and I hope at the end of this tutorial you guys will be able to design your own inverter. I tried my best to keep it simple but still if you guys got stuck at any point ask in comments and I will solve your query.
Hello friends, I hope you all are doing great. In today's tutorial, I am going to explain the Relay Interfacing with Microcontroller using ULN2003A. In the previous lecture, we have discussed the detailed Introduction to Relay along with its working. Now we are going to practically interface the relay with a microcontroller to design an automatic switch. Relay is a key component in almost every electronic circuit. It can be used as a switch and can also be used as a voltage regulator.
The microcontroller I am going to use here is PIC18F4552 but you can use any other Microcontroller. You just need to change the syntax of coding but the logic will remain the same. Here, I am using ULN2003A to control the relay and from this relay, we can control anything.
So, let's get started:
Where To Buy? | ||||
---|---|---|---|---|
No. | Components | Distributor | Link To Buy | |
1 | LEDs | Amazon | Buy Now | |
2 | Relay | Amazon | Buy Now | |
3 | Resistor | Amazon | Buy Now | |
4 | ULN2003 | Amazon | Buy Now |
That's all for today guys. If you guys have any problem in any part of this tutorial ask in the comments, and I will reply to your queries. Till next tutorial ALLAH HAFIZ .... :))
Hello everyone! I hope you will be fine and having fun. Today, I am going to give a detailed Introduction to Relay. In this tutorial, we will learn the basics of relays, the working principle of relays, the types of relays and their applications in detail.
A relay is a simple automatic switch that opens and closes the circuit(either electronically or mechanically) based on its input signal. A relay is an electromechanical switch that uses electromagnetism from a small current or voltage to switch higher current or voltage for different appliances. When a relay is in a Normally Open (NO) state, no current passes through it and when the relay is energized, the current starts to flow and we can say the relay is in a Normally Closed state. You should also have a look at Relay Interfacing with Microcontroller using ULN2003.
A Relay is used to control high-power devices with small current devices i.e. microcontrollers. When a small voltage is applied(normally from microcontrollers) to the input coil of a relay, it gets energized and the relay output changes its position from NO to NC. Relays are also used for protection purposes i.e. overload, reverse, under current, over current etc.
Now let's have a detailed overview of What is Relay???
Relay is an automatic switch, which opens and closes the circuit electronically. It uses electromagnetism from small voltage to provide higher voltages. It has two basic contacts i.e. NO (Normally Open) and NC (Normally Closed). When input voltage is applied across its coil, NC changes to NO and NO changes to NC. When input voltage is supplied, we say that the relay is energized. It has several features e.g. it can be used for switching smaller voltage to higher. But it can not be used in power-consuming devices. It has a wide range of applications. It can be used in home appliances, electronic circuits where there is a need of protection, robotics for controlling its motors for the proper motion and many more. A basic relay is given in the figure shown below.
Today we will make a software on Microsoft Visual Basic 2010 in which we will send data through the serial port in VB 2010. In this software we will send the data and also receive it. Simply follow all the given steps carefully and you can easily interface the Serial Port in VB 2010, its a fully working project with code so don't do any mistake. Moreover check these two complete tutorials on Microsoft Visual Studio 2010 as well, these are quite fascinating.
First of all download the Microsoft Visual Basic 2010. The installer can be freely downloaded from Microsoft. After installing the software follow these simple steps. So ,let's get started with How to use Serial Port in VB 2010:
'Code Starts here .... 'Import Systems which we are gonna use in our code Imports System Imports System.ComponentModel Imports System.Threading Imports System.IO.Ports 'frmMain is the name of our form .... 'Here starts our main form code ..... Public Class frmMain Dim myPort As Array Delegate Sub SetTextCallback(ByVal [text] As String) 'Page Load Code Starts Here.... Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load myPort = IO.Ports.SerialPort.GetPortNames() cmbBaud.Items.Add(9600) cmbBaud.Items.Add(19200) cmbBaud.Items.Add(38400) cmbBaud.Items.Add(57600) cmbBaud.Items.Add(115200) For i = 0 To UBound(myPort) cmbPort.Items.Add(myPort(i)) Next cmbPort.Text = cmbPort.Items.Item(0) cmbBaud.Text = cmbBaud.Items.Item(0) btnDisconnect.Enabled = False End Sub 'Page Load Code Ends Here .... 'Connect Button Code Starts Here .... Private Sub btnConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConnect.Click SerialPort1.PortName = cmbPort.Text SerialPort1.BaudRate = cmbBaud.Text SerialPort1.Parity = IO.Ports.Parity.None SerialPort1.StopBits = IO.Ports.StopBits.One SerialPort1.DataBits = 8 SerialPort1.Open() btnConnect.Enabled = False btnDisconnect.Enabled = True End Sub 'Connect Button Code Ends Here .... 'Disconnect Button Code Starts Here .... Private Sub btnDisconnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisconnect.Click SerialPort1.Close() btnConnect.Enabled = True btnDisconnect.Enabled = False End Sub 'Disconnect Button Code Ends Here .... 'Send Button Code Starts Here .... Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click SerialPort1.Write(txtTransmit.Text) End Sub 'Send Button Code Ends Here .... 'Serial Port Receiving Code Starts Here .... Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived ReceivedText(SerialPort1.ReadExisting()) End Sub 'Serial Port Receiving Code Ends Here .... 'Serial Port Receiving Code(Invoke) Starts Here .... Private Sub ReceivedText(ByVal [text] As String) If Me.rtbReceived.InvokeRequired Then Dim x As New SetTextCallback(AddressOf ReceivedText) Me.Invoke(x, New Object() {(text)}) Else Me.rtbReceived.Text &= [text] End If End Sub 'Serial Port Receiving Code(Invoke) Ends Here .... 'Com Port Change Warning Code Starts Here .... Private Sub cmbPort_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbPort.SelectedIndexChanged If SerialPort1.IsOpen = False Then SerialPort1.PortName = cmbPort.Text Else MsgBox("Valid only if port is Closed", vbCritical) End If End Sub 'Com Port Change Warning Code Ends Here .... 'Baud Rate Change Warning Code Starts Here .... Private Sub cmbBaud_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbBaud.SelectedIndexChanged If SerialPort1.IsOpen = False Then SerialPort1.BaudRate = cmbBaud.Text Else MsgBox("Valid only if port is Closed", vbCritical) End If End Sub 'Baud Rate Change Warning Code Ends Here .... End Class 'Whole Code Ends Here ....
Its a very simple project so the programming level is very basic. We will just add some LEDs on all pins of PortB of PIC16F877a and then we will program it in such a way that these LEDs will blink in different pattern, we can also change the speed of blinking by adding a delay.
I will explain the whole code but if you got any problem may ask in comments.I will recommend you guys to do this project, I know a beginner can't make this project work in first attempt but when you do it, you will make mistakes and will learn a lot. So let's start the LED Blinking Project using PIC16F877a:
[dt_default_button link="https://www.theengineeringprojects.com/PICProjects/Led Blinking Project with PIC Microcontroller.rar" button_alignment="default" animation="fadeIn" size="medium" default_btn_bg_color="" bg_hover_color="" text_color="" text_hover_color="" icon="fa fa-chevron-circle-right" icon_align="left"]Download Proteus Simulation & Code[/dt_default_button]
// ************ LED Blinking Project using PIC16F877a void main() { trisb= 0x00; while(1) { portb = 0x00; delay_ms(2000); portb = 0xFF; delay_ms(2000); } }
I have tried my best to explain it in full detail but if still you got any problem or anything left then ask in comments and I will explain it to you. So, that was all about LED Blinking Project using PIC16F877a.
Stay Blessed .... ALLAH HAFIZ :))Hello friends , I hope you all are fine and having fun with your lives. Today, I am going to share a new project which is XBee Arduino Interfacing. In my previous tutorials in the XBee series, we have had first Introduction to XBee Module and after that we have also discussed How to Interface XBee Module with Computer. Now we are all well aware of XBee Module and can easily do the XBee Arduino Interfacing. We have seen in the previous tutorial that XBee Module works on Serial protocol so we have to use the Serial Pins of Arduino UNO board.
If you want to use any other microcontroller then you can its not a big issue, just see the way how the programming goes and convert it to the language of your microcontroller i.e. PIC Microcontrollers or 8051 Microcontrollers. If you guys have any question, you may contact me or can ask in the comments. so, let's get started with XBee Arduino Interfacing:
Other XBee Projects:int b1 = 2; int b2 = A3;int mode1 = A4; int mode2 = A5;void setup() { Serial.begin(9600); delay(100); pinMode(b1,OUTPUT);digitalWrite(b1, LOW); pinMode(b2,INPUT_PULLUP); pinMode(mode1,INPUT_PULLUP); pinMode(mode2,INPUT_PULLUP); } void loop() { if (Serial.available() > 0) { delay(500); Serial.print("+++"); delay(1000); Serial.print("rnATDL1"); delay(100); Serial.print("rnATCN"); delay(100); Serial.print("A"); } }
That's all for today. I hope you have enjoyed this tutorial XBee Arduino Interfacing. I will share more projects on XBee Arduino Interfacing soon. If you are getting any problem you can ask in comments. Thanks. ALLAH HAFIZ :))
Hello friends, I hope you all are fine and having fun with your lives. In today's tutorial, I am going to show you the Interfacing of XBee with Computer. In the previous part of this tutorial, I have given the Introduction to XBee Module. Hope you guys have read it and if not then go visit it so that you may have some idea about XBee module.
Now come to the second part about how to interface xbee with computer because its important as if you cant interface the xbee with computer then you cant interface it with any microcontroller and later I will tell you its interfacing with microcontroller. You should also check this XBee Library for Proteus which will help you to simulate XBee module in Proteus.
We will cover arduino with more detail as its the most usable microcontroller these days with XBee. In this tutorial, I will remain to the basics of XBee i.e. we will just simple send data from one xbee to another but in coming tutorials we will have a look on quite difficult projects i.e. plotting of nodes using Rssi value. I have also posted a tutorial on Interfacing of XBee Module with Arduino. If you guys have any question, you may contact me or can ask in the comments. So, let's get started with Interfacing of XBee with Computer:
That's all for today and I am a bit tired too while writing this tutorial on Interfacing of XBee with Computer, so I will continue it tomorrow regarding the microcontroller part. One more thing play with the software and do let me know what you find in the comments. Thanks. ALLAH HAFIZ :))
In this tutorial, we are gonna hanve an Introduction to XBee Module. XBee is an RF module and these days its using in lots of student projects and I am getting a lot of queries reagarding this module. So first we will cover the introduction of XBee in this post. Soon I will tell you about Interfacing of XBee Module with Computer and also after this discussion we will also discuss Interfacing of XBee Module with Arduino. You can also Interface it with other Microcontrollers like PIC Microcontroller or 8051 Microcontroller.
We will cover arduino with more detail as its quite famous and easily accessible microcontroller these days. In this tutorial I am gonna add just simple interfacing of XBee module with arduino but soon I will post few quite difficult project on XBee like mesh networking. If you guys have any question, you may contact me or can ask in the comments. So, let's get Started with Introduction to XBee Module: