CR2032 Lithium Coin Library for Proteus
Hello friends, I hope you all are well. In today's tutorial, I am going to share a new
CR2032 Lithium Coin Library for Proteus. This small cell is extensively used in electronics whereabouts because of its small size. CR2032 is not present in the Proteus components' database and we are quite pleased that we are sharing it for the first time.
This library contains 3 types of these small cells, one is the cell itself, while the other two models are cells with leads. Before downloading the Proteus Library zip file, let's first have a brief overview of CR2032:
What is CR2032???
- CR2032(also called Lithium Coin) is a small round Lithium Manganese Dioxide battery, normally provides 3V.
- As CR2032 is very small in size, thus used in small electronics devices & whereabouts i.e. watches, bracelets, calculators, hand-held video games etc.
- CR2032 is a small cell, so a black or yellow casing is used to operate it.
- Here are few images of real CR2032 with casing:
CR2032 Library for Proteus
- First of all, download the zip file of Proteus library for CR2032, by clicking the below button:
Download Proteus Library Files
- Open the zip file of Proteus Library and extract the files.
- Open the folder named Proteus Library Files and you will find 2 files in it, named:
- CR2032LibraryTEP.IDX
- CR2032LibraryTEP.LIB
- Copy these files and paste them into the Library folder of Proteus software.
Note:
- Now, open Proteus ISIS and in the components section, search for CR2032 and you will get results, as shown in the below figure:
- Let's place these three components in the Proteus workspace, as shown in the below figure:
- As you can see in the above figure, the first one is the cell CR2032 itself, and in the second and third, we have tried to create a Cell with leads & casing.
Now, let's simulate them in proteus to have a look at their output:
CR2032 Proteus Simulation
- Here's the Proteus simulation of CR2032, where I have simply placed a voltmeter in front of these coins, as shown in the below figure:
- Now simply run the Proteus simulation, and you will get results as shown below:
- They all are providing 3V as shown on the voltmeters but you can change the voltage level from their properties panel.
So, that was all for today. I hope this Lithium coin will help you in your proteus simulations. Thanks for reading. Take care. Bye !!!
Proteus Library of Single Cell Battery
Hello friends, I hope you all are doing well. In today's tutorial, I am going to share a new Proteus Library of Single Cell Battery. These single-cell batteries are not present in Proteus, so we have designed them, I hope you guys will find them helpful.
This Proteus library has 5 Single Cell Batteries in it, we have designed the most common ones. Four of these batteries provide 3.7V, while one provides 12V. First, let's have a look at
What is a Single Cell Battery???
- Single Cell Batteries are available in different voltage ranges and normally provide 3.7 volts.
- Single Cell Battery is used in small electronic projects i.e. toys, clocks, alarms, calculators etc.
- Few Single Cell Batteries are shown in the below figure, which we have simulated in Proteus:
Proteus Library of Single Cell Battery
- First of all, click on the below button to download the Proteus Library zip file of Single Cell Battery:
Download Proteus Library Files
- Extract the files of this zip file and open the folder named Proteus Library Files.
- In this folder, you will find three library files, named:
- SingleCellBatteryTEP.IDX
- SingleCellBatteryTEP.LIB
- SingleCellBatteryTEP.HEX
- We need to place these files in the Library folder of our Proteus software.
Note:
- After adding the Library files, restart your Proteus ISIS software.
- In the components section, make a search for "Single Cell" and you will find these results:
- Let's place these Single Cells in our Proteus workspace, and they will look something like this:
- These Single Cells will provide 3.7V, but you can change the voltage level from its Properties panel.
- So, double click on any of these batteries & the properties panel will open up, as shown in the below figure:
Single Cell Battery Proteus Simulation
- Now, let's design a simple Proteus simulation.
- I have just placed a voltmeter in front of three of these sensors, as shown in the below figure:
- Now, run the simulation and you will get results as shown in the below figure:
- The center one is of 12V, while all others are of 3.7V.
- You can use these batteries to power up your electronic circuits.
So, that was all for today. If you have any questions/suggestions, please use the below comment form. Thanks for reading. Have a good day. Bye !!! :)
Sound Detector Library for Proteus V2.0
Hello friends, I hope you all are doing great. In today's tutorial, we are going to share a new Sound Detector Library for Proteus. It's actually the second version of our previous library
Sound Sensor Library for Proteus. We have changed the name as "Sound Detector" is written on these sensors. Moreover, this new sensor is quite small-sized, compact and also has an analog output pin.
We were receiving many complaints about the large size of the previous sound sensor, as it occupies more space and there's less space left for other components. So, this new one is quite small-sized and I am hopeful students will find it helpful. So, let's first have a look at What is Sound Detector Sensor and why is it used?
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | Arduino Uno | Amazon | Buy Now |
What is Sound Detector Sensor???
- Sound Detector sensor is an Embedded sensor, used for the detection of sound in the surroundings.
- It has both analog & digital outputs and thus gives us information about the intensity of sound as well i.e. how low or high the sound is?
- So these sensors are used for sound detection but they are not used for sound recognition.
Now let's download the Proteus Library of Sound Detector Sensor and simulate it:
Sound Detector Library for Proteus V2.0
- First of all, download the proteus library of Sound Detector Sensor by clicking the below button:
Download Proteus Library Files
- You will get a zip file of Proteus Library, extract these files and open the folder named "Proteus Library Files".
- In this folder, you will find three files, titled:
- SoundDetector2TEP.IDX
- SoundDetector2TEP.LIB
- SoundDetector2TEP.HEX
- We need to place these three library files in the Proteus Library folder.
Note:
- Once added the Library files, now open your Proteus software or restart it. (In order to index the library components, proteus has to restart)
- In the components section, make a search for sound detector and you will get 4 results, shown in the below figure:
- Now, let's place all these sensors in the Proteus workspace:
Adding Hex File to the Sensor
- In order to simulate this sensor in Proteus, we need to add a hex file to the sensor.
- So, double click on the sensor or right-click on it and then click on Edit Properties and it will open up the Properties Panel.
- In the Properties panel, we have a textbox titled Upload Hex File and here we need to add the hex file, which we have placed in the library folder of Proteus, as shown in the below figure:
Now our sensor is ready to simulate, so let's design a simple circuit to understand its working:
Sound Detector Simulation in Proteus
- As we have seen this sensor consists of 5 pins in total, which are:
- V: Vcc (Power).
- G: Ground.
- D0: Digital Output.
- A0: Analog Output.
- Test: For Testing Purposes. (It's not present in real sensor)
Why Test Pin is used?
- As we can't add a real mic in Proteus simulation, so in order to simulate this sensor, we have placed this Test Pin.
- So, when the voltage at Test Pin will increase, the sensor will consider it as sound intensity is increasing.
- We need to connect a potentiometer with this Test Pin.
Sound Detector Circuit Diagram
- Now, we need to design a simple circuit in Proteus, as shown in the below figure:
- As you can see in the above figure, I have placed an LC filter on the analog output, because we are getting peak to peak voltage and we need to convert it to Vrms.
- We don't need to place this LC filter with the real sensor.
- Now, let's run this simulation and if everything's good, you will get results as shown in the below figure:
- I have simulated two of these sound detector sensors and you can see they have different outputs because they have different voltage at their Test Pins.
So, that was all for today. If you have any problem in simulating the sound detector, ask in the below comments. We will soon share its simulation with Microcontrollers. Thanks for reading. Take care !!! :)
Infrared Tracker Sensor Library for Proteus
Hello friends, I hope you all are doing great. Today, I am going to share a new Infrared Tracker Sensor Library for Proteus. By using this library, you will be able to simulate IR based tracker sensor. This library contains 4 tracker sensors in it.
This Infrared Tracker Sensor is not present in Proteus software and we are sharing it for the first time. We have already shared 2 Proteus Libraries of Infrared sensors, you should check them as well.
Note:
- You should also have a look at:
First, let's have a look at what is tracker sensor and why is it used?
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | IR Tracker Sensor | Amazon | Buy Now |
2 | Arduino Uno | Amazon | Buy Now |
What is IR Tracker Sensor???
- IR Tracker Sensor uses Infrared technology and contains two IR LEDs on it.
- A signal is transmitted from one LED, which is reflected back after hitting some target and is received by the second LED.
- This sensor is normally used in Line Tracking Robotic Projects, where the black line is sensed by this IR Tracker sensor.
Infrared Tracker Sensor Library for Proteus
- First of all, download the zip file of Proteus Library by clicking the below button:
Download Proteus Library Files
- Once you downloaded the zip file, extract it and open the folder named "Proteus Library Files".
- You will find three files in it, named:
- InfraredTrackerSensorTEP.IDX
- InfraredTrackerSensorTEP.LIB
- InfraredTrackerSensorTEP.HEX
- Place these three files in the Library folder of your Proteus software.
Note:
- Now open your Proteus software or restart it, if it's already running.
- In the components section, we need to make a search for Infrared Tracker Sensor, and you will get results as shown in the below figure:
- As you can see in the above figure, now we have 4 infrared tracker sensors in our Proteus database.
- Let's place these sensors in the Proteus workspace, that's how they will look like:
Adding Hex File to the sensor
- Now we need to add the hex file to the sensor, so double click on the sensor to open its Properties Panel.
- In the properties panel, we have a textbox named "Program File".
- In this textbox, browse to the hex file of the sensor, which we have placed in the Library folder of Proteus software, as shown in the below figure:
- After adding the hex file, click the OK button to close the properties panel.
Our sensor is now ready to operate.
Infrared Tracker Sensor Pinout
- As you can see these sensors have five pins in total, which are:
- V: Power.
- G: Ground.
- D0: Digital Output.
- A0: Analog Output.
- Test: For Testing Purposes.
Why Test Pin is used?
- As it's a simulation, so we can't actually generate IR pulses, that's why I have placed this Test Pin.
- As the voltage at Test Pin will increase, the sensor will consider it as the obstacle is coming close.
- We will place a potentiometer at this Test Pin.
- This Test Pin is not present in a real IR Tracker sensor.
So, let's design a simple simulation of this Infrared Tracker sensor to have a look at its working:
Infrared Tracker Sensor Proteus Simulation
- Design a simulation in Proteus, as shown in the below figure:
- I have placed an LC circuit in front of the analog output because we have to convert the peak to peak voltage to Vrms.
- This LC filter is also not required in real hardware, but in simulation, we need to place it to get an analog value.
- Now, let's run our Proteus simulation of the IR sensor and if everything goes fine, you will get results as shown in the below figure:
- I have simulated two of these sensors, the rest will work the same and as you can see depending on the potentiometer, we got different values at the output.
So, that was all for today. I hope this library will help you guys in your engineering projects. If you have any questions/suggestions, please use the below comment form. Thanks for reading. Take care !!! :)
Magnetic Hall Effect Sensor(KY-024) Library for Proteus
Hello friends, I hope you all are doing fine. Today, I am going to share a new
Magnetic Hall Effect Sensor Library for Proteus. We are sharing this library for the first time and we hope it will help students in their final year & semester projects.
In this library, you will find 4 models of the KY-024 Magnetic Hall Effect Sensor. First, we will have a look at the brief overview of Magnetic Hall Effect Sensor, then will add its Library in proteus and will simulate it. So, let's get started:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | Arduino Uno | Amazon | Buy Now |
What is Magnetic Hall Effect Sensor?
- Magnetic Hall Effect Sensor is used to measure the density of magnetic field in the surroundings using Hall Effect Principle.
- KY-024 is the sensor's model used for measuring magnetic density.
- There are many different breakout boards available but they all are using the same sensor i.e. KY-024.
So, let's install its Proteus Library and simulate it:
Magnetic Hall Effect Sensor Library(Ky-024) for Proteus
- First of all, download the Proteus Library zip file for Magnetic Hall Effect Sensor, by clicking the below button:
Proteus Library Files
- In this zip file, we need to open the folder titled Proteus Library Files.
- In this folder, you will find three Proteus Library files, named:
- MagneticHallEffectSensorTEP.IDX
- MagneticHallEffectSensorTEP.LIB
- MagneticHallEffectSensorTEP.HEX
- We need to place these files in the Library folder of our Proteus software.
Note:
- Now, open Proteus ISIS and if you are already working on it, restart it.
- In the components search box, make a search for "Magnetic Hall" and you will get four results, as shown in the below figure:
- Let's place these four Hall Effect sensors' models in our Proteus workspace.
So, we have successfully added these sensors to our Proteus software. Let's design a simple simulation to have a look at its working:
KY-024 Proteus Simulation
- As we have seen this simulated model of KY-024 has five pins in total:
- A0: Analog output.
- G: Ground.
- V: Vcc (Power).
- D0: Digital output.
- Test: For testing purposes.
Why Test Pin is used?
- As it's stimulation, so we can't actually create a magnetic field around the sensor, that's why we have placed this Test Pin.
- As the voltage at Test Pin will increase, the sensor will consider it as magnetic density is increasing around.
- If Test Pin is at 0V, the sensor will feel no magnetic field.
- If Test Pin is 5V, the sensor will feel a maximum magnetic field.
- We will attach a potentiometer to the Test Pin, for variable voltage levels.
Adding Hex File to the sensor
- In order to operate the magnetic Hall Effect sensor, we need to add a hex file in its properties panel.(We have placed the hex file in the Library folder)
- So, double click on your sensor to open its properties panel.
- In the Upload Hex File section, browse to your sensor's hex file, as shown in below figure:
- After adding the hex file to the sensor, click on the Ok button to close the properties panel.
Now our sensor is fully operational, so let's design its simulation:
Proteus Simulation of Magnetic Hall Effect Sensor
- Now, let's design a simulation in Proteus software, as shown in the below figure:
- I have attached an LED with the digital output of the sensor and a voltmeter with analog output.
- I have also placed a simple LC filter at the analog output. This filter is not required in real hardware implementation.
- We are using it in Proteus simulation, as Proteus gives the peak to peak value and we have to convert that PP value into Vrms.
- If you are working on a real sensor then you don’t need to add this LC circuit.
- Now, let's run our simulation and if everything's configured correctly, you will get results as shown in the below figure:
- As you can see in the above figure, our sensors are working perfectly, now if you change the value of the potentiometer, their output will change accordingly.
So, that was all for today. I hope this sensor will help you guys in your final year and semester projects. If you have any questions, please ask in the comments. Thanks for reading. Take care !!! :)
Lipo Battery Library for Proteus
Hello everyone, I hope you all are fine. In today's tutorial, we are going to share a new Lipo Battery Library for Proteus. Proteus has a 12V battery module in it but they are quite simple in looks, so we have simply designed a stylish looking lipo battery, I hope you will find it useful for a better project presentation.
This Proteus Library has two Lipo Batteries in it, one is of 3.7V and the second one is of 11.1V, these are normally available Lipo models in the market. Although, you can change the voltage level of these batteries from their properties panel. Let's first have a look at the brief introduction of Lipo Baterry:
What is Lipo Battery???
- Lipo is an abbreviation of lithium polymer battery, designed using lithium-ion technology and uses polymer electrodes.
- Lipo Battery provides high power in a small package and thus used in autonomous project i.e. quadcopter, robotic vehicles etc.
Lipo Battery Library for Proteus
- First of all, we need to download the Proteus Library zip file of the Lipo battery, by clicking the below button:
Lipo Battery Library for Proteus
- In this zip file, you will find a folder named Proteus Library Files.
- In this folder, we have two files:
- LipoBatteryTEP.LIB
- LipoBatteryTEP.IDX
- Place these two files in the library folder of your Proteus software
Note:
- After adding these Library files, open your Proteus software or restart it, if it's already open.
- In the components section, make a search for Lipo Battery and you will get results, as shown in the below figure:
- As you can see, now we have two Lipo batteries in the components database, so let's place them in the Proteus workspace.
- If everything's fine, then you will get results as shown in the below figure:
- As you can see in the above figure, we have two Lipo Batteries:
- One is operating at 11.1V.
- Second one is operating at 3.7V
- We can change the voltage level from the properties panel, so double click on the Lipo battery to open its properties, as shown in the below figure:
- As you can see in the above figure, we have 11.1V written in the Voltage text box, so here you can change the voltage level of these batteries.
- Now, let's design a simple simulation to understand how it works:
- So, I have simply attached a voltmeter with both of these lipo batteries, as shown in the above figure.
- Now, let's run our simulation and if everything's fine, you will get results as shown in the below figure:
- If you are working on a 12V project, then simply change the voltage level from the properties panel and use it in your project.
So, that was all for today. I hope you have enjoyed today's tutorial. If you have any questions, please ask in comments and we will help you out. Thanks for reading.. Take care. Bye !!! :)
Soil Moisture Sensor Library for Proteus V2.0
Hello friends, I hope you all are doing fine. In today's tutorial, I am going to share a new Soil Moisture Sensor Library for Proteus V2.0. You should also have a look at its previous version i.e. Soil Moisture Sensor Library for Proteus V1.0. If you have worked on the previous version, it has only one soil moisture sensor in it, while in this library, we have added three soil moisture sensors.
First, we will have a brief introduction of the Soil Moisture sensor, then we will download the zip file containing Proteus Library files of Soil Moisture Sensor and finally, we will design a small simulation using these new sensors. So, let's get started:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | Arduino Uno | Amazon | Buy Now |
What is Soil Moisture Sensor?
- Soil Moisture sensor is an embedded sensor, used to measure the moisture level of the soil.
- It is normally used in agricultural automation projects, i.e. controlling the water flow based on the moisture level of the soil.
- Soil Moisture sensors are available with both analog and digital outputs.
- They normally have a potentiometer embedded in them, for controlling the sensitivity of the sensor.
Before downloading the sensor's library file, let's first have a look at what's new in version 2.
Difference b/w V1.0 & V2.0
- We received many complaints about the big size of the Soil Moisture sensor(V1.0), so we have reduced their sizes in this new library(V2.0).
- The first version contains only 1 soil moisture sensor, while in V2.0 we have added three soil moisture sensors.
- The output of V1.0 was quite smooth, while in V2.0 we have made the output a bit fluctuating to make it more realistic.
Now, let's download the Proteus Library zip file for this sensor and simulate it in Proteus:
Soil Moisture Sensor Library for Proteus V2.0
- First, we need to download the Proteus Library zip file, by clicking the below button:
Soil Moisture Sensor Library for Proteus V2.0
- After downloading the zip file, extract it and open the folder named Proteus Library Files.
- You will find three files in this folder, named as:
- SoilMoistureSensor2TEP.IDX
- SoilMoistureSensor2TEP.LIB
- SoilMoistureSensor2TEP.HEX
- Place these files in the library folder of your Proteus software.
Note:
- Now, open Proteus ISIS, and if you are already working on it, then restart it.
- In the components library, make a search for Soil Moisture Sensor, and you will get results as shown in the below figure:
- Let's place these three soil moisture sensors in the Proteus workspace:
- Quite pretty, aren't they? :)
Now let's design a small simulation, to have a look at its working:
Proteus Simulation of Soil Moisture Sensor
- As you can see in the above figure, each of these sensors has 4 pins in total, which are:
- Vcc: We need to provide +5V here.
- GND: We need to connect it to Ground.
- A0: It's the analog output pin, its value will increase as the moisture level of the soil will increase.
- TestPin: The voltage level of TestPin will decide the moisture level of the soil.
Why Test Pin is used?
- As it's a simulation, so we can't actually probe the sensor in real soil, so we are using this TestPin for testing purposes.
- The value of Test Pin can vary from 0 to 5V, so as the value of this Test Pin will increase, the sensor will consider the moisture level of the soil in increasing and thus its output will also increase. In simple words:
- If TestPin is HIGH: Soil has maximum moisture level.
- If TestPin is LOW: Soil is completely dry.
- We will place a potentiometer at TestPin to provide variable voltage for testing.
Adding Hex File to the sensor
- We have placed three library files of soil moisture sensor in the Library folder of Proteus, and if you have noticed, one of them is the .hex file.
- In order to operate this sensor, we need to add that hex file to our sensor.
- So, double click on the Soil Moisture sensor to open its Properties Panel.
- In the properties panel, we have a section named "Program File", here upload the hex file which we have downloaded, as shown in the below figure:
- After adding the hex file, click Ok to close the properties panel.
- Now, design a small simulation, as shown in the below figure:(I have added this simulation in the Proteus Library zip file)
- I have added the hex file in both of these soil moisture sensors.
- Now, let's run the Proteus Simulation and have a look at the output:
- As we change the value of the potentiometer(attached to Test Pin), the output of the sensor will change accordingly.
So, that was all for today. I hope this library will help embedded students in their engineering projects. If you have any suggestions/comments, please use the below comment form. Thanks for reading. Take care. Bye !!! :)
Home Security System using Arduino UNO in Proteus
Hello friends, I hope you all are doing well. In today's tutorial, we are going to design a Home Security System using Arduino UNO in Proteus software. It's the most commonly designed engineering project, especially in electrical, electronics and mechatronics engineering. Normally engineering students design it as a semester project during their engineering course.
So, today we will design a home security system from scratch in Proteus software. I have given the complete project below to download but I would suggest you to design it on your own so that you could understand it better. So, let's get started:
Home Security System: Project Description
- Before going into the detail, let's first download the complete Proteus Simulation with Arduino Code, by clicking the below button:
Home Security System using Arduino UNO in Proteus
Let me first give you a detailed project description i.e. what we actually want to design? We want to build a Home Security Project, which should follow these security protocols:
- Fire alarm: It should be able to detect the fire and sound an alarm to alert everyone at home.
- Smoke alarm: It should detect the gas(smoke) and turn on the alarm(if detected).
The above-mentioned security protocols will be followed 24/7. Moreover, there will be two security modes in the project, named:
- Secure Mode.
- Normal Mode.
Let's have a look at both of these modes, one by one:
1. Secure Mode
- This mode should be selected, when owners want to completely secure their home i.e. they are leaving home or while sleeping at night.
- If the Secure Mode is selected, the project should follow the following security protocols:
- Intruder Detection Alarm: It should detect the presence of any human being in the occupied premises.
- Windows Security Alarm: If someone tries to break through the windows, the project should sound an alarm.
- Door Security Alarm: If any intruder tries to break through the main door, it should again sound the alarm to alert everyone.
2. Normal Mode
- This mode should be selected, when owners are at home and just want to take the basic security measures.
- In this mode, only the Fire Alarm & Gas Alarm will work, while all other alarms will remain on standby.
Other Features
- There should be an LCD, to display values of all parameters.
- It should have a buzzer to generate an alarm, in case of emergency.
- There should a Push Button to make switches between these security modes.
Here's the final simulation, which we are going to design in today's lecture:
So, these are our requirements, which we want to achieve in this Home Security Project. Now let's have a look at the components selected for this project:
Home Security System: Components Selected
Now let's have a look at the list of components, which I have selected for this Home Security Project. I will also briefly explain the purpose of using each component.
1. Arduino UNO
- As clearly it's an Embedded Systems Project, so first of all we need to select a Microcontroller for our project.
- As I have mentioned earlier, we will use the Arduino UNO Microcontroller board for designing this project.
- Arduino UNO will act as the brain of the project and will control all sensors and modules.
2. Flame Sensor:
- A flame sensor is used to detects the presence of fire.
- The sensor basically consists of a photo-diode that detects the Infrared rays that emit from the fire. When it detects a fire, its output goes HIGH.
3. Gas Sensor (MQ-6)
- MQ-6 Gas Sensor is used to detect the concentration of gases in the environment.
- The sensor produces a potential difference proportional to the concentration of the particular gases.
- The type of gas that it detects depends upon the material used in the sensor.
- There are many gas sensors available in the market i.e. MQ-2, MQ-3, MQ-4 etc.
- These sensors are available as ready-made modules for easy interfacing with the microcontroller.
4. PIR Sensor(HC-SR501)
- HC-SR501 PIR sensor is used to detect any human being(intruder) in the Secure Mode.
- It detects the IR radiations from the human movement & generates a pulse on its output.
- The time period of the pulse could be varied by using the potentiometer on the sensor.
5. Vibration sensor(SW-420)
- The SW-420 vibration sensor is used to detect any forced entry through windows.
- In Secure Mode, if someone tries to open the window, the sensor will detect vibrations and will send a HIGH signal to the microcontroller.
6. Infrared Sensor
- An infrared sensor will be placed at the door and someone tried to enter through that door, the sensor will detect it.
- It consists of an IR transmitter and a photo-diode that are placed close to each other.
- If any object movement occurs in front of the sensor, the IR rays hit the object and return back with a particular angle called incident angle.
- This pulls the comparator output to ground or logic LOW.
7. LCD 20x4
- LCD 20x4 will be used for displaying the values of all these sensors.
- It will also display useful information i.e. which mode is selected.
8. Buzzer
- A small 5V Buzzer is used to sound the alarm.
9. LM7805
- LM7805 is a voltage regulator and is used to convert voltage from 12V to 5V.
- Power sources(i.e. battery, adapter etc.) available are normally 12V, as it has become a standard.
- Moreover, many components also operate at 12V like a buzzer or DC motor.
- While microcontrollers and sensors work on 5V, so in Embedded projects, it's quite necessary to design a voltage regulator from 12V to 5V and in some cases 3.3V.
- I normally prefer LM7805 for converting voltage from 12V to 5V.
10. Resistances(1kohm)
- We need to use a few resistances of 1kohm.
11. Small LED
- We will also use a small LED for power indication.
12. Capacitors(100uF)
- We will also use few capacitors of 100uF, as it removes any noise/ripples.
So, these are the components, we are going to use for designing Home Security System. Now let's get started with designing the Proteus Simulation:
Proteus Simulation of Home Security System
As I have told you earlier, I am going to use Proteus software for designing this project. Proteus is an excellent simulation tool, where we will not only design the circuit of this project but will also test its output. I always design my programming algorithms on simulations as working on real hardware is too time-consuming. You should remove all your programming bugs in simulation and once confirmed then design your project in real hardware. So, let's start:
Install Proteus Libraries
- Arduino boards & sensors' modules are not available in the Proteus components list.
- So, first of all, we need to install these Proteus libraries:
- Adding these libraries is quite simple, you just need to place their files in the library folder of Proteus software.
- If you got any issues, then read this guide on How to add a Library in Proteus 8.
Once you added all the libraries, now open your Proteus software.
Designing Circuit Diagram in Proteus
- Now we need to design a circuit for our project, so select these components from Proteus Components Search Box.
- First of all, let's design the voltage regulator circuit using LM7805, which will be simply converting the voltage from 12V to 5V.
- As you can see in the above figure, I have used 12V Battery, while the output of LM7805 is showing 5V and I have also placed an LED for power indication.
LCD Interfacing with Arduino:
- Next, we need to interface 20x4 LCD with Arduino UNO, so design the circuit as shown in the below figure:
Next, we need to interface five sensors with Arduino UNO, so let's add them to our Proteus simulation:
Sensors Interfacing with Arduino:
- These are simple digital & analog sensors and are all powered up at 5V.
- So, simply connect them as shown in the below figure:
- The Flame Sensor is connected to pin A0 of Arduino UNO.
- Gas Sensor is connected to pin A1 of Arduino UNO.
- PIR Sensor is connected to pin A2 of Arduino UNO.
- The Vibration Sensor is connected to pin A3 of Arduino UNO.
- The Infrared Sensor is connected to pin A4 of Arduino UNO.
For simulation, ensure all hex files are uploaded to each sensor for proper working. You can upload the source code hex file to the Arduino, by pressing Ctrl+E or by right click --> Edit properties.
Buzzer & Push Button:
- Finally, we need to add the Buzzer to sound the alarm in emergency cases, I have connected it to Pin A5 of Arduino UNO.
- I have also connected a push-button for switching the modes, connected to Pin 7 of Arduino UNO, as shown in the below figure:
- Here's the image of the complete Proteus Simulation for Home Security System:
Now let's design the Arduino programming code for Home Security Project:
Arduino Code for Home Security System
In the previous section, we have designed the Proteus simulation of the project, now let's design its Arduino Code to make it alive. Let's get started:
Initialization LCD Arduino Code
- First of all, we need to define all our variables, as you can see in the code shown in the right figure.
- I have included the Liquid Crystal Library, which is used to operate LCD.
- Next, I have defined all my sensors to the respective pins and then initialized boolean variables for storing the output of sensors.
- In the Setup loop, I have made the sensors' pins input pullup using the pinMode Arduino command.
- Finally, displayed an initialization message on the LCD screen i.e. "Home Security System using Arduino UNO By TEP".
- The message will display for around 1 second and then LCD will be cleared and the SensorDisplay function will be called, which will simply write sensors' names on the LCD screen.
- Now compile your code and add the hex file in Arduino UNO and run your PRoteus simulation.
- If everything goes fine, you will get results as shown in the below figure:
So far, we have just displayed the sensor's names, now let's read the sensors' data in the loop section:
Reading Sensors' Data
- In the loop section, first of all, we need to read the sensors' data using the digitalRead command, as shown in the code.
- After reading the sensor's data, I have called the SensorValues function, in which I have placed a check on each sensor's value and updated it on LCD.
- It's quite straightforward code, if the sensor is giving HIGH output, I am displaying Yes on LCD and if it's LOW, I am simply printing No.
- We haven't yet defined the modes, so the project will keep on reading the sensors and will display their respective value in the LCD.
- As you can see in the below figure, if the TestPin of the sensor is HIGH, its respective value on LCD is showing "Yes" and if it's LOW then "No" is written.
- Now, if you change any sensor's value, its respective value on LCD will be updated.
So, we have successfully interfaced our sensors with Arduino UNO and now it's time to add operational modes to our project.
Two Operational Modes
- As I mentioned earlier, we need to add two operational modes in our project, and the push button will be used for conversion from one mode to another.
- So, I have simply added an If loop in my code, as shown in the figure on the right side.
- In normal mode, I have simply displayed the name of the mode at the first line of LCD.
- While in secure mode, I am checking if either of the sensors goes HIGH, simply turn ON the Buzzer.
- Although, you won't be able to hear the Buzzer sound in the below figure, but you can see Buzzer's Pin is HIGH because two of the sensors are giving a response. Check the video for Buzzer working.
- We normally need to use an optocoupler or relay driver in between the buzzer and microcontroller as buzzers normally operate at 12V, but 5V buzzers are also available.
- Here's the complete Arduino Code:
/*
* All rights reserved to TEP www.TheEngineeringProjects.com
*/
#include
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
#define Flame A0
#define Gas A1
#define Pir A2
#define Vib A3
#define Ir A4
#define Buzzer A5
#define Switch 7
boolean Fire, Smoke, Intruder, Window, Door;
boolean Mode = false;
void setup() {
pinMode(Flame,INPUT_PULLUP);
pinMode(Gas,INPUT_PULLUP);
pinMode(Pir,INPUT_PULLUP);
pinMode(Vib,INPUT_PULLUP);
pinMode(Ir,INPUT_PULLUP);
pinMode(Switch,INPUT_PULLUP);
pinMode(Buzzer,OUTPUT);
lcd.begin(20,4);
pinMode(Buzzer, OUTPUT);
lcd.setCursor(0,1);
lcd.print("HOME SECURITY SYSTEM");
lcd.setCursor(0,2);
lcd.print(" USING ARDUINO UNO ");
lcd.setCursor(7,3);
lcd.print("By TEP ");
//delay(700);
lcd.clear();
SensorDisplay();
}
void loop()
{
Fire = digitalRead(Flame);
Smoke = digitalRead(Gas);
Intruder = digitalRead(Pir);
Window = digitalRead(Vib);
Door = digitalRead(Ir);
Mode = digitalRead(Switch);
SensorValues();
if(Mode==false) // Normal mode
{
lcd.setCursor(4,0);
lcd.print("Normal Mode");
}
else // Secure Mode
{
lcd.setCursor(4,0);
lcd.print("Secure Mode");
if((Fire == HIGH) || (Smoke == HIGH) || (Intruder == HIGH) || (Window == HIGH) || (Door == HIGH)){
digitalWrite(Buzzer, HIGH);
}else{
digitalWrite(Buzzer, LOW);
}
}
}
void SensorDisplay()
{
lcd.setCursor(0,1);
lcd.print("Fire:");
lcd.setCursor(10,1);
lcd.print("Smoke:");
lcd.setCursor(0,2);
lcd.print("Door:");
lcd.setCursor(10,2);
lcd.print("Window:");
lcd.setCursor(0,3);
lcd.print("Intruder:");
}
void SensorValues()
{
if(Fire == true){ lcd.setCursor(6,1); lcd.print("Yes");}
else{ lcd.setCursor(6,1); lcd.print("No ");}
if(Smoke == true){lcd.setCursor(17,1); lcd.print("Yes");}
else{lcd.setCursor(17,1); lcd.print("No ");}
if(Intruder == true){lcd.setCursor(11,3); lcd.print("Yes");}
else{lcd.setCursor(11,3); lcd.print("No ");}
if(Window == true){lcd.setCursor(17,2); lcd.print("Yes");}
else{lcd.setCursor(17,2); lcd.print("No ");}
if(Door == true){lcd.setCursor(6,2); lcd.print("Yes");}
else{lcd.setCursor(6,2); lcd.print("No ");}
}
Future Scope of Home Security System
- Embedded has taken over the whole world because of its user-friendliness and low cost.
- Instead of hiring security guards(which is quite expensive), now smart homes in modern societies are equipped with such home security systems.
- Modern Home Security systems are even linked with local police or security agencies for emergency help.
- Moreover, these security systems are not bound to homes only, nowadays offices, banks, shopping malls etc. are all equipped with such smart security systems.
Future Work on Home Security System
- Today, we have designed a very simple Home Security System, where we interfaced few sensors and have only placed a Buzzer.
- We will continue this project and will add smart features to it.
- Let's have a look at few features, which we can add to this project:
- We can interface the GSM module to send messages, in case of emergency.
- We can add more sensors i.e. ultrasonic sensors, different types of Gas sensors in it.
- We can also improve our code by using interrupts instead of polling.
- We can also add a camera for facial recognition.
- To improve the security, we can add a keypad and only authorized persons will have the access to enter.
- The fingerprint sensor can also be used for identification purposes.
No matter what happens, you should put safety first. Even a great security system won’t ensure full protection, which is why you might want to consider secondary measures. Hiring fire watch security will assist you on a daily basis, performing tasks that machines cannot. These veterans will protect your home or office, addressing potential hazards as they appear.
So, that was all for today. I hope you guys have enjoyed today's project. If you have any questions/queries, please ask in the comments and I will try my best to resolve them asap. Thanks for reading, take care. Bye :)
Traffic Light Simulation with D Flip Flop in Proteus
Hi Mentees! we hope you are doing great. Welcome to a super easy yet useful project based upon the simulation in Proteus. We are working on the Traffic Lights project that will work with the help of
D Flip Flop. In this simple tutorial, you will be aware of the following concepts:
- What are the Traffic Lights using D Flip Flop?
- What is the role of D Flip Flop?
- How does the circuit of D Flip Flop work in the Traffic Lights?
- How can you simulate the circuit of Traffic Lights with D Flip Flop in Proteus?
In addition, you will find some important information about the Traffic Lights circuit in the
DID YOU KNOW Sections. Let's start learning.
Traffic Lights with D Flip Flop
Who is not aware of the traffic lights? we all observe and use the Traffic lights on the road every day. But for the sake of the concepts, let's see the traffic lights technically.
"The Traffic Lights are the signaling devices that has an electronic circuit designed to control the flow of traffic at the roads by a specialized pattern of lights."
These traffic lights are positioned at road intersections ad pedestrian crossing and other positions where the traffic flow has to maintain.
The Traffic Lights depends on an array of three lights with different colors that are connected electrically The whole system is packed into a metallic structure. The LEDs turn on and off with a special pattern that depends upon the circuit.
Before moving forward, refresh the concepts of Traffic Light with the logical point of view. There are three lights in the Traffic Light Signals. These are:
- Red
- Amber
- Green
The red light stays last for some moments. The circuit is designed so, we get the output from the Amber color light that coordinates with the red and green light and lasts for some time. In the end, we get only Green light. All these lights are formed as a result of the sequential logic of D Flip Flop and at the end, the output of two D Flip Flops are inserted into AND Gate. The output of the Green light depends upon the AND Gate and we found the light of green LED only when the output of both the D Flip Flops are HIGH.
Role of D Flip Flop in Traffic Lights
Have you ever thought about how does the traffic light blink at a specific time? We all follow the Traffic lights but today we'll learn that what does traffic light follows. The D Flip Flops are the logical circuits and we define the D Flip Flop as:
"The D Flip Flops a dual input is Flip Flop circuit that is designed to have the input at its D Terminal, regulates the signal with the clock edge pulses and shows the output at its two output terminals."
In the Traffic Lights, we use two D Flip Flops that are responsible for the switching of the lights in on or off conditions. The D Flip Flop is the combination of the S and R Flip Flops with an inverter with one terminal. but for simplicity, we'll use the Integrated Circuit of D Flip Flop. Hence our circuit has only four components and we get a clean, easy and useful circuit that works automatically.
The input Terminals are called
CLK and
D terminals whereas output terminals are denoted by
Q and
Q'. The Truth Table for the D Flip Flop is given next:
Inputs |
Output |
CLK |
D |
Q |
Q’ |
0 |
X |
No Change |
1 |
0 |
0 |
1 |
1 |
1 |
1 |
0 |
The X is called the don't care condition which means in this situation, the value of D does not matters. You can learn more about D Flip Flop in
https://www.theengineeringprojects.com/2021/01/d-type-flip-flop-circuit-diagrams-in-proteus.html section.
The output of the D Flip Flop is connected with each LED in the Traffic lights and hence we observe the on/off situations of Traffic Lights.
Working of Traffic Lights circuit with D Flip Flop
The working of the Traffic Light starts with the change in the pulse of the clock.
- The Q' output of the D Flip Flop 2 gives the power to the Red Light of the Traffic Light.
- When the clock is low, there is no change in the Q' terminal of the 1st Flip Flop then the Amber light is off.
- With the clock pulses, the Amber light of the Traffic Light turns on.
- When the clock is high, we get the output inverse of the D Flip Flop.
- The output Q of the D Flip Flop1 and the Q' of the D Flip Flop 2 is fed into AND Gate.
- We know the AND Gate is HIGH only when both of its terminals are HIGH.
- This output of the AND Gate is connected with the Green Light of the Traffic Light.
Circuit Simulation of Traffic Lights in Proteus ISIS
For the simulation of Traffic Light in Proteus, simply follow the easy steps coming next.
Devices required for the Traffic Lights
- D Flip Flop - DTFF
- Traffic Lights
- AND Gate
- Clock pulses - DClock
- Connecting wires
- Power up your Proteus software.
- Click the "P" button.
- Write the names of 1st three devices given above one by one and choose them.
- Get D Flip Flop twice, And Gate and Traffic Lights from the pick library and arrange them on the working area.
- Go to Generation mode(from the sidebar) >DClock and set it just on left side of the 1st D Flip Flop.
- Connect all the components with the help of connecting wires.
- Connect the Traffic Light's red light with the output of 1st D Flip Flop, the amber light with the D Flip Flop 2 and the green light with the output of AND Gate.
Does your Traffic Lights are working well? great! if not, then check the connection again. if you face any problem then share with us.
Consequently, today we learned about the logic behind the Traffic Lights. We learned that with the help of D Flip Flop, one can easily design a circuit just using four simple devices. We saw the working of the sequential on/off condition of the Traffic Lights. Stay with us for more interesting circuits.
H-Bridge Circuit with 2N2222 Transistor in Proteus
Hey Learners! Welcome to The Engineering Projects. We hope you are doing great. Our team is working on transistors and today, we'll design a circuit for using the 2N2222 Transistor. In this chapter you will learn:
- What is H Bridge with 2N2222 Transistor?
- How do the 2N2222 Transistor works?
- What is the working of H Bridge?
- How can we run the circuit of H Bridge in Proteus using 2N2222 Transistor?
By the same token, you will also learn important information about the topic in DID YOU KNOW Sections.
Introduction to H-Bridge
In electronic circuits, the direction of quantities like the flow of current, EMF, Electric field lines matter a lot. The H Bridge is used to control such motors through its specialized circuitry. The H Bridge is defined as:
"The H Bridge is an elementary circuit that ends the Motors to rotate in forward or backward direction according to the will of the user."
In this way, there is no need for the two motors in many cases. Only one motor can be used to accomplish the task instead of two.
DID YOU KNOW???
The most common, easy and interesting application of the H Bridge is in the robotics. The H Bridge is used to run the motors of the robots that are required to move the robot in the forward and backward direction.
The circuit of the 2N2222 H Bridge allows the current from the Direct Current source to flow from the required direction only and hinders the flow from the other direction.
Why we need the H Bridge
The direction of the moving of a motor paly a vital role in the output of that motor. The reason behind this is, most electric motors operate due to torque produced as the combined effect of magnetic field and electric current through a wire winding. Hence, We always need some means through which we can control the direction of the Motor to get the output that is suitable for our present requirement.
Performance of 2N2222 Transistor in H Bridge
The 2N2222 Transistor works as a backbone in the circuit of the H Bridge. We use four 2N2222 Transistors in the circuit and they work as a couple. The diagonal Transistors work together as a couple and allow the flow of current through them. By the same token, the non-diagonal 2N2222 Transistors work as a couple. Let's have a look at what is 2N2222 Transistor:
"The 2N2222 Transistor is a type of Bipolar Junction Transistors or BJTs that is designed to be used in the low power amplifying or switching applications."
DID YO KNOW???
Motorola made many semiconductor companies and the 2N2222 is part of a huge family of Devices and Transistors that were discussed in IRE Conventions in Motorola company.
Being a BJT Transistor, the 2N2222 allows the flow of current in only one direction. Thus, it is responsible for the rotation of the Motor as per requirement of the user.
The 2N2222 transistor (just as other JTs) has three pins. These pins are called Emitter, Base and Collector. The arrow symbol just at the transistor symbolizes the Emitter.
Being an NPN Transistor, the collector and emitter terminals of 2N2222 Transistor in H Bridge act reverse biased or are said to be left open when the base pin is held to the ground or when there is no current flow from the base.
On the other hand, when the base gets the flow of current from the battery or other components of the circuit in the H Bridge, the circuit is said to be forward-biased. The gain of the 2N2222 Transistor in the H Bridge ranges from 110 to 800. The value of gain is responsible for the determination of the 2N2222 Transistor's amplification capacity in the H Bridge.
Working of H Bridge Circuit
When we look at the circuit of H Bridge we get the following points:
- The Direct Current from the battery originates from the positive terminal of the battery (considering the conventional current) and passes through the switch.
- The switch allows the current to pass through the pair of the 2N2222 Transistor that is to be used.
- The resistors just before the Transistors perform the regulation of the current through the transistors.
- In our case, the H Bridge works according to the table given below:
Switch |
Flow of Current |
Direction of Motor |
Connected to A |
From T4 to Motor then Motor to T1 |
Anti-Clockwise |
Connected to B |
From T2 to Motor then Motor to T3 |
ClockWise |
Let's have a look at the working of the H Bridge in action in Proteus ISIS.
Circuit of H Bridge in Proteus ISIS
We are going to design the circuit of the H Bridge in the Proteus ISIS. But before this, let's have a look at the required devices for the circuit.
Required Devices for H Bridge
- 2N2222 Transistor
- Resistor
- Motor
- Cell
- Switch
- Connecting Wires
Now, just follow these simple steps:
- Start your Proteus Software.
- Click at the "P" button and choose the required devices except for connecting wires one by one.
- Arrange for 2N2222 Transistors, four Resistors, motor, switch and cell on the working area.
- Change the orientation of two of these Transistors before setting on the screen by clicking the arrow sign given just above the "P" button.
- Left Click the motor>Rotate clock-wise to change the direction of the motor according to the image given next:
- Change the value of Cell and Motor to 6v by double taping them one after the other.
- Connect all the components according to the circuit given next:
- Double click at all the resistors and transistors one after the other and label them to identify them as different devices.
- Pop the simulation button.
- Change the orientation of switch and check the output.
Task
Change the value of the transistors around the motor and observe the rotation speed of the motor.
Truss today we saw, what is H Bridge, what is the role of 2N2222 Transistor in the circuit of H Bridge, How does the circuit of H Bridge works and we implemented the H Bridge circuit using 2N2222 Transistor in Proteus ISIS. Stay with us with more tutorials.