Simple 4-Way Traffic Light Control using Arduino
Hello friends, I hope you’re all well and healthy. In today’s tutorial, we will be going through a simple, yet effective practice to design a 4-way traffic light simulation in Proteus software. This project is designed for undergrad engineering students with majors in electronics, electrical and mechatronics engineering. It is also useful for people that want to learn the basics of circuit design and Arduino programming.
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | LEDs | Amazon | Buy Now |
2 | Arduino Mega 2560 | Amazon | Buy Now |
4-Way Traffic Light Control using Arduino:
Traffic lights are an integral part of the world’s transportation systems. Over the years a number of different algorithms regarding traffic lights have been developed. The algorithm being used at any place for the purpose of controlling traffic takes into account of various factors, such as number of lanes, people that cross a certain road, etc. The most common usage of traffic lights is to control the flow of traffic, which means providing a steady flow for people to go about their daily business on the road. Traffic lights help reduce accidents by a large margin since they allow the flow of vehicles in only one direction at a time. Traffic lights also help in avoiding traffic jams. The most common traffic light pattern being used in the world today is a 4-way traffic control that accounts for pedestrians as well. This sort of pattern is used in main city blocks and squares since these possess both vehicular traffic as well as pedestrian traffic. Traffic lights have a universal color understanding that red light signals for the traffic to stop, yellow light serves as a transition light from going to stop and vice versa.
Software to Install:
Since we are simulating this project instead of designing it using hardware components, you need to fill some requisites so that you can follow our procedure. At first, we need to have the simulating software. For simulation purposes, we will use the Proteus software, if you already have that installed, that is excellent. However, if you don’t, you should Install Proteus Software. Proteus is a circuit simulating software that has an open database that can be customized quite easily, leaving room to add new components along with their libraries. To start working with Proteus for this project, you need to add the following libraries:
- Arduino Library for Proteus: This library includes all the Arduino boards, giving you options to simulate your circuit exactly according to your needs.
Project Overview:
The main components of a 4-way traffic light are:
- Arduino Mega: For this circuit, we recommend using Arduino mega, that is because to control 4-way traffic along with pedestrian lights, we need 20 output pins while an Arduino UNO only has 14 digital I/O pins.
- Traffic light module: This is an inbuilt traffic light module you can find in Proteus, there is no need for any additional libraries for this.
- Pedestrian Lights: To distinguish pedestrian lights, we will use simple LEDs.
In this certain design, we have used delays to control the ON and OFF time of the traffic lights. There are other ways around this as well but using delays with Arduino is the simplest and most effective way for small projects.
The pedestrian lights are set up so that whenever a certain traffic light is GREEN, its opposing pedestrian light on which there is no traffic is turned ON and signals for the pedestrians to walk.
Components Needed:
- Arduino Mega
- Green and Red LEDs
- Traffic Lights
Component details:
Arduino Mega:
Arduino Mega is a programmable microcontroller board.
Arduino Mega contains ATMegaGA2560 and is based on that microcontroller.
Every Arduino board is equipped with voltage regulators to make sure an excessive input does not burn components on the board.
Arduino Mega has 53 digital I/O pins.
Figure 1: Arduino Mega
Traffic Lights:
This module consists of three lights, namely, Red, Yellow and Green.
All three lights have separate input pins through which each light is controlled independently.
Make sure you connect all three pins to the Arduino, even if you are not using a certain light. This is because Proteus simulation only works when all the pins of traffic light are connected.
Figure 2: Traffic Lights
Proteus Simulation of Traffic Light Control:
We will first make the circuit on our Proteus software, after doing the connections of the circuit, we will work on the Arduino code based upon the circuitry and connections made.
First of all, make sure you have downloaded and installed Proteus software on your system and have downloaded and integrated the required libraries with the downloaded software.
Open Proteus and then open a new project, there is no need to change settings and simply select okay to default selected settings.
Import all the components of this project mentioned above and shown in the figure below:
Figure 3: Required Components
Place the components in the worksheet as illustrated below:
Figure 4: Component Placement
After placing the components in the worksheet, make connections as follows:
- Connect 0,1 and 2 digital pins of Arduino to red, yellow and green of traffic light 1 respectively.
- Connect 3,4 and 5 digital pins of Arduino to red, yellow and green of traffic light 2 respectively.
- Connect 6,7 and 8 digital pins of Arduino to red, yellow and green of traffic light 3 respectively.
- Connect 9,10 and 11 digital pins of Arduino to red, yellow and green of traffic light 4 respectively.
- Connect 12and 13 digital pins of Arduino to red and green LEDs of pedestrian light 1 respectively.
- Connect 14 and 15 digital pins of Arduino to red and green LEDs of pedestrian light 2 respectively.
- Connect 16 and 17 digital pins of Arduino to red and green LEDs of pedestrian light 3 respectively.
- Connect 18 and 19 digital pins of Arduino to red and green LEDs of pedestrian light 4 respectively.
- Ground the negative terminals of all LEDs.
With this, your circuit connections are complete and we will now move on to the firmware setup of this circuit.
Arduino Code:
We have divided the Arduino code into 3 segments:
- Declaration Code
- Void setup
- Void loop
We will look at these sections separately now.
Declaration Code:
The first step in the code is the declaration of variables that we will utilize in our program. At first is the declaration of traffic lights and setting them up with their respective pins of Arduino board. The syntax of this code is as follows.
Figure 5: Arduino Code
The next declaration is of pedestrian lights. The syntax of pedestrian light declaration is illustrated as follows.
Figure 6: Arduino Code
Void Setup:
This part of the code along with the declaration part is run only once, we will use this to define output and input pins. This helps Arduino to understand which pins to take data from and which pins to write data on.
Since there is no input, we will only define traffic lights and pedestrian lights as output pins. The syntax to do this is shown in figure 7.
Figure 7: Arduino code, Void Setup
Void Loop:
This part of the code runs in a loop consistently and is used to write the main section of the code.
In the first section, we will turn on the green light of signal 1 while all other signals are red. The pedestrian lights are red for pedestrian signals 1, 2 and 3. While the pedestrian 4 light is green since it is opposite to traffic signal 1.
Figure 8: Arduino Code
After a delay of 2000ms, we will turn on the yellow light for signal 1 and signal 2 to indicate that a transition from signal 1 to signal 2 will be made shortly. We will also turn all pedestrian lights red in order to ensure pedestrian safety.
Figure 9: Arduino Code
After a delay of 1000ms, all traffic and pedestrian lights will turn off for 100ms.
Figure 10: Arduino Code
For the second signal, we will turn on the green light of signal 2 while all other signals are red. The pedestrian lights are red for pedestrian signals 2, 3 and 4. While the pedestrian 1 light is green since it is opposite to traffic signal 2.
Figure 11: Arduino Code
After a delay of 2000ms, we will turn on the yellow light for signal 2 and signal 3 to indicate that a transition from signal 2 to signal 3 will be made shortly. We will also turn all pedestrian lights red in order to ensure pedestrian safety.
Figure 12: Arduino Code
After a delay of 1000ms, all traffic and pedestrian lights will turn off for 100ms.
Figure 13: Arduino Code
For signal 3, we will turn on the green light of signal 3 while all other signals are red. The pedestrian lights are red for pedestrian signal 1, 3 and 4. While the pedestrian 2 light is green since it is opposite to traffic signal 3.
Figure 14: Arduino Code
After a delay of 2000ms, we will turn on the yellow light for signal 3 and signal 4 to indicate that a transition from signal 3 to signal 4 will be made shortly. We will also turn all pedestrian lights red in order to ensure pedestrian safety.
Figure 15: Arduino Code
After a delay of 1000ms, all traffic and pedestrian lights will turn off for 100ms.
Figure 16: Arduino Code
For the final signal, we will turn on the green light of signal 4 while all other signals are red. The pedestrian lights are red for pedestrian signals 1, 2 and 4. While the pedestrian 3 light is green since it is opposite to traffic signal 4.
Figure 17: Arduino Code
After a delay of 2000ms, we will turn on the yellow light for signal 4 and signal 1 to indicate that a transition from signal 4 to signal 1 will be made shortly. We will also turn all pedestrian lights red in order to ensure pedestrian safety. This will also complete the loop and the sequence will keep running on its own.
Figure 18: Arduino Code
After a delay of 1000ms, all traffic and pedestrian lights will turn off for 100ms.
Figure 19: Arduino Code
With this, the program of the void loop will end and start again from signal 1 on its own.
Results/Working:
Generate a hex file from the Arduino program made above. Be sure to select
Integrate the hex file into your Arduino board on Proteus.
Run the simulation.
The results of the simulation should be something like our simulation results.
The simulation results for each scenario are illustrated in the figure below.
At first, traffic signal 1 is turned ON and the green light is displayed for 2000ms. The green pedestrian light 4 is also turned ON since it is opposite to signal 1.
Figure 20: Signal 1 is ON while Pedestrian 4 is ON.
Then the yellow light of signals 1 and 2 are turned ON showing transition is about to happen. The red pedestrian lights during this are turned ON to ensure pedestrian safety.
Figure 21: Yellow light showing the transition.
Then traffic signal 2 is turned ON and the green light is displayed for 2000ms. The green pedestrian light 1 is also turned ON since it is opposite to signal 2.
Figure 22: Signal 2 is ON while Pedestrian 1 is ON.
Then the yellow light of signal 2 and 3 is turned ON showing transition is about to happen. The red pedestrian lights during this are turned ON to ensure pedestrian safety.
Figure 23: Yellow light showing transition.
Then traffic signal 3 is turned ON and the green light is displayed for 2000ms. The green pedestrian light 2 is also turned ON since it is opposite to signal 3.
Figure 24: Signal 3 is ON and Pedestrian 2 is ON
Then the yellow light of signal 3 and 4 is turned ON showing transition is about to happen. The red pedestrian lights during this are turned ON to ensure pedestrian safety.
Figure 25: Yellow light showing the transition.
Then traffic signal 4 is turned ON and the green light is displayed for 2000ms. The green pedestrian light 3 is also turned ON since it is opposite to signal 4.
Figure 26: Signal 3 is ON and Pedestrian 2 is ON
Then the yellow light of signal 4 and 1 is turned ON showing transition is about to happen. The red pedestrian lights during this are turned ON to ensure pedestrian safety.
Figure 27: Yellow light showing the transition.
That is all for today’s tutorial, I hope you enjoyed learning with us. We wish you have a good day ahead of you. Thanks for reading.
Accident Detection System using Arduino
Hello everyone, Welcome to our new project. Our new project plays a very important role in our daily life as it is directly connected to our lives. In this project, we are going to design an Accident Detection module. Accidents are the most common thing we hear about in the news, and in social media. Everyone here or there has seen accidents or has been with one. So when any such incidents happen, we inform respective stations or hospitals in that emergency situation. But what about the accidents that happen at night, or in places where there is very less crowd or you are alone. So, to address this issue and provide a potential solution for that, we are going to learn how to detect an accident automatically and inform nearby aid/help stations.
We can use this useful project for an engineering project’s showcase for electronics, electrical engineering students, and can be used in real-life situations where it can help people in disastrous situations.
According to WHO, research says that in the current scenario, 1.3 million people are the victims of road traffic crashes, and 40% of these accidents of all fatal accidents occur at night. In most cases, the accidents are not reported immediately, or the injured doesn’t receive any help during that time. The time between the accident and the arrival of medical help for the injured can sometimes make the difference between his life or death. In the future, we can interface with the vehicle airbag system. This will optimize the proposed technology to the maximum extent and result in the finest accident detection system possible. In this Modern era, everything is being automated and with this project, we are going to automate this process with some electronic components and Arduino. So Let’s dive in. Here's the video demonstration of this project:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | NEO-6M | Amazon | Buy Now |
2 | SIM900 | Amazon | Buy Now |
3 | Arduino Uno | Amazon | Buy Now |
Software to Install:
Instead of using real components, we will design this project using Proteus Simulation. Working with simulation before attempting to make it with real components is also a smart practice. We can figure out the issue that may arise while working on real components and avoid any kind of damage to our components by simulating it.
Proteus is a very fascinating tool that allows us to simulate and create electronic circuits. Despite the fact that Proteus software contains a large library of electronics components, it still lacks pre-installed modules such as Arduino boards, GPS or GSM modules, and so on.
Let’s install the required libraries which, we are going to use in this project:
You can download this whole project for example Proteus Simulation and Arduino Code, by tapping the below button
Accident Detection System using Arduino
Project Overview:
These are required components for Accident Detection, which are as follows:
- Arduino Uno: Arduino Uno is a development board from the Arduino family, which is the main component of this project. The Microcontroller i.e., Arduino is responsible for the decisions that are going to be processed in the project.
- Accelerometer: An accelerometer is a device that measures acceleration, which is the change in speed (velocity) per unit time. By measuring acceleration we can get information like object inclination and vibration which helps in detecting unusual activities/ accidents.
- GSM: A GSM/GPRS Module is a device that is actually responsible for the wireless communication with the GSM Network, in this case, it is responsible for sending the appropriate information to rescue stations.
Components Needed:
- Arduino Uno
- GPRS Module
- Accelerometer
- GSM Module
- Bread Board
- Jumper Wires
Component details:
Arduino Uno:
- The Arduino UNO is one of the Arduino family's programmable, open-source microcontroller boards.
- It includes an Atmel Microchip ATMega328P microcontroller with an 8-bit RISC processing core and 32 KB flash memory from Atmel.
- It has 14 digital I/O pins, including 6 PWM pins and 6 analog I/O pins with a resolution of 10 bits (0-1024).
- It comes with one hardware UART, one I2C, and one SPI peripheral.
- We can use the Arduino UNO with a voltage range of 7-12 volts, but not more than 9 volts is recommended because it may damage the Arduino board
- To power the Arduino UNO we can use a USB-B cable (the same cable that we use to upload the sketch to Arduino UNO), a DC power jack, or the Vin pin on the board.
GPS Module:
- The Global Positioning System (GPS) is a space-based global navigation satellite system that gives accurate location and timing in all weather and at all times around the world.
- It sendLongitude, latitude, height, and time are the four variables that a GPS receiver determines.
- Data determined by the module will be sent to the microcontroller (Arduino Uno) through the UART protocol.
- With a USB interface, the GPS module is simple to operate. It operates on a 3.2 to 5V supply range, allowing it to interface with both 3.3V and 5V microcontrollers.
- It has a default baud rate of 9600 and can be modified as per our requirement.
- We have used this to get the current location of the user.
Accelerometer:
- Accelerometer sensors are integrated circuits (ICs) that are used to measure acceleration, inclination, and various parameters regarding the x,y,z axes. It is the main component to detect the accident.
- Here we used the MEMS (Microelectromechanical Systems) accelerometer. These types of accelerometers are used where we have to measure the vibration or shock without any fixed reference.
- It monitors changes in the capacitance and converts that value to analog output voltage.
- Gyro Range of the Accelerometer sensor is ± 250, 500, 1000, 2000 °/s (may vary depending upon the sensor).
- Accelerometer Range of the sensor module is ± 2 ± 4 ± 8 ± 16 g (may vary depending upon the sensor).
GSM module:
- This module is used to send the notification to the rescue station or the emergency numbers.
- It communicates with the Arduino UNO using the UART protocol.
- It works in a voltage range of 3.5 - 5 volts.
- There are different types of GSM modules available but in this project, we have used the SIM900D module.
- We operate them using the AT commands. As there are hundreds of AT commands but we will use some basic only just to send the message.
Proteus Simulation of Accident Detection Circuit:
Now, it is time to start designing the main circuit of Accident detection in Proteus Simulation software.
- Most importantly, ensure that Proteus is installed on your PC/Laptop and download all the required libraries for Proteus ahead of starting the designing steps.
- For this project, we are going to use libraries for Arduino Uno, GPRS Module, GSM module.
- To add the libraries in the Proteus suite we have to go to the C drive then LabCenter Electronics >> Proteus 8 professional >> Data >> Library and paste the downloaded library files here.
- The download links of all the libraries have been provided to you in the above sections, please go check them out.
- Let’s start the making of a new project, open the new project in Proteus.
- After that enter the name of your new project.
- Now our working area will be open here we will import all the required components which we are going to use.
- The following components need to be selected from the Proteus component library. We’ll connect the components and make the circuit complete.
- Now we have imported all the required components for this project, after this, we will start connecting them.
Circuit Diagram and Working:
- There are two modules GPRS and GSM modules, both communicate using the UART protocol but in the Arduino UNO there is only one hardware UART’s provision. Now, you may have doubts about how we are going to connect them. No worries, we will handle that on the coding side by declaring the different pins as UART pins.
- We can use different pins for UART using the SoftSerial library of Arduino, which will be discussed in the code.
- We will use the digital pins for UART connections, digital pins 2 and 3 for communication of the GSM module, which means connecting the Rx and Tx of the GSM module with the D2 and D3 pins of Arduino UNO respectively.
- Connect the Rx and Tx of the GPRS module with the D10 and D11 pins of Arduino UNO respectively.
- As modules are connected, now we will connect the accelerometer. As it will not be possible to simulate the accelerometer in Proteus so we have used the potentiometers to change the value of the X-axis, Y-axis and Z-axis.
- You may have doubts about how we can replace the accelerometer with potentiometers. As we will use the MEMS accelerometer, which sends the analog voltages for each axis, so we can simulate that using the potentiometer because we will receive the same type of data.
- We need three potentiometers, one for each axis. Potentiometers of the X-axis, Y-axis and Z-axis will be connected to A1, A2 and A3 pins of Arduino respectively.
- We will connect a serial terminal for debugging purposes.
Arduino code for Accident Detection System
Before going to start the coding, it would be easy if you understood the circuit diagram connections.
- When we start writing the code(called a sketch in Arduino IDE), we will first include all of the necessary libraries for this project.
- So, if the essential libraries aren't already installed in the Arduino IDE, our first step would be to get them.
- Here we use mainly two libraries, one for serial communication and parsing data from the GPS module.
- By heading to 'Sketch > Include Library > Manage Library' in the Arduino IDE, we can install libraries related to Arduino. We can now search for our essential libraries in the library manager. We can also use zip files to install the libraries.
- As we've installed all the specified libraries. Let’s include them in our sketch.
- Now, we are declaring D2 and D3 pins for serial communication with GPRS modules and declaring GPS objects as well, which will pretty much do all the grunt work with the NMEA data.
- After that, we will declare variables to store the GPS module data.
- Now, we are declaring pins and variables for the accelerometer which we will use in our project. Here, we are using Analog Pins because we are reading the analog voltages from the potentiometer.
- We need to declare two threshold values for change in acceleration when an accident is detected.
- The min and max values can vary. So, it is highly recommended to measure the values by accelerometer for devices using.
Void Setup():
- It is one of the most important functions which will execute only once in the whole process.
- As we are using a GPS module in our project, We should first start serial communication between the components and Monitor them through “Serial Monitor” in the Arduino IDE.
- “Serial.begin” is used to set up the serial configuration for the device which is connected to the Serial Port of the Arduino. Here, we will set the baud rate for that device i.e 9600 in our case.
- “serial_connection.begin(9600)” is used to set up the UART configuration for the GPS module. As the GPS module communicates to the Arduino at the baud rate of 9600.
- We are using an Accelerometer in the circuit and it was clearly explained in detail that it will sense the x,y,z coordinates of the device and send them to Arduino.
- Here, we have initialized a for loop to collect the sample data for x, y, and z coordinates of the device in the ideal state.
- Afterward, the sample coordinates have been successfully measured by the Accelerometer sensor, but we need an average value for smoothing the sample coordinate values. So here, we will calculate the average of each coordinate and print them in the serial monitor.
- After the setup, we will write our main application code in the Void loop function.
Void loop():
- It is the second most important function of Arduino code. It will come to action after the execution of “void setup()”
- We'll write the code required to run in a continuous loop in this part. So this is where we'll write our primary application code.
- As a result, when the code gets to the void loop portion, We firstly take the NMEA data from the GPS module and print it in the serial monitor.
- Wait a minute, NMEA??, I can understand all the questions in your mind. Let us give you a simple explanation regarding NMEA and its applications.
- The word NMEA stands for the National Marine Electronics Association, which is a mode of communication that existed before inventing GPS. NMEA-format GPS data can be accessed with a wide variety of GPS receivers, instead of creating a new custom interface every time. Thus, it makes our lives easier using the GPS Module.
- When we are printing the NMEA data into the serial monitor, it will be printed in a specific structure. This NMEA data was output from a GPS receiver:
“$GPGGA,191605.00,4521.7785210,N,07331.7656561,W,2,19,1.00,674.354,M,19.900,M,0.90,0000*60”
- All NMEA signals start with the ‘ $ ’ character and for every data field such as coordinates, and various parameters are separated by a comma. The data further includes Timestamp, Latitude, Longitude, Quality indicator, Number of satellites involved, Altitude, etc., which is not necessary to remember. Make sure to get the data from the GPS module. If we have succeeded in this step and get the data on the serial monitor, then we are good to go for further processing.
- The “if” statement is to process the NMEA data and separate the data into the required format if there is any location updated to the GPS receiver.
- As we have already received NMEA data in the previous step, the data will be separated into Latitude, Longitude and Altitude.
- In the Loop function, the values of GPS and accelerometer will be continuously tracked.
- Here, the analog values of x,y,z coordinates are being measured and printed in the serial monitor.
- These are not the values we measured in the void setup, those were the values to take the readings in the ideal state of the device.
- But in the loop, the values are the present x,y and z coordinates measured by the accelerometer.
- This is the condition for accident detection, we have already discussed before that in the void loop the x,y,z coordinate values are continuously extracted and the “if” statement here compares the recent values with fixed min and max values of the coordinates.
- If the recent values are indistinct or do not match with threshold values i.e., max value and min value, then it indicates that an accident has been detected.
- When the accident detection condition is satisfied, the GPRS module will be activated and will call to rescue stations for aid/help and their home.
- Here, we have programmed to give a call 5 times to the appropriate numbers in the “for” loop.
- And the process also includes a messaging feature along with calling to rescue stations.
- When the same accident condition is satisfied, the messaging feature will be activated and we are going to send the alerting message including the Location, Latitude, Longitude, and Google map location link by appending latitude and longitude values the to respective numbers.
Results / Working:
We have successfully completed our Accident detection project and it’s ready to test!
- Before going to start the simulation, we need to import the hex files of Arduino code in the Proteus, to do so click on the Arduino and browse to the hex file of the code and select.
- Now we need to add the program files for the GPS and GPRS modules.
- Here we should note that we only need to upload the program files for the modules while we are working in simulation. In the real modules, they come up with pre-installed codes.
Now we have done all the prerequisites of simulation.
- Let’s power the circuit and start the simulation, firstly the void setup function will run and it will initialize all the required pins and variables and will read the ideal state values of the potentiometer.
- Now to simulate the accident case, we will change the values from the potentiometer, so when the potentiometer’s value changes and the falls in the Min and Max value range the if condition will be stratified.
- After this GSM module will call the stored number 5 times and send the GPS location with Google maps link in that.
- We have used some serial monitors for debug purposes, you can see the current state of the project using them.
I hope you have a good understanding of how our Accident Detection project works and that you have liked it. Although I believe we have covered almost everything, please let us know if you have any questions or suggestions in the comments section.
Thank you very much for reading this project. All the best for your projects!
Smart Coffee Vending Machine using Arduino
Hello geeks, Welcome to our new project. As most readers have already seen the coffee vending machine or maybe you are drinking coffee while reading this article and if you are a tinker or a geek, it must have come to your mind how to make a coffee vending machine on your own. In today's tutorial, we are going to learn how to make a Smart Coffee Vending Machine using Arduino with Proteus Simulation for the same.
We can use this project for an engineering project’s showcase for electronics, electrical engineering students, and can be used in offices as well.
Coffee is the second most popular drink in the world and it is one of the oldest beverages of the world. According to Wikipedia, more than 2 billion cups of coffee are consumed every day in the whole world. As engineers or working professionals, we all know how coffee is very important for us. Having a good coffee makes our day better and refreshes the mood. Research shows coffee drinkers tend to live longer but when keeping it in moderate consumption. And making a good coffee is one of the most skillful jobs and time-consuming processes as we want our coffee in minutes. Now here our project comes to the picture, this smart coffee vending machine can make a good coffee in a couple of minutes. There are various flavors of coffee and our smart coffee vending machine can provide us with 4 different flavors which are the most commonly loved such as Latte, Cappuccino, Espresso, and Cafe Mocha. Here's the video demonstration of this project:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | DC Motor | Amazon | Buy Now |
2 | LCD 20x4 | Amazon | Buy Now |
3 | Arduino Uno | Amazon | Buy Now |
Software to Install:
As we are going to design this project using Proteus Simulation, instead of using real components. As in the simulation, we can figure out the issue which may occur while working on real components and that can damage our components.
Proteus is the software for simulation and designing electronics circuits. As Proteus software has a big database of electronics components but still it does not have few modules in it like Arduino boards or LCD modules etc.
So we have to install the libraries, which we are going to use in this project:
- Arduino Library for Proteus: We have to add the Arduino boards to the Proteus components list.
- LCD Library for Proteus: We have to add the LCD module to Proteus Suite.
You can download this whole project for example Proteus Simulation and Arduino Code, by tapping the below button
Smart Coffee Vending Machine using Arduino
These are required components for Smart Coffee Vending Machine, as follows:
- 20X4 LCD display: It is used to display user-related messages like the state of the vending machine.
- Arduino UNO: It is used as the brain of our project. All operations and decision-making will be done using this microcontroller.
- DC motor: It is used for dispensing the ingredients of coffee and the mixer.
- Buttons: It is used as a user interaction option.
As a suggestion, whenever we make a project, it should be like a product, as it should be user friendly and interactive, so considering that we have used an LCD module to display the messages related to available coffee flavors and their individual prices so that users can easily select them using buttons and DC motors to pour the ingredients related to coffee like water, sugar, coffee powder, and milk, and a mixer for blending the coffee.
We have connected the LCD using an I2C GPIO expander as we have limited GPIO pins to connect other peripherals with Arduino UNO. I2C Gpio expander requires only two pins as we know that I2C uses SCL(Serial Clock) and SDA(Serial Data) pins for communication.
Components Needed:
- Arduino UNO
- LCD display
- 4 Buttons
- 8 Motors
- PCF8574
Components Details
Arduino UNO:
We can use any Arduino development board but here in this project, we have used an Arduino UNO board.
- Arduino UNO is one of the programmable, open-source microcontroller boards of the Arduino family.
- It contains an Atmel’s Microchip ATMega328 or ATMega328P microcontroller which has Harvard architecture 8-bit RISC processor core and 32 KB flash memory.
- Arduino UNO comprises 14 digital I/O pins out of which 6 are PWM pins as well and 6 Analog I/O pins with 10 bits resolution(0-1024).
- Arduino UNO has only 1 hardware UART pin(but we can use other pins also for UART communication using SoftwareSerial library in Arduino), 1 I2C, and 1 SPI.
PCF8574:
We have used this IC as a GPIO expander for our project as we have restrictions on the availability of GPIO pins in Arduino UNO.
- It is an 8-bit I/O, silicon-based CMOS GPIO expander.
- It can be used to write data on the pins and also can read data on those pins.
- It uses the I2C protocol for communication with the master device.
- As we know that I2C protocol uses the slave address to send or receive data from slaves, so for that it has 3 pins A0, A1, A2 for setting the slave address.
- Slave address for PCF8574 starts from 0x20 to 0x27. That means we can add only 8 PCF8574 IC directly to a master controller.
- The following image explains the logic of the slave address of PCF8574.
- It is used for connection for the LCD module with Arduino UNO in our project.
- If you want to learn more about IC PCF8574, you can refer to the datasheet using the following URL: PCF8574 Datasheet
LCD display
The LCD display is used to show the user-related messages in this project.
- LCD is a short form of Liquid Crystal Display which is basically built using Liquid Crystal technology.
- There are different sizes of LCDs available, in this project we have used 20X4 size.
- Here 20X4 signifies that it can display 80 ASCII characters at a time.
- There are 16 pins in the LCD. We will not use every pin of LCD in this project.
- It has 8 data pins, 1 Read/ Write select pin, 1 Register mode pin, 1 Enable pin, 2 pins for backlight, and 2 pins for power supply, 1 contrast control pin.
- There are mainly two types of register in the LCD: Command Register and Data Register.
- When we set the RS(Register Select) pin to logic High then it will select the data register mode and in logic Low, it will select the command register.
- To display the data on LCD we will set the RS pin to logic High.
Proteus Simulation of Smart Coffee Vending Machine :
Now, it's time to start designing the Proteus Simulation of our Smart Coffee Vending Machine.
- Most importantly, ensure that Proteus is installed on your PC and download all the required libraries for Proteus ahead.
- For this project, we are going to need libraries of Arduino and LCD modules.
- Make sure that you have read about how to use libraries in Proteus software.
Let’s create a new project, open the new project in Proteus and import all the required components which we are going to use, and place them within the working area.
- We need the following components, so select all of them from the Proteus component library.
Circuit Diagram and Working:
- Now let’s design our circuit, first place all the selected components in the Proteus Workplace, as shown in the image below:
- We will start connecting the LCD module and PCF8574, as we are using only 4-data pin-mode of LCD.
- After that, we will start the GPIO expander PCF8574 I2C connections, connect the SDA, SCL pins of PCF8574 to Arduino UNO’s SDA, SCL pins which are A4, A5 pins of the development board.
- As we know, we have to set the slave address of PCF8574 using A0, A1, A2 pins. And in this project we are going to use the slave address 0x20, therefore for that, we have to connect all pins to the ground. (As we have already seen in the above PCF8574 addressing image)
- In the next step, we are going to connect the buttons to Arduino digital pins D2, D3, D4, D5 as "Latte", "Cappuccino", "Espresso", "Cafe Mocha" flavors respectively and another terminal of the buttons is connected to ground. As we are going to use the buttons inactive low condition which means, when we press the button it will give us a logical LOW state.
- There may be a doubt in your mind why we have not used any PULL-UP resistors with buttons because we will handle that in our code. Arduino UNO comes with an internal PULL-UP resistor of 20-50 KOhms.
- Now connect the dc motors for each container, Water, Coffee, and Sugar container’s motors are connected with Arduino’s digital pins D10, D12, D11 respectively. Connect the coffee outlet motors for each type of Latte, Cappuccino, Espresso, Cafe Mocha with digital pins D6, D7, D8, D9 respectively. And at last, connect the mixer with the D13 pin.
- As we have mostly completed the wiring part, the first thing which we must make sure of before going to start our simulation is that all components should have adequate power supply and ground. And ground must be common in the whole circuit.
Now we hope you have understood the connections and you have already done it, so it is time to move to the coding part of our project.
Arduino Code for Smart Coffee Vending Machine
If you already know about the syntax and structure of Arduino sketch, it's a good thing, but if you have not been familiarized yet, no need to worry, we will explain it to you step-by-step.
Arduino coding language mostly follow the syntax and structure of C++ programming language, so if you are familiar with C++, then it would be like a cup of cake for you to understand the code but still if you don’t have any background knowledge, you don’t have to worry again, we have your back.
Arduino Coding follows a strict structure, it has mainly two sections. we have to write our code in those two functions.
As we are going to explain the Arduino code, it would be easy to understand if you have opened the code in the Arduino IDE already.
Declaration code:
- When we start our code, we will first include all the required libraries which we are going to use in this project.
- So our first step would be to download the required libraries if they are already not pre-installed in the Arduino IDE.
- Mainly we will use only two libraries, one for LCD display and the other for I2C communication.
- And I2C related functions come in the Wire library which will be pre-installed in Arduino ID, we don't have to install it explicitly.
- For the LCD module, we will use the Liquid Crystal_I2C library that we have to install.
- We can install libraries related to Arduino from the Arduino IDE by going to ‘Sketch > Include Library > Manage Library’. Now in the library manager, we can search for our required libraries. We can install the libraries using zip files also.
- >> Now, as we have installed all the required libraries. Let’s include them in our sketch.
- After that, we will define the pins which we are going to use in our project.
- We have to define them globally so that we can use them in all functions.
- You must be having a doubt why we have not defined pins for I2C.
- Because those pins are pre-defined in the Wire library, we can not assign any other pins for I2C communication.
- Now we will define and declare all the variables which are required in our project.
- There is an array for the price of a coffee with the size of 4, as we will only provide only 4 types of coffees and a string type variable for storing the name of flavors of coffee.
Arduino Setup() Function:
In this Arduino Setup() function, we will write a section of code that will only run once.
- So mostly we will write the declarations, define the type of pins and initialize the peripherals such as the LCD module.
- We want to take user input from the buttons therefore we will declare them as INPUT type.
- We have not connected PULL UP resistors in buttons as you have read above, we will handle that in the code therefore we have declared it as INPUT_PULLUP mode.
- We have declared motor pins as OUTPUT mode because we want to control the motors.
- After that we will initialize the LCD module then we will turn on the backlight of LCD, set the cursor to 0,0 index and using ‘lcd.print()’, we will print the welcome message on the LCD module.
- In the setCursor function, the first argument is used for X-Axis and the second argument is for Y-Axis.
- It will display the welcome message for 1 sec as we have given a delay for 1000 milliseconds after we clear the display.
Arduino Loop() Function:
Arduino Loop function runs after the the
‘void setup()’ function.
- In this section, we will write the code which is required to run in a continuous loop. So we will write our main application code here.
- So when the code reaches the void loop section, first we will display the flavor and the price of the coffee on LCD display as we want to show the user what type of coffee our vending machine makes and the price of those individually.
>> Now we will write the section for reading the user input from the buttons. As we have set that the condition will be true when the button will be logic LOW state.
>> Now when the user will press the button, the state of the button’s pin state will be changed to logic LOW state and then our ‘if condition’ will be true and code and our operation will enter in the ‘if condition’ section.
>> Here we will display to the user the current process stage of the coffee making. So we will clear the LCD display and then set the cursor to 0,0 index. After that we will display the message for collecting the ingredients.
- As we have not cleared the display, it will display the same message.
- After 1 second delay, we will start the water container motor for pouring the water for 2 seconds.
- Thereafter we will set the water’s container pin to LOW and Sugar’s container motor pin to HIGH for 2 seconds, similarly for the coffee’s container pin.
- Now we will start the motor for the selected flavor of coffee for 2 seconds and then stop it.
- As now our selected coffee is getting ready so we will display the message for the same.
- To display any new message, we have to clear our display with pre-occupied text.
- Now we will start the mixer motor for 10 seconds to mix all the poured ingredients.
>> Now our selected coffee is ready. So we will clear the LCD display and set the cursor, and will print the message regarding the prepared coffee with the price of it.
Results/Working:
- Below is the Flow diagram of coffee vending machine:
- Let’s understand the code with an example, we will go with the starting step.
- Power ON the device, the machine will display the welcome message that you can change from that code as per your choice.
- That message will be shown for 1 second thereafter it will clear the display.
- Now it will display the type of coffee as "Latte", "Cappuccino", "Espresso", "Cafe Mocha" and their respective prices.
- Let’s suppose, the user wants to have a Latte today, so he/she will press the button for the same, thereafter our coffee-making process will start.
- The first LCD display will show the message “Wait a Moment Collecting Ingredients” and it waits for 1 second.
- Thereafter it will start pouring the water for 2 seconds, then it will stop that motor.
- After that, it will start to pour sugar for 2 seconds, then stop that motor.
- At last, it will start to pour the coffee for 2 seconds, then stop that motor.
- It will start the motor of the selected type of coffee to dispense the coffee to the container and then it will wait for 1 second.
- Now LCD will display the message for coffee getting ready as "Wait a Moment Your’s Rich Latte is getting ready…” as the user has selected Latte that’s why it shows “Latte is getting ready… “.
- Now we will start the mixer to mix all the ingredients for 10 seconds.
- Again we will clear the LCD display to show the message for prepared coffee as “ Your's Rich Latte is ready. Please Collect it Your's Amount - 5/-”.
- Then it waits for 5 seconds and clears the display and again shows the price and the available types of coffee.
- As Proteus requires the hex file of the code to run the simulation.
- So for that, open the Arduino IDE and please verify your code before making a hex file by clicking on the ‘Verify’ button to remedy any errors.
- To get the hex file from the Arduino IDE click on “Sketch > Export Compiled Binary”.
- Your hex file will be generated successfully now put that hex file to the Arduino UNO board in the Proteus software.
- Everything is now in place, it's time to run the simulation and get a nice virtual coffee.
I hope you have understood the whole working of our smart vending machine project and enjoyed it as well. I think we have explained pretty much everything but still if you have any doubts or improvements please let us know in the comment section.
Thanks for giving your valuable time for reading it.
Automatic Plant Watering System using Arduino
Hello friends, I hope you all are doing great. In today's tutorial, we are going to design a Proteus Simulation for Automatic Plant Watering System using Arduino. We have designed this project for engineering students as it's a common semester project, especially in electrical, electronics and mechatronics engineering.
The two most significant hazards to the agriculture industry are the need for extensive labor and a scarcity of water. According to the World Wildlife Fund (WWF) organization, water shortages might affect two-thirds of the world's population by 2025, putting both the ecosystem and human health at risk. The use of automatic plant watering systems eliminates both of these problems by watering plants at specified times and amounts while monitoring their hydration levels through measuring moisture in the soil surrounding the plants. Automatic plant watering systems can be used in homemade gardens and can also be deployed in fields for large-scale use. Whenever designing an automatic watering system, it is important to keep in mind that the system should be expandable, allowing for the simple integration of new devices in order to broaden the applicability of the system.
Software to Install
We are not designing this project using real components, instead, we are going to design its Proteus simulation. So, first of all, you should
Install Proteus Software itself. Proteus software has a big database of electronics components but it doesn't have modules in it. So, we need to install Proteus Libraries of a few components, so that we could simulate them. So, these are the PRoteus libraries which you should install first, before working on this project:
You can download this complete project i.e. Proteus Simulation & Arduino Code, by clicking the below button:
Download Complete Project
Note:
You should also have a look at these other Proteus Libraries:
Project Overview:
Three main components of an autonomous watering system are:
- Water Level Sensor: monitors the water reservoir level.
- Moisture Sensor: monitors the soil moisture level.
- RTC module: responsible for supplying water to the plant at predetermined intervals or at a predetermined time.
- Arduino UNO: serves as a hub for connecting and controlling all these components.
It is necessary to integrate the water level sensor with the microcontroller before it can be installed within the water reservoir. The location of the water level sensor within the reservoir is variable and is determined by the user and the application for which it is being utilized. The Arduino receives continuous data from the water level sensor and warns the user when the water goes below a certain level, either by an alarm or a buzzer, as appropriate.
The soil moisture sensor operates in a manner similar to that of the water level sensor. The tip of the sensor is inserted into the soil near the plant, and the sensor is activated. In the case of a moisture sensor, the closeness of the sensor to the plant is also variable, and the user may adjust it depending on the features of the plant for which it is being used. In vast agricultural fields, a single sensor may be used for numerous plants if they are closely spaced and their hydration levels can be determined by measuring the soil moisture at one location that overlaps with another spot on the soil surface.
The RTC module operates on the same concept of time monitoring in the background as other electronic devices such as computers and smartphones; even when these devices appear to be turned off, they continue to keep track of the current time. The RTC module, on the other hand, is capable of exchanging time information with the Arduino board. On a specific day of the week, at a specific time of day, the Arduino is pre-programmed to turn on the water pump and turn off the water pump after a specified length of time.
Components Needed:
- Arduino UNO
- Water Level Sensor
- Moisture Sensor
- RTC Module (DS1307)
- LCD
- 4 LEDs
- Buzzer
- Relay
- Water Pump
- PCF8574
Component Details:
Arduino UNO:
- Arduino UNO is a programmable microcontroller board.
- It contains Atmel's ATMega328 as is based on that microcontroller.
- The Arduino board also contains an in-built voltage regulator to protect it from burning out and supports serial communication to help programmers.
- The Arduino board is culturally programmed through the Arduino App designed by the board's developers and the programming is done in C language.
- The Arduino App compiles code and interfaces the firmware into the Arduino hardware.
- Arduino UNO has 14 digital I/O pins out of which 6 are PWM pins as well.
- Arduino also takes analog inputs and has 6 analog input pins.
Figure # 1: Arduino UNO
Soil Moisture Sensor:
- The soil moisture sensor is a resistive sensor that consists of two electrodes with a small charge and the resistance in those electrodes is measured and then the resistance in between the soil is used to find the moisture levels.
- A soil moisture sensor normally comes equipped with an amplifier such as LM393. It has a VCC, GND and analog output pin.
Figure # 2: Soil Moisture Sensor
Water Level Sensor:
- The water level sensor is a module that helps calculate the amount of liquid in a container.
- When a liquid is present in the tank, the Submersible level sensor detects the hydrostatic pressure generated by the liquid.
- Since hydrostatic pressure is a measure of two variables, the first of which is the density of the fluid and the second of which is the height of the fluid, it is a useful tool.
Figure # 3: Water Level Sensor
RTC Module:
- RTC stands for real Time Clock and as the name suggests the module keeps track of time even when the external power supply is cut off.
- It has a battery cell installed within it for that purpose, moreover, it is capable of communication with other devices such as Arduino too.
Figure # 4: RTC Module
Relay:
- Relays are basically electrical or electromechanical switches that operate on the principle of magnetic field controlling the switching within the relay.
- A relay has two modes of operation, normally open and normally closed.
Figure # 5: 12V Relay
PCF8574:
- The PCF8574 is a silicon-based CMOS integrated circuit.
- Using the two-line bidirectional bus enables general-purpose remote I/O extension for the majority of microcontroller families (I2C).
- It is used in our project for I2C communication of LCD.
Figure # 6: PCF 8574
Proteus Simulation of Plant Watering System
Now, let's design the Proteus Simulation of Plant Watering System first and then will work on the Arduino Code.
- First of all, make sure that Proteus is installed on your computer and download all the necessary libraries for Proteus beforehand.
- For this project, you will need libraries for Arduino, LCD, RTC Module, Water Level Sensor and Soil Moisture Sensor. Make sure that you read how to use each library in Proteus as well.
- Open a new project on Proteus, import all the components required and place them within the working area or the blue line of Proteus.
- Select below components from Proteus Components' library:
Circuit Diagram and Working:
- Now, place these components in your Proteus workspace, as shown in the below figure:
- For the water level and moisture sensor, place a variable POT(potentiometer) at the test pin and place an RC filter at the output pins. (This is only for simulation purposes)
- Start with the input side of Arduino and connect the soil moisture, water level output pins to the A1 and A0 pins of Arduino respectively.
- To use the LCD for I2C communication, Place PCF8574 and connect with LCD.
- Connect the SDA and SCL pins of PCF8574 and the SDA and SCL pins of the RTC module with the SDA and SCL pins of Arduino.
- For the output side of Arduino, Connect the D7 to the relay controlling the pump.
- Connect the buzzer at D2 and the LEDs to their respective Arduino pins as well.
- Make sure appropriate power and ground are provided to each component. With that the making of the circuit on Proteus is complete.
Figure 7 shows the circuit diagram of the system. Proteus was used to simulate the circuit and Arduino App was used for the simulation of the Arduino code. The circuit was designed in a way that is easy to understand and further integrated easily. We will now go through a step-by-step guide on how the circuit was built.
Figure # 7: Proteus Circuit diagram
Arduino Code for Plant Watering System
A normal Arduino code has two main segments:
We will look at both of them separately here.
Declaration Code
- The first step in setting up our code is defining libraries, download if you don’t have any libraries already integrated in the Arduino App.
Figure # 12: Arduino Code
- The next step in the code is tone definition for buzzer and pin definition of variables being used in the project.
Figure # 13: Arduino Code
- After pin definition, the variables used must be defined so that Arduino knows where to find them and how to identify them.
Figure # 14: Arduino Code
- The next step is defining the system messages that will appear on the LCD.
- It is not necessary to define those messages in the setup, they can be easily defined within the main code but it is an easier way to define those beforehand and call them whenever needed.
- This is especially useful when a system message is used multiple times in the code.
Figure # 15: Arduino Code
- Now we define the objects being used in the project.
- The two objects being defined are the RTC module and LCD. In the syntax below we used 20x0 in the argument for the LCD, that is because there are no libraries for I2C LCDs and we had to turn a simple LCD into an I2C LCD by the means of PCF8574.
Figure # 16: Arduino Code
Void setup:
Now we start the programming of void setup.
- At first is the initialization of various components, such as initializing the RTC module and setting the time and date of RTC with respect to our computer.
- Wire initialization and library are used for I2C communication.
Figure # 17: Arduino Code
- The next step is defining the digital pins of Arduino being used as input or output pins and displaying the initial message on our LCD.
Figure # 18: Arduino Code
Void Loop:
- The first step in the loop is to read the date and time from the computer through the RTC and read the values from the sensor.
- Since this part of the program runs in the loop, Arduino will keep reading and refreshing the sensor inputs every time the loop starts.
Figure # 19: Arduino Code
- In the next segment of the code, we will check various conditions of the sensor values and RTC and actuate our outputs on the basis of these conditions.
- At first, we check the water level of the container, if it is below the set level, Arduino will actuate the buzzer to alarm the user of low tank on LCD.
Figure # 20: Arduino Code
- In the next step, we check the values of the moisture sensor and place the conditions in three categories, namely, moist soil, soggy soil and dry soil.
- The Arduino will light up the respective LED whenever its condition is true. Red LED for dry soil, yellow LED for soggy soil and green LED for moist soil.
- The LCD will also display respective messages for each of those conditions.
- The following code is for the condition of dry soil.
Figure # 21: Arduino Code
- The following code is for the condition of moist soil.
Figure # 22: Arduino Code
- And finally the code for the condition of soggy soil.
Figure # 23: Arduino Code
- In the next step of the code, we check the condition of time, whether it is time to water the plants or not and the condition of the water reservoir to see its level as well.
Figure # 24: Arduino Code
If you see the code closely, you may see the function of the right hour, which is called various times in the main code. The function code in itself is written at the bottom of the main code. This function is used for displaying the time and date on the LCD and also for fixing the date and time.
Results/Working
- Open Arduino and generate a hex file for that program.
- Put the hex file in the Arduino UNO board placed in Proteus.
- Run the simulation.
Figure # 8: Proteus circuit simulation when soil is soggy
Figure # 9: Proteus circuit simulation when soil is moist
Figure # 10: Proteus circuit simulation when soil is dry
Figure # 11: Proteus circuit simulation when soil is dry and it is time to water the plant
As you can see from figure 8 that our simulation is running according to the program set at Arduino. You can increase or decrease the values coming from the sensors through the Potentiometer.
So, that was all for today. I hope you have enjoyed today's lecture. If you have any questions, please ask in the comments. Thanks for reading.
Smart Home Security System using Arduino
Security systems are widely suggested for homes as well as other locations. Everybody wants to take necessary steps to prevent infiltration at home, thus this security is necessary. Intruders nowadays may take advantage of almost any illegal activity and wreak havoc on a property's security. The security of one's home is a critical concern that everyone faces in the current day.
While there are certain devices on the market that may considerably help protect your house, some of them are excessively costly and need constant maintenance. Many devices regarding smart home security systems are available in the market but these are not user friendly according to the budget, the device we designed provides the user with a better interface with the help of LCD. We have used enough sensors that make sure the security protocol.
So in this way, we designed a reasonable security system that has the features of gas and flame detection with the help of MQ-2 Gas Sensor and flame sensor respectively and also have installed a Motion detector sensor known as PIR sensor to detect the intruder's motion. For a better user interface an LCD and Alarm are installed to alert the user. The whole system is programmed using Arduino UNO. A proteus circuit is designed for this project as shown below:
- You can download the complete project i.e. Proteus Simulation and Arduino Code by clicking the below button:
Smart Home Security System using Arduino
Components Required
For the home security system, we have used 3 sensors which are briefly explained as follows:
Flame Sensor
- The flame sensor is used to detect the fire, it has 3 pins (Ground, VCC, OUTPUT) with operational voltages ranging from 3.3V to 5V.
- This sensor may be constructed using an electrical circuit and a receiver similar to that used for electromagnetic radiation.
- This sensor employs the infrared flame flash technology, which enables it to operate through a layer of oil, dust, water vapor etc.
- There are several wavelengths of flame sensors normally in the range of 700 to 1100 nm from the source.
- Normally flame sensors have an operating temperature ranging from -25? ~ 85? with several features like adjustable sensitivity, fast response time and ease to use.
- Proteus doesn't have a Flame Sensor in its database, so you need to download this Flame Sensor Library for Proteus.
PIR Sensor
- PIR Sensor is used to detect the intruder’s motion.
- There are mainly two kinds of infrared sensors one is active and the other is passive.
- The active infrared sensor emits as well as absorbs the infrared radiations whereas the passive infrared sensor simply absorbs not emit.
- When an object enters or escapes the sensor's range, a passive infrared sensor is employed to detect it.
- For adjusting the sensitivity and delay time, there are two trim pots supplied. You may alter them to meet your requirements.
- The sensor produces a HIGH output when it senses movement within its range; otherwise, it generates a LOW output.
- PIR also has 3 pins like a Flame sensor.
- It has operating voltages of range 5V - 20V with output voltage generation of 0V-3V when the object is detected in the sensing range that is 7 meters.
- Proteus doesn't have a PIR Sensor in its database, so you need to download this PIR Sensor Library for Proteus.
MQ-2 Gas Sensor
- MQ2 gas sensors detect the presence of gases such as LPG, methane, ethanol and carbon monoxide in the air ranging up to 10000 ppm using electricity.
- It is also known as chemiresistor for the MQ2 gas sensor.
- The resistance of the sensing material changes depending on the amount of gas present.
- When it comes to detecting gas, sensors use variations in resistance value that generates the output voltage.
- When a sensor material is heated to a high temperature in the air, oxygen is adsorbed on the surface.
- Because current can flow via the sensor, its analog voltage values may now be read.
- The voltage values reported here may be used to compute the concentration of a gas. When the gas concentration is high, the voltage values are greater.
- Proteus doesn't have a Gass Sensor in its database, so you need to download this Gas Sensor Library for Proteus.
Arduino UNO
- Atmel's ATMega328 is used in the Arduino Uno, an open-source single-board microcontroller.
- Either an external power source or a 5V USB connection may be used to power the device.
- In all, there are 14 digital input/output pins on the board, with 6 of them serving as PWM outputs.
- On the board, you'll find a reset button and six analog input pins. The Arduino software is used to program the board, which is written in C language.
- When it came to controlling the home security system, the Arduino Uno's capabilities were found to be sufficient.
- Arduino Boards are not present in Proteus, so we need to use this Arduino Library for Proteus.
Circuit Designing
- This whole project is designed to provide a security system for the home in which multiple safety sensors can be installed with a Buzzer and LCD for a better user interface.
- We won't design this project in real, instead, we are going to design its Proteus simulation.
- If you are working on an electronics/embedded project, then it's always a best practice to design its simulation first.
- In simulations, it's easy to debug your code and thus you can program quickly.
- Once you are satisfied with your project's working, you can move forward to hardware designing.
So, let's design our Proteus Simulation for Smart Home Security System:
Proteus Simulation
- These are the components, which we are going to use for designing our Proteus Simulation:
- So, select these components from Proteus Components Library and place them in your workspace, as shown in the below figure:
- Next, we need to connect these components' pins to complete our circuit, as shown in the below figure:
- As you can see in the above simulation, we have used three sensors in total, which we have discussed above.
So, now we are going to design the Arduino Code for this simulation:
Arduino Programming Code
We have designed the circuit in our Proteus Simulation and next, we need to design its Arduino Code, in order to make it work.
LCD Initialization Code
- First of all, we are going to interface LCD with Arduino UNO and will display the Project's name on the screen.
- The code is shown in the below figure:
- As you can see in the above figure, we have first initialized the variables.
- Arduino board is programmed using Arduino IDE software which has mainly 2 sections void setup and void loop.
- Before void setup, we have to declare the pins of sensors and actuators that we are using in our project.
- Depending on the nature of sensors (analog or digital) the pins of sensors are connected to Arduino UNO accordingly.
- #define is used to declare the pins of Gas, PIR, FIRE and BUZZER.
- Initially, all the sensors have zero value that is stored by an integer variable.
- In the void setup section, input and output sensors are defined.
- GAS, PIR, and FIRE sensors are employed as input sensors to detect and activate the BUZZER, which is an output component.
- LCD 20×4 is used and lcd.begin is used to initiate the LCD.
- lcd.setCursor is used to cursor position on LCD and the name of the project is displayed on LCD Screen using lcd.print command.
- Now, let's run our simulation to check the results, shown in the figure below:
Sensors Interfacing with Arduino
- In Arduino IDE code execution, void setup runs once while the void loop executes again and again.
- analogRead and digitalRead commands are used to read the value of analog and digital sensors respectively, while analogWrite and digitalWrite commands are used for sending commands or data.
- As shown in the above figure, first, we have read the sensors' data and if all sensors are in LOW state, then have displayed the message "You are safe".
- Let's run the code to check the output:
- As you can see in the above figure, all sensors are at a LOW state and thus LCD is displaying the safe message.
- Next, we have added the if loop for the case where all sensors are giving HIGH value:
- The rest of the code has similar if loops for various conditions of sensors.
- You can download the complete code and Proteus Simulation from the link, given at the start of this tutorial.
- Now, let's run our final simulation and test the sensors and if everything goes fine, you will get results as shown in the below figure:
Future Recommendations
It deters the crime and notifies the user about the gas or fire problem. Home security systems are mostly utilized for safety reasons in residences, businesses, and educational facilities. Another option is to use a mobile device or the internet to send data to a remote location. Other modules, such as a wind sensor or a fire sensor, might be added to the system in the future. Voice alarm modules may also alert you to an intruder or a gas leak if you use them. We can increase the number of sensors to make it better. We can use the latest technology of the Internet of Things that makes our system wireless. A growing number of devices and goods are being connected to the Internet, which is referred to as the Internet of Things by the phrase. We can use the Internet of Things to produce a low-cost security system for residential and industrial applications that is especially useful for home security. When the door is opened or an unauthorized entry is detected, the system will send an alert to the owner. The user may take action after getting the notification. ESP8266 Wi-Fi module will connect to and interact with the Internet, while an Arduino Uno microcontroller keeps track of the system's status, as well as a magnetic Reed sensor for sounding the alarm. The principal advantages of this system are ease of installation, low costs, and low maintenance requirements.
So, that was all for today. I hope you have enjoyed today's project. If you have any questions, ask in the comments. Thanks for reading. Take care !!! :)
Smart Irrigation System using Arduino UNO
Hello everyone, we are back with a new project and we hope you all are doing well. In this article, we will discuss a project named Smart Irrigation System using Arduino UNO. We will use different sensors to measure the environmental and crop parameters which are responsible for good production. We will also make the water pump system automatic which will open the water valve automatically according to the soil moisture of the crop.
We will discuss all points and concepts briefly in this article and also provide a Proteus Simulation to observe how it will work in the real world. Complete fully explained code and simulation are also provided below as you go ahead in this article. You can download it from there.
Smart Irrigation System using Arduino UNO
Let’s start with an Introduction:
Introduction
In the late decades, there has been a quick advancement in Smart Agricultural Systems. Show that agriculture has great importance worldwide. Indeed, in India for example, about 70 % of the people rely upon the vital sector of agriculture. In the past, irrigation systems used to be dependent on the mills to irrigate the farm by conventional methods without knowing the appropriate quantities of these crops.
These old systems are a major cause of the waste of large quantities of water and thus destroy some crops because of the lack of adequate quantities of water. However, with the recent technological developments, there have been innovative systems for irrigation without the farmer interfering in the irrigation process. We will discuss it in brief below.
We will do a simulation on Proteus 8 Professional Software.
Working
The working of this project is like, we will use a Soil Moisture sensor for measuring the moisture of Soil according to which water valves are controlled. When the moisture level gets below a threshold value, valves will open with the help of a relay or solenoid till the soil is well moisturized.
- The BMP180 sensor will measure the Atmospheric Pressure.
- The DHT11 sensor will measure the temperature and humidity of the climate.
- The MQ135 sensor will measure the Air Quality Index of the environment.
- LDR will measure the sunlight intensity.
- We will use a 20x4 LCD Screen for displaying the data gathered from the sensors.
- And the main thing, we will use an Arduino UNO microcontroller as the brain of the project.
In a used case, when the moisture level gets below a threshold value, valves will open with the help of a relay or solenoid for a required time interval.
Block Diagram
- Here's the Block Diagram of Smart Irrigation System:
Components Required
Here's the list of components used in this project:
- Arduino UNO
- BMP180 Sensor
- DHT11 Sensor
- LDR Sensor
- MQ135 Gas Sensor
- Soil Moisture Sensor
- 20x4 LCD Display
- PCF8574 remote 8-bit I/O expander for the I2C bus
- Breadboard.
- Jumper wires (Male to Male, Male to Female, Female to Male.)
Since we are designing a prototype of this project, we will use jumper wires instead of soldering.
You can use a Battery, Adapter or any DC source of 5-8v(recommendable).
Circuit Diagram
Since we are making a prototype of this project, we will make connections on the breadboard and avoid soldering the components. We will use male to male, male to female and female to female jumper wires.
Pins Connections
These are the pin connections of all components.
Pin Connections of Smart Irrigation System |
No. |
Sensor |
Pinout |
1 |
Soil Moisture Sensor |
Data - A0 (Arduino) |
2 |
LDR Sensor |
LDR-Resistor Junction - A2 (Arduino) |
3 |
MQ135 Gas Sensor |
Out - A1 (Arduino) |
4 |
DHT11 Sensor |
Data - D2 (Arduino) |
5 |
BMP180 Pressure Sensor |
SDA-SDA (Arduino)
SCL - SCL (Arduino) |
Arduino Libraries Required
You need to install these third-party Arduino Libraries, in order to interface sensors:
- Adafruit_BMP085.h
- DHT.h
- LiquidCrystal_I2C.h
We have added comments in the code for better understanding so it can be understood easily.
Note - Change the Address of the LCD Screen while you run the code in Proteus, change it to 0x20 instead of 0x27 or anyone else. In the real experiment, we can alter the address of the LCD by changing the configurations of A0, A1 and A2 pins of the PCF8574 module.
Proteus Libraries Required
We will show you a demo of this project as a simulation. We are using Proteus 8 Professional Software for the simulation.
Proteus Simulation Connections
- This potentiometer defines the soil water content in the proteus simulation.
- When the resistance is maximum at the test pin, the circuit shows zero volts across the voltmeter, which means the sensor is either in the dry ground or taken out of the ground, i.e. giving zero moisture value of the water content.
- And when resistance is zero, the circuit will show the maximum voltage across the voltmeter which indicates the sensor is inserted in a wet ground i.e. water contents in the soil are too high.
- This is important. We have attached the output pin with an LC filter. This filter is not required in real hardware implementation.
- We are using it in Proteus Simulation only 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.
- Similarly for Gas sensor, as we increase the potentiometer, in simulation it means good air quality.
Steps for Simulation
These are the steps for simulation. Follow them to create a fully working simulation.
- Download the Zip Files given at the start of this tutorial.
- Extract them in the LIBRARY folder. You will find it inside the Labcenter Electronics Folder.
- Go to Arduino IDE and open the code, go to Tools and select the board Arduino UNO.
- Go to Sketch and Click on Export Compiled Binary. It will create a compiled .hex file of the code which will be used as the main program in the simulation ahead.
- Open Proteus software and add components by searching like Arduino, DHT11, BMP180, 20x4 LCD, etc.
You can see the components listed here.
Note - We used a simple LED instead of the valve because the valve component is not available in the Software, simply replace the LED with a valve in a real project. Make connections according to the circuit diagram and add virtual terminals to Serial pins to see the readings and Data.
- Paste the Program File here for all the sensors.
- Paste the Compiled Binary File as a Program file of Arduino UNO.
- Run the simulation and you can see the readings by opening the virtual terminal.
Observations and Results
- In this simulation and project, you can see the sensor's information first in the terminal.
- After that, we are getting well organized and easily understood data on the terminal by every sensor according to code.
- According to the code, when the value of the soil moisture sensor gets less than a threshold value, the LED gets on.
This means when the soil gets dry the valve will open and water will be provided to the crops.
FET: Definition, Symbol, Working, Characteristics, Types & Applications
Hello friends, I hope you all are happy, healthy and, content. We have been discussing transistors lately, from the basic definition to the types and characteristics of transistors we have covered it all. If you have a brief idea about transistors, you must be aware of the field effect transistor or you might have heard or read about it somewhere, it is one of the earliest known types of transistors which is our topic of discussion today.
Field Effect Transistors were made to cover up the lacking of previously known transistors which occupied large space and produced a lot of noise, another major problem was the low reliability of previous versions. So, let's get started with the FETs.
Definition of Field Effect Transistor
Let us define field effect transistor first,
- "The Field effect transistor is a unipolar transistor made up of semiconductor material, which uses an electric field to control the current flow."
History of Field Effect Transistors
- To know how the field effect transistors evolved throughout the ages, let us have a quick trip to history, the days when we did not have a large amount of resources to materialize our concepts.
- The first attempt to make a field-effect transistor was made by Julius Edgar in 1925, and sadly he failed miserably but he was lucky enough to get the concept patented.
- In 1934, Oscar Heil tried his luck but failed to make a successful attempt.
- In 1945, the Junction field-effect transistor was the first FET device to be constructed by Heinrich Welker.
- In successive years several attempts were made and different types of materials were introduced for making field-effect transistors and their related types. All these successful and unsuccessful attempts led to the formation of the modern-day Field Effect Transistor.
Unipolarity of Field Effect Transistor
Unipolarity of the field effect transistor means that the transistor uses either holes or electrons for working, depending on the type of material being implied for making, unlike the bipolar junction transistors which employ both the electrons and holes for their functioning.
Symbol of Field Effect transistor_ FET
- The following figure shows the symbol of a field effect transistor.
- Three terminals can be seen in the figure namely gate, source, and drain represented by D, G, and S.
- The direction of the arrowhead reflects the direction of the electric field.
- The symbol is slightly different for two different types of field-effect transistors FETs, they can either be N channel FET or P channel FET, you will learn the symbols of different FETs in their respective sections of this article.
Why Field Effect Transistors are named so, or what is the meaning of FET?
Now you must be thinking about how the field effect transistor got its name? What does it mean by a FET? There are multiple assumptions behind it, the one that I felt to be appropriate is the one that, a weak electrical signal entering through an electrode generates a larger electric field through the other parts of the transistor as well, so they are named field-effect transistors. If you know any other reason, why we call them field effect transistor other than this, you can let me know in the comment section below, I'm looking forward to your response!
BJT vs FET
A lot of times, FET is compared with the BJT let's have a brief overview of their peculiarities in this section. These are some of the significant differences between the two of them;
- BJT is a bit noisy than FET.
- BJT has a higher output impedance than FET.
- BJT is current controlled meanwhile FET is voltage controlled device.
- BJT has a lower input impedance than FET.
Working of Field Effect Transistor FET
Basic construction of a field effect transistor FET
Unlike the other types of transistors, the field effect transistors are not made up of typical collector, emitter, and base, although the number of components is the same but the name and functions of each component are entirely different. To understand the working of the field effect transistor, let us first discuss its basic components one by one.
Source
- The source is represented by the symbol S. It acts as an electrode of the field effect transistor through which the charge carriers enter the channel when voltage is applied.
- As the name suggests, the source of a field-effect transistor works as a providing source of charge carriers.
Gate
- It is represented by the letter G, wherever you see a G, immediately assume it's a field effect transistor, in the case of transistors. The conductive story of the field effect transistor begins with applying the voltage to the Gate, which is passed on to the other components.
Drain
- The drain is represented by symbol D. The drain is the electrode of the field effect transistor which provides the channel to charge carriers helping them leave the circuit.
Working of FET
- As you have a brief idea about the main components of a Field Effect Transistor and their function, we are going to discuss the working of FET.
- The current always flows from the source S towards the Drain D.
- A voltage is applied across the Gate and Source terminal which creates a conductive channel between the source S and Gate G.
- The electrons or holes flow from the source S to Drain D in the form of a stream through the channel.
- There are several other things involved in the working and function of a field effect transistor according to their types, which we are about to discuss in respective sections. So, stay tuned!
- Here arises a simple question which is often left unasked and answered too, why the field effect transistors FETs are called voltage-controlled devices?
- The FETs are called voltage-controlled devices because the current in the drain represented as ID depends on the voltage across the gate G, unlike the bipolar junction transistor which is a current-controlled device.
- The gate voltage is very important for the conduction of current towards the Drain.
- There are two phenomena that influence it one is depletion of the channel and the other is the enhanced state of the channel. Let us discuss them one by one.
- Depletion of channel: Consider an N channel FET, it has the majority of electrons as charge carriers, by making the gate more negative we would repel the electrons from the gate and these electrons would saturate the channel increasing its resistance. This makes the gate region thinner because of the minimal traffic of electrons, but the conduction channel is said to be depleted due to increased resistance.
- Again consider the n channel FET, now think yourself, what would happen when you will make the gate G of the FET is more positive? The traffic of electrons would rush towards the gate! It would make the gate region thicker due to greater traffic but on the parallel lines, the conduction channel would be enhanced due to less resistance.
Types of Field Effect Transistor
We can divide the field effect transistor into the following types based on their structure;
- Junction Field-effect transistor JFET
- Metal oxide Field Effect Transistor MOSFET
Junction Field-effect transistor JFET
- Junction field effect is one of the simplest types of field effect transistors.
- They are unipolar in function and either work with electrons and holes, the same thing which is peculiar to the simple field effect transistors.
- The junction field-effect transistor has a very high input impedance level.
- Unlike the bipolar junction field-effect transistor, it makes a little noise or is somehow silent as compared to it.
- The structure of the Junction Field-effect transistor is based on its type, in general, JFET is made up of two n-type and one p-type semiconductor material and vice versa.
- The symbol of the junction field effect transistor is as follows;
Types of JFET
There are further two types of junction field effect transistors
- N Channel Field Effect Transistors
- P Channel Field Effect Transistors
We will now discuss these two types of junction Field Effect Transistors - JFET in detail.
N Channel Field Effect Transistors
Construction of N Channel FET
Let's discuss the construction of N channel Field Effect Transistor first,
- A bar of n-type semiconductor material primarily silicone is taken which acts as the substrate.
- The bar is then diffused with two p-type silicone bars which are smaller in size than the n-type silicon bar, on the two extreme ends of the substrate bar. Just imagine you are placing and gluing two small blocks on the extreme right and extreme left sides of a larger block made up of wood or any material you can stick together!
- Now we are done with diffusing the p-type materials into our n-type substrate, the leftover region conducts the current and is labeled as Channel. These channels are responsible for the conductive action of the Field Effect Transistors when voltage is applied.
- After we are done with the formation of the channel, we will now see how the main parts such as Gate, Source, and Drain are formed out of these diffused semiconductor blocks.
- The two diffused p-type silicon bars which have now formed the PN junction with the n-type material are now joined together to form the Gate.
- The two ends of the channel which was formed earlier after the diffusion process are metalized to be converted into source and drain.
- The N channel Field Effect Transistors imply electrons as the majority charge carriers. They are more efficient than the p channel junction Field Effect Transistors because electrons travel faster than the holes.
P channel junction Field Effect Transistors
Construction of P channel FET
- The same process is repeated for the construction of the p channel junction Field Effect Transistor.
- The p-type material substrate is taken in form of a large wafer or bar and then diffused with two smaller n-type bars.
- The channel formed after diffusion is then metalized at both ends to form the source and drain.
- The PN junction formed by the two n-type semiconductor materials is then connected to form the Gate.
- So this is how the p channel junction Field Effect Transistors are constructed.
- The p channel junction Field Effect Transistors imply holes as Majority charge carriers as they are unipolar.
Working of Junction Field Effect Transistor
- The Junction Field Effect Transistor always works in reverse biasing condition, that is why they have a very high input impedance.
- In the case of the Junction Field Effect Transistor, the gate current is Zero which is denoted by; IG=0
- The input voltage which is represented by VGS is the controlling factor for the output current which is represented by ID.
- You must be thinking how we control the width of the channel through which the current is conducted? The answer is simple, we alter the width of the PN junction on both sides of the channel which increases resistance to the flow of current.
As we already know that the Junction Field Effect Transistor only works in reverse biasing conditions let us now discuss a few scenarios to know how the output is generated under different circumstances.
Zero biasing condition of Junction Field Effect Transistor
- When no external voltage VGS is applied to the gate the resulting voltage to the drain would be zero which can be written as VGS = VDS = 0
- The depletion regions would have the same thickness as they had earlier because the voltage is not being applied yet.
- In this zero biased condition the drain current is produced, let me tell you how! The charge carriers in the absence of a potential difference start moving from the source to drain producing a drain current that is opposite to the conventional flow of current.
- So in the zero biased condition, only drain current exists in Junction Field Effect Transistor.
Reverse Biasing condition of Junction Field Effect Transistor
Small Reverse Voltage application scenario
- In the presence of a potential or small voltage the gate-source voltage VGS on which the Drain current ID is dependent, on applying small reverse potential width of the depletion region increases.
- Due to the increase in the width of depletion regions on both sides, the channel finds it difficult to conduct current.
- This difficulty of the channel to conduct current results in voltage drop.
- The width of the depletion region increases more towards the drain terminal, one can think of it as accidental but in science, nothing exists within reasoning and logic, the depletion region increases more towards the drain because the voltage drop is higher at the drain side.
- There is a lesser amount of Drain current ID because of the shrinkage of the conduction channel.
Large reverse voltage application scenario
- In this case we apply a higher negative voltage which is our Gate to Source voltage, represented by VGS
- The depletion regions of both the corresponding PN Junctions, keep on increasing in width.
- Eventually, both the depletion regions meet each other or you can say touch each other.
- Here is a question for you, what would happen when both the depletion regions would meet or diffuse into each other? They would eventually block the conduction of the current!
- The point at which the particular voltage blocks the conduction channel completely is called the cut-off voltage or sometimes pinch-off
MOSFET_ metal-oxide field-effect transistors.
The second type of field-effect transistors is the MOSFET, metal-oxide field-effect transistors.
Metal-oxide field-effect transistors are one of the most common types of transistors used widely.
Features of MOSFET
- The MOSFET consumes lesser power than other transistors.
- They are exceptionally scalable and if you remember Moore's law, they are the best practical manifestation of it.
- MOSFETs have high switching speeds that is why they are used for generating pulse trains. Do you know what is a pulse train? A pulse train is the square waveform of asymmetrical waves which are periodic but non-sinusoidal in nature.
- .metal oxide field-effect transistors are considered ideal for digital circuits, analog circuits, and linear circuits as well.
- Sometimes metal-oxide field-effect transistors - MOSFETs are also called IGFET, Insulated Gate Field-Effect Transistors.
Basic Structure of MOSFET
- Let us now discuss the basic structure of metal oxide field-effect transistors MOSFET.
- The metal oxide field effect transistor MOSFET has four components, unlike the JFET.
- The components of MOSFET include Source S, drain D, body B, and Gate G.
- The gate is separated by the body of the transistor through the insulating material
- MOSFET is very similar to the JFET, but the main difference lies in the insulation of Gate Electrode from the conduction channel, either P channel or N channel, with the help of a thin layer of primarily SiO2 or Glass.
- The insulation of the Gate terminal with the metal oxide layer helps in increasing the input resistance. The insulation can increase the value of input resistance into Mega Ohms.
- For a detailed outlook on the MOSFET, its construction, working and applications you can refer to the detailed article present on our website.
Symbol of The metal oxide field effect transistor MOSFET
- The following symbol is used to represent MOSFET.
- The Arrowhead indicates the direction of current and I already know that you are aware of this!
- Now you must be thinking, why the symbolic representation is only showing three terminals, please do not search for the fourth one! Because the source is always attached to the body terminal and is represented as one terminal.
- So you can only spot the three terminals naming Gate G, Drain D, and Source S.
Types of MOSFET
Following are the four commonly known types of MOSFET;
- N-Channel Enhancement mode MOSFET
- P-Channel Enhancement mode MOSFET
- N-Channel Depletion mode MOSFET
- P-Channel Depletion mode MOSFET
Detailed outlook on all these types of MOSFET can be found in our article regarding MOSFET.
Characteristics of FET
- The Current Voltage, I-V characteristics of the Field Effect Transistor is plotted between the applied voltage VDS and Drain Current ID.
- The graph for studying the characteristic curve of a field effect transistor_ FET is plotted between the varying values of Drain Current represented by ID along the y-axis, with the varying values of VDS along the x- axis.
The graph shows the following regions;
- Ohmic Region
- Cut off region
- Saturation or Active Region
- Breakdown region
Refer to the graph for better understanding.
We will now discuss each of the regions in detail.
Ohmic Region
- This is the extreme left side of the graph which represents the value of Drain Current ID when the applied voltage of the transistor between the source and gate is Zero i.e VGS= 0
- The conductive channel is small but not narrow in this case.
- Depletion regions on the corresponding sides are equal in size and haven't started expanding yet.
- Our Field effect transistor acts as a voltage controlled resistor at this instance of the IV characteristics curve.
Cut-off Region
- This is the second region of our graph represented by purple the purple lines.
- This cut-off region is also called as pinch-off region because the VGS voltage , the one which controls the current of the transistor is terribly high enough to make the circuit work as an open switch.
- At the pinch off region the conductive channel for current is almost closed due to the Increased thickness of depletion regions on both sides.
Saturation Region
- The saturation region is also called the active region of the graph.
- In this region the Field effect transistor acts a good conductor.
- The value of applied Voltage VGS, the voltage between gate and source drives the transistor.
- The Drain Source Voltage VDS has minimal effect on the current ID of the transistor at this very instant.
Breakdown Region
- This is the last and terminal region of characteristics curve for the field effect transistor, you can observe this region on the extreme right corner.
- The Voltage between the source and drain represented by VDS is very high at this point.
- The voltage is high enough that the conductive channel is broken and maximum current passes through the channel into drain.
Applications of Field Effect Transistors
- Field Effect Transistors have revolutionized the electronic world, there is an endless list of uses of field effect transistors, we are going to discuss a few important ones in this section.
- Field Effect Transistors FETs are frequently used in Integrated Circuits because of their smaller size and compactness.
- FETs are used in operational amplifiers as VRs, Voltage Variable Resistors.
- They are also used in tone controls for mixer operations on TV and on FM as well.
- Field Effect Transistors are also used in logic gates.
- Field Effect Transistors are widely used in the production of digital switches as well.
We will now discuss some of the most advanced applications of field effect transistors now,
FET as Buffer Amplifier
- First things first ,let us first discuss what does a buffer do? A buffer makes sure that the signal either digital or analog is successfully transferred to the preceding wave.
- A voltage buffer helps in amplifying the current without disturbing the actual voltage level.
- So, as you are well aware of the function of a buffer, we will discuss how a Field Effect Transistor acts a buffer amplifier.
- A buffer amplifier separates the previous stage of the signal from the next upcoming stage, drain of the Field Effect Transistor works for this purpose.
- Lastly , you must be thinking which characteristic property helps the Field Effect Transistor in achieving this, i have the answer for this question of yours! The high input impedance and low output impedance make a Field Effect Transistor an excellent buffer amplifier.
FET as Analog switch
- We have been discussing the use of Field Effect Transistors in analog and digital switches lately, we will be discussing their use in analog switches now.
- We have discussed it earlier as well in our characteristics curve and operational scenarios of the Field Effect Transistor when the output voltage equals the input voltage making the FET works as a switch.
- When the VGS which is the gate source voltage as you already know is absent, the FET works as a small resistance , although a little bit of drain current is present but its value is almost negligible.
- The mathematical expression can be written as
VOUT = {RDS/ (RD + RDS (ON)}* Vin
- If you remember, the cuttoff region of I-V characteristics curve of our Field Effect Transistor, when the max negative voltage is applied to the Gate source region and eventually the Field Effect Transistor_ FET starts acting as a very high resistance.
- That resistance lies in the range of Mega Ohms.
- In this case the output voltage Vout is nearly equal to the input voltage which was VGS.
FET as Phase shift oscillator
- Field Effect Transistors are ideal to be used as phase shift oscillators.
- Phase shift oscillators are used to generate signals with wide range of frequencies.
- Field Effect Transistors can be used for amplifying as well as for feedback loop operation, that is the reason they are excellent to work as phase shift oscillators.
- Field Effect Transistor_ FETs have high input impedance, so there is a very less loading effect when they are used as phase shift oscillators.
- Most of the times N channel JFETs are used for this purpose.
- You can observe the Field Effect Transistors as phase shift oscillators in GPS units, musical instruments and many other places where audio signals are modulated such as voice synthesis.
FET as Cascode amplifier
- The word case code has been derived from the phrase " Cascade to Cathode".
- Cascode circuits are made up of two components, the first one is the transconductance amplifier and the second one is the buffer amplifier.
- Cascode amplifiers are generally made using Field-Effect Transistors due to their high input resistance.
- We use cascode amplifiers because of their quality of having low input capacitance, otherwise, the normally used common amplifiers have a higher value of input capacitance in general than the cascode amplifiers.
- Although the voltage gain is the same for both the amplifiers which is again a win-win situation for
- Cascode amplifiers using Field-Effect Transistors.
FET in Multiplexer
- Let us first discuss the function of a multiplexer, a multiplexer collects different signals from different sources to present as a single output signal. Imagine a whole year of hard work and the end result is summarized in a single result card after the exam!
- Junction Field-Effect Transistors are used to construct the multiplexer circuit.
- Each Field Effect Transistor act as an SPST.
- In case you don't know about the SPST, let me tell you, it is the single pole single throw switch that generates one output from one input.
- An SPST is used as an on-off switch in circuits.
Consider the circuit diagram given below;
- All input signals get blocked when the control signals are made more negative than the Gate source voltage VGS.
- This condition blocks all the input signals.
- By turning any one of the control voltages V1, V2, or V3 to zero we can obtain a single desired output wave.
- Consider if ye turn V2 to Zero we will obtain a triangular signal.
- If we turn V3 to zero, you can yourself figure out from the circuit diagram, the wave signal you would get, Go! Scroll up!
- So this is how the Field Effect Transistors are used in multiplexers.
FET as Low noise input amplifier
- How you define noise? A sound that is unpleasant to the ears or when talking of signals a disturbance that causes unnecessary turbulence in the desired output making it meager or weak.
- Noise is produced in many mechanical and electrical instruments but sometimes for a few things it is tolerable and sometimes it is not!
- Just imagine disturbing noise when you are streaming a video or audio, a loud signal which blurs out music during your sunny beach day on your radio, nobody wants that! That is why Field effect transistors are used for low noise amplification.
- Noise has nothing to do with signal strength which is why it is always there, even when you have ended your live stream!
- Noise production is a drawback of many electronic devices but the bright side is that our Field effect transistors make a little less noise especially if they are used in the front end of the signal receiver.
- Field-effect transistors are a bit noisy too, but I have a solution for it, MOSFETs are used where even a little bit of noise can't be tolerated, don't worry we would talk about MOSFETs in our next article!
- So, lastly, we can say that, if we use a Field-effect transistor_ FET on the front end, there is lesser amplification of undesirable signal in our generated output.
FET as Current limiter
- Junction Field Effect transistors can be used to make a current limiting circuit.
- By this characteristic and arrangement, constant-current diodes and current regulators are made, let's discuss the process, but firstly refer to the circuit diagram for better understanding.
- When there is an excess of supply voltage due to any discrepancies in the system, the Junction Field Effect transistor immediately starts operating in its active or saturated region, I hope, by now you are well aware of the active region of the Junction Field Effect transistor, if not, refer to the section of I-V characteristics graph and its explanation!
- At this instance, the Junction Field Effect transistor acts as a source of the current itself and prevents any further load current.
So friends, this last segment concludes our discussion on Field Effect Transistors(FET), I hope you have learned something new from this discussion. For any suggestions or constructive criticism or a little bit of appreciation, you can use the comment section below. See you soon with the next topic, have a good day ahead!
What is a 3D Printer? Working, Models, Resins, Software, & Prices
3D Printer is an electronic machine that uses digital data to generate physical 3D models through successive layer printing. A 3D printer can make an object's physical model either scanned by a 3D scanner or designed using a CAD program. 3D Printing is an additive manufacturing technique where successive material layers create a three-dimensional object (Rapid Prototyping). The 3D printing concept is fascinating. Who is not excited about 3D printing? The use of inkjet technology in creating 3D models is a revolutionary method that costs less and saves time by eliminating the designing need for separate model parts. One can use a 3D printer to make a complete model in just a single process.
Several industries use 3D Printers in printing various outputs they need; The industries include footwear, architecture, jewelry, construction and engineering, education, automotive, medical and dental industries, aerospace, and consumer products.
What is a 3D Printer?
- A 3D printer is a computerized machine that allows physical object creation using a three-dimensional digital model (3D); it typically lays down thin material layers in a successive form.
- Three-dimensional printing is an additive manufacturing technique. Thus, it uses digital designs in creating physical objects.
- The process constitutes successively laying down a material's thin layers in powdered plastic or liquid form, cement or metal. Lastly, the layers are fused (Will, 2020).
How a 3D Printer works
According to Woodford (2021), inkjet printers usually spray liquid ink, while a laser printer applies solid powder in its production. Well, a 3D printer does not use any of the two. Instead, it uses plastic in physical object modeling.
- A 3D printer functions by melting a plastic material to a molten state released via a tiny nozzle.
- The nozzle moves accordingly under computer control or automation of the 3D Printer.
- The Printer prints one layer simultaneously; a printed layer has to dry before another is published.
- The end product depends on the Printer and user skills; Mostly, the printed product is usually superb with a 3D model appearance.
- The material used in printing is equally crucial. For example, the plastic material used in the Printer will determine the quality of the object printed.
Advantages of 3D Printer
According to TWI (2021), 3D Printers in production have more benefits than traditional production methods.
Flexible design
- 3D Printers allow the designing and printing of a variety of complex models. 3D Printers have limited restrictions in printing, unlike several traditional processes.
Printing on demand
- 3D Printers require less space in stocking inventory than the traditional processes.
- 3D Printers save costs and a lot of space because printing in bulk is not necessary unless needed.
- The 3D Printer has a virtual library where all the design files are stored.
Rapid Prototyping
- 3D Printers carry out printing very fast; they manufacture many parts within a short time.
- In comparison with machine prototypes, 3D Printers cost less and faster by allowing completion of each design model at a higher speed rate.
Solid and light parts
- Most of the material parts in 3D Printers are plastics and more minor metals.
- Therefore, plastics provide more advantages because they are lighter than metals.
- Industries such as automotive use the lightweight benefit because it gives significant fuel efficiency.
- Also, several parts are made from tailored materials, providing unique properties like higher strength, heat resistance, and water repellency.
Fast design and high production rate
- 3D Printer prints objects in a short time, i.e., an hour, depending on a part's complexity and design.
- In 3D printing, the part's manufacture provides time-saving, and design processes are extremely fast by creating ready CAD or STL files to be printed.
Minimal waste
- The parts’ production process in 3D Printer only needs the materials required for each part, with very minimum material wastage.
- In alternative methods like traditional processes, parts are cut from considerable chunks of materials, especially non-recycled materials.
Cost-effective
- A 3D Printer saves on costs in its operations; partnered with different manufacturing machines.
- The Printer can automatically work on a task if set; it does not need an operator to control its functions.
- Also, the 3D Printers reduce material cost in the manufacturing process since the process only requires the material required.
Ease of access
- A 3D Printer can quickly access more local service providers which offer outsourced services for manufacturing tasks.
- Therefore, it does not require costly transportation, unlike the traditional industrial process.
Environmental friendly
- The technology used in 3D Printers reduces wastage of materials in production processes.
- Also, the 3D Printers benefit the environmental properties like better fuel efficiency than the traditional methods.
Advanced Healthcare
- The 3D Printers are used in hospitals to save lives, especially in surgery sectors. The Printer is used in printing human body organs such as kidneys and livers.
Disadvantages of 3D Printer
No matter how good a 3D Printer may look to have solved the problems of many individuals, it still has drawbacks.
Limited materials
- A 3D Printer is limited in creating items within a selection of metals and plastics; it does not have an exhaustive raw materials selection.
- Not all plastics or metals are temperature controlled to be used in 3D Printers. Furthermore, most of the printable materials are unsafe for food and can not be recycled.
Restricted build size
- A 3D Printer’s print chambers are small. Hence the print chambers restrict the sizes of parts to print.
- Things that are larger than the print chambers are printed in parts separate from the 3D Printer.
- One can join the large and small printed objects after production, but it is much work, costs more, and consumes a lot of work.
Post-processing
- 3D printed parts require clean-up to eliminate supporting materials from the building process and create a smooth surface finishing.
Large Volumes
- The cost of 3D printing is static, unlike conventional methods such as injection molding.
- The 3D printing initial investment is lower than in some manufacturing techniques.
- But, when 3D printing is scaled for mass production of large production volumes, the cost per unit for injection molding reduces more than the 3D Printers.
Part structure
- Certain orientations or stresses can delaminate the layers because of the successive layer production in 3D printing.
- The problem commonly occurs in the production of items using fused deposition modeling (FDM). Also, multijet and polyjet are
3D Printer Models
Three plastic parts 3D Printers are most developed. They include:
- Fused Deposition Modelling 3D Printers (FDM).
- Stereolithography 3D Printers (SLA).
- Selective Laser Sintering 3D Printers (SLS).
- Laser Crystal Display 3D Printers (LCD).
- Digital Laser Printing 3D Printers (DLP).
Stereolithography 3D Printer (SLA)
According to Formlabs (2021), the world's first 3D Printer is stereolithography, invented in the 1980s. Most professionals are still using the SLA technologies in production. The Stereolithography 3D Printer applies the photopolymerization process in its functioning; The process includes using a laser to cure liquid resin into hard plastics.
The Printer is popular because of its production ability of watertight, isotropic, and high-accuracy prototypes or parts. The parts or prototypes have advanced materials range with good quality features and smooth surface finishing. The Stereolithography resin offers vast mechanical, thermal, and optical elements to match the industrial, standard, and engineering thermoplastics properties.
Several industries use stereolithography—for example, dental, engineering, education, modeling, and manufacturing industries.
Stereolithography parts constitute a smooth surface finishing, fewer visible lines, and sharp edges.
Application of stereolithography
- Concept modeling
- Dental application
- Functional Prototyping
- Rapid Prototyping
- Jewelry casting and Prototyping
- Short-run production
Liquid Crystal Display 3D Printer (LCD)
The LCD 3D Printer uses UV LCDs arrays as its light source. The LCD panels produce light that directly shines onto the building area in a parallel fashion. Pixel distortion is not a problem in LCD 3D Printer because its light is not expanded. The printing quality is dependant on the LCD 3D Printer's density; increasing the pixels produces better quality (Leo, 2019).
The LCD 3D Printer has a faster building speed when compared to SLA 3D Printer; it prints parts faster.
Selective Laser Sintering 3D Printer (SLS)
A selective laser sintering (SLS) 3D Printers sinters small polymer powder particles to form a solid structure using a high-power laser. The SLS has unfused powder whose function supports the part when the Printer is printing and removes the need for a dedicated support structure. Hence, the SLS is suitable for complex geometries, including the negative and interior features, thin walls, and undercuts (Formlabs, 2021). The SLS 3D Printer produces parts with superb mechanical characteristics. Furthermore, it has strength that resembles the injection-molded parts' strength.
The SLS’s most common material is nylon. Nylon. Nylon has suitable properties that suit the SLS 3D Printer; the properties of nylon include it is flexible, strong, lightweight, and stable against chemicals, water, impact, UV light, and dirt.
According to Formlabs (2021), The SLS 3D Printer is popular among engineers because it combines high productivity, low cost per part, and established materials. The engineers use it for functional Prototyping. Furthermore, the SLS 3D Printer is cost-effective for bridge manufacturing or limited-run.
The SLS 3D printer parts have faintly rough surface finishing and layer lines that are almost not visible.
Applications of an SLS 3D printer
- End-use parts
- Functional Prototyping
- Custom manufacturing, bridge, or short-run
Fused Deposition Modelling 3D Printer (FDM)
Fused Deposition Modelling (FDM) also refers to the Fused Filament Fabrication (FFF). Consumers popularly use FDM 3D Printer. The printer functions by releasing thermoplastic filaments like the Polylactic Acid (PLA) and Acrylonitrile Butadiene Styrene (ABS) via a heated nozzle, building a platform through heating the material to melt and applying the plastic on successive layers until completion of the part (Formlabs, 2021).
The FDM 3D printer is the most favorable for simple, low-cost Prototyping and basic proof-of-concept models. Compared to SLS and SLA 3D Printers, FDM 3D Printer has the lowest accuracy and resolution; hence, it is advisable not to use the FDM 3D printers in printing designs that are complex or have intricate features. Mechanical and chemical polishing processes are used in obtaining higher-quality surface finishes. An industrial mitigates challenging issues through soluble support and allows a wide variety of engineering thermoplastics, increasing production costs.
FDM parts show visible lines responsible for creating inaccuracies when handling complex features.
Application of FDM 3D printer
- Simple Prototyping
- Basic proof-of-concept models
3D Printer Resins
A resin refers to a highly viscous substance of synthetic or plant origin typically converted into polymers; generally, the resin is a combination of organic compounds (Liqcreate, 2021). Transparent resin is mainly used in 3D printing in a transparent material. Transparent resin is suitable for 3D printing because of its water-resistant property. Also, the transparent resin is an ideal choice for that requires high quality, smooth finish, and fine surface.
According to Liqcreate (2021), several types of resin are used in 3D Printers basing on their functions or purpose. They include the general-purpose, premium, medical, castable, engineering, and creative purpose resin.
General Purpose resins
- General-purpose resins can perform several functions and are not specifically for one task.
- The resin is ideal for a wide range of purposes in Prototyping, consumer applications, and entertainment.
- The resins have the best quality performance and costs in the market and are easy to use.
Premium resin
- Premium resins have perfect quality in LCD 3D Printers, no discoloration, and high opacity.
- The premium resin range comprises flexible and rigid resin for functional objects.
- The premium resins are suitable for in-office printing because they do not release any unpleasant odor.
Medical resins
- Each medical application has unique resin requirements—for example, dental applications or products concerning skin contact.
- Therefore, every medical operation will require a different special resin depending on the type of medical operation.
Castable resins
- Castable resin is the best in jewelry manufacturing, industrial, and dental parts.
- Castable resin is a wax-based material with a reliable casting process.
- Also, it uses a clean burnout to crisp details and provides a smooth surface finish.
- A castable resin can create custom elegant organic geometries.
Engineering resins
- The engineering resins are suitable for applications that need specific mechanical assets.
- The engineering category of resins comprises advanced photopolymers for professionals who expect tough, extreme impact resistance, and tough.
Creative resins
- The creative resin creates the 4th dimension when used in 3D printers.
- One has beautiful options when selecting the resins.
- The creative resins add feel, scent, sound, or glow to a 3D Printer.
Software for 3D Printing
In the past, people used a lot of resources to study Software about modeling software. Some software is easy to use, and some are free to access. Some software use solid modeling whereby they produce manifold models. While other Software is watertight, a manifold model refers to a model with some thickness in all of its walls (Strikwerda, 2021). Softwares that use polygon modeling create walls with zero thickenings; such walls are suitable for creating graphics for movies and games contrasting with 3D printing. The polygon modeling software makes the manifold models, but it would need a lengthy procedure and more experience. The Software listed in the article generates 3D printable models. Some of the Software is easy to use. At the same time, others are more suitable for professionals rather than for amateurs.
Trinkercad
According to Strikwerda (2021), Trinkercad software is a browser-based app and freely available to all users, and it applies solid modeling in its work. The creation of the Software targets beginners. Trinkercard software is unique because it introduces solid modeling and allows any person to make 3D printable modeling.
The Software applies the block-building concept. Therefore, it allows one to create models from a variety of basic shapes. The Software also provides aid to beginners through its guides and tutorials. Furthermore, the Software has the advantage of exporting or sharing with ease.
Trinkercad has an extensive library that constitutes millions of files that give the users several distinct options for finding the best shapes that will suit their problem requirements best. The Software allows the user to print and have the product instantly at your location through direct integration with other printing services. It is the best platform to learn about 3D modeling and printing.
Blender
According to Strikwerda (2021), Blender software is freely accessible to its users. The Software is not a solid model; it is open-source, rich in features, and constitutes animation, rendering, sculpting, video editing, simulation, and motion tracking. Also, the Software is very friendly since both advanced users and amateurs can use it.
The Blender Software constitutes many 3D creation facets, including simulation, animation, and modeling, e.t.c. The software suits individuals who are ready for transitioning from learning to designing complex 3D models.
One of Blender's exciting features is the photorealistic rendering feature. The feature creates models to reality; only a few free software can have such a feature.
BRL-CAD
According to Strikwerda (2021), the BRL-CAD Software is a type of Open-source Software. Also, it is an advanced solid model system comprising interactive geometry editing. The U.S military uses the BRL-CAD Software in modeling weapons and related systems. This shows the Software is very advanced and quite dependable. The Software serves its users with a precision of high level by using specific coordinates in arranging the geometric shapes.
The Software provides complex and simple shapes to its users to make their designs, having an extensive library of files. The Software allows combining multiple different forms to generate the desired model. BRL-CAD Software performs its tasks fast due to its dense features. Furthermore, it is free and available for access to all users.
Wings3D
According to Strikwerda (2021), Wings3D is an open-source software type; polygon modeling tool and has a broad range of selection and mesh tools regardless of its freeware. The Software is user-friendly, with beginners as the primary target; it has a steady learning curve. Its features, such as the easy-to-use interface and customizable hotkeys, indicate the designing or printing status; hence, the Software suits the starters.
The Software has no shortage of valuable or essential features like the inset or plane cut; thus, it can create impressive models. Moreover, the Software supports a vast range of both import or export file formats.
Modo
According to Strikwerda (2021), Modo 3D Printer software creates a creative 3D polygon modeling tool. Also, it can provide a subdivided surface designing tool that has more flexibilities for creating both the precision meshes and freeform organic designs through the use of the same Software. The Software is strictly used by professionals or advanced 3D printing users. The Software is not user-friendly, and it is costly to operate.
Modo has a wide variety of features and runs its processes smoothly. It has a very high speed in production and modeling. The Software allows extensions of partnering with other Software in production activities.
Price of a 3D Printer
The price of a 3D printer varies based on the type of printer and the needs of the user. If you rank all of the many 3D printers on the market, you'll come up with a price of $400. However, as of April 2021, the price has dropped to $ 200-$500, with some being quite pricey at $ 1500. Professional 3D printers and enthusiast 3D printers, for example, range in price from $ 1,500 to $6,000, depending on the printing capability. Finally, industrial 3D printers are expensive to buy and operate, ranging from $20,000 to $100,000.
So, that was all for today. I hope you have enjoyed today's lecture. If you have any questions, please ask in the comments. Take care.
RC Electronic Circuits Simulation in Proteus ISIS
Hello friends! Welcome to the Engineering components. Today, We are talking about the very common topic of electronic devices. In this tutorial, we'll pick very common components and learn about their role in circuits. If you are a beginner in the world of electronics, you must read this article till the end because we'll learn all the things from scratch till the completion of the circuit. In this article, you will learn:
- Introduction to electronic circuits
- Categories of electronic circuits.
- Introduction to Resistor and Capacitor.
- What are RC Circuits?
- Simulation of R Circuits in Proteus ISIS.
Let's look at the description.
Introduction to Electronic Circuits
We come across many circuits in our daily lives, some of them are electrical circuits and some are electronic circuits. There are many differences between them but the main difference is, that electrical circuits do not have decision-making capacity whilst electronic circuits do have this ability. In electronic circuits, we power up the components with the mean power source and get the output. Hence we may define the electronic circuits as:
- "The electronic circuits are the types of circuits in which the individual electronic components are used that are connected to the power source with the help of wires so that the current can pass through the components."
The electronic circuits are also called discrete circuits because they are somehow, opposite to the integrated circuits. Most of the circuits use a combination of electrical and electronic circuits.
Categories of Electronic components
As we know, electronic components are used in many ways. For convenience, we divide the electronic components into categories. These are categories into two main sections:
- Active Components.
- Passive components.
The main focus of this article is passive components. The passive components include Capacitor, Resistor and Inductor. These are symbolized as C, R and L respectively. We'll learn about the first two of them today.
Introduction to Resistor and capacitor In electronic circuits
The Resistor and capacitor may be said to be the backbone of thousands of electronic circuits. To design a circuit, one should have a clear concept of these components. So, Let's have their introductions:
Resistor in Electronic Circuits
As the name implies, the resistor shows the resistance for the current in the circuit. It has a tube-like shape that has a molded figure and has a wire at the start and end. One may define the resistor as:
- The resistor is a passive, bi-terminal electrical component that is used in the circuit to have the electrical resistance in the current. When we use it in electronic circuits, it reduces the sudden current flow in the circuits, biases the active elements, divides the voltages in the circuit and performs such other tasks.
Current is the flow of electrons, this flow should be resisted by some mean, so that the components used in the circuit will be safe from damage. To control this opposition, one must have a clear idea about the resistance.
The resistance is the measure of the property of the resistor to oppose the current in a circuit.
The resistance of the resistor is symbolized by the strip of different colors. Each color has a meaning of different value.
Capacitor in Electronic Circuits
The capacitor works like a battery. The body of the capacitor is so simple and easy to understand, yet plays an important role in many types of circuits. The introduction of Capacitor is given next:
- The capacitor is an electrical component consists of two metallic plates and two wires connected with two plates that store energy passes through it in the form of an electrostatic field in between its two metallic plates. Its body is packed in an envelope.
As you can see in the picture, capacitors are manufactured in the form of a tube-like shape with two wires that are used to connect within the circuit. The capacitors are made in a variety of ranges according to their role in the circuit.
RC Electronic Circuits
As we know the Resistor is denoted as R and the capacitor is denoted by C. The RC circuits are the simple and easy circuits to understand. We introduce the RC Electronic circuits as:
"The RC Circuits are the Resistor-Capacitor circuit in that consist of only resistor and capacitor as passive components of capacitor and these are connected with the current or voltage source according to the type of circuit."
One should keep in mind that we are talking about the category of passive components right now. Otherwise, some other components such as the power generating component are also used in the circuit.
The are two categories of RC Circuits mentioned next:
- RC Series circuit.
- RC Parallel circuit.
RC Series circuits are the ones in which the resistor and capacitors are connected in series whereas, when we talk about the RC Parallel circuit, the R and C are connected in parallel to each other. RC circuits are also called the
filter circuit or
network circuit because many RC circuits are used to filter the unwanted frequencies of signals from the circuit and keep only the required ones.
The RC Circuits are further classified on the basis of the number of components used in the circuit. The circuit is called the
first-ordered RC Circuit if it contains only one resistor and one capacitor. Similarly, if it has two resistors and capacitors then the circuit is called the
second ordered RC Circuit.
To have a clear idea about the circuit, design it on the Proteus.
RC Electronic circuits in Proteus ISIS
To experiment, just follow the steps given next:
Required Components
- Resistor
- Capacitor
- Battery
- Connecting wires
Procedure
- Start your Proteus software.
- Click on the "P" button and choose the required components one by one.
- Arrange these components in the working area.
- Connect the components with connecting wires.
- Play the circuit with the play button present on the lower-left corner of the screen.
This image shows two types of circuits. The upper circuit is the RC Series circuit and the lower circuit is the RC Parallel circuit. Hence today, we learned about the introduction of Electronic circuits, we saw what are RC circuits, their components and their types depending upon different parameters. We also simulated the circuits in Proteus.
Diode: Definition, Symbol, Working, Characteristics, Types and Applications
Hello friends, I hope you all are happy, healthy, and, content. Today, our discussion is all about "Diodes". Whoever has been a science student, knows about diodes. Although it seems to be a tiny component of a circuit, apparently it is true but it has a lot of complexities or you can say, it's a storm in a teacup. You might have read a lot about diodes in physics, in today's discussion we would be moving step by step into the pool of diodes from definition to working of diodes, their types, and then lastly its applications. Let's get started!
Diode Definition
First things first, Let's define diode,
- A diode is a basic discreet electronic component made up of semiconductor material, used in electronic circuits, which allows unidirectional current to flow through it, i.e it only conducts current in one direction.
- You must be thinking, how is it possible for a device to conduct electricity in only one direction only, even when it has two terminals?
- The answer lies in making of a diode, a diode has zero resistance in one direction, meanwhile, the other direction has infinite resistance, hence maintaining the flow in only one direction hindering the flow in other direction, but keep one thing in mind, its an ideal case, otherwise a little bit of current flow is always there and ideal cases do not exist!
- A diode can act as a conductor and as an insulator as well. When the diode is reverse biased it acts as an insulator meanwhile when a diode is forward biased, it acts as a conductor.
- Diodes are mainly made up of two famous semiconductors silicon and Germanium.
- There are several different types of a diode, make of each one differs according to its function and the way it transmits current, don't worry we are going to have a detailed account of it soon.
Diode symbol
- The above symbol represents a diode, it's the symbol for a basic diode, let me clear one thing for you, there are several different types of diodes that we would be studying next and each one is represented with a different symbol accordingly. So, do not doubt yourself when you see a slightly different one!
- You can observe two ends or two terminals labeled as cathode and anode respectively.
- The Arrowhead represents the anode and direction of current flow.
- The other end is the cathode represented as a line attached to the terminal vertex of the triangle representing the anode.
History of Diode
Here is a brief account of the history of diodes, a little touch-up hurts no one!
- So, the History of diodes dates back to 1900 when the thermionic diodes and semiconductor diodes were made for radio.
- Vacuum tube diodes were the trendiest items of early 1950 being used and altered by several scientists through different experiments such as Fredrick Guthrie and Thomas Edison.
- Fleming valve was the first recognized diode of its age with all the elements present in a diode in the true sense.
- In world war ll, crystal diodes and Crystal rectifiers were used intensively in radar systems which led to extreme usage and development in the diode world, all thanks to their wide window of utility.
Working and Construction of Diode
In order to understand the working of a diode, let us first discuss its basic structure, how would you understand the working until unless you understand the make and build of a thing!
The basic structure of a Diode
- A basic diode is made up of a semiconductor, a p-type semiconductor and an n-type semiconductor joined together. Do you have a basic idea of semiconductors? Semiconductors are materials that have properties lying within the spectrum of metals and nonmetals, you can read our detailed article on the periodic table if you want to know more about the elements and their respective properties.
- Anyhow, we were talking about semiconductors, semiconductors are of two types, Intrinsic semiconductors, and extrinsic semiconductors.
- Intrinsic semiconductors are pure semiconductors without any additional impurity. They include silicon and germanium.
- Extrinsic semiconductors are the ones with doping, don't worry we are about to discuss it next.
- I hope you have a general idea about p-type and n-type semiconductors, if not, we have got you covered. Read the next section for details;
Doping in Semiconductors
To understand p-type and n-type semiconductors, you must be aware of the concept of Doping.
We can define doping as;
Doping is the intentional addition of impurities into an intrinsic semiconductor. It changes the physical, electrical, and optical characteristics of that very intrinsic semiconductor.
1. p-type semiconductors
- A p-type semiconductor is made by doping i.e adding an impurity which is an electron acceptor by nature into the semiconductor i.e gallium and boron are added to the silicon, turning it into a p-type semiconductor.
- You must be thinking about why they are called p-type semiconductors? Let me tell you, The name p-type is given due to the presence of a positive charge on the semiconductor.
- The p-type semiconductor contains a majority of holes and a minority of electrons.
2. n-type semiconductors
- The n-type semiconductor is made by doping the semiconductor with an electron donor element.
- The n-type semiconductor has a majority of electrons and a minority of holes.
- The name n-type is given due to the negative charge of electrons present in the semiconductor, you knew that already, or you didn't?
- Arsenic and phosphorus are used for the doping of silicone making it a n-type semiconductor.
Now we are done with the basics of n-type and p-type semiconductors, let us discuss their utility in making a semiconductor diode. The following section includes a breakdown of components and concepts lying in the scope of diodes.
PN junction
- Our discussion would be incomplete without the PN junction, can you think of a diode without it? Yes, there are a few exceptions but typical ones necessarily have a PN junction.
- As I have told you earlier semiconductor diodes are made up of n and p-type semiconductor materials joined together to make a diode.
- The merger of these two materials is responsible for the making of PN junction made between the contact point of two materials.
- After the formation of the PN junction, the process of diffusion takes place, we would be discussing it next, don't worry!
Depletion Region
- There is a considerable difference between the amount of holes and electrons on both sides. If you know about the simple concept of diffusion, a particle moves from the area of higher concentration to the area of lower concentration and vice versa, same happens here, the holes from the p side move to the n side of the diode.
- Meanwhile, electrons move from the n side where they are higher in concentration to the p side where they are lower in concentration.
- This movement of electrons and holes generate a diffusion current leading to the formation of an immobile layer of positive and negative ion on the PN Junction, this layer is called depletion region.
- Now you must be thinking why I'm telling you about the depletion region? Why is it necessary?
- The depletion region limits the diffusion of electrons and holes from the opposite doped semiconductor portion, otherwise, after the constant diffusion, all the electrons and holes would have been diffused into each other leaving behind almost no charge carriers to conduct the current when the diode is connected to the battery.
- On the other hand, the size of the depletion region maintains the current flow and resistance. Larger the depletion region, the Larger the resistance. You will understand this concept more easily once we would be done discussing the forward and reverse biasing of the diode and characteristics of the diode. Stay tuned!
Biasing conditions of the Diode
To understand the working of a simple diode, you must know about the biasing conditions of the diode first,
-
Forward biasing
-
Reverse biasing
-
Zero biasing
1. Forward Biasing
- When the positive terminal of the battery is connected to the p-type semiconductor meanwhile the n-type semiconductor is connected to the negative terminal of the battery it is called forward biasing of the diode.
- The depletion region is very thin in this case and it is easier for the forward Voltage or VF to overcome the depletion region for conduction of current.
- PN junction offers very little resistance to the current flow due to the thin depletion region.
- In forward biasing condition, an ideal diode has zero resistance, but as I told you earlier, an ideal condition does not exist.
2. Reverse Biasing
- In reverse biasing condition, negative terminal is connected to the p-type region of the diode, meanwhile positive terminal is connected to the n-type region of the diode.
- The depletion region in this case is very thick.
- The PN junction in reverse biasing offers a very high resistance due to the thickness of the depletion region.
- A diode in ideal condition when reverse biased has infinite resistance.
3. Zero biasing
- Voltage has not been applied to the diode, in zero biasing condition.
- In zero biasing conditions, there is a thermal equilibrium in the diode.
- The natural potential barrier is present in the diode, which is 0.5V to 0.7V for silicon and for germanium this potential barrier is 0.3V.
Characteristics of diode
- We have already learned about the forward and reversed biased condition of the diode, in order to understand the current and Voltage characteristics of both the conditions , consider the following graph consisting of a single characteristic curve.
- The voltage is usually plotted on the x-axis of the graph meanwhile the current takes the y- axis.
- The starting point of the graph can be seen in the center, where both the values i.e current and the voltage is zero.
- Forward current can be observed extending upwards, above the horizontal axis meanwhile, reverse current extends downwards.
- In the upper right corner you can see the combined values of forward voltage and forward current.
- The lower left corner shows the combined value of reverse current and reverse voltage.
Forward Characteristic of Diode
- We have already studied about the forward biasing of the diode, forward characteristic corresponds to that.
- In forward characteristic the current IF flows in forward direction and depends on the amount of forward voltage VF.
- The relationship between VF and IF is called IV characteristic of diode or ampere volt relationship, this is the point of focus of our discussion!
- When forward voltage is zero i.e
- 0V, the forward current IF is also zero i.e 0mA.
- From the graph we can clearly see that the increase in forward voltage , VF causes can increase in forward Current IF, when the value starts from the point 0 of the given graph.
- Now its the turn for the most important point of the curve, the knee voltage denoted as VK.
- You must be thinking why we call it knee voltage? And how is it achieved? Have a look at the line formed , it seems like an extended knee, so we call it knee voltage. Knee voltage is the point where forward voltage VF is large enough to overcome the depletion region of the diode and there is surge in forward current IF, marking the highest point of voltage, knee Voltage VK.
- Knee voltage varies from material to material i.e VK is material specific.
Reverse Characteristic of Diode
- During the reverse biased condition, a very little current is conducted by the diode.
- You can observe the Reverse Voltage and Reverse current in the graph, represented by VR and IR respectively.
- There is a very little amount of charge carriers which conduct the reverse current IR.
- We cannot observe a considerable increase in Reverse current IR even with a large amount of Reverse Voltage VR.
- VBR is one of the most important characteristics of the reverse biased diode, its the breakdown voltage of the reverse biased diode which refers to the amount of voltage at which the reverse current IR increases rapidly breaking the PN junction.
Diode Equation
Following equation refers to the ideal condition of the current and voltage of a diode either in forward biased or reversed biased condition;
The equation corresponds to the following things;
- I is the diode current sometimes represented as ID as well.
- IS is the reverse bias saturation current and is not constant for any device, it usually varies with temperature.
- VD is the voltage across the diode
- VT is the thermal voltage which is equal to 25.8563 mV at 300 K.
- In other conditions, Vt equals Boltzmann's constant × temperature ÷ electron charge i.e kT/q
- n is the ideality factor, also called the quality factor and emission coefficient.
- The equation is called Shockley ideal diode equation in which the ideality factor is preset to 1.
- In other conditions, the ideality factor can range from 1 to 2 or maybe higher than that in some cases.
- In forward bias condition, the ideality factor is almost negligible and the equation can be written as;
Types of Diode
With the advancement in technology and increasing human needs, diodes also changed shapes and took over several functions, there are several types of the diode, some of them are explained below;
1. Zener Diode
- It is a heavily doped PN junction diode that works in a reverse-biased condition when a certain specified voltage is reached, this voltage is called Zener Voltage.
- The Breakdown voltage marks the best possible functional capacity of the diode.
- Zener diode is used for voltage regulation, you may observe one in clipping operations, circuit protectors, surge suppressors, and switching applications among the countless other uses which can not be listed here at once.
- They are available in different zener voltages and can be used according to the need.
2. PIN diode
- A PIN diode is a semiconductor diode having a wide undoped semiconductor region sandwiched between heavily doped n-type and p-type regions.
- PIN photodiode doesn't rectify or distort the signal.
- They have a wide range of applications being used in microwave switches and radars.
- PIN diodes are also used in fiber optics and photodetectors.
- Gamma rays and x-ray photons can be detected using a PIN photodiode.
3. Schottky diode
- This is not like a typical PN junction diode, Schottky diode is made by the combination of the metal with the n-type semiconductor.
- Because of the absence of a typical P and N-type combination, we do not see a depletion region in this diode.
- They are also called the hot carrier or Schottky barrier diode.
- These are highly efficient and used in digital devices which are highly sophisticated and fast.
4. Photodiode
- This is one of the most famous types of diodes which are almost known by everyone. A photodiode is a semiconductor p n junction.
- It works in a reverse-biased condition when current is generated on the absorption of light, i.e it converts light in current.
- They have countless applications in the medical, automotive, and other industrial fields such as CAT scanners, PET scanners, light meters, cameras, bar code scanners, and whatnot!
- Photodiodes are used in signal demodulation, detection, and switching.
5. Laser Diode
- Have you ever thought of the full form of the word LASER? You might have, but for the people who haven't, here it is, light amplification by stimulated emission of radiation.
- Laser diode works on the principle of stimulated emission.
- A laser diode works exactly opposite to the photodiode, it converts the voltage into high-intensity coherent light.
- The p-n junction of acts as the active region or laser medium of the diode.
- Laser diodes are highly efficient and can be produced at much lower costs than other diodes known to us.
- Laser diode requires a lower power to operate and produce coherent light than other diodes.
- There are countless applications of laser diodes being used in radiological scans, barcode readers, laser pointers, laser printing, and much more.
6. Tunnel Diode
- A tunnel diode is also known as Esaki diode.
- Tunnel diode as the name suggests works on the principle of tunneling, based on quantum mechanical effects.
- These diodes have a 10nm pn junction which is heavily doped which works on the negative conductance property of the semiconductors.
- Tunnel diodes are used in high-frequency oscillators and receivers, microwave circuits are also made using them.
- They are not widely used in every other circuit because of their low current.
7. Varactor diode
- Varactor diode is made up of two things, a diode and a variable capacitor. They are used as voltage-controlled capacitors.
- It is also named as varicap diode.
- A varactor works in a reverse-biased condition, I hope you know how the reverse-biased condition works, don't fret, if you still don't know, give it another read from the previous sections.
- They are used in frequency modulation, RF phase shifter, and have multiple other applications.
8. Vacuum Diode
- It is the simplest form of the diode and works on the principle of thermionic emission. It does not a PN junction, which are present in the modern day diodes, it's an old school one!
- The cathode and anode are made up of specified metals, different metals are used for the purpose.
- Both the cathode and anode are enclosed in a vacuum tube.
- The cathode is heated with the help of a power supply which in turn releases the electrons, these electrons are then attracted towards the anode.
- The stream of electrons flows from cathode to anode generating current.
- Vacuum diode only works in forward biased condition, in reverse biased condition, it does not work.
- It is the most primitive form of the diode and was used in almost every electronic appliance in the twentieth century, when technology was about to touch the new horizons, there were many available options such as radio, television, computers, and telephones to name a few with a vacuum diode as their functional component.
9. LED
- First things first, please do not call it LED diode, led already is a complete word, Light emitting diode, you can not write it , light emitting diode diode, or can you?
- Who is not aware of the light emitting diodes in this modern age? With endless advertisements and media campaigns, we all have a vague notion about LEDs to an extent.
- Light emitting diodes are similar to laser diodes but they do not emit laser beams on applying voltage.
- LEDs work in forward biased conditions i.e on applying and increasing voltage, current also increases emitting a non-coherent light.
- They are widely used in digital devices for display screens, optical fiber communication, and several detection systems.
10. Gunn diode
- If you remember, I told you earlier about the diodes without a PN junction, Gunn diode is one of them.
- The Gunn diode is a transferred electron device TED, which works on the Gunn effect, named after a scientist. It's a negative differential resistance device.
- There are three regions in total, N- region is the negative region, which is sandwiched between two P+ regions which are heavily doped.
- The materials used in the formation are Indium phosphide and Gallium Arsenide.
- It is a low-power oscillator used in the production of microwaves.
- Gunn diode provides high reliability, and high bandwidth at comparatively lower costs than other available options.
Applications and examples of Diode
As we are at the terminal stage of our discussion, you must be aware of the wide window of utilities we have for diodes, here is the list of few uses of diode which you might already know to an extent;
1. Inverter Technology
- You must be aware of the inverter technology used in modern appliances, they make use of rectifiers which convert the alternating current into direct current.
- Power conversion with the help of diodes has worked as the game-changer in the electronic world, the conversion of alternating current into direct current or higher dc voltage has revolutionized modern technology. You might have seen endless advertisements of invertors technology in home appliances such as air conditioners, and refrigerators to name a few.
- Automotive alternators and voltage multipliers are the well-known examples in this respect.
2. Boolean logic gates
- All of us have thoroughly learned boolean algebra and its logic gates in physics or somehow in computer sciences as well, I always had a love-hate relationship with the logic gates, I still don't know why!
- Those logic gates especially the AND and OR logic gates can be made using diodes and other necessary components required to complete the circuit.
- Diode logic gates were used a lot in the earlier production of computers when other available options were not cost-effective.
3. Signal Demodulation
- Do you know, what is signal demodulation? Let me answer this first, Picking up the actual signal from the modulated wave is called signal demodulation.
- Signal demodulation is carried out by the diode, usually for radio signals.
- The basic task is to remove the negative signals from the carrier wave, generating a clear output signal in terms of sound or an image.
- Signal demodulation is one of the most important things done by diodes.
- Can you guess how this process is carried out? The AM envelope detector, which is simply a diode and an RC circuit the leads for demodulation.
4. Electronics
- From transistors and rectifiers to Light emitting diodes and an endless spectrum of usage, diodes have a significant place in electronics.
- Diodes have plenty of variants to choose from, such as Diode 1n4004 is the most famous diode, which is used for rectification. It has a maximum current carrying capacity of 1A, there are plenty of options you can use as per your requirement.
- One of the most observed examples includes the LEDs, the festive fairy lights to large traffic signal lights and radiological detectors, we all have seen endless diodes in our lives.
- Zener diodes and tuning diodes act as voltage regulators, without them, your circuits would suffer a burnout soon, nobody can withstand a financial and human loss in general at such a large scale.
- We have discussed all of them in detail, you can refer to the section above, in case you have skipped it!
5. Bypass Diodes in Solar panels
- Hot spot heating is one of the many problems faced by the solar system, the solar cell gets damaged due to the low output in presence of shade, dust or snow or any other factors hindering the sunlight to the solar cell.
- Now, you must be thinking about how a hotspot is formed even though the cell itself is not working?
- It is absolutely true that the cell is not working, but the other cells are functional and the current of these cells flow through this faulty cell, heating it up and making a hot spot.
- For this purpose, to protect the faulty cell, bypass diodes are used. This is one of the least celebrated uses of diode indeed!
- These bypass diodes are connected in parallel with the solar cells which helps to reduce the flow of current through the flawed solar cell, making the current flow through an external circuit.
6. Diodes as Clippers
- Let's first discuss the function of a clipper circuit, in case you don't know, a clipper circuit is used to cut down certain parts of the signal, without disturbing the actual waveform, imagine you are making a sandwich with the sandwich cutter, upon cutting with the stencil the sandwich takes the shape of the cutter only from the corners, shedding off the extra parts and bits, but the actual build and assembly of the sandwich is not disturbed, the clipper does the same with the signals.
- These clippers are usually of two types, shunt clippers and series clipper, depending on their function.
7. Diodes in Radiology
- Have you ever been to the hospital for a scan? For a broken bone or for a diagnostic one?
- Laser diodes are the ones used for this purpose, we have already read about them in detail in our previous section.
- Nowadays, laser diodes are even used for surgical treatments such as retinal repair, and other eye-related surgeries. Lithotripsy is also done by laser, the stone in your kidney is broken from outside of the body, through a laser beam without any incision. Isn't it revolutionary? Definitely, it is!
So, friends, it was all about diodes, I presume you have a clear understanding of many concepts related to diodes including their basic structure, working, types, and applications. I tried to keep it simple but significant, You can re-read the section you least understood, it happens to everyone and it helps. See you with another soon, have a good day ahead!