How to use Arduino Software Serial ?
Hello friends, I hope you all are fine and having fun. In today's tutorial, I am going to show you How to use Arduino Software Serial. In my previous tutorial, we have had a look at How to use Arduino Serial Write and How to use Arduino Serial Read. In both of these tutorials, we have done the hardware Serial Communication. But we all know that Arduino has just one Serial Port placed at pins 0 and 1.
So, if you are having two or more serial modules, then there's difficulty in adding two modules because we just have one hardware serial port. So, in such cases, there's a need to add one more serial port and that serial port can be created at any two pins of Arduino and is called software serial. Software Serial is also named Virtual Serial Port.
It's really very comfy if you are working on serial modules. If you ask me, I have never used a hardware serial port because pin # 0 and pin # 1 are also used for uploading code and debugging the code via Arduino Serial Monitor. So, I always connect my Serial modules via software serial and then check their output on Serial Monitor. So, let's get started with How to use Arduino Software Serial:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | Arduino Uno | Amazon | Buy Now |
How to use Arduino Software Serial?
- I am going to use Proteus software for testing the codes.
- You can download the Proteus Simulation for Arduino Software Serial, by clicking the below button:
Download Simulation & Code
Arduino Code
- First of all, let me tell you where you can find Examples of Software Serial.
- Arduino has a Library of Software Serial in it. If you can't find its library then you should download the Software Serial Library.
- Now copy and paste the below code in your Arduino software:
#include <SoftwareSerial.h>
SoftwareSerial SoftSerial(2, 3);
void setup()
{
Serial.begin(9600);
SoftSerial.begin(9600);
SoftSerial.println(" **** Its a Software Serial **** ");
SoftSerial.println(" Designed by www.TheEngineeringProjects.com");
SoftSerial.println();
Serial.println(" **** Its a Hardware Serial **** ");
Serial.println(" Designed by www.TheEngineeringProjects.com");
Serial.println();
}
void loop()
{
if (Serial.available())
{
char data = Serial.read();
SoftSerial.print(data);
}
}
- In the above code, we have first included the Arduino Software Serial Library using #include<SoftwareSerial.h>.
- After that, I have created the SoftSerial object and its parameters are SoftSerial(RX, TX), so in the above code pin # 2 has become RX of our Arduino Software Serial and pin # 3 become TX.
- Now our SoftSerial object is ready and then we have initialized our software serial by using SoftSerial.begin(9600), here we have started our software serial and the baud rate set is 9600.
Proteus Simulation
- Now design a small circuit in Proteus, you will need Arduino Library for Proteus to use Arduino in Proteus, as shown in the below figure:
- Now get the Arduino Hex File and upload it to your Proteus software.
- Now run your Proteus Simulation and you will get something as shown in the below figure:
- So, it's printed there that one is hardware serial and second is software serial and you can see the software serial is connected to Pin # 2 and Pin # 3.
- Now when you write something in the Hardware Serial, it will also get printed in the Software Serial, that's the code which we have added in the loop() section.
So, that's all for today, I hope you have enjoyed this Arduino Software Serial example. Download the Simulation from the above button and try to design it on your own. Take care and have fun !!! :)
How to use Arduino Serial Write?
Hello everyone, I hope you all are fine and having fun with your lives. Today, I am going to share the next tutorial in this series of basic Arduino tutorials and it's named How to use Arduino Serial Write. In this tutorial, I have given an overview of How to use the Arduino Serial Write Command. In the previous tutorial, we have seen How to use Arduino Serial Read? in which we have read the data coming from the serial port.
While today we will have a look at how to send the data through a serial port in Arduino and for that, I am going to use the Arduino Serial Write command. It's also going to be a very simple and basic Arduino tutorial but if you are new to Arduino then you must read it completely as it will gonna help you out. I have also designed a Proteus Simulation and explained it at the end of this tutorial. I hope you guys are gonna learn from it:
How to use Arduino Serial Write ???
- In the Arduino Serial Read, we have seen that How to read data coming from the serial port and we have used Pin # 0 for that purpose.
- So, now we are going to write some data on the Serial Port.
- It's like we are sending data from Arduino to some other device via Serial Port.
- For example, you are using a GSM module with Arduino then you have to send AT commands to your GSM board from Arduino and that's where you use Arduino Serial write.
- You can download the Proteus Simulation and code for Arduino Serial Write Command by clicking the below button:
Download Simulation and Code
- Here's the first syntax for Arduino Serial write:
Arduino Serial Write Syntax 1:
- Arduino Serial Write is used to write some data on the Serial Port and it sends data in binary form.
- Here's Arduino Serial Write Syntax:
Serial.write ( 'DataSent' ) ;
where:
- DataSent is a simple byte and is used in these characters ' '. The below example code will send byte '1' on the serial port:
Serial.write ( '1' ) ;
- Now, let's write some data on Arduino Serial Port using the above syntax and see what we got.
Proteus Simulation
- So, design a Proteus Simulation as shown in the below figure:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(20, 4);
// Print a message to the LCD.
lcd.setCursor(1,0);
lcd.print("www.TheEngineering");
lcd.setCursor(4,1);
lcd.print("Projects.com");
lcd.setCursor(1,0);
Serial.begin(9600);
lcd.clear();
Serial.write('1');
}
void loop()
{
}
- In the above code, I have simply written a byte which you can see is 1.
- So, now upload it and run your simulation and if everything goes fine then you will get 1 on your virtual serial terminal of Proteus, as shown in the below figure:
- You can see in the above figure that we got 1 in Serial Port so now you can send whatever you want via this Arduino Serial Write Command.
- Now let's have a look at the second syntax of the Arduino Serial Write command:
Arduino Serial Write Syntax 2:
- We can also send a String of bytes via Arduino Serial Write Command. Here's the syntax:
Serial.write ( "DataSent" ) ;
where:
- DataSent is a simple byte and is used in these characters " ". The below example code will send our site address on the serial port:
Serial.write ( "www.TheEngineeringProjects.com" ) ;
- Now let's sent a string of bytes through this Arduino Serial Write Command, so I have used the below code and have sent our website address via Serial Write.
- So, use the below code and get your Hex File:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(20, 4);
// Print a message to the LCD.
lcd.setCursor(1,0);
lcd.print("www.TheEngineering");
lcd.setCursor(4,1);
lcd.print("Projects.com");
lcd.setCursor(1,0);
Serial.begin(9600);
// lcd.clear();
Serial.write("www.TheEngineeringProjects.com");
}
void loop()
{
}
- Run your Proteus Simulation and you will get the below results:
- You can see in the above figure that we got the whole address via Serial Port.
That's all for today, I hope you guys have enjoyed today's post. In the coming post, I am gonna discuss the Arduino Print Command. Thanks for reading. Take care.
How to use Arduino Serial Read ?
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a very basic and introductory tutorial named How to use Arduino Serial Read. I am sharing this tutorial because I am getting a lot of emails in which users normally ask about basic Arduino tutorials as they are very new to them. So, I thought of sharing this very basic Arduino tutorial in which we are going to have a look at how we can use the Arduino Serial Read command.
I selected this tutorial as my first tutorial in this list of Arduino basic tutorials because learning to use Serial port is very necessary as it's one of the best troubleshooting tools for your code. I have also given a Proteus Simulation in which I have received the incoming data from the serial port and displayed it on LCD. Before going into the details of this Arduino Serial Read, let me first discuss the Serial Port in General.
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | LCD 16x2 | Amazon | Buy Now |
2 | Arduino Uno | Amazon | Buy Now |
What is Serial Port?
- I have already written a detailed tutorial on this topic which you can read at What is Serial Port?
- Serial Port is used for data communication between two electronic modules, both should support serial ports.
- Serial Port has 9 pins in total used for different purposes.
- The two of these pins most commonly used are TX (transmitter) and RX (Receiver).
- So, using these two pins we send our data from one place to another.
- Now let's have a look at Arduino Serial Port first, before having a look at Arduino Serial Read.
Serial Port in Arduino
- Almost all Arduino boards support Serial Port.
- If we talk about Arduino UNO, it has one serial port on it and it is located at pin 0 and pin 1.
- If you look closely at the Arduino UNO board then you can see a little TX is written on its pin # 1 and a little RX is written on its pin # 0, as shown in the below figure:
- So, now we have got the Serial Port on Arduino UNO which we know are at pin # 0 and pin # 1, now in the next part, we are going to have a look at How to use Arduino Serial Read and get data from this Serial Port.
How to use Arduino Serial Read?
- Arduino Serial read command is used for reading any data available at the Serial Port of Arduino board.
- I have also designed a Proteus simulation which you can download from the below button, and I have explained this simulation in the last step of this tutorial:
Download Simulation & Code
- For example, you have some serial module, let's say GPS module (most of the GPS module works at serial port).
- So, when you connect your GPS module with Arduino, you have to connect the TX pin of GPS with the RX pin of Arduino.
- Now the TX pin of GPS will be sending/transmitting the data and because this pin is connected with the RX pin of Arduino, so Arduino will keep receiving the data.
- Now the data is coming to Arduino but you have to write some code to read this incoming serial data and then save it in some variable.
- And in order to read this data, we need to use the Arduino Serial Read command.
- Arduino Serial read command reads the incoming data from Serial Port and then saves it in some variable.
- Here's the syntax of the Arduino Serial Read command:
char data = Serial.read();
- One important thing is, in order to make Arduino Serial Read command work, you have to first initialize the Serial Port in Arduino, as shown below:
Serial.begin(9600);
Note:
- Arduino USB Port which is plugged into the computer and is used for uploading code also works on the same serial port.
- So, if you have anything plugged in pin # 0 of Arduino then you can't upload the code in Arduino.
Now, let's design a simple example in which we will be receiving data from Serial Port and then saving it in some variable.
- So, connect your Serial device with your Arduino board and now upload the below code to your Arduino board:
void setup() {
Serial.begin(9600); // Serial Port initialization
}
void loop() {
if(Serial.available()) // Chek for availablity of data at Serial Port
{
char data = Serial.read(); // Reading Serial Data and saving in data variable
Serial.print(data); // Printing the Serial data
}
}
- Now, you need to open the Serial Monitor of Arduino which is used for debugging purposes.
- So, whenever you write something on Serial Port, it got printed on the Serial monitor.
- So, whatever you will be receiving in the Serial Port you will get in the Serial Monitor.
- Here are some random data of GSM module coming on serial port and showing in serial monitor:
How to use Arduino Serial Read in Proteus?
- So, now let's design a small Proteus simulation in which we will see how to use Arduino Serial Read.
- Proteus doesn't have Arduino boards in it, so you need to first download this Arduino Library for Proteus and then you will be able to simulate your Arduino board in Proteus.
- So, design a simple circuit as shown in the below figure:
- In the above figure, I have placed an LCD and I will get the data from the serial port and then I will print that data on LCD.
- So, in simple words, whatever I type in the Virtual terminal will be shown on LCD.
- You also need to download this New LCD Library for Proteus to get this amazing LCD in Proteus.
- So, now use the below code and Get your Hex File from Arduino Software:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(20, 4);
// Print a message to the LCD.
lcd.setCursor(1,0);
lcd.print("www.TheEngineering");
lcd.setCursor(4,1);
lcd.print("Projects.com");
lcd.setCursor(1,0);
Serial.begin(9600);
}
void loop() {
if(Serial.available()) // Chek for availablity of data at Serial Port
{
char data = Serial.read(); // Reading Serial Data and saving in data variable
Serial.print(data);
lcd.print(data); // Printing the Serial data
}
}
- Now when you start the Proteus simulation the first screen will look something like this:
- Now whatever you write in your Serial Port, will show on the LCD as shown in below figure:
- That's how the Arduino Serial Read works.
- You can download this Proteus simulation and the Arduino code by clicking the Download button given at the start of this post.
So, that's how you can use the
Arduino Serial Read command and can do your task. If it's still difficult for you then let me know on comments and I will try my best to resolve your issues. Thanks.
Line Following Robot using Arduino
Hello everyone, I hope you all are fine and having fun with your lives. Today, I am going to share a very basic project named as Line Following Robot using Arduino. I have designed a three wheeler robot and have placed IR sensors beneath it to detect the black line and then I have made it move over this Black Line.
This Line Following Robot is not doing any extra feature i.e. turning or rotating back. It will just simply move in the straight line. I have also posted a short video at the botton of this tutorials which will give you better idea of how this robot moves. You should first read this tutorial and design the basic robot and once you are successful in designing the basic Line Following Robot then you should have a look at my recent Project Line following Robotic Waiter in which I have designed a Robotic waiter which follows the line and also take turns on different tables. So, let's get started with Line Following Robot using Arduino.
Line Following Robot using Arduino
- First of all I have designed the Mechanical model of the robot, which has three wheels on it.
- Its a triangular method in which the motors were attached to the front two wheels and the back wheel is a caster wheel, which is present in the middle of the robot.
- Here's the image of front wheel coupled with the DC Gear Motor:
- Now let's have a look at the rear caster wheels, shown in below image:
- Finally, I have used Acrylic as the body of the robot.
- Here's the assembled version of our Line Following Robot:
- Now that we have the mechanical design of our robot and we have assembled it completely.
- So, now comes the electronics part where we are gonna place the DC Motor Driver Circuits and will also place the IR sensors.
- I have used Arduino board for programming of this Line following Robot.
- First of all, I have designed the 2 relay baord for DC motors.
- Its circuit diagram is shown in below figure:
- We also need a voltage divider circuit because we need such a power supply from which we can get 5V, while our source battery is of 12V.
- So, in order to do that I have used 7805 Regulator IC and have designed a simple circuit as shown in below figure:
- Now placing all the components over the Line following Robot, it looked like something as shown in below figure:
- Here's the Arduino code which you need to upload in your Arduino board:
#define motorL1 8
#define motorL2 9
#define motorR1 10
#define motorR2 11
#define PwmLeft 5
#define PwmRight 6
#define SensorR 2
#define SensorL 3
#define Sensor3 A0
#define Sensor4 A1
#define TableA A4
#define TableB A2
#define TableC A5
#define TableD A3
int OriginalSpeed = 200;
int TableCount = 0;
int TableCheck = 0;
int RFCheck = 10;
void setup()
{
Serial.begin (9600);
pinMode(motorR1, OUTPUT);
pinMode(motorR2, OUTPUT);
pinMode(motorL1, OUTPUT);
pinMode(motorL2, OUTPUT);
pinMode(PwmLeft, OUTPUT);
pinMode(PwmRight, OUTPUT);
pinMode(SensorL, INPUT);
pinMode(SensorR, INPUT);
pinMode(Sensor3, INPUT);
pinMode(Sensor4, INPUT);
pinMode(TableA, INPUT);
pinMode(TableB, INPUT);
pinMode(TableC, INPUT);
pinMode(TableD, INPUT);
MotorsStop();
analogWrite(PwmLeft, 0);
analogWrite(PwmRight, 0);
delay(2000);
// Serial.println("fghfg");
}
void loop() {
MotorsForward();
PIDController();
}
void MotorsBackward()
{
digitalWrite(motorL1, HIGH);
digitalWrite(motorL2, LOW);
digitalWrite(motorR1, HIGH);
digitalWrite(motorR2, LOW);
}
void MotorsForward()
{
digitalWrite(motorL1, LOW);
digitalWrite(motorL2, HIGH);
digitalWrite(motorR1, LOW);
digitalWrite(motorR2, HIGH);
}
void MotorsStop()
{
digitalWrite(motorL1, HIGH);
digitalWrite(motorL2, HIGH);
digitalWrite(motorR1, HIGH);
digitalWrite(motorR2, HIGH);
}
void MotorsLeft()
{
analogWrite(PwmLeft, 0);
analogWrite(PwmRight, 0);
digitalWrite(motorR1, HIGH);
digitalWrite(motorR2, HIGH);
digitalWrite(motorL1, LOW);
digitalWrite(motorL2, HIGH);
}
void MotorsRight()
{
analogWrite(PwmLeft, 0);
analogWrite(PwmRight, 0);
digitalWrite(motorR1, LOW);
digitalWrite(motorR2, HIGH);
digitalWrite(motorL1, HIGH);
digitalWrite(motorL2, HIGH);
}
void Motors180()
{
analogWrite(PwmLeft, 0);
analogWrite(PwmRight, 0);
digitalWrite(motorL1, HIGH);
digitalWrite(motorL2, LOW);
digitalWrite(motorR1, LOW);
digitalWrite(motorR2, HIGH);
}
void PIDController()
{
if(digitalRead(SensorL) == HIGH){analogWrite(PwmRight, 250);analogWrite(PwmLeft, 0);}
if(digitalRead(SensorR) == HIGH){analogWrite(PwmLeft, 250);analogWrite(PwmRight,0);}
if((digitalRead(SensorL) == LOW) && (digitalRead(SensorR) == LOW)){analogWrite(PwmRight, 0);analogWrite(PwmLeft, 0);}
}
- Now that's all, here's the video for Line Following Robot using Arduino which will give you better idea:
That's all for today. I hope you have enjoyed this Line Following Robot using Arduino and are gonna use it in your projects. feel free to ask in comments, if you got into any trouble. Thanks for reading. Take care !!! :)
Automatic Street Light Project in Proteus
Hello everyone, I hope you all are fine and having fun with your lives. Today, I am going to share a semester project which is named as Automatic Street Light Project. I have designed this project in Proteus ISIS and the simulation is also given below for download. Btw this was my first project during my engineering course. :D I had really enjoyed while working on this project as I was new to electronics then.
This project is about Automatic Street Light. You must have examined on your streets that the street lights turn ON at night while they turn OFF in the day. When I was a child then I think that someone turns ON the switch in the day and then turns it OFF at night but that's really not the case. :P
In fact, these lights are automatic and have a sensor in them which is known as LDR sensor. This sensor is used to detect the light intensity so if there's sun light in the surroundings then it simply turn OFF the street light and if there's no sun light then it turns ON the street light and that's how Automatic Street Light works. I have designed its simulation in Proteus ISIS software which you can download below. So, let's get started with Automatic Street Light Project in Proteus ISIS.
Note:
Automatic Street Light Project in Proteus ISIS
- You can download the working simulation of Automatic Street Light Project designed in Proteus ISIS by clicking the below button:
Download Proteus Simulation
- You can download the Proteus simulation by clicking the above button but I would recommend you to design it on your own so that you get maximum knowledge out of it.
- So, let's design it on our own. :)
- First of all, design a simple circuit as shown in below figure:
- You can see in the above figure that I have designed two circuits. Both of these circuits are exactly same but they have different LDR sensors.
- Proteus has two LDR sensors in its database that's why I have designed two circuit diagrams and have used both of them.
- Moreover, I have used LM324 IC in it which is getting the input from the LDR sensor at its negative pole and the LED is attached at its output.
- LDR is a Light Dependent Resistance which gives output when it detects light.
- The output of LDR is analog and it depends on the light intensity.
- If the light intensity is HIGH then LDR value will be HIGH if its LOW then value will be LOW.
- That's why I have placed a variable resistance which is used for setting the threshold value for LDR.
- Rite now when there is full light only then the LED will go HIGH otherwise it will remain LOW.
- So, let's now simulate this simulation of Automatic Street Light and have a look at the results:
- You can see in the above figure that in the OFF state the LED is OFF when LDR is not detecting light.
- Now in the ON state, when LDR detected the Light then the LED goes ON automatically.
- You must be wondering that its working on opposite logic i.e. when there's light then the Light goes HIGH and when there's no light then the Light goes LOW.
- Moreover, the output is just of 5V but the street lights are of normally 220V AC or 12V DC.
- So, let's add a simple Relay in front of this circuit so that we can add some lamp as shown in below figure:
- Now let's have a look at the OFF state of this Automatic Street Light Project, shown in below figure:
- You can see in the above figure that the LDR is detecting the light but the Lamp is OFF, so its like a day time. There's light and that's why street light is OFF.
- Now, let's have a look at its ON state in the below figure:
- Now you can see the LDR is not detecting any Light which means its a night time and that's why our lamp is ON.
- The below video will give you a better idea of How it works:
So, that's all for today. I hope you have enjoyed this Automatic Street Light Project in Proteus ISIS. Will meet you guys in next tutorial. Till then take care and have fun !!! :)
LPG Gas Leak Detector using Arduino
Hello friends, hope you all are fine and having fun with your lives. Today, I am going to share a new project named LPG Gas Leak Detector using Arduino in Proteus ISIS. Before reading this tutorial, you must first download the Gas Sensor Library for Proteus because we are gonna use that Library and will simulate the Gas Sensor in Proteus.
In this library you will find eight sensors and all of them works exactly the same so that's why we are gonna use one of them. For LPG Gas Leak Detector Project I have used MQ-2 sensor which is used for detection of LPG gas. I have also used Arduino UNO board which you can simulate in Proteus using Arduino Library for Proteus. Moreover, I have also placed an LCD which will display either LPG gas Leak Detected or not. So, let's get started with LPG Gas Leak Detector using Arduino in Proteus ISIS.
LPG Gas Leak Detector using Arduino in Proteus ISIS
- First of all, download the Gas Sensor Library for Proteus and install it in your Proteus software so that you can it in Proteus.
- After installing the Gas Sensor Library, now download the LPG Gas Leak Detector Project's simulation and programming code by clicking the below button:
Download Proteus Simulation & Code
- Now, let's design this project so that you can get a better idea of how it works.
- First of all, design a small circuit in your Proteus software as shown in below figure:
- Now you can see in the above figure that I have used Arduino UNO board along with 20 x 4 LCD and Gas Sensor MQ-2.
- You can use this LCD by download this New LCD Library for Proteus.
- Next thing you need to do is to download the below code and get your hex file.
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
int Gas = 7;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(20, 4);
// Print a message to the LCD.
lcd.setCursor(0,0);
lcd.print("Gas Detected :");
lcd.setCursor(1,2);
lcd.print("www.TheEngineering");
lcd.setCursor(4,3);
lcd.print("Projects.com");
pinMode(Gas , INPUT);
}
void loop() {
if(digitalRead(Gas) == HIGH){lcd.setCursor(14,0);lcd.print(" Yes");}
if(digitalRead(Gas) == LOW){lcd.setCursor(14,0);lcd.print(" No ");}
}
- If you don't know about Hex file then read How to Get Hex file from Arduino Software.
- Upload this Hex File in your Proteus Arduino software and then run your simulation.
- If everything goes fine then you will get results as shown in below figure:
- So, you can see in the above figure that when Gas Sensor is HIGH then its written on the LCD that Gas Detected: Yes.
- Here's a video which will explain this LPG Gas Leak Detection using Arduino in Proteus ISIS:
So, that's all for today. I hope you have enjoyed this project named LPG Gas Leak Detection using Arduino in Proteus ISIS. Will meet you guys in the next tutorial. Till then take care and have fun !!! :)
GSM Based Home Security System
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a complete project named as GSM Based Home Security System. I have designed its complete working simulation in Proteus and have used different libraries which you can also download from our blog. In the previous post, I have posted Home Automation Project using XBee & Arduino and today we are gonna work on Home Security System.
We have designed this simulation after a lot of efforts that's why we have placed a very small amount of $50 on it so that engineering students can download it and get knowledge from it. Moreover, as its a complex project so when you buy it then there's a chance that you can't run it by yourself so we also offer a free service. If you got into any trouble while running this simulation then use our Contact Form we will help you out personally within 24 hours.
GSM based Home Security System
- You can buy this complete project by clicking the below button:
Buy This Project
- When you will click the above button, you will be taken to the sale page for this project and you can buy this project using PayPal.
- When you buy it you will get the complete code along with working Proteus simulation.
- So, let's have an overview of this GSM Based Home Security System.
- This GSM based Home Security System contains seven sensors which will be installed theoretically in your home. :)
- These seven sensors are:
- PIR Sensor: For Motion Detection.
- Smoke Sensor: For Smoke Detection.
- Flame Sensor: For Fire Detection.
- Vibration Sensor for Window: For Detection of vibrations on Window.
- Vibration Sensor for Door: For Detection of vibrations on Door.
- Ultrasonic Sensor for Window: For intruder Detection on Window.
- Ultrasonic Sensor for Door: For intruder Detection on Door.
- When we are talking about security then we have to take care of door and windows.
- That's why I have placed two sensors on each of them. If someone tries to break the window then the vibration sensor will sense it and if someone tries to open the window then ultrasonic sensor will detect it.
- The same will happen for the door.
- So, whenever any of these seven sensors will get activated then the buzzer will go on and at the same time the user will receive a warning message.
- Moreover, I have also placed an LCD which will display the sensors' condition.
- Here's the Proteus Simulation for this GSM based Home Security System:
- You can see in the above figure that I have used all these seven sensors mentioned above.
- Moreover, I have used the GSM module, you can read more about it on GSM Library for Proteus.
- Moreover, we have the Power circuit and the Buzzer Driver Circuit at the bottom.
- Arduino UNO acting as the brain of this GSM Based Home Security System.
- Now, let's run this simulation and if everything goes fine then you will get something as shown in below figure:
- First of all, the system will configure the GSM module and then it will display two screens on LCD side by side.
- First LCD screen is shown in below figure:
- The first screen will show the status of first three sensors.
- Now here's the screenshot of second screen showing the status for next four sensors:
- That's how this project is working, now when any of these sensors got HIGH then buzzer will go ON and a message will be sent to the given number:
- Now, you can see when I click the Smoke Sensor HIGH, it got detected immediately and a warning message is sent to my number.
- I have explained this GSM based Home Security System in detail in the below video:
So, that's all for today. I hope you guys have enjoyed this awesome project. Before buying it, you must read it completely and also watch the video so that you are sure about what you are buying.
Home Automation Project using XBee & Arduino
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a new Home Automation Project using XBee & Arduino. Home Automation Project is a most commonly designed project by the engineering students. So, that's why I have thought to create a complete Home Automation Project so that engineering students can get benefit out of it.
We all know about automation which is originated from automate or automatic. In automation the task is done automatically and you don't need to control it. In normal Home automation project, there are few sensors which are displayed wirelessly to user and there are few controls like user can ON or OFF Lights, Fans etc via remote or mobile App.
In this Project, I have used Arduino UNO board and I have designed its complete working simulation in Proteus software, so that users got sure that its working perfectly. Because we have to work a lot in designing this complete working simulation of home Automation Project that's why its not free but you can buy it for a small price of $50. In this price, you will get the compelte Arduino code along with the working Proteus Simulation. But before buying this project, must have a look at the details below so that you are sure what you are buying. So, let's get started with Home Automation Project using XBee & Arduino.
Home Automation Project using XBee & Arduino
- You can buy the complete working Proteus Simulation along with the Arduino Programming Code by clicking the below button.
- You can pay via Paypal and the download link will be instantly available to you and if you don't have the PayPal account then use our Contact Us Form and we will find some other way for you.
Buy This Project
1: Overview
- First of all, let's have an overview of this Home Automation Project.
- In this Project, I have designed two simulations, one simulation is for Remote using which we are gonna control our appliances and the second simulation is for the controlling of these appliances.
- So, when you press buttons from your remote section, a wireless command will be sent to the control board and it will turn ON or OFF the respective load.
- Moreover, there's an LCD on the Remote on which you will also check the values of the sensors.
- So, in simple words, the remote will be in your hand and using this remote you can easily turn ON or OFF your appliances and can also check the status of your different sensors wirelessly.
- Let's first have a look at the remote section:
Remote Control:
- In Remote Control Section, I have used the below main modules:
- Arduino UNO: Microcontroller Board.
- KeyPad: Commands will be sent by clicking this Keypad's buttons.
- LCD (20 x 4): For Displaying Sensor's Data & Commands.
- XBee Module: It's an RF Module used for sending wireless commands.
- Now when you click any button on your Keypad, a command is sent from Arduino to XBee Module and the XBee module then forwards that command to other XBee on the Control Unit.
- Moreover, when the Control Unit sends the Sensors' data on xbee then Arduino receives that data and then displayed that data on LCD.
- Here's the block diagram of Remote control section which will give you a better idea of its working:
- Here's the Proteus Diagram of our Remote Section:
- In the above Proteus Simulation of Remote Control, you can see that we have Arduino UNO board which is connected with LCD, KeyPad and XBee Module.
- Working of this Remote section will be discussed in the later section.
- Now let's have a look at the Control Unit Side of Home Automation Project.
Note:You must also have a look at below tutorials because I have interfaced these modules separately with Arduino as well:
Control Unit:
- In the previous section, we had an overview of the Remote section, now let's have a look at the Control Unit.
- The Control Unit is the Unit which is being controlled by the Remote Control.
- The Main components of Control Unit are:
- Arduino UNO: Microcontroller Board.
- Relays: Used to control the appliances. I have added eight relays so you can control eight appliances.
- Lamps: Indicating the Bulbs.
- DC Motors: Indicating the Fans.
- Smoke Sensor: Used to detect the Smoke.
- Flame Sensor: Used for Fire detection.
- DS18B20: Used to measure atmospheric temperature.
Note:
- On this Control unit, the Arduino UNO is getting the data from the smoke sensors and then sending this data via XBee to Remote Control.
- We have seen in the previous section that this data is then displayed over LCD.
- Moreover, when any button is pressed from the Remote Control, the command is received by this Arduino via XBee.
- On receiving this command, Arduino UNO then turns ON or OFF the respective relay which in turn ON or OFF the respective appliance.
- Here's the block diagram of this control unit:
- You can see in the above block diagram that I have connected three sensors with Arduino and Arduino is receving their values and then sending these values to the remote control via XBee.
- Moreover Relays are also connected to Arduino and then loads are further connected to these Relays.
- So, Arduino is controlling these Relays which in turn are controlling the loads.
- I have used eight relays and hence eight loads.
- The Loads I have used are all DC loads because Proteus doesn't have AC active loads in it but you can place AC loads as well.
- Here's the Proteus Simulation of Control Unit:
- You can see all the modules are present in it.
- Eight relays are present on the right side and their outputs are going into the loads.
- I have used four lamps and four DC Motors.
- Now let's have a look at their operation.
Note:You should also have a look at below tutorials in which I have interfaced these sensors separately with Arduino:
2: Operation
- I have already mentioned their operation in above section so I am not gonna discuss it in detail.
- But let's have a little talk about their operation.
- First I am gonna discuss the operation of Remote Control:
Remote Control:
- The remote Control has an XBee module which is used for wireless communication.
- The Keypad has buttons on it so now when you press button "1" on the keypad then the Signal is sent via XBee to Control Unit.
- The control unit will automatically turn on the first load when it will receive the command from button "1" of Remote Control.
- When you press "1" for the first time then the first load will turn ON but when you press button "1" again then the first load will go off.
- So, its like if you want to turn it ON then press it and if you want to turn it OFF then press again. (Quite simple :P)
- As there are eigth loads, so button "1" to "8" are working for loads "1" to "8" respectively.
- Moreover, when sensor's data come from control unit then it is updated in the LCD of Remote Control.
- Now let's have a look at the operation of Control Unit:
Control Unit:
- As the Control Unit is concerned, it keeps on waiting for the command from remote and whenever a command is received from the Remote Control, it turns ON or OFF the respective load.
- Moreover, it also sends the data of sensors continuously to the Remote Control.
- For this wireless communication, XBee is used here.
3: Working
- This is the last section of this project where will will have a look at the working of the project.
- I haven't divided this section in parts instead I have create a video which will explain the working in detail.
- Here's the First look of Remote section image while working:
- Now when the Sensor's data come from the remote Section then it will be displayed in the LCD as shown in below figure:
- You can see in the above figure that both sensors are detecting and the temperature is also displayed in the LCD.
- Now the complete working of this project is shown in the below video which will give you complete idea of this project:
Note:
- If you buy this project and you are unable to run it properly then we will provide you free service and will make it work on your laptop perfectly. :)
So, that's all for today. I hope you have liked this Home Automation Project and are gonna buy this one. But again before buying it must read this tutorial and also watch the video so that you get complete understanding of this project.
Interfacing of Flame Sensor with Arduino
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a new tutorial which is Interfacing of Flame Sensor with Arduino. I have recently posted a tutorial in which I have shared the Flame Sensor Library for Proteus. Now in this tutorial, I am gonna use that Flame Sensor Library and will interface this Flame Sensor with Arduino. So, if you haven't downloaded this file then I suggest you to download this Flame Sensor Library so that you can easily simulate this flame Sensor in Proteus.
I am sharing interfacing of this Flame Sensor with Arduino today, but soon I will also post a tutorial on Interfacing of Flame Sensor with PIC Microcontroller. If you guys have any questions then ask in comments. I have also given the Simulation file and the Programming code below to download. But I would recommend you to design this proejct on your own so that you make mistakes and then learn from them. So, let's get started with Interfacing of Flame Sensor with Arduino:
Interfacing of Flame Sensor with Arduino
- You can download the complete Proteus Simulation along with Arduino programming code from the below button:
Download the Simulation
- Now design a small Arduino code as given below:
#include <LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
int Flame = 7;
void setup() {
Serial.begin(9600);
pinMode(Flame, INPUT_PULLUP);
lcd.begin(20, 4);
lcd.setCursor(0,0);
lcd.print("Flame : ");
lcd.setCursor(1,2);
lcd.print("www.TheEngineering");
lcd.setCursor(4,3);
lcd.print("Projects.com");
}
void loop() {
if(digitalRead(Flame) == HIGH){lcd.setCursor(8,0);lcd.print("Detected ");}
if(digitalRead(Flame) == LOW ){lcd.setCursor(8,0);lcd.print("Not Detected");}
}
- Add this code in your Arduino software and compile it to get the Hex File from Arduino Software.
- Upload this hex file in your simulation and then run your simulation and if everything goes fine then you will get something as shown in below figure:
- In the above figure, you can see the sensor is off that's why in the LCD its written that no smoke detected.
- Now, let's bring some Flame by clicking the Logic State on Flame Sensor and you will see the below results:
- Now you can see in the above figure that when the Flame is detected then the LCD indicated that Flame has detected.
- That's how we can easily simulate the Flame Sensor with Arduino.
- I have explained this project in detail in the below video:
That's all for today. I hope you have enjoyed this project and now you can easily interface your Flame Sensor with Arduino in Proteus ISIS.
How to Install and Download Proteus Software
Hello everyone, I hope you all are fine and having fun. Today, I am not going to share a project. Instead, I am gonna share a tutorial in which I will teach you How to download Proteus and install it. It's going to be a quick tutorial because there's not much in it to say. You know Proteus is a Paid software and you must pay the company because they have put really great effort into designing this software. So, if you can afford then you must buy the latest version of Proteus software from their Official Website.
In today's post, I am going to share the Full version of Proteus software and it is Proteus 7 Professional, I am sharing it for engineering students. I hope you are going to enjoy this software its not only free but also complete and the Professional version. So, let's get started with How to Install and Download Proteus Software. Please watch this youTube video for better guidance:
How to Install and Download Proteus Software ???
- First of all, download the Proteus 7 Professional software by clicking the below button:
Proteus 7 Professional Free download
Proteus 8.5 Professional Free download
- Once you downloaded the files, now unrar them and place them in some folder.
- The next thing you need to do is to run the Setup file from the package and it will start to install.
- Use the recommended settings and once it's done then it will ask about the key.
- The default key is given in the package so browse it and upload it to the software.
- Once the key is uploaded, now complete the setup and you will get yourself a Proteus software.
- After the completion, one more thing you need to do is to install the software given in the next folder.
- In the path selection, gave it the path to your Proteus software, which you just installed.
- Now hit run and after it's complete, your Proteus will become registered.
- I have made a small video that will explain the above procedure of How to Install and Download Proteus software in a better way.
So, that's all for today, I hope you guys are gonna enjoy this Proteus software free download and gonna write about it in the comments. That's all for today, will meet you guys in the next tutorial. Till then take care !!! :)