There are two edge types:
Figure 3 shows the general symbol of a rising edge. The letter “P” denotes a positive edge. while fig. 4. Depicts the rising edge in ladder logic in the TIA portal of siemens software.
In ladder programming, the rising edge shows a positive rising edge received for the signals. In fig. 4, the rising edge is for the signal tagged as “TagIn_4” and the previously saved value is stored in “Tag_M”. the system can recognize a rising edge by comparing the buffered value stored in “Tag_M” and the current value in “TagIn_4”. For example, if the previous value stored in “Tag_M” is False, and the current value in “TagIn_4” shows high logic, this would mean a rising edge is received.
Figure 5 shows the general symbol of a falling edge. The letter “N” denotes a negative edge. while fig. 6. Depicts the falling edge in ladder logic in the TIA portal of siemens software.
In ladder programming, the rising edge shows a negative or falling edge received for the signals. In fig. 6, the falling edge is for the signal tagged as “TagIn_4” and the previously saved value is stored in “Tag_M”. the system can recognize a falling edge by comparing the buffered value stored in “Tag_M” and the current value in “TagIn_4”. For example, if the previous value stored in “Tag_M” is True, and the current value in “TagIn_4” shows low or false logic, this would mean a falling edge is received.
Now let’s do the same concept on the output side, fig. 7 shows the set output ladder instruction on a rising or positive edge. In this instruction, the result of the logic operation (RLO) which represents the left part before the output is evaluated to check the transition in its state. If the RLO changes from false to true then the output will be set for one scan cycle.
Figure 8 shows an example of the set output on a positive edge. On the most left, the coil with the letter “P” inside represents the instruction. The instruction works by saving the previous value of RLO into “Tag_M” and verifying the changes in a state with “TagOut”. For example, if the “Tag_M” holds a true state while the previously stored value in “Tag_M” was false. That would show a positive edge and the output will be set to true for the complete scan cycle.
Figure 9 shows the set output ladder instruction on a falling or negative edge. In this instruction, the result of the logic operation (RLO) which represents the left part before the output is evaluated to check the transition in its state. If the RLO changes from true to false then the output will be set for one scan cycle based on detecting a falling edge of RLO.
Figure 10 shows an example of the set output on a falling or negative edge. On the most left, the coil with the letter “N” inside represents the instruction. The instruction works by saving the previous value of RLO into “Tag_M” and verifying the changes in a state with “TagOut”. For example, if the “Tag_M” holds a false state while the previously stored value in “Tag_M” was true. That would show a negative or falling edge of the RLO. Consequently, the output will be set to true for the complete scan cycle.
Now let’s go to our lab and open a simulator to enjoy practicing very critical points in ladder logic programming. Yes, my friends, these are very critical points and are used smartly in solving very hard problems to solve. But, by comprehensive these points, you will be superb in your field as a prospective ladder logic programmer. Two points we are going to simulate, the first one is the ringing and falling edge of the inputs and their effects on activating and energizing the output for a complete pulse. And the rising and falling edge cases of the result of logic output (RLO) and its effects on energizing the output for a complete pulse.
Now, let’s assume we have a situation in the factory that, when specific action occurred, the output will be energized. In the example represented by fig. 11, when and only when input A, turned on, we need to start the output. That means the only scenario in which the output is turned on is when input A state changed from false to true. So let us simulate three scenarios, the first one shown in fig. 11, in this scenario the input previous status is saved in input B, while the current or new state is saved in input A. notice when the input does not change and it is false, the output is turned off.
Now let’s turn on input A, so now input changed from false to true as shown in Fig. 12. Ohh, notice the output comes true and that’s the rising edge at when the input changes from false to true.
And in the last scenario, when the input keeps true meaning the previous status was true and the current state is true, then the output is false as shown in Fig. 13.
In a conclusion, in rising edge, the output only gets true when the input changed from false to true.
Now, let’s assume we have another situation in the factory that, when an input or sensor turns off or changed from true to false, the output will be energized. In the example represented by fig. 14, when and only when input A, turned out from ON to off, the output will be energized. That means the only scenario in which the output is turned on is when input A state changed from true to false. So let us simulate three scenarios, the first one shown in fig. 14, in this scenario the input previous status is saved in input B, while the current or new state is saved in input A. notice when the input does not change and it is false, the output is turned off.
Now let’s turn on input A, so now input changed from false to true as shown in Fig. 15. Ohh, notice the output is false because that’s not a falling edge as the input changes from false to true.
And in the last scenario, when the input changed from true to false which is a falling edge. Therefore, the output turned on as in fig. 16.
In a conclusion, in a falling edge, the output only gets true when the input changed from true to false.
Now, my friends, we need to run the output for one pulse based on the result of logic output (RLO). Figure 17 shows the scenario of having a false state of the RLO, the output is false because there is no falling edge detected for the RLO.
Figure 18 shows the case when the RLO is turned from false to true, the output comes true but for one pulse notice the previous status represented by buffer has become false but the output after pulse time returns to false. However, the pulse of the output has been detected thanks to energizing output tag_5.
Figure 19 shows the very initial case of set output with a falling edge. To show, the case of the falling edge of RLO, we use another rung that would energize another output at Q0.6 when and only when the falling edge of the RLO occurs. In Fig. 19, the RLO was false. Therefore, there is no cause for a falling edge when RLO changed from true to false. So the output shows a false state.
Now let’s turn on the RLO, so the RLO changed from false to true which is still not a case of a falling edge of the RLO. SO the output is still false as shown in Fig. 20 represented by output Q0.6.
Figure .21 shows the scenario of the RLO turning from true to false which is a falling edge. In that case, the output will be turned on for one pulse and as a result, latching output at Q0.6 as shown in rung 2 of fig. 21.
Once more I would like to thank all my friends for continuing with our learning and practicing our PLC ladder logic series. Now we have learned the concept of edge detection, its importance, and how we can utilize the rising and following edge in some critical and accurate cases of logic. The rising and falling edge of the inputs can energize an output in a pulsative way or for only one pulse. This scenario exists in the industry and is very common. For example, when you want to energize a safety device by the occurrence of some conditions like increase of liquid level or temperature or pressure et cetera. Also, the result of logic output (RLO), can be used to set or reset output for one pulse. In the next tutorial, we are going to introduce the latching in more detail showing why we need to latch an output, the ways of latching with examples, and for sure enjoying our practicing with the PLC ladder logic simulator.
Hello readers, I hope you are all doing great. Welcome to the 2nd lecture of Section 5(ESP32 Sensors) in the ESP32 Programming Series. In the previous tutorial, we discussed the built-in ESP32 Hall Effect Sensor. In this tutorial, we will discuss another inbuilt sensor of the ESP32 i.e. Capacitive Touch Sensor.
ESP32 Board has 10 built-in capacitive touch pins, which generate an electrical signal when someone touches these pins. These ESP32 touch pins are normally used to wake up the board from deep sleep mode. These touch pins are also used to replace the normal mechanical buttons with touch pads, improving the presentation of the IoT projects.
Here's the video demonstration of the ESP32 Capacitive Touch Sensor:
Before going forward, let's first understand how this touch sensor works:
Where To Buy? | ||||
---|---|---|---|---|
No. | Components | Distributor | Link To Buy | |
1 | ESP32 | Amazon | Buy Now |
Capacitance is determined by the geometry of the conductors and the dielectric materials used. Changing any of these factors will result in changing the capacitance.
C = Ad
As we know, the human body also carries a small electric charge. So, when a body approaches the metallic plates(of a capacitor), the mutual capacitance between the two metal plates decreases. This change in capacitance is used to detect the touch in these capacitive sensors.
So, if someone touches any of these pins, ESP32 can easily detect it. The pin mapping of touch-sensitive pins in DOIT ESP32 DevKit V1 with GPIO pins is shown below:
ESP32 Capacitive Touch Pins | ||||
---|---|---|---|---|
No. | Parameter Name | Parameter Value | ||
1 |
Touch0 | GPIO4 | ||
2 |
Touch1 | GPIO0(not available in DOIT ESP32 Dev-kit V1 30-pin module but available in the 36-pin module) | ||
3 |
Touch2 | GPIO2 | ||
4 |
Touch3 | GPIO15 | ||
5 |
Touch4 | GPIO13 | ||
6 |
Touch5 | GPIO12 | ||
7 |
Touch6 | GPIO14 | ||
8 |
Touch7 | GPIO27 | ||
9 |
Touch8 | GPIO33 | ||
10 |
Touch9 | GPIO32 |
We are using the Arduino IDE development environment for programming ESP32. If you are new to Arduino IDE, read out How to Install ESP32 in Arduino IDE. Let's use the builtin Touch Sensor example in Arduino IDE:
In Arduino IDE there are two example codes available for the ESP32 touch sensor. We will discuss and implement both example codes in this tutorial. So, let's first open the TouchRead Code:
Here's the code for the TouchRead Example:
// ESP32 Touch Test
void setup()
{
Serial.begin(115200);
delay(1000); // give me time to bring up serial monitor
Serial.println("ESP32 Touch Test");
}
void loop()
{
Serial.println(touchRead(T0)); // get value using T0
delay(1000);
}
Inside the setup() function, the serial monitor is initialized at a baud rate of 115200 to display the sensor readings. Finally, we printed the message(ESP32 Touch Test) on the Serial Monitor:
void setup()
{
Serial.begin(115200);
delay(1000); // give me time to bring up serial monitor
Serial.println("ESP32 Touch Test");
}
void loop()
{
Serial.println(touchRead(T0)); // get value using T0
delay(1000);
}
These capacitive touch sensor pins are mainly used to generate an external interrupt for waking up ESP32 from low power modes(deep sleep mode). Moreover, can also be used to control external peripherals like LED blinking or tuning on a DC motor, when a capacitive touch-interrupt is observed. So, let's have a look at How to Generate external interrupt by touching the ESP32 capacitive touch pins:
Here's the ESP32 Touch Interrupt Code:
const int CAPACITIVE_TOUCH_INPUT_PIN = T0; // GPIO pin 4
const int LED_OUTPUT_PIN = LED_BUILTIN;
const int TOUCH_THRESHOLD = 40; // turn on light if touchRead value < this threshold
volatile boolean _touchDetected = false;
void setup()
{
Serial.begin(115200);
pinMode(LED_OUTPUT_PIN, OUTPUT);
pinMode(LED_OUTPUT_PIN, LOW);
touchAttachInterrupt(CAPACITIVE_TOUCH_INPUT_PIN, touchDetected, TOUCH_THRESHOLD);
}
void touchDetected()
{
_touchDetected = true;
}
void loop()
{
if(_touchDetected)
{
Serial.println("Touch detected.");
_touchDetected = false;
Serial.println("blink the LED");
digitalWrite(LED_OUTPUT_PIN, HIGH);
delay(1000);
digitalWrite(LED_OUTPUT_PIN, LOW);
delay(1000);
}
}
Let's understand the code by parts:
const int CAPACITIVE_TOUCH_INPUT_PIN = T0; // GPIO pin 4
const int LED_OUTPUT_PIN = LED_BUILTIN;
const int TOUCH_THRESHOLD = 40; // turn on light if touchRead value < this threshold
volatile boolean _touchDetected = false;
void setup()
{
Serial.begin(115200);
pinMode(LED_OUTPUT_PIN, OUTPUT);
pinMode(LED_OUTPUT_PIN, LOW);
touchAttachInterrupt(CAPACITIVE_TOUCH_INPUT_PIN, touchDetected, TOUCH_THRESHOLD);
}
void touchDetected()
{
_touchDetected = true;
}
void loop()
{
if(_touchDetected)
{
Serial.println("Touch detected.");
_touchDetected = false;
Serial.println("blink the LED");
digitalWrite(LED_OUTPUT_PIN, HIGH);
delay(1000);
digitalWrite(LED_OUTPUT_PIN, LOW);
delay(1000);
}
}
This concludes the tutorial; I hope you found this helpful and also hope to see you again with a new tutorial on ESP32.
In short, this technology connects any device to the net and plenty of different devices. In easy terms, this can be a classy network of things connected with one another. This network collects and shares information and data.
The devices embody a variety of objects, like good microwaves, self-driving cars, wearable devices, and complicated sensors, to call many.
Devices that feature constitutional sensors connect with the IoT platforms that integrate data and information from a variety of ordinarily used devices. Then powerful analytics square measure wont to share helpful data so as to resolve specific desires.
IoT platforms will determine helpful data and also the data which will be unheeded. Then the data are often employed in order to spot patterns, offer suggestions and imply issues before their incidence.
For instance, if you deal during an automotive creating business, you'll ascertain the nonobligatory and necessary components.
Based on the insight and analytics offered, you'll simply build the processes heaps additional economical. Moreover, good systems and objects may also assist you to build some tasks automatically, particularly once these tasks square measure mundane, repetitive, and long naturally. Let's take a glance at some real-world examples.
At the stuff-user level, the IoT is conveyance connected intelligence to our homes, offices, and vehicles. sensible speakers just like the Amazon Echo and Google Home create it fast and convenient to play music set timers or get info, mistreatment voice commands, or mobile app controls. Systems usually integrate with in-car amusement and remote observation applications.
Home security systems with integrated cameras, sensible protection mechanisms, and remote controls permit householders to watch what’s occurring within and outdoors or to ascertain and discuss with guests from miles away.
Environment regulators like sensible thermostats will facilitate the North American nation to heat our homes before we tend to arrive back from the workplace, whereas sensible light-weight bulbs will create it appear as if we’re reception, even once we’re out. Noise and pollution sensors will unceasingly monitor the areas we tend to routinely inhabit, and modify the North American nation to arrange wherever and the way to pay our time with the best level of safety.
As we tend to mention antecedently, IoT examples currently span all walks of life and sectors of business. makers, for instance, square measure adding sensors to their products’ parts to transmit knowledge concerning how they're operating. This could facilitate organizations to determine once a part is probably going to fail and swap it out before it can cause harm. Enterprise applications of the IoT typically take 2 forms: industry-specific applications like sensors in a very generating plant or period location devices for health care, and IoT devices capable of the application altogether industries, like sensible air-con or security systems.
The entire world is evolving with new technologies and IoT is that the current trend. Not all, however, people who are awake to it, are wanting forward to home automation victimization IoT. There are several IoT answer suppliers UN agency will assist you with expertise IoT based mostly home automation.
The idea of IoT primarily based on home automation could appear fictitious at first, however not anymore; due to the advancements in the net of Things. it's currently quite potential to own automatic house using this technology; here is a way to explain.
There are broadly three speaking categorized parts of associate degree IoT machine-controlled house: hardware, software, and communication protocol. These 3 parts area unit is indispensable as every of that area units is crucial for building a wise home. mobilization the IoT network with the right hardware ensures prospering IoT epitome development. it'll additionally facilitate in managing technological changes.
It is crucial to pick the correct communication protocol. A handy and tested protocol can facilitate avoiding performance bottlenecks and problems with device integration. at the side of the communication protocol, another crucial part of the IoT network is that the microcode.
IoT primarily based on home automation will revive the method individuals use technology. there's a substantial vary of prospects once we talk about applications of home automation.
We discus each of them briefly in our next articles, you need to engaged with our website for more information about IoT.
These are little, however not all the potential applications of home automation victimization IoT. As technology advances, there'll be a lot of else on the list.
Wearable health monitors area unit each fascinating and helpful. They embody good garments, good wristwear, and medical wearables that offer the United States of America high-quality health services. they're designed to trace activities like rate, step count, heart rate, etc. This knowledge is recorded and may be sent to the doctors for elaborated fitness analysis. These IoT-based mostly good wearable devices area unit influencing our lifestyles tons. with the exception of playacting these basic operations, they'll conjointly raise alarm, they have the capacity to send alert just in case of a medical pinch like bronchial asthma, seizures, etc.
Have you ever fully-fledged a scenario after you have some friend's reception and you opened the electric refrigerator for a few cold drinks and there have been no cold drinks within the refrigerator! therein scenario you want to have wanted that, somebody would have educated you regarding the cold drinks and you had bought them before. however don’t worry, currently, this can be attainable with IoT, a good refrigerators area unit there, that does not solely inform you regarding the consumed things or empty bottles within the electric refrigerator however conjointly organize them online before they run out. These refrigerators will do far more than this though the assembly has not started at a huge scale nevertheless.
IoT is utilized to connect cars with one another so as to exchange data like location, speed, and dynamics. An approximation shows that by 2020, there'll be twenty-four billion connected cars within the world. we have a tendency to use IoT in our everyday life while not even realizing its presence. for instance, whereas finding the shortest route, whereas driving semi-automatic good cars, etc. IoT is additionally employed in vehicle repair and maintenance. It doesn't solely prompt the client concerning the regular pairing date however conjointly assists the buyer in repair and maintenance by providing correct steering. On the premise of options provided, the communication technique of connected vehicle technology is assessed into 2 broad categories:
It permits the good automobile to run a diagnostic check and supply an in-depth analysis report back to the user. it's conjointly accustomed to conclude the shortest route and to find the empty parking spot.
V2V communication of good cars makes use of high-speed information transfer and high bandwidth. It lets the automobile perform hefty tasks like avoiding collisions, clipping supernumerary traffic, etc.
Due to temperature change and water crisis, farmers bear a lot of troubles like crop flattening, wearing away, drought, etc. These issues are often simply suppressed by mistreatment IoT based mostly farming systems. for instance, the IoT-based mostly irrigation system makes use of a variety of sensors to observe the wetness content of the soil. If the wetness level drops below an explicit vary, it mechanically activates the irrigation pump. apart from this, IoT conjointly helps farmers to look at soil health. Before about to farm a brand new batch of crops, a farmer has to recover the soil nutrients. The IoT enriched software system permits the user or the farmer to pick out the simplest nutrient restoring crops. It conjointly helps in sensing the necessity of fertilizer and diverse different farming desires.
IoT permits preciseness agriculture and good farming.
The Internet of Things (IoT) starts with property, however since IoT could be a wide various, and many-sided realm, you actually cannot realize a one-size-fits-all communication answer. continued our discussion on mesh and star topologies, during this article we’ll practice the six commonest varieties of IoT wireless technologies.
LAPWAN area unit the new development in IoT. By providing long-range communication on little, cheap batteries that last for years, this family of technologies is purposeful to support large-scale IoT networks sprawling over immense industrial and business campuses.
LPWANs will virtually connect every type of IoT sensors
Well-established within the client mobile market, cellular networks supply reliable broadband communication supporting varied voice calls and video streaming applications. On the drawback, they impose terribly high operational prices and power needs.
Zigbee could be a short-range, low-power, wireless commonplace (IEEE 802.15.4), normally deployed in topology to increase coverage by relaying detector information over multiple detector nodes.
Defined within the class of Wireless Personal space Networks, Bluetooth could be a short-range communication technology well-positioned within the client marketplace. Bluetooth Classic was originally supposed for point-to-point or point-to-multipoint (up to seven slave nodes) information exchange among client devices. Optimized for power consumption, Bluetooth Low-Energy was later introduced to deal with small-scale client IoT applications.
There is just about no have to be compelled to make a case for Wi-Fi, given its crucial role in providing high-throughput information transfer for each enterprise and residential environment. However, within the IoT house, its major limitations in coverage, quantifiability, and power consumption create the technology abundant less prevailing.
Imposing high energy needs, Wi-Fi is usually not a possible answer for giant networks of battery-operated IoT sensors, particularly in industrial IoT and good building eventualities. Instead, it a lot pertains to connecting devices that will be handily connected to an influence outlet like good home gadgets and appliances, digital signages, or security cameras.
Radio Frequency Identification (RFID) uses radio waves to transmit little amounts of information from AN RFID tag to a reader within an awfully short distance. Till now, technology has expedited a significant revolution in retail and supply.
IoT finds its major application in searching malls. In most shops, a barcode scanner is employed to scan the barcode gift on each product. once scanning, it extracts the required info and sends the information to the host pc. the pc is additionally connected to an asking machine that hands over the bill to the client once the correct process. of these devices area unit connected alongside the assistance of the net of Things
Manual or digital sensors are connected to circuit boards, which can be programmed to live a variety of variables. Sensors will collect info like carbon monoxide gas levels (from vehicle emissions), temperature, humidity, pressure, vibration, and motion.
IoT sensors don’t solely gather info from completely different physical environments — they will additionally send information to connected devices. this permits enterprises to use them for prophetic maintenance, potency sweetening, and value reduction.
Smart IoT grids provide the time period watching of knowledge relating to the provision and demand of utilities like electricity and water. employing a good grid, utility corporations will interconnect all of their assets, as well as meters and substations. they'll use IoT applications to spot load distribution, improve responsibility, and help in fault detection and repairs. this can be an awfully useful
Smart IoT grids provide the time period watching of knowledge relating to the provision and demand of utilities like electricity and water. employing a good grid, utility corporations will interconnect all of their assets, as well as meters and substations. they'll use IoT applications to spot load distribution, improve responsibility, and help in fault detection and repairs. this can be an awfully useful example of IoT.
That’s All today. I hope it might be helpful for you. If you have any query then mention them in the comment session. We make an effort to respond to your problem.
We all use calculators in our daily life, whether you are working in an office or counting money at the bank, you are buying your daily grocery or doing shopping online, you will find calculators in different forms everywhere. In fact, the computer was initially considered a giant calculator. So if it is that common, why do we not make our own calculator?
Before going into the details of the project, it is good to know some history of that, let’s know some facts about the calculator. So the first known device for calculation is Abacus. And the first digital calculator was made by Texas Instruments in 1967 before that all calculators were mostly mechanical and they did not need any electronic circuits. The first all-transistor calculator was made by IBM and it is claimed that the calculator performed all the four basic operations such as addition, subtraction, multiplication, and division.
Where To Buy? | ||||
---|---|---|---|---|
No. | Components | Distributor | Link To Buy | |
1 | Keypad 4x4 | Amazon | Buy Now | |
2 | LCD 16x2 | Amazon | Buy Now | |
3 | Arduino Mega 2560 | Amazon | Buy Now |
In this, we will be going to use the Proteus simulation tool and we will make our whole project using this software only. But no need to worry while using the actual components because if our project works perfectly with simulation, it will definitely work with actual hardware implementation. And the best part of the simulation is, here we will not damage any components by making any inappropriate connections.
If you don’t have an idea about Proteus, Proteus is a software for the simulation of electronic circuits and here we can use different types of microcontrollers and run our applications on them.
So for this project, we need to install this software. This software has a big database for all electronics components but still, it lacks some, therefore we have to install some libraries for modules which we are going to use in this project.
In this project, we will take input from the user using a keypad and perform the operation using Arduino UNO and display the result on an LCD display.
Our project will work the same as a normal digital calculator such that the user will enter two numerical values and select arithmetic operations which she/he wants to perform on the given values. Once the user clicks on the equal button, thereafter Arduino UNO will calculate the output and display the result on the LCD module.
Now, let’s start designing our circuit diagram for the calculator.
Now we have all the required components in the workplace as follows.
Let's start connecting them.
That is all for connection. Make sure all the connections are correct, especially for keypad’s row and column connections otherwise we will get the wrong values from the keypad input.
And while working on the actual components, power the backlight of the LCD module and set the appropriate contrast, else nothing will be visible even if that has been displayed.
In the above-mentioned image, the first argument for RS pin, second for Enable pin, and rest four for data pins.
And required operation will be stored in the ‘op’ variable and a flag will be set for taking the second number.
That is all the code, we need to run an Arduino Calculator.
Now, we have completed the coding and circuit part, it is time to run the simulation in the Proteus.
I hope we have covered everything related to Arduino calculator i.e. Simulation, Code, Working etc. but still if you find anything confusing, ask in the comments.
Thanks for reading this project out. All the best for your projects!
Where To Buy? | ||||
---|---|---|---|---|
No. | Components | Distributor | Link To Buy | |
1 | LEDs | Amazon | Buy Now | |
2 | Resistor | Amazon | Buy Now | |
3 | LCD 16x2 | Amazon | Buy Now | |
4 | Arduino Mega 2560 | Amazon | Buy Now |
As you all already know the importance of traffic lights and their usage has solved a number of traffic problems, traffic is becoming denser on each road in the whole world by the hour. This leads us to consider traffic density at such roads as well. A number of different solutions have been developed in recent times to help with this problem such as roundabouts. This is done so to ensure the safety of vehicles on road and of people walking on pedestrian walks. With the world going towards automation and autonomous systems, this is the right time to switch traffic lights to an autonomous traffic light system too and make the system intelligent.
We will be going through how to make an autonomous traffic system by using Arduino as a microcontroller. However, we’re not making an actual system rather we will be making a simulation of the said traffic system on a circuit simulating software Proteus. So make sure you already have the latest version of Proteus installed on your PCs and laptops. If not, you should first install the Proteus Software by following the embedded link. Proteus is open database software, meaning people can easily make their own circuit simulating libraries for the software and can easily integrate those libraries. This helps in making the software versatile and easy to use. You can easily add your own components or download libraries of components and place them within the software.
To start working with this project, you need to install and include the following libraries on your Proteus software:
This is a smart 4-way traffic light system. The pedestrian lights work such that whenever a certain traffic light is green its opposite pedestrian lights turn on. An addition of ultrasonic sensors have been made in the traffic light sequence. One ultrasonic sensor is placed at each traffic light. Each ultrasonic sensor controls the time of their respective green traffic light. When the ultrasonic sensor output is high, the traffic light opens for one second, when the ultrasonic sensor output is intermediate the traffic light opens for two seconds and when the ultrasonic sensor output is low the traffic lights open for 3 seconds.
The main components and their use in this project is given below:
We will go through the details of some of the important components being used in this project.
Arduino is an open-source programmable board that serves as a microcontroller and processes information based upon inputs and gives information to actuators in terms of output. Arduino Mega is based upon the chip ATmegaGA2560 and has 53 digital I/O pins.
Liquid Crystal Displays used in electronics are of two basic sizes, 16x2 and 24x2. These represent the number of columns and rows of the LCD. Each pixel can store one character in it. It is also known as a character LCD. It comes equipped with a backlight. The intensity or glow of the backlight can be controlled by attaching a potentiometer at specified pins.
Figure 2: LCD display
An ultrasonic sensor uses SONAR technology to identify objects. It is basically used to find the distance of objects from the sensor. The ultrasonic sensor works by sending out ultrasonic waves and when these waves or parts of waves hit an object, they are reflected backward and the time from their propagation to their return is then noted. This time is then converted into the distance because we already know the speed by which those waves are traveling.
Figure 3: Ultrasonic Sensor
In order to simulate this project on Proteus software, we will first make the circuit diagram on Proteus. After that, we will write our code on Arduino IDE software and integrate it with the circuit made in Proteus.
Open Proteus and open a new project. Import the following components in your Proteus worksheet.
Place the component in your worksheet as illustrated in the figure below:
Figure 5: Placement of components
After placing the components, make the connections as follows:
With this, your circuit connections are complete and we will now move on to the firmware setup of this circuit.
We have divided the Arduino code in 3 segments:
We will look at these sections separately now.
The first step in the code is the declaration of variables that we will utilize in our program. At first is the declaration of ultrasonic sensor pins and setting them up with their respective pins of Arduino board. The syntax of this code is as follows.
Figure 6: Ultrasonic declaration code
Now we will include the library of LCD into our Arduino program, you can download this library from within the software. After that we will declare the LCD by defining the LCD pins. The syntax for which is as follows:
In the next step, we will declare traffic light variables and define their Arduino pins.
Figure 8: Traffic light variable declaration
Now, we will declare the variables of pedestrian LEDs and then allot them their Arduino pins being used in the circuit.
Figure 9: Declaration of pedestrian LEDs
Now, there are two variables being used for each ultrasonic sensor for the calculation of their distance and time duration. We will declare those variables now.
Figure 10: Declaration of variables being used for calculations
Void setup is the part of Arduino program that only runs once, in this section the program that only needs to run once is put, such as declaring pins as output pins or input pins.
Only the echo pins of ultrasonic sensor are input pins while all other pins are going to be output pins for this project.
We will first set up ultrasonic pins as follows:
Now we will declare traffic light pins as output pins. The syntax for this is given as follows:
Figure 12: Setup of Traffic light Pins as Output
Now we will setup our pedestrian LEDs.
Figure 13: Setup of Pedestrian LEDs as Output
Now we will initialize our LCD, this basically tells the microcontroller to start the LCD and give power to it. The syntax is given below.
Figure 14: Initializing LCD
This part of Arduino Program runs in a loop and consists of the main code of the program in which all the calculations are being done.
In the first part of the program, we will set the trigger pin of the first ultrasonic sensor to low and high. This would generate a pulse and send out a wave. After that we will read a pulse input from the echo pin. This will give us the duration in which the wave was propagated and returned. After that we will calculate the distance from the duration of the wave.
Figure 15: Syntax of 1st Ultrasonic Sensor
This distance calculation is for our first traffic light. Now we will use the if loop to check our distance value.
If the value falls between our set limit for the loop, the signal will turn green for three seconds. This will also be displayed on the LCD.
Figure 17: Arduino Code
After that in our if loop, the yellow lights 1 and 2 will turn on to indicate transition.
Figure 18: Arduino Code
Now we will use the if loop to check our distance value.
If the value falls between our set limit for the loop of intermediate traffic, the signal will turn green for two seconds. This will also be displayed on the LCD.
Figure 19: Arduino Code
After that in our if loop, the yellow lights 1 and 2 will turn on to indicate transition.
Now we will use the if loop to check our distance value again.
If the value falls between our set limit for the loop of low traffic, the signal will turn green for one second. This will also be displayed on the LCD.
Figure 21: Arduino Code
After that in our if loop, the yellow lights 1 and 2 will turn on to indicate transition.
Figure 22: Arduino Code
Now we will set the trigger pin of the second ultrasonic sensor to low and high. This would generate a pulse and send out a wave. After that we will read a pulse input from the echo pin. This will give us the duration in which the wave was propagated and returned. After that we will calculate the distance from the duration of the wave.
Figure 23: Arduino Code
This distance calculation is for our Second traffic light. Now we will use the if loop to check our distance value.
Figure 24: Arduino Code
If the value falls between our set limit for the loop, the signal will turn green for three seconds. This will also be displayed on the LCD.
After that in our if loop, the yellow lights 2 and 3 will turn on to indicate transition.
Figure 26: Arduino Code
Now we will use the if loop to check our distance value.
If the value falls between our set limit for the loop of intermediate traffic, the signal will turn green for two seconds. This will also be displayed on the LCD.
Figure 27: Arduino Code
After that in our if loop, the yellow lights 2 and 3 will turn on to indicate transition.
Figure 28: Arduino Code
Now we will use the if loop to check our distance value again.
If the value falls between our set limit for the loop of low traffic, the signal will turn green for one second. This will also be displayed on the LCD.
Figure 29: Arduino Code
After that in our if loop, the yellow lights 2 and 3 will turn on to indicate transition.
Now we will set the trigger pin of the third ultrasonic sensor to low and high. This would generate a pulse and send out a wave. After that, we will read a pulse input from the echo pin. This will give us the duration in which the wave was propagated and returned. After that we will calculate the distance from the duration of the wave.
Figure 31: Arduino Code
This distance calculation is for our third traffic light. Now we will use the if loop to check our distance value.
Figure 32: Arduino Code
If the value falls between our set limit for the loop, the signal will turn green for three seconds. This will also be displayed on the LCD.
Figure 33: Arduino Code
After that in our if loop, the yellow lights 3 and 4 will turn on to indicate transition.
Figure 34: Arduino Code
Now we will use the if loop to check our distance value.
If the value falls between our set limit for the loop of intermediate traffic, the signal will turn green for two seconds. This will also be displayed on the LCD.
After that in our if loop, the yellow lights 3 and 4 will turn on to indicate transition.
Figure 36: Arduino Code
Now we will use the if loop to check our distance value again.
If the value falls between our set limit for the loop of low traffic, the signal will turn green for one second. This will also be displayed on the LCD.
Figure 37: Arduino Code
After that in our if loop, the yellow lights 3 and 4 will turn on to indicate transition.
Figure 38: Arduino Code
Now we will set the trigger pin of the fourth ultrasonic sensor to low and high. This would generate a pulse and send out a wave. After that, we will read a pulse input from the echo pin. This will give us the duration in which the wave was propagated and returned. After that, we will calculate the distance from the duration of the wave.
Figure 39: Arduino Code
This distance calculation is for our fourth traffic light. Now we will use the if loop to check our distance value.
If the value falls between our set limit for the loop, the signal will turn green for three seconds. This will also be displayed on the LCD.
Figure 41: Arduino Code
After that in our if loop, the yellow lights 4 and 1 will turn on to indicate transition.
Figure 42: Arduino Code
Now we will use the if loop to check our distance value.
If the value falls between our set limit for the loop of intermediate traffic, the signal will turn green for two seconds. This will also be displayed on the LCD.
After that in our if loop, the yellow lights 4 and 1 will turn on to indicate transition.
Figure 44: Arduino Code
Now we will use the if loop to check our distance value again.
If the value falls between our set limit for the loop of low traffic, the signal will turn green for one second. This will also be displayed on the LCD.
Figure 45: Arduino Code
After that in our if loop, the yellow lights 4 and 1 will turn on to indicate transition.
Figure 46: Arduino Code
At first, after writing the code, generate its hex file and put that hex file on the Arduino board on your Proteus software. After that, run the simulation. The results of the simulation are shown below thoroughly.
At first, when sensor one gives the output within 500 cm, the traffic light will turn on for one second only.
Figure 47: Simulation Results
However, if the sensor one value is between 500 and 900 cm, the traffic light 1 will be green for 2 seconds with the LCD displaying the remaining time.
Figure 48: Simulation Results
If the sensor values are above 900 cm, then the lights will be green for 3 seconds.
When the sensor two gives the output within 500 cm, traffic light 2 will turn on for one second only.
Figure 50: Simulation Results
However, if the sensor two value is between 500 and 900 cm, the traffic light 2 will be green for 2 seconds with the LCD displaying the remaining time.
Figure 51: Simulation Results
If the sensor values are above 900 cm, then the lights will be green for 3 seconds.
Figure 52: Simulation Results
When sensor three gives the output within 500 cm, traffic light 3 will turn on for one second only.
However, if the sensor three value is between 500 and 900 cm, the traffic light 3 will be green for 2 seconds with the LCD displaying the remaining time.
Figure 54: Simulation Results
If the sensor values are above 900 cm, then the lights will be green for 3 seconds.
Figure 55: Simulation Results
When sensor four gives the output within 500 cm, traffic light 4 will turn on for one second only.
Figure 56: Simulation Results
However, if the sensor four value is between 500 and 900 cm, the traffic light 4 will be green for 2 seconds with the LCD displaying the remaining time.
Figure 57: Simulation Results
If the sensor values are above 900 cm, then the lights will be green for 3 seconds.
Figure 58: Simulation Results
Phew! I know that this was an extremely long project, but that is a part of an engineer’s life. Multiple receptions and running recurring patterns smoothly requires skill and patience only an engineer can possess. I hope you guys made it through. Kudos to your nerves of steel. Thanks for reading.
Hello everyone, welcome to today article which we are going to have a look at how technology has evolved the online casino industry. Some of you might be having knowhow on what casino industry is and some might be having partial or no knowledge at all. So, we are going to start with simple things as we advance our topic of discussion further. You should also have a look at the Technology behind Online Casinos.
The global casino industry is an industry that is made of facilities that involves predictions of outcomes of the final result that will be obtained after an invent has passed. The predictions are made before the event has started. It is made up of the gambling activities such as the gaming machines and the table wagering boards. it is also a common thing for some of these facilities to provide dinning, lodging and the beverage services to their customers. This industry has evolved to an online modernized activity. The online facility has become the most used one especially in this era of corona virus where lockdowns have really affected the physical appearances in the normal global casinos. Online facilities have offered players and bookies a very momentous offer where they can play the game at any place of their comfort.
The first online casino which was referred to as Inter-casino was launched in 1996 and at this time nobody had an idea of what awaited the casino industry. Bookies never thought that one day the industry would evolve to what it is today. Currently, the online casino industry is worthy over 45 billion US dollars something that is still forcing more investors to put their capital in this new area of business and entertainment. You can imagine after the launch of the first online casino industry, in the same month, there was a raise in the number to 15 and a year later, more than 150 online casinos had been launched. Actually, this was the area where investors had started seeing some great potential.
Since the industry crossed the one billion net worth mark in 1998, there have been new inventions and innovations that have led to drastic change and growth in the online casino industry. More technological advances have been made which has led to more players feeling comfortable in joining the industry. This article will focus on how technology has impacted on the online casino industry.
Multiple payment option is one of the areas that have greatly improved the online casino industry. Players can now deposit and withdraw money from sites within seconds. This payment systems introduction has lowered the cost incurred by clients and also fastened the process. Several cashless payment methods have also hit the market. These payment methods such as PayPal, Skrill, mobile money and Wire Transfer, etc have impacted greatly on how customers receive their winnings from the booking sites. You can check on OBLG to take note of all the casinos that offers their payment through PayPal which is the most commonly used universal payment methods by the majority of the bookies especially in Europe and America. Moreover, because of this online payment system, casinos also offer no deposit free spins offers, in order to attract customers.
Although landless betting has a limited amount that a client can play with, the online casino has offered a lot of options that can be used in the process and this has led to the expansion of the casino industry. One greatest thing that happens in technology is that you can adapt to new trend very quickly. Currently, cryptocurrency is taking over as the means of payment because with it you are guaranteed of great financial security and anonymity. Most popular cryptocurrency is the Bitcoin and it has offered very strong facility where even governments are unable to track owners of the casinos or even the players. With this cryptocurrency being used as a mode of payment, the casino industry has grown internationally simply because players from restricted countries can play in anonymity and get their winnings in form of cryptocurrency.
There has also been a shift in focus where most online casinos are introducing casinos that operate in the blockchain technology whereby there is an outcome of better features and makes the future of the casino industry look great.
With new trend in the area of technology, there have been development of the multi-dimensional approach across the casino industry. There has been great input in the development of the games that offers great and clear features to the players and the viewers.
With online gambling, bookers can feel a redefined industry. When you look at the betting sites, you will realize that they have been customized in a manner that it has a very powerful interface which offers the gamers a very welcoming experience while carrying out the gambling at the comfort of their wish. The introduction cool visuals and the tense atmosphere which tries to mimic the situations in real-life has made the online casino industry more and more beautiful. This actually evidence from the growth of the numbers on the gamblers who are who prefer doing their gambling online as compared to those who prefer doing it manually or in the traditional land-based gambling. For example, most online gambling industry have decided to introduce the eSports games in their online gambling platform and this shows the potential of that innovation has made in the gambling industry.
The variety of the games available in the online casino platform has also led to the increased number of gamers joining the gambling industry where some online casinos offer more than 2000 games that a gamer can choose from. The vast options of the games that are available ensure that gamers are never bored due to the availability of too many games options to choose. In some occasions, virtual reality has been involved in making this online gaming industry a reality. The use of this high technology glasses has made gamblers experience more entertainment as they feel inserted into the world of different reality. Users are able to have a real time interaction that is based on the traditional land-based casino interactions.
Despite the great growth in the online gaming industry, it comes home with some disadvantages especially on matters security since it is accompanied with a lot of attacks that are directed towards the gamers. This frequent security attacks are more as compared to what is experienced in the traditional land-based casino. Since the digital information is always very sensitive, it is the duty of the casino site to keep the information very safe lest it falls in the hands of the wrong person. The sensitive personal information that is required for online casino can be used for identity where the client can lose a lot of money through hacking. Online casinos have been forced to use new technology in securing their sites in order to protect their clients from insecurity that might occur.
Some online casinos have even gone a step higher whereby they use the artificial intelligent to improve the security of the site and ensure that they monitor every movement that is made on the sites. There has also been a way where users have to provide the 2FA authentication to ensure that only authorized members get access to the sites.
Customer support has also moved a notch higher with the advent of new advanced ways of solving customer issues in the online casino platforms. In the online casino platforms, you will come across emails, call centers and even live chats which have been introduced in the recent years to improv on customer care services. Some of these casinos have a way of offering 24/7 customer care services and this is done to prove to the customers that they are gambling in a very safe place. This proper customer care services have led to the expansion of the casino industry globally.
The advent of the smartphone industry has also increased the growth in the online industry. Today, the largest population of the world have a smartphone in their pocket and this has led to the people participation more in the online casino games and gambling. Online casinos have taken advantage in the growth of the smartphone owners and have come up with sites that are mobile friendly giving their players a very fascinating environment to entertain themselves. The mobile casino games are very revolutionary as players can get access to the games at any time and any locations and this has made it very convenient to the gamers the mobile phones have introduced portability to this industry.
Some few years ago, the gamers used to visit the betting shops to play games. With the introduction of the online casino, it has become do possible for the games to rich people easily and in any location of this world. Some companies have moved the impact higher by organizing gaming competitions that involves millions of people which could not be achieved in the traditional hall because of the spacing and difficulty in managing the outcome. The online casino has actually introduced the new investment opportunity for the people. This online casino has actually introduced new technology trends in order to place itself in a position which can rival the competitors and also give the pundits an improved gaming experience. They have come up with very user -friendly interfaces that come in with several important features. Some of these sites use artificial intelligent to settle and update results and games too. All these activities are being done to ensure that the online casino site has more clients joining.
Modern online casinos have gone into another level whereby the use of artificial intelligent have revolutionized the industry. Artificial intelligence such as the use of the chatbots have been used to help the gamblers in placement of the bets. The same artificial intelligence has been used by the sites to help customers in the processing of their payments from the bookies and also process withdrawal request for the clients. The bot is very important in this industry because they can offer unlimited customer support. The artificial intelligence has also found use in the online casino industry where the gamers have an interest in playing against the machines instead of playing against the other gamers. Also, the Sportbooks have been using various artificial intelligence mechanism to help the users of the various websites find the various icons and learn how to use the sites.
The smartphone, tablets and the internet industry has made major technological impact in the area of the online casino industry. Statistics show that in 2012 there was a great improvement in the use of the online casino by 12% globally. This improvement was introduced due to the revolutionization of the smartphone and the internet industry. Now close to over one hundred and sixty million pundits visit online casinos on their phones using the mobile phones applications. The mobile gambling is said to be contributing at least 50% of the revenue that is generated from the gambling industry. The mobile applications have greatly impacted on the growth of the online casinos industry.
In conclusion, the online casino industry has grown to a greater extent through the introduction of so many trends in the areas of money transfer, online payment methods, the introduction of artificial intelligence, the great extent to which the mobile phone application industry has grown higher, the introduction of better marketing strategies, better customer support and security systems. With all these, the industry has grown to something else, something better and something magnificent attracting more bookies worldwide.
Working in ladder logic programs is getting further complicated especially for large-scale projects. So, it is very beneficial to know shortcuts for writing ladder logic simpler, more readable, and easier for others to develop. Using this variety of logic gates, enrich the logic and fluency of writing the logic in different situations. For example, using XOR logic is very common for comparing two inputs to decide if they are equal or different. Therefore, we found that it is crucial to go through all logic gates and do simulations for them all in this tutorial. for coherently we get the knowledge to use them fluently in ladder logic programming to solve different logical problems and scenarios. There are seven basic logic gates which are: “AND”, “OR”, “NOT”, “NAND”, “NOR”, “XOR”, and “XNOR”. We have gone through “AND”, “OR”, and “NOT” logic gates including simulation work. So let us go through the other four gates for learning and practicing all basic logic gates.
The “NAND” logic gate is the invert of the “AND” gate like you invert the output of an “AND” logic gate as shown in Fig. 12. Table 5 lists all combinations of the inputs and the output of the “NAND” logic gate.
Fig. 12: NAND symbol
Table 5: the truth table of the “NAND” logic gate
Input A | Input B | Output |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
In addition, the timing diagram of a “NAND” logic gate is shown in fig. 13, it shows the output goes low when both of the inputs A and B are true which is the inverse of the “AND” logic gate. Also, Fig. 14 shows a ladder logic of a “NAND” logic.
Fig. 13: The timing diagram of the “NAND” logic gate
Fig. 14: Ladder logic sample of a “NAND” logic
The NAND logic gate can be considered as the invert of the “AND” logic gate. So as listed in table 1, the truth table of AND and NAND logic gates shows how the NAND gate is the reverse of the AND gate. Also, it shows the NAND gate should come out to your mind when you want the output always low except when both inputs A and B are high.
The NAND gate can be implemented by connecting the negate of the output in series to the inputs A and B. Another way to implement NAND is by inverting both inputs and connecting them in parallel as shown in fig. 1. Rung 1 and rung 2 respectively.
Fig. 1: The NAND ladder logic in two ways
Let’s test our ladder logic in both methods. According to the truth table of NAND gate, we have four test cases. figure 2 shows the first test case when both inputs A and B are false. In this case, the output should be true as shown in fig. 1.
Fig. 2: NAND ladder logic when both inputs are false
figure 3 shows the second test case when inputs A goes true while B is false. In this case, the output should be true as shown in fig. 3.
Figure 4 shows the third test case when inputs B goes high while B is low. In this case, the output should be true as shown in fig. 4.
Fig. 4: NAND ladder logic when input A is true and input B is false
Figure 5 shows the last test case when both inputs A and B become high so the output goes false as shown in fig. 5.
Fig. 5: NAND ladder logic when both inputs are true
Thanks to performing the simulation of the NAND gate, we now can conclude that we should be looking for a NAND logic when we want to shut down an actuator i.e. motor whenever two inputs are in a true logical state simultaneously. For a practical example, when we have three pumps and we want to run them in the mode of two of three. There should be only two of the three pumps to run at any time. In that case scenario, the run condition of any motor can be a NAND of the status of the other two motors.
The “NOR” logic gate receives two inputs and has one output. It is the same as the invert of the “OR” logic gate. Like you follow the output of an “OR” gate by a “NOT” logic gate. Fig. 15 shows the symbol of a “NOR” gate. In addition, the truth table is expressed in table 6. It shows the output becomes false only when one of the input A or input B or both goes high which is the reverse logic of the “OR” logic gate.
The “NOR” logic gate can be formed by connecting the “OR” logic gate to the inverter “NOT” logic gate. Or by inverting the inputs by using “NOT” logic gates and connecting them to the “AND” logic gate as shown in Fig. 16.
Fig. 16: structure of “NOR” logic gate
Table 6: the truth table of the “NOR” gate
Input A | Input B | Output |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
Figure 17 shows an example of a ladder program for implementing the “NOR” logic gate. It shows that the “NOR” gate can be implemented in ladder logic by connecting two contacts of type NC in series.
Fig. 17: A sample ladder for a “NOR” logic gate
On the other hand, the timing diagram of the “NOR” logic gate is depicted in Fig. 18. It shows the output is false as long as either input A or input B or both are true.
This logic gate can be considered as the negate of OR as you can notice in the truth table as listed in table 2. You can now feel when we may need to use the NOR logic? Yes! Exactly you want it when you design for output which is all time off except when both inputs are false.
Table 2: the truth table of NOR versus OR
Input A | Input B | OR | NOR |
0 | 0 | 0 | 1 |
0 | 1 | 1 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 1 | 0 |
Figure 6 shows two ways to implement the NOR logic in ladder logic. To make that happen, we connect the invert of the two inputs in series to the output as shown in the top part of fig. 6. The other way is to connect the two inputs in parallel to form OR and then connect to negate the output as shown in the lower part of fig. 6.
Let’s practice simulation of the NOR gate, in fig. 7, the first test case is when both inputs are false, the output is true as shown in fig. 7.
Fig. 7: The Simulation of NOR ladder when both inputs are false
Figure 8 shows the second case when input A is true and input B is false, the output is false as shown in fig. 8.
Fig. 8: The Simulation of NOR ladder when input A is true and input B is false
Figure 9 shows the third test case when input B is true and input A is false, the output is false as shown in fig. 9.
Fig. 9: the Simulation of NOR ladder when input B is true and input A is false
Figure 10 shows the last test case of NOR ladder logic, it shows the output is false
One practical example of using the NOR logic is that, imagine friends we drive some machine with two motors. And it is required to have at least one of them or both are running all the time otherwise alarm should be energized. The NOR logic is the best to manage that alarm to get energized if and only if both motors are off.
Despite this logic gate having two inputs and one output like the “AND” and “OR” logic gates, this logic gate is a bit more complicated than the previous logic gates. Table 4 lists the truth table including all combinations of the inputs and the output. By noticing the truth table of the XOR logic gate, you can see the output becomes low when the two inputs are equal like both are high or both are low. But the output goes high when there is a difference in the state of the two inputs. Imagine my friend, how much this logic gate is very beneficial for comparing two signals.
Input A | Input B | Output |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
On the other hand, Figure 10 shows the symbol of the XOR logic gate and its schematic. See how the basic logic gates OR, AND, and NOT can be utilized to build the logic of XOR logic gate.
Fig. 10: The XOR logic gate symbol
Figure 11 shows a sample of a ladder logic program that implements XOR logic. In addition, it shows the timing diagram of the inputs and output, it shows the output goes high when there is a difference between the two inputs and becomes low when they are equal i.e. both are low or both are high.
Fig 11: Sample of the ladder logic for XOR logic and the timing diagram
The XOR is used to compare two signals if they are equal or different. Table 3 lists the truth table of the XOR. It shows that the output comes to true when inputs are different and becomes false when they are equal.
Table 3: The truth table of XOR logic
Figure 11 shows the construction of XOR ladder logic. It shows that it is composed of, two parallel branches and each branch is forming AND logic of the two inputs in the opposite logical state.
Figure 12, shows the simulation results of XOR when input A and B are false, the output is false.
Figure 13, shows the simulation results of XOR when input A is true and input B is false, the output is true.
Figure 14, shows the simulation results of XOR when input B is true and input A is false, the output is true.
Figure 15, shows the simulation results of XOR when input A is true and input B is true, the output is false.
In a conclusion, the XOR logic in simulation shows that the output is low whenever both inputs are equal and goes high when the inputs are different in the logical state. A very good practical example for utilizing the XOR logic is that imagine friends we have a motor that is energized by two different destinations, and it should be requested by only one at a time. So we can get the run signal from the XOR of the two input switches. So, the only case to run the motor is by requesting from one source.
This logic gate is the invert of the XOR gate. So it is equivalent to applying an inverter to the “XOR” logic gate. Table 7 lists the combination of its two inputs and its output. It shows clearly that, the output becomes true when inputs are equal i.e. both inputs are true or both are false.
Input A | Input B | Output |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Fig. 20 shows the symbol of the “XNOR” logic gate, it shows clearly how it is the invert of the XOR logic gate. This logic gate is very useful to validate if two signals are equal or not.
Fig. 20: The symbol of the “XNOR” logic gate
On the other hand, Fig. 21 shows a sample ladder logic of an “XNOR” logic gate implementation. It shows that there are only two ways to have the output in the TRUE state which are by setting both inputs TRUE or set both FALSE.
Fig. 22 depicts the timing diagram of the inputs and output of the “XNOR” logic gate and clearly shows the output goes high when both inputs have the same state.
Fig. 22: the timing diagram of the “XNOR” logic gate
The XNOR is the invert of the XOR and it is used to compare two input signals. Table 4 lists the cases of the truth table of XNOR logic. It shows the output goes high when both inputs are equal i.e. both are high or both of them are low.
Figure 16 shows the construction of XNOR ladder logic. It shows that it is composed of, two parallel branches and each branch is forming AND logic of the two inputs in the same logical state.
Figure 17, shows the simulation results of XNOR when input A and B are equal i.e. both are false, the output is high.
Fig. 17: The Simulation of XNOR ladder when both inputs are false
Figure 18, shows the simulation results of XNOR when input A is true and input B is false i.e. they are different. So the output goes false.
Fig. 18: The Simulation of XNOR ladder when input A is false and input B is high
Figure 19, shows the simulation results of XNOR when input A is false and input B is true i.e. they are different. So the output goes false.
Fig. 19: The Simulation of the XNOR ladder when input B is true and input A is false.
In the last case when both inputs A and B are high as shown in Fig. 20, the output becomes true.
Fig. 20: The Simulation of XNOR ladder when both inputs are true
We can conclude that the XNOR is marked by the true status of its output whenever both inputs are equal and vice versa. One of the most common scenarios for the best practice of XNOR is the protection of the operator's hands in the cutting machine. In that machine, the command for running the knife driving motor is an XNOR of two switches on the left and right hand of the operator. In that way, it is guaranteed that to run the motor, the operator should use both hands at the same time.
I am very pleased to see you up to this point of our tutorial, Now you are familiar with all logic gates and practiced their logic on the simulator. In addition, you can feel the importance of mastering all these logic gates to ease your programming and enrich your programming skills. In the next tutorial, we are going to go deeply through the edge signal including rising and falling edge. We are going to introduce the benefits of these edge signals and how they can be utilized in ladder logic programming to solve a lot of problems. So be ready for more learning and practice with simulation in ladder logic series.
Hello readers, I hope you all are doing great. Welcome to Section 5 of the ESP32 Programming Series. In this section, we are going to interface different Embedded Sensors with the ESP32 Microcontroller Board. ESP32 development board is featured with some inbuilt sensors(i.e. hall effect sensor, capacitive touch sensor) so, in the initial tutorials of this section, we will explore these built-in ESP32 sensors and in the later lectures, we will interface third-party sensors with the ESP32.
In today's lecture, we will discuss the working/operation of the ESP32 built-in Hall Effect Sensor. Hall Effect sensor is used to detect the variation in the magnetic field of its surroundings. So, let's first understand What's Hall Effect:
Where To Buy? | ||||
---|---|---|---|---|
No. | Components | Distributor | Link To Buy | |
1 | ESP32 | Amazon | Buy Now |
The Hall Effect phenomenon was first discovered by Edwin Hall in 1879. When current passes through a conductor, the electrons move in a straight line and thus the voltage difference across the conductor's surface remains zero, as shown in the below figure:
However, when a magnet is placed near the current-carrying conductor in a way that the direction of the magnetic field is perpendicular to the flow of current, the electrons get diverted and don't follow a straight line, which results in generating a small potential difference across the conductor's surface, as shown in the below figure:
This small potential difference generated because of magnetic field presence is called Hall Voltage. This magnetic field influence over the current-carrying conductor is termed the Hall Effect.
A Hall Effect Sensor is a non-contact type embedded sensor, used to detect the presence & intensity of a magnetic field in its surroundings. Different third-party Hall Effect Sensors available in the market are shown in the below figure:
In ESP32, the Hall effect sensor is located inside the ESP-WROOM-32 metallic cover. As the Hall Effect sensor is a non-contact type, it doesn't have to be in contact with the magnet. We just need to place the magnet above this metallic sheet and the ESP32 Hall Effect sensor will detect it.
To understand the working of the Hall sensor with ESP32, let's test the builtin ESP32 example:
Here's the code for this ESP32 Hall Sensor example:
int val = 0;
void setup()
{
Serial.begin (9600);
}
void loop()
{
val = hallRead();
Serial.print ("sensor value = ");
Serial.println (val);//to graph
delay(100);
}
The code is quite simple, where the hallRead() function is called to read the hall sensor value, store it into a variable and then print it on the Serial monitor. Finally added a small delay to get the next value. Let me explain the code line by line for the beginners:
int val = 0;
void setup()
{
Serial.begin (9600);
}
void loop()
{
val = hallRead();
Serial.print ("sensor value = ");
Serial.println (val);//to graph
delay(100);
}
This concludes the tutorial. I hope you found this helpful, test it out and if feel any difficulty, let me know in the comments. In the next tutorial, we will have a look at another built-in sensor of ESP32 i.e. Capacitive Touch Sensor. Thanks for reading.
People are still choosing manual parking methods, which have a number of drawbacks, such as searching for a vacant spot in a parking lot without knowing if the lot is full or not, resulting in time and fuel waste. Vehicle safety is also a concern that may be addressed. We've all been in a position when we've spent a long time looking for parking at a location just to discover that none is available. You would think that if you knew the slots were full, you would've ended up finding another parking spot.
Based on these scenarios, we came up with the idea of a Car Parking System with Automatic Billing which will also reduce manpower such as security, booth attendants, etc., required in parking lots. Everything in the modern day is automated, and with this project, we can automate this procedure using simple electronics components and Arduino. Let's get started.
Where To Buy? | ||||
---|---|---|---|---|
No. | Components | Distributor | Link To Buy | |
1 | DS1307 | Amazon | Buy Now | |
2 | Keypad 4x3 | Amazon | Buy Now | |
3 | LCD 20x4 | Amazon | Buy Now | |
4 | Arduino Uno | Amazon | Buy Now |
Instead of using real components, we'll use the Proteus Simulation tool to design this project. It's also a good habit to experiment with simulations before attempting to build everything with real components. By simulating an issue that may develop when working on actual components, we may identify the problem and avoid any damage to our components.
Proteus is an interesting software that lets you model and build electronics circuits. Despite having a huge library of electronics components, Proteus software lacks pre-installed modules such as Arduino boards, Ultrasonic sensors, RTC modules, LCD modules, and so on.
Now, we’ll start installing the libraries, which is needed for our project:
By clicking the button below, you can download the entire project, including Proteus Simulation and Arduino Code.
These are required components for Accident Detection, which are as follows:
The RS pin will be set to logic high to display the data on the LCD.
Distance = (Time x SpeedOfSound) / 2.
Speed of Sound: 340 meters per second i.e., 0.034Distance in Centimeters = (( Time taken by pulse signal (in microseconds) / 2) / 29)
Now, it’s time to start the design of the Proteus Simulation of our Car parking system
After importing all required components to the workplace, let’s move to connecting them.
Now we have done the circuit, it’s time to move to the coding side of this project.
We have completed the Proteus simulation circuit and Arduino code for the Car Parking project. And it is ready for testing.
As we can see that for 50% value on the pot ultrasonic sensor value is near to 500 cm and for 77% value on the pot ultrasonic sensor value is near to 850 cm.
Here it is not visible which button on the keypad has clicked but suppose we have clicked ‘1’ and if that location is vacant then it will display that message.
I hope you have a good understanding of how our Car parking system project works and that you have liked it. Although it’s a tough nut to crack in the first read, I strongly recommend you to read the logic part twice for better understanding. 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!
Given that IPC has been globally adopted well-known standards for training in the field of electronics, many times you will find yourself working in an environment that adheres to IPC standards, where all professionals and organizations, you are working in communicates in IPC-based terminology. If you do not have a good handle on the IPC standard, it can cause unnecessary and expensive delays in the manufacturing process.
It is beneficial for a company or organization to adopt the practice of following IPC standards within, as it will not only help in improving efficiency but also maintain quality standards of the industry. So, it goes without saying that all these lead to influence the hiring policy of many organizations as they prefer to employ staff with IPC certification.
Other than all these mentioned benefits, let's briefly analyze all major advantages that come with practicing IPC standards.
In the highly competitive world of electronics, the key strategy of maintaining a leading position is consistency in delivering quality products with great efficiency. Adopting visual inspection in the manufacturing process as per guidelines provided by IPC, directly impacts the efficiency of the production process. It is evident that consistent inspection of the manufacturing process has a positive influence in terms of customer satisfaction and repetitive business.
On the contrary, failing to adopt the IPC standard will lead to massive duplication of working hours, which will waste crucial time and result in chaos and non-standardization within the fabrication level. An organization's level of internal consistency should reflect industry best practices to ensure optimal production symmetry and collaboration.
Miscommunication among professionals due to non-standardized working processes can lead to inconsistency and expensive delayed production. In the OEM (original equipment manufacturers), CEMs (contract electronics manufacturers), ODMs (original design manufacturers) and EMS (electronics manufacturing service) industry, it is crucial that vendors and manufacturers/contractors use the same terminology and practice the same standards. IPC certification provides that certainty in the process. Many professionals associated with the electronics industry confirm all the advantages that come with IPC standardized practices within the industry due to cross-channel communication, and attribute their success, in large part, to speaking the same language.
When a company consistently follows the IPC standardized production process and streamlines cross-channel communications and interactions, what comes next is a significant reduction in production costs and time.
IPC-A-610 course ensures the acceptability of electronic assemblies such as soldering criteria, surface mounting criteria and jumper wire assembly requirements among others, whereas and J-STD-001 course help maintains a standard of each product, at each stage in the assembly line and process, while evaluating and serving under the same scrutiny as others. On top of reducing costs by decreasing the number of rebuilds and reworks, these courses also focus on improving production time. These certifications establish standards within the fabrication process and guarantee that your operation employs a higher standard of quality control.
After pursuing IPC certifications, you’ll find yourself capable of delivering a consistent, high-quality product, and communicating with other vendors/manufacturers in your supply chain. These certifications enable your company to become a trusted provider within the industry as well as assure security in terms of future business growth.
If you currently do not have globally recognized IPC certification in your institute or on your resume and you want to make that superior change, contact Advanced Rework Technology (A.R.T.) today. A.R.T Ltd also offers bespoke training that can be based entirely around the requirements of your company and even specific products, with all theory and practical equipment supplied by them too. All is just a call away from you. Call A.R.T. Ltd today on 01245 237 083.