NRF24L01 Arduino Interfacing
Hello friends, I hope you all are fine and enjoying. I have been working on a project these days and one portion of my current project includes the NRF24L01 Arduino Interfacing. So, I thought why not share this knowledge with you people, I hope you will learn something new and more interesting. If you don't know much about it, then you should have a look at Introduction to NRF24L01.
Few days ago, I have also posted a tutorial on XBee Arduino Interfacing, in which we have seen how to make wireless communication between two XBee Modules which is also an RF module. So, now we are gonna have a look at How to make Wireless Communication between two NRF24L01 modules. I hope you are gonna enjoy this nrf24l01 arduino Interfacing. Here's the video demonstration of NRF24L01 Arduino Interfacing:
Basics of NRF24L01
Before staring this interfacing of Arduino with 24L01, lets have a little introduction of nrf24l01 module. NRF24L01 is, in fact, a Radio Transceiver module and it operates on 2.4 GHz frequency. This module is a by default half- duplex fabricated module and it has the capability to send and receive data simultaneously. It's a very cheap & small sized module but it's features are astonishing. For example this module is capable of sending from 1 to 25 bytes of raw data simultaneously and the data transmission rate is up to 1 mega bytes per second. If we summarize all the features of this small size but big capability module then, we can say that:
- By using this NRF24L01 module we can send a message to a particular receiver.
- We can receive a message from some particular sender. (remember as I told earlier, we can do both the steps simultaneously).
- During sending the message through this module, we will have to specify the message sender's and receiver's address.
- Also we will have to specify the size of that particular message, which we are going to transmit through this module.
- In some particular applications, we also have to perform switching between the receiver and sending state. For example, if you are received a particular message then, we will stop the communication first and will read it and then you will send it. So in such situations, we have to perform the switching while sending or receiving data through this module.
Now above discussion was a brief introduction about NRF24l01 module. Now lets move towards the major theme of our project which is
Interfacing of arduino with NRF24l01 module.
Note:
- I encountered a problem of "Failed, response timed out" with NRF24L01+ while interfacing it with Arduino, if you got the same problem then read this post Interfacing of NRF24L01+ with Arduino - Response Timed Out. This nrf24l01 arduino example will help you in understanding this Response Timed Out problem.
NRF24L01 Arduino Interfacing
Arduino is a very powerful and versatile microcontroller board and it gives us the ease to perform multitasking. NRF24l01 has total 8 pins. The pin configuration and the function of each pin is described below:
- The very first pin is for GND and through the pin#1 of this module, ground is provided to module.
- Pin#2 of this module is to provide power supply. This pin is designated as VCC. This module generally needs 1.9 to 3.6 volts for its operation. And in most cases we will apply 3 volts to it.
- Pin#3 is designated as CE and it is used to select the mode of operation. Either you are using this module to transmit data or to receive data.
- Pin#4 is designated as CSN and it is used to enable the SPI chip, embedded on the module.
- Pin#5 is used to provide SPI clock to the module. When this pin is HIGH then, clock is enabled and when this pin is LOW then, the clock to this module is disabled.
- Pin#6 is designated as MOSI and it is used to transmit data from this module to the external circuit.
- Pin#7 is designated as MISO and if we wish to receive data through this module from any external source then, this pin is enabled.
- Pin#8 is the last pin of this module and it is designated as IRQ pin.
In order to do this Arduino with NRF24L01 communication, you will need two Arduino boards and two NRF24L01 modules. Now I suppose that you have these 4 items in your hand. So, first of all, let's do the transmitter side of
NRF24L01 Arduino Interfacing.
NRF24L01 As Transmitter
- Connect your NRF24L01 with Arduino as shown in the below figure:
- Total 7 pins of NRF24L01 will be connected while the 8th pin IRQ doesn't need to connect.
- Now, next thing you need to do is to download this RF24 Library of Arduino and place it in the libraries folder of your Arduino software so that we could compile our code of nrf24l01 arduino example.
Arduino Library for NRF24L01
- We haven't designed this library, we are just sharing it for the engineers to use it in their projects.
- Now upload the below sketch into your Arduino which you want to act as Transmitter.
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
RF24 radio(9,10);
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
unsigned long Command = 1;
void setup()
{
Serial.begin(57600);
radio.begin();
radio.setRetries(15,15);
radio.openReadingPipe(1,pipes[1]);
radio.startListening();
radio.printDetails();
radio.openWritingPipe(pipes[0]);
radio.openReadingPipe(1,pipes[1]);
radio.stopListening();
}
void loop(void)
{
radio.stopListening();
radio.write( &Command, sizeof(unsigned long) );
radio.startListening();
delay(1000);
}
- In this code, I have marked the variable Command, this is the variable which I am sending via NRF24L01, rite now its value is 1 which you can change.
- So, if you want to send 3 you can change its value to 3.
- Now lets design the receiver side.
NRF24L01 As Receiver
- Again connect your Arduino with NRF24L01 as shown in below figure. Its same as we did for Transmitter side.
- Now upload this below code into the Receiver and you will start receiving the value coming from transmitter.
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
RF24 radio(9,10);
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
typedef enum { role_ping_out = 1, role_pong_back } role_e;
const char* role_friendly_name[] = { "invalid", "Ping out", "Pong back"};
role_e role = role_pong_back;
void setup(void)
{
Serial.begin(57600);
radio.begin();
radio.setRetries(15,15);
radio.openReadingPipe(1,pipes[1]);
radio.startListening();
radio.printDetails();
radio.openWritingPipe(pipes[1]);
radio.openReadingPipe(1,pipes[0]);
radio.startListening();
}
void loop(void)
{
if ( radio.available() )
{
unsigned long data = 0;
radio.read( &data, sizeof(unsigned long) );
Serial.println(data);
delay(20);
}
}
- Now open your Serial Monitor of Receiver side and you will see that you are getting "1" in the Arduino Serial Monitor, which is the value of Command variable we set in the Transmitter side, as shown in below figure:
- Its quite easy and I hope you will make it work in the first attempt but if you still got problem then ask in comments.
- I will share more Arduino Projects on this RF module soon.
So, that's all for today and I hope now you can easily Interface Arduino with NRF24L01 and can do the RF communication. If you have any problem in this Interfacing of Arduino with NRF24L01 then ask in comments and I will try my best to resolve them. Take care. :)
Getting Started with Arduino Programming
Hello friends, i hope you all are fine enjoying. Today i am going to share a new project tutorial which is Getting Started with Arduino Programming. In the previous tutorial, which was titled as Getting started with Arduino Software, I have explained in detail the basics of Arduino software. How this software is installed and run.
Today's post is also related to arduino software but, the difference is that, in previous post we learn How to use the arduino software, What are the function keys of this software and Where to write the code(sketch) and after writing the sketch, how it is debugged. Now in today's post which is ' Getting started with Arduino Programming', we will see How a Code is written in Arduino software? What are the built-in functions of Arduino software? How comments are made in sketch? What are the main loops, used in Arduino programming? How pin selection is done in Arduino software? How Digital pins are controlled, which are embeded on Arduino board? To explain this whole software in detail, i have divided this tutorial into major parts and also their sub-parts. Above was a little introduction about what actually we are going to learn in this post. Now without wasting any further time on introduction (as i will be explaining each and every step in below tutorial) i think now we should move towards the actual learning of the Arduino software to use it for programming.
You should also read:
1- How to make Comments in Arduino Programming
- I hope that you are a beginner and i will start to elaborate the soaftware from very beginning.
- First of all open your Arduino software. Go to file menu, a new window will open, from there click on the Examples and then go the Basics.
- After clicking on basics a third new window will open and it will be showing all the basic Arduino built-in basic functions.
Note:
- If you haven't bought your Arduino UNO yet, then you can buy it from this reliable source:
- For beginners the function named as blink is very useful, so i will also teach you from this basic level tutorial.
- When you will click on 'blink' option then, a new window will open, which is shown in the image given below:
- In the above shown image you can see that we have opened a basic level example from built in Arduino software.
- Now under this heading title, i will explain how to make comments in Arduino programming?
- This is in fact the syntax to make comments in your sketch.The above code is of very basic level and it elaborates how to blink a single led by using Arduino board.
- If you look closely in the above image then you will see that some words are written in the start of the sketch and these words are encloses in these signs " /* ..........*/ ".
Note:
Comments have no rule in sketch, neither they are as necessary to write in every sketch. We only add them in code to make the code user friendly or to make the user understand that what actually in happening in the code.
- An other way to add the comments is to write " // .........." before every line in your sketch.
- When you will do that before any particular line then, that line will become green and it will no longer have any effect in the sketch.
- There is also a little difference in these both techniques of making comments.
- First technique is used at that place where we have to write 3 or 4 lines together, or a large paragraph is to introduced in the sketch to make the user understand the sketch. We don't have make every line comments one by one. So, this method of making comments gives us ease.
- While the second technique is used at that place, where we have to make comments in a single line.
- Both these techniques have there own purposes and are used at that place where, we wish to use them.
2- Main Loops In Arduino Programming
- Now the next step in learning Arduino programming is to learn about the main loops, which are used in Arduino programming.
- To see what are the main loops, you simply go to the file menu and click on the new button and a second new window will open, which is shown in the image given below:
- Above image is showing the main loops, which are used in Arduino software while programming.
- The first loop is 'void setup' and the second loop is 'void loop'.
- The syntax to write these both loops is also shown in the above image. But you should don't worry about the syntax of these loops because the good news is that the software it-self generated the syntax, when you open a new file to write the sketch.
- Void setup is the first and the main loop while programming in Arduino. It is used for initialization and for configuration of constant values.
- For example while writing a sketch if you are gonna need some constant values in your code then, it is necessary that you must initialize them first in this loop.
- If you didn't initialize those constants first then, code will not execute properly and it will generate error.
- The other main loop which is used while using programming in Arduino is "void loop", as you can also see it from the above given image.
- An important thing to note here is that the compiler checks each and every line one by one in steps.
- The compiler moves from top to bottom and in the first step, it will read every line of the " void setup() " and then it comes to the " void loop() " and it reads/compiles every line written in this portion.
Note:
An important thing to remember here is that, the compiler reeds ' void setup() ' loop only once and on the other hand it reeds the second loop, named as ( void loop() ) again and again.
- So from the above given info, we can conclude that ' void loop() ' is similar to ' while(1) ' loop, which is in fact an infinite loop.
3- Pin Mode Selection in Arduino Programming
- In the above two portions of the today's tutorial we have seen, How to make comments while doing programming in Arduino software and secondly What are the main loop being used in Arduino programming.
- Now we are going to the third stage which is Pin Mode selection in Arduino programming.
- If you are aware of the other micro controllers like ATmel series, PIC or AVR, then you may also know that the pin configuration of these micro controllers are fixed.
- Which means you have pre-decided input and output pins of the micro controller. Those micro controllers have definite pins for inputs and also for outputs and they can only be used for that specific purpose.
- For example if a micro controller have a input port then all the pins on that port will be used to receive data and you can't use them to send data.
- While working with Arduino micro controller gives us a flexibility that every I/O pin available on the board (except for some definite pins like VCC,GND, etc) can be used as input or output pin.
- For example if we wish to connect a led at the pin#2 of our Arduino board, which means we are going to make this pin#2 as a output pin.
- For Arduino board we will send data to this pin through our code, which means we have made this pin as an output pin.
- The syntax to write command to do this function is:
pinMode (2 , OUTPUT)
- By writing this command in the code, we have made pin#2 as a output pin.
- And if we connect some kind of sensor at this port and we have to take the value of that sensor as an input then, we will have to make pin#2 as an input pin.
- In order to make the same pin as an input pin, we will have to write the command in the following syntax:
pinMode (2 , INPUT)
- By writing this command, Arduino board will automatically made the pin#2 as an output pin.
- Pull-up criteria is also very important in writing any commands for Arduino board.
- There is only one problem with all the Arduino boards that, we whenever an un-initialized pin is used in our code then the Arduino board send some garbage value to that particular pin.
- To overcome this problem we have to set some particular value for each and every pin. and we ahve to define state of every pin that either it is HIGH or LOW.
- For example we can say that the function of pin#3 is that GND is always connected to that pin and if ground is not available at any case then we will send +5V to that pin to keep that pin in a particular position.
- The Arduino board command for pull-up purpose is:
pinMode(2 , INPUT_PULLUP);
- This command will automatically decide the particular value of every pin.
4- Digital Pins Controlling in Arduino Programming
- Now the fourth part of the today's tutorial in learning of Arduino Programming is How digital pins are controlled while coding in Arduino.
- Arduino board is a multi purpose micro controller and it is also capable of sending and receiving data from Digital as well as Analogue data.
- It is our choice to make every pin as an input or output pin and similarly either it has to send or receive Digital data or it has to send or receive analogue data.
I/P Digital Pins:
- For example, i wish to make my pin#2 as an Digital input pin, which means it will read digital data from some external source.
- The command to do this function is given below as:
digitalRead(2);
boolean sensor=digitalRead(2);
- The first command is teeling the Arduino compiler to make pin#2 as a digital pin and the compiler will take Digital input data from that pin.
- While the second command i have written is to save the command in a variable.
- In this command i have introduced a datatype named as 'boolean' . You can also change the name of this datatype.
- And the name of the variable is 'sensor'. I have kept the name 'sensor' and you can also change this name according to your own choice.
O/P Digital Pins:
- Next if you wish to make these pins as an output pins then we can also do that.
- Suppose now if you want to make your pin#2 as an output pin and you wish to send data to this pin or you want to define the state of this pin then the commands, which you will write are:
digitalWrite(2,HIGH);
digitalWrite(2,LOW);
- In the syntax of writing the command, we will first write no of the pin and then we write it's state.
- The first command is showing that we are writing digital data on our pin#2 and we are going to set it in HIGH/ON state.
- The second command shows that we are going to set the pin#2 in OFF state.
5- Analogue pins controlling in arduino programming
- In this section of the tutorial we are going to see how to control the Analogue pins of an Arduino board.
I/P Analog Pins:
- As i have explained above in detail that how we can digitally take or send data using Arduino pins.
- An interesting feature is that Arduino board pins can also be used to send or receive data in an analog pattern.
- Since my heading is to input analog data, to understand this pattern suppose that you are going to read some analog voltage from pin#2 of arduino board.
- In order to do that, the commands which you will write in Arduino software are as:
analogRead(2);
int sensor Value = analogRead(2);
- As you can see that the syntax to read Digital and Analog Data is same.
- In first command i am reading the analog data from external source at pin#2 of arduino board.
- In the next command i have stored that data into a variable named "sensor value" .
- After that all the analog data which will appear at pin#2 will be stored in 'sensor value'.
O/P Analog Pins:
- Now if we wish to use the pins of Arduino board as an output pins then it is also very easy and you can also do that by following some simple steps.
- If you wish to use any pin to write data or we can say that you wish to turn a switch ON or OFF then, the syntax will be as:
analogWrite (3,HIGH);
analogWrite (3,LOW);
- The first is showing that a switch has been connected at pin#3 and you wish to turn it ON and you will write the first command in Arduino sketch.
- The second command is showing that a switch is already in ON state, which is connected at pin#3 and we wish to turn it OFF then, we will write the second command in our Arduino sketch.
Alright friends, today's tutorial was a little bit lengthy but very informative for beginners who are keen to learn Arduino software. If you have any questions then, ask in comments and i will try my best to solve the problem. Till next tutorial take care !!! :)
Interfacing PIR sensor with Arduino
Hello friends, i hope you all are fine and enjoying. Today i am going to share a new project tutorial which is Interfacing PIR sensor with Arduino. First of all lets, have a little introduction about the basics and working of the PIR sensor. PIR sensors are in fact a Passive Infrared Sensor. PIR sensors are actually electronic sensors and they are used for motion detection. They are also used to detect the Infrared waves emitting from a particular object. You should also have a look at PIR Sensor Library for Proteus, using this library now you can easily simulate your PIR Sensor in Proteus software.
PIR sensors are widely used in motion detection projects now a days. Since my today's tutorial is about interfacing of PIR sensor with Arduino micro controller. Before going to that it is necessary that we should first understand the construction and working principle of PIR sensor. So i am going to divide my tutorial into different blocks and i will describe PIR sensor from its construction to practical applications. So first of all, lets see the construction and operating principle of PIR sensor.
Construction of PIR sensor
The construction of PIR sensor is very simple and easy to understand. In the bottom or you can say in the core of the PIR sensor we have a set of sensors which are made of pyro-electric materials. The properties of this material is that when this material is exposed to heat then, it generates energy. Different methods are used to to measure this energy generated by PIR sensor. On the top of the PIR sensor and above the internal sensors we have a small screen through which infrared radiations enters into sensor. When these radiations falls on the pyro-electric material then it generates energy. Generally the size of this sensor is very small and it is available in the form of thin film in market. Many other materials are also used in collaboration with pyro-electric material like galliam nitrite and cesium nitrate and all these materials take the form of an small integrated circuit.
Operating Principle of PIR sensor
The modern studies in the field of quantum physics tells us the fact each and every object when it is placed at a temperature above absolute zero, emits some energy in the form of heat and this heat energy is in fact the form of infrared radiations. So an other question comes into mind that why our eyes can't see these waves? It is because that these waves have infrared wavelengths and his wavelength is invisible to human eyes. if you want to detect these waves then, you have to design a proper electronic circuit.
If you see closely the name of PIR sensor which is Passive Infrared Sensor. Passive elements are those elements that don't generate their own voltages or energy. They just only measures things. So we can say that this sensor is a passive infrared sensor and it doesn't generate anything by itself. It is only capable to measure the rediations emitted by other objects around it. It measures those raditions and do some desired calculations on them.
Interfacing of PIR Sensor with Arduino
PIR sensor have total 3 pins. The configuration of each pin is shown in the image given below:
- Pin#1 is of supply pin and it is used to connect +5 DC voltages.
- Pin#2 is of output pin and this pin is used to collect the output signal which is collected by PIR sensor.
- Pin#3 is marked as GND pin. This pin is used to provide ground to internal circuit of PIR sensor.
This whole configuration is also shown in the image given below:
The pin configuration of a PIR sensor is shown in the image given above. Since we have to interface the PIR sensor with Arduino micro controller. The image showing the interfacing of PIR sensor with Arduino is shown below as:
Interfacing Code
The code for interfacing Arduino micro controller with PIR sensor is given below as:
#define pirPin 2
int calibrationTime = 30;
long unsigned int lowIn;
long unsigned int pause = 5000;
boolean lockLow = true;
boolean takeLowTime;
int PIRValue = 0;
void setup()
{
Serial.begin(9600);
pinMode(pirPin, INPUT);
}
void loop()
{
PIRSensor();
}
void PIRSensor()
{
if(digitalRead(pirPin) == HIGH)
{
if(lockLow)
{
PIRValue = 1;
lockLow = false;
Serial.println("Motion detected.");
delay(50);
}
takeLowTime = true;
}
if(digitalRead(pirPin) == LOW)
{
if(takeLowTime){lowIn = millis();takeLowTime = false;}
if(!lockLow && millis() - lowIn > pause)
{
PIRValue = 0;
lockLow = true;
Serial.println("Motion ended.");
delay(50);
}
}
}
Applications of PIR sensor
PIR sensors possess a no of applications and due to their low cost and much advanced features they are the main focus of different projects being made now a days. Some of their features and practical applications are listed below as:
- They are able to sense the detection of people and other objects.
- PIR sensors are also used in automatic lightening systems. In these type of systems, when a person comes in the vicinity of the sensor then, the lights are automatically turned ON.
- They are used in outdoor lightening systems and also in some lift lobbies. You may have observed that when a person comes in front of the lift and if the doors are being closed then, the doors are opened again. This is all due to PIR sensors.
- They are widely used in underground car parking system. At every parking position a PIR sensor is installed and when that position is vacant then, a green light glows over that place which means you can park here. And if that position has been occupied then, a red light will glow, representing that this position is already occupied.
- PIR sensor is much compatible sensor and it has the ability to detect a particular motion and the output of this system is very sensitive and doesn't have any kind of noise in it.
Alright friends, that was all from today's post. If you have any questions, fell free to ask. Till next tutorial Take Care!!! :)
What is 555 Timer?
Hello friends, i hope you all are fine and enjoying. Today i am going to share a new tutorial in which I am gonna explain What is 555 timer? We all know about 555 timer, which is an 8-pin IC (integrated circuit), most commonly used in electronic projects, built now a days. As you can see fron its name that it is a timer and designed to generate PWM.
In today's tutorial i am going to explain, what's hidden inside this 555 timer IC and what is 555 timer. A 555 timer is a much compatible electronic device and the biggest feature of this IC is that it able to work on both analogue and digital techniques. Now if we simply consider the output of the 555 timer then, at any particular time, this timer has only 1 definite state. Which means at any time, it will be either ON or OFF. It is not possible that its output is ON and OFF simultaneously. A new invention of 555 timer has also been discovered which is named as 556 timer. 556 is in fact a Dual version of 555 timer and it contains 2 555 timers in a single IC. 556 is a 14 pin IC. Now you will think that 555 timer is a pin IC and as i said that 556 contains two 555 timers then, it should have 16 pins. The answer to this question is that, when two 555 timers are connected to each other then the VCC and GND of both ICs is made common so, we have 14 pins instead of 16. Now let's move towards the basic theme of our tutorial. In this tutorial i will be explain the steps, the pin configuration of 555 timer, It's different modes and project applications.
Internal Design of 555 Timer
Before going into details of what is 555 timer, let's first come to the internal design of a 555 timer. The outer shape of the 555 timer may look like very simple but there is a complex mechanism hidden inside that small IC. A 555 timer contains 25 transistors, 15 resistors and 2 diodes, which are connected to each other in a very complex manner. An interesting thing to know here is that all these components are embedded on a single small silicon chip. Some other series of 555 timers are also available in market like NE555 timer, which we commonly use in our engineering or electronic projects. And the second series is SE555. SE555 series was designed for military purposes. These operating temperature ranges of both NE555 ans SE555 are given below as:
- NE555 is mostly used for basic level projects and such high level accuracy is not demanded in it so it is capable to operate from 0 ~ 70 degree Celsius.
- SE555 was designed for military applications and it is used in those projects where high precision is required. The operating temperature of this IC is -55 ~ +125 degree Celsius.
Pin configuration of 555 Timer
Let's have a look at pin configuration to know what is 555 timer. As I described earlier that 555 timer has total 8 pins. As i described that 555 timer is a multipurpose IC and it is capable to perform variable function. So through some proper arrangement of connections, we can made this IC to do different tasks. Now i will explain the every pin no. and its purpose so that we know the answer to our main question what is 555 Timer ??? :)
- The pin designated as pin#1 is GND pin. This pin is used to provide reference voltage or ground to 555 timer.
- The pin designated as pin#2 is TR pin. It is used for triggering of 555 timer. The operating voltages of 555 timer is 4.5V ~ 15V. When the operating voltages exceeds 5V then, the 555 timer triggers and it generated output or we can say that now it has crossed that limit above which it will generate output.
- The pin designated as pin#3 is the output pin of 555 timer. Through this pin, the output of 555 timer goes to the external circuit. The output depends on the purpose for which you are using 555 timer. For example if you are using your 555 timer to generate PWM then its output will vary. Sometimes it will go High and some time it will go Low.
- The pin designated as pin#4 is Reset pin of 555 timer. If you look closely on the first feature image of the tutorial then, you yourself will understand that it is a NOT function. Which means that in order to reset the 555 timer you will have to give '0' at that pin and after the compliment it will become High and 555 timer will 'Reset' .
- The pin#5 of 555 is 'CTRL' pin. It is in fact a control pin of 555 timer. This pin gives us the direct access to the internal voltage divider of the 555 timer, which is fabricated inside that small silicon chip. We can divide the voltages according to our output requirements.
- The pin#6 is named as 'THR' pin of the 555 timer. For the supply voltages, 555 timer has kept a reference value for them. For example when the supply voltages exceeds 5 volts then, the this pin becomes activated and the 555 timer starts to generate output or it sends data to its output pins.
- Pin#7 is named as 'DIS' of the 555 timer. This pin is in fact the discharge pin of 555 timer and used to discharge the capacitors between intervals. This pin has the biggest advantage when, we are generating PWM through 555 timer.
- The last pin is pin#8 and it is designated as 'VCC' . This is the supply pin of 555 timer. Source is connected at this pin and as i have already explained that the supply voltages range for 555 timer is 4.5V ~ 15V, but generally it triggers above 5 volts.
Modes of Operation - What is 555 Timer ???
In order to know what is 555 Timer, we should have a look at its modes of operation. 555 timer has 3 major modes of operations. All these modes have there own applications and advantages. All the 3 modes are explained in below:
Astable Mode of 555 timer:
From the name of this mode 'astable mode', you can understand that, in this mode, we don't have any stable output of 555 timer. While operating in this mode, the output will be continuously fluctuating and we will be obtaining a square wave form on the output pin of the 555 timer. To operate the 555 timer in Astable mode, you will have to draw the following circuit, which is shown in the image below:
- Astable mode is also used to flash lamps and leds. A very similar project named as Sequential LED blinking using 555 timer has also been uploaded by our team. In that project 555 timer was again being used in astable mode.
Monostable Mode of 555 timer:
In this mode of operation the 555 timer gives only one output pulse in addition to the intentional trigger input. For example if you will press the button then, 555 timer will produce a output pulse and its length remains constant until you again press the button and the 555 timer will generate another pulse. The circuit to use 555 timer in monostable mode is shown in the image given below:
- Monostable mode of 555 timer has wast application. In this state it is used as a timer, touch switches.
- The biggest example of this mode is to generate PWM. If you recall one of my previous tutorial which was Angle control of servo motor using 555 timer, then at that stage we were using a 555 timer to generate a PWM and through this PWM, we were controlling the angle of micro servo motor.
- This mode is also used for capacitive measurement and also for missing pulse detection.
Bistable Mode of 555 timer:
The third and the last mode of operation of 555 timer is to use it in bistable mode. This thing is understood from its name 'Bistable' which means this circuit will have 2 stable states, which we are going to control. The circuit diagram to operate a 555 timer in bistable state is shown in the image given below:
- The above shown circuit is of bistable mode of 555 timer.
- As you can see in the above figure, we have 2 push buttons. One is connected to 'THR' pin and the other is connected to 'TRIG' pin of 555 timer.
- When we will press the 'TRIG' button, which means that we have connected the trigger state to ground and its state has become LOW. By doing that the output of 555 timer will become High.
- On the other hand, when i will press the 'RESET' button then 'THR' pin of 555 timer will be grounded and the output of 555 timer will become LOW.
- In this way we have made the 555 timer to work in 2 different states and that's why it is called Bistable mode of operation of 555 timer.
If you wanna read more about 555 Timer then you must check below simulations on 555 Timer:
Alright friends, that was all from today's post. I hope you have learned something new today and have got your answer for our first question what is 555 timer and if you have any questions then please ask in comments and i will try my best to resolve the issue. Till next tutorial Take Care !!! :)
Getting Started with Arduino Software
Hello friends, i hope you all are fine and enjoying in life. On a friends request, today i am going to share a new tutorial which is 'Getting Started with Arduino Software'. Previously i have uploaded a large no of project tutorials made on 555 timers and some MATLAB based Simulations. Now we are going to touch the next level and from now on we will work on mostly projects containing Arduino microcontroller.
To get started with Arduino microcontroller, we first need to learn the operating software of Arduino microcontroller. This tutorial is very informative and i will be using Arduino software 1.0.5. It is a very basic level software and very easy to learn. IF you have already worked on Arduino software then you don't need to go through it. This tutorial is only for begineers who have just bought the Arduino board and don't know wht to do with it. :)
This software is very user friendly. There are two versions of Arduino software available on theArduino official site. One isexe file which you need to install in your computer. While the second version is a simple rar file and you don't have to install the 'exe' file in your computer. You only copy the software at a particular folder and when you double click on it, it automatically starts to run. I will be explaining this tutorial in various parts. We will see all the options available in main menu and their functioning. Now i think we should move towards the actual working of the software and see how it woks and what are its control parameters.
Getting Started with Arduino Software
- First of all copy the Arduino software folder where you can easily access it. For example, copy the folder on desktop of your computer.
- Double click the folder and the next window will show all the sub-folders, which contains the libraries, hardware tools, references and all other things.
Note:
- If you haven't bought your Arduino UNO yet, then you can buy it from this reliable source:
- That window is also shown in the image given below:
- The above image is showing all the sub-folders and and the Ardunio running application.
- The above folder is showing the examples, drives, hardware, libraries, references, tools of the Arduino software.
- When you will double click on the icon named as 'ardunio' then arduino software will start to run.
- The next window which will open is shown in the image given below:
- A very important thing to note is that when we write code in Arduino software window then, it is called a sketch.
- This software automatically gives the name to the code, which you are going to write.
- For example i have open the command window of Arduino software, then it saves every sketch with that particular date on which you are gonna write that sketch.
- Since today is May 13, 2015 and this software has automatically saved the sketch with today's date.
- Now coming towards menu bar, we have 5 options. I will explain all of them one by one.
File Menu Description
- When you will single click the 'File' button then, a new window will open which is shown in the image given below:
- This list is showing all the components which are encoded in 'File' button.
- First option is 'new' and it will open a new window or new sketch. Next is 'open' and it will open the file or sketch which you will select and will try to open in Arduino software.
- Next options are 'sketch book' and 'examples'. When you will click the examples button then it will open the Arduino libraries.
- The Arduino libraries are shown in the inage given below:
- This option will give all of the Arduino libraries. Arduino libraries are very useful in learning the basic code of Arduino.
- For starters, you can go to the first option which is, '01. Basics' and it will give you some libraries of that projects which are very easy to understand.
- You can simply click on any option and the code will automatically load into Arduino software.
- Next options are 'close', 'save' , 'save as'. These options are very simple and every user is aware of these options.
- Next option is 'upload'. It is very important option and it will load the particular code into Arduino sketch file.
- Next option is of 'upload using programmer'. This option uploads the code into Arduino sketch which is written in some other software.
- Next option is of 'page setup'. It gives you the options about alignment of the page and what size of sketch you want to keep.
- Then comes the 'print' option and 'preferences'. When you will click on 'Preference' option then a new window will open and this window is shown in the image given below:
- This window will open and it will be showing sketckbook location. where you wish to save all your sketches. We will give it location only once and afterwards it will automatically save the file at that particular location.
- You can also select the language, in which Arduino sketch will be written and the font size can also be selected.
- This option also gives the check flag. For example either you want to update or Arduino software version or you tends to use the existing software and many other options.
- The last option in file menu is 'Quit'. By clicking on this option, Arduino software will close and the sketch which is running at that particular time will stop.
Edit Menu Description
- After file menu then comes the 'Edit' menu. When you will single click on that icon then, a new window will open, containing all the options which are ancoded in 'Edit' menu.
- That new window is shown in the image given below:
- The first 2 options in Edit menu are 'Undo' and 'Redo'. If accidentally something goes wrong then, you will press undo button and problem will be eliminated.
- Redo is the opposite of Undo option.
- Next options are 'cut' and 'copy'. Nearly all users are aware of their functions.
- The next option is 'copy from forum'. It will copy the sketch from a particular forum and will automatically save it into sketch window of Arduino software.
- The very option is 'copy as HTML'. This option is used at that place where, you want to upload your sketch or code.
- After writing you sketch, you just single click on this button and it will automatically convert the sketch language into HTML language and then you can easily upload it.
- Next option is of 'paste'. You copy the sketch from some other folder and you can 'paste' it in this sketch menu. and you can easily compile it.
- Next to paste option we have 'select all' option. Once you click on this option and the whole sketch will be selected. It's upto you either you want to copy it or whatever you want to do with the sketch.
- The next option is very important which is 'comment/un-comment'. For those people who have done the coding before and are aware of the basics it is a simple options.
- You bring the curser to any particular line and when you will first click on this button then, it will be commented. Which means physically this line is written in the code but logically it has no importance anymore.
- to avail this particular line, you will again click on that particular line and then it will be 'un-comment'.
- After un-commenting the line, now you can use it in code.
- Next option is 'increase indent', by single clicking on this option you will observe that the width of blinking curser has been increased.
- This is also very interesting feature in looking and also very beneficial for those people who have a little weak eye-side.
- And if you are not comfortable with this feature then, don't worry we also have a secondary feature for it.
- Then you will click on the next option named as 'Decrease indent' and it will automatically decrease the width of the curser and it will start to look like as before.
- The next option is very interesting and it is to find anything within your sketch.
- When you will click on that option, a new window will open which is shown in the image given below:
- In this window you can see that we have no of options. First bar is of find.
- Write in the first bar whats actually you want to find.
- And if you think something has gone wrong and you want to make changes in your code, you just simply write that things in 'replace with' menu and the whole code will be changed accordingly.
- Next options in the edit menu are 'find next' and 'find previous'. When you write something in find menu and the software finds it for you.
- Now if you want to find what's written next to those lines, you just simply click on that options and it will show whats next to that thing in sketch.
- Similarly you can also find whats written previous to that thing in our sketch.
Sketch Menu Description
- After edit menu we have 'Sketch Menu' in the list. When you will click on that option then, a new window will open which is shown in the image given below:
- In sketch menu we have total 4 options.
- The first option is 'verify/compile'. If you have written a code and when you will click on this option, it will verify the whole code and it will compile it and if there is no error then, the sketch will start running.
- Next option is of show sketch folder. By clicking on that icon, we will access that particular folder in which sketch has been saved.
- Next option is of 'Add file' and if you want to add any particular file in your sketch, you just simply click on that option and that file will be added in your sketch.
- The last option in sketch menu is very very important and it will enables you to 'import library' into your sketch.
- When you will click on that button then, a new window will open which is shown in the image given below:
- As you can see in the above shown image that in this software there are a large no of built in libraries and if you need to import any library in your sketch then, you can easily import it.
Tools Menu Description
- The next option in the main menu is 'Tools'. In order to explore it you just simply click on it and a new window will open, which is shown in the image given below:
- The very first option in 'sketch menu' is auto format and it will automatically give format to the sketch.
- Next are Archive Sketch, Fix encoding and reload.
- The most important option in tools menu is 'select board'. By clicking on this option a new window will open which is shown in the image given below:
- You can see that we have a large no of options available here .
- Its your choice to choose that Arduino board which you are going to use in your project.
- Next option is of programmer and when you will click on this button then a new window will open, which is shown in the image given below:
- You can see from here we can select that which type of programmer we are going to use in our project.
- The default setting for this version is AVRISP, as shown in the above image.
- The last option in tools menu is Burn Boothloader and the beauty of Arduino software is that it is capable to burn the code into its micro controller itself and no external burner is required for this purpose.
Help Menu Description
- This is the last option in menu and when you will click on it then a new window will open which is shown in the image given below:
- The help menu of Arduino software is very user friendly and it gives you ease to learn the software and to do something new.
- You can see that the very first option is 'getting started' and when you will click this option it will guide you about the features of the Arduino software. How we are going to use it and what are its basics?
- Other options are also related to help and are much informative, if you are writing a particular sketch and at any stage if you don't know what to do the next then, don't worry, Help will guide at every step.
- Now coming towards next menu, which is below the main menu, it has 5 major icons, which are shown in the image given below:
- In the above image you can see that, we have 5 major icons.
- The icon numbered a '1' is of 'verify'. After writing the whole code, you just simply click on that icon and it will verify the whole sketch and if there is any error then it will also generate error.
- The icon numbered as '2' is to upload the sketch into your micro controller.
- The icon numbered as '3' is of 'New'. By clicking on that icon a new menu will open and it will allow you to write a new sketch in it.
- The icon numbered as '4' is of 'open'. When you wish to open a existing file in your present code, you just simply click on that.
- The icon numbered as '5' is of 'save'. When you have written a particular sketch, you simply click on that and that sketch will be saved automatically.
- The last icon which is numbered s '6' is of serial monitor and after writing the whole code you just simply click on that and it will monitors the whole sketch thoroughly step by step.
- if any error will present at any stage then it will generate error.
Alright friends, that was all from today's post. Today's tutorial was very informative so i conclude that you hve learned something new today. Till next tutorial Take Care !!! :)
Traffic Signal Control using 555 Timer in Proteus ISIS
Hello Friends, i hope you all are fine and enjoying. Now i am going to share my new project tutorial which is Traffic Signal Control using 555 Timer. Up till now i have uploaded a no. of projects using 555 timer and i have got much appreciation from my friends, for some 555 timer based projects like How to use Capacitive Touch Sensor in Proteus ISIS, Sequential LED Blinking using 555 Timer and many more.
Now i am going to share another application of 555 Timer and here we will be using a shift register (4017) next to 555 timer to implement Traffic Signal Control circuit. 4017 is a SERIAL IN PARALLEL OUT shift register. Data enters in a serial manner into register and it leaves the register in parallel manner. 4017 is a 10-bit shift register and it needs a clock pulse to shift data from serial input pin to parallel output pins. Now we need a device which can provide continuous clock pulse to Shift Register. Clock pulse is generated either from Micro-controllers or some sort of timers. Here we will be using 555 Timer to generate clock pulse. It is a very easy project to understand and also very simple to implement. These type of projects are generally designed by the Engineering students in their First or Second semester. Now i am done with the theory of the circuit and now lets move towards the designing of the project.
You can also download the complete simulation of the above described project by simply clicking on the button given below:
Traffic Signal Control using 555 Timer in Proteus ISIS
- First of all place all the components in your proteus workspace,as shown in the image below:
- Threshold voltage for 555 Timer is 5 volts, and when voltages exceeds this level, 555 timer triggers and it generates a output pulse at its output pin which is ‘Q’ pin.
- In this project, we will be using a battery of 12 volts as supply voltages.Positive pin (+) of source is connected to Vcc pin of 555 Timer and the Negative pin (-) is connected to GND pin of 555 timer.
- Pin#3 of 555 timer is connected to CLK pin of shift register and this pin is the data input pin of shift register. Through this pin, 555 timer send data to shift register.
- At output pins of shift register we have connected 3 Leds, RED, YELLOW and GREEN. Same colors which are used in Traffic Signals.
- RED led is connected to output pin#12. YELLOW LED has 2 parallel inputs that are pined at pin#10 and pin#11 respectively. Diodes are connected the way of inputs to block reverse currents. YELLOW led will glow if any of the input will be HIGH.
- GREEN led has 4 parallel inputs connected at pin# 1,5,6,9 respectively. GREEN led has to blink for longer time, that's why we have connected multiple inputs to it. GREEN led will keep on glowing as along as any of the input will be HIGH.
- If you connected all the components in their exact position and all the connections are OK, then the final circuit will look like as shown in the image below:
- Now if you look the above circuit closely then, you will observe that we have connected high valued capacitor (47uf) in the way of trigger pin of 555 timer.
- The purpose of capacitor is to produce lag in the clock generated by 555 Timer.
- Now when you will play the simulation then LED will start to glow in periodic manner. First RED led will blink, then YELLOW led will glow and in the end GREEN led will start to glow.
- All these stages are shown in the image given below:
- As you can see that state#1 represents the "STOP" state, which means that traffic has to stop.
- State#2 represents "GET READY" state and it means get ready to GO but you are not allowed to go yet.
- State#3 represents "GO" state, in which traffic is allowed to Go.
Alright friends that was all for today's project. It was a very simple tutorial and most of its portion have been explained in previous tutorials. So i haven't explain it in much detail. But still if you have any problem then, don't feel shy to ask in the comments. Till next tutorial Take Care !!! :)
Relay Control Using 555 Timer in Proteus ISIS
Hello friends, I hope you all are fine and enjoying yourself. Today I am going to share my new project tutorial which is Relay Control Using 555 Timer in Proteus ISIS. We all know about relays that are used for automatic switching and are magnetically connected while electrically insulated. If you don't know much about relays then I think you should first read What is a Relay? in which I have given a detailed overview of relays and where are relays used? After reading this post you will have a good grip over relay and today's post will be piece of cake for you. Relays are mostly used with some microcontrollers like Arduino or PIC Microcontroller. You might also wanna have a look at traffic Signal Control using 555 Timer, which is good if you are interested in learning 555 Timer.
Now in today's project, it can be understood from its name (Relay Control Using 555 Timer in Proteus ISIS), that we are going to operate and control a Relay through 555 Timer. First of all, if we define the relay, then we can say that 'Relay is an Electrical switch which operates Mechanically'. You should also check this Relay Simulation in Proteus to know how it works. Although some relays operate automatically but since we are working on a very basic project and we will be controlling the relay from an external mean and for this, we will use a mechanical switch. The mechanical switch is in fact a button and we can turn it ON or OFF according to our own choice. It is a very simple and easy project and most of its contents have been described in the earlier tutorials. So, I am not going into much detail and without wasting any time, let's move towards the Hardware of the circuit. But it's my personal advice, try to do design this relay control using the 555 timer project yourself and get to know the practical applications of the 555 Timer in person. You can also download the complete simulation of above described tutorial by simply clicking on the button given below:
Download Project Files
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | 555 Timer | Amazon | Buy Now |
2 | LEDs | Amazon | Buy Now |
3 | Resistor | Amazon | Buy Now |
Relay Control Using 555 Timer in Proteus ISIS
- First of all place all the components in your Proteus workspace as shown in the image given below:
- Now connect supply voltage (+5 volts) to Vcc pin of 555 Timer.
- At the output pin of 555 Timer, which is pin # 3, we will connect our load. By load we mean a 5 volts relay and a simple DC motor is connected next to the relay.
- As I told you earlier that we are using a manual relay, so a simple push Button is also connected between pin # 3 and relay.
- If you have connected all the electronic components in their exact place, then the final simulation will look like as shown in the image given below:
- If you notice the image closely, then you will observe that a Diode is also connected in parallel with the relay coil.
- A Relay contains a coil. When the voltage source is applied across one end of the Relay and the other end is connected to the ground, then the relay gets energized. And when we remove the source voltages then, it still remains energized and the stored charge tends to flow the reverse current.
- The reason to connect the Diode is that it blocks the reverse current and only allows the forward current to pass through it.
- Now run the simulation, if the button is kept in the OFF state then, the voltage will appear across the Relay but it will not operate. To run the load, which is Motor, in this case, we will have to turn the switch ON. This can be seen in the image given below:
- As you can see in the above image, when the switch was in an ON state, the relay gets no signal and doesn't operate. As we move the switch from ON state to OFF state, the relay gets the signal and it starts to operate the load.
- Now after reading today's post, you must have a look at Relay Interfacing with Microcontroller which is an advanced tutorial and the benefit of a microcontroller is that now you can control your relay any way you want.
- Other exciting tutorials on 555 Timer include Seven segment Control using 555 timer and Servo Motor Control using 555 Timer.
- I have created a small video for this tutorial in which I have shown how to do relay control using 555 Timer, I hope you are gonna like it:
Alright, Friends that was all for today's tutorial about relay control using a 555 timer. I hope, I have conveyed something new today. If you have any questions, then don't hesitate to ask in the comments and I will try my best to resolve them. Follow us through email to get the tutorial straight in your inbox. Till the next tutorial, Take care and Be Safe !!! :)
How to use Capacitive Touch Sensor in Proteus ISIS ?
Hello friends, I hope you all are fine and enjoying. Today i am going to share my new project's tutorial which is How to use Capacitive Touch Sensor in Proteus ISIS. It is a very interesting project, and we will be using a 555 Timer while designing this project. If you recall our previous project tutorial which was Angle Control of Servo Motor using 555 Timer in Proteus ISIS, in which 555 timer was generating PWM and was controlling the rotating angle of servo motor.
Now in this project, we have a little different context and now we will be using a 555 Timer in collaboration with Capacitive Touch Sensor. First of all, lets have a little introduction of Capacitive Touch Sensor. Well, if we talk broadly then, in Electrical Engineering Capacitive Touch Sensing is a Technology used in Capacitive Coupling. Capacitive Coupling is a technology which takes Human Body's Capacitance as an input and it measures anything which has a potential difference or which is conductive or any static object which has a dielectric difference from that of air. While designing this technology, one side of the insulator is coated with the conductive material and a very small voltage is applied to this conductive layer. Now after applying the voltages to the conductive layer, a uniform electrostatic field is formed. After that if any conductor (suppose human finger) will come within the vicinity of this field or it touches the other non coated layer of the insulating material then a capacitor will be dynamically formed and if potential difference between both bodies is HIGH then the current will start to flow. That was a little introduction of Capacitive Touch Sensor, and now lets be practical and move towards the Hardware of the Above described tutorial.
You can download the complete simulation of above described project by simply clicking on the button given below:
Download Simulation Files
How to use Capacitive Touch Sensor in Proteus
- In this project, we are using 555 Timer in collaboration with Capacitive Touch Sensor. A 555 timer is an 8 pin IC. Pin # 6 is called threshold pin and for 555 timer threshold level is 5 volts.
- So, 555 timer will trigger above 5 volts and it will generate output which can be collected from pin # 3 represented as ‘Q’ which is output pin of 555 timer.
- While moving toward the simulation of project, first of all place all the components in the proteus workspace, as shown in the image given below:
- First of all we have place Capacitive Touch Sensor and after that we have placed a NPN transistor, then 555 Timer will come and at the output of 555 Timer we have added a LED. The complete circuit diagram ready for simulation is shown in the image given below:
- As long as the finger is out of the vicinity of the electrostatic field, no potential difference occurs and the LED remains in the OFF state.
- Now if we move the finger towards Capacitive Touch Sensor, then and when the potential difference reaches up to 0.6 volts, then 555 triggers and it generates output voltages across LED which are 5 volts but in some cases voltages are lost due to series connected resistances. This phenomenon is shown in below image:
- Now if we further move the finger and take it completely near the sensor, then at this point max potential difference will occur between both point (finger and conductive layer). An important thing to note here is that, we have change the location of our interrupt ( finger) but, same voltages are appearing across LED which are 4.91 volts in this case. It can also seen in the figure given below:
- Now, if we summarize the whole project, then we have seen that the movement of finger is in fact controlling our output. When the finger was out of vicinity of the sensor, then LED was OFF. When we moved the finger in forward direction and came in the vicinity of Electrostatic field, then Sensor gives signal to 555 Timer and Timer makes LED to glow.
- Here's a video demonstrating Capacitive Touch Sensor in Proteus ISIS.
Applications Of Capacitive Touch Sensor
Capacitive sensing touchscreens are now a days commonly used in Digital Audio Players, Mobile Phones and Tablet Computers. Capacitive touch sensors also have the ability to replace Mechanical Buttons. Back in 1928 Russians invented a music instrument known as "Theremin" , in which The Instrument Player was able to control the volume and pitch of the sound without physically touching the instrument. Capacitive Touch Sensors are of basic level but they are back bone of large industrial projects and are widely used in designing some other sensors like:
- Position sensor.
- Humidity sensor.
- Fluid or Water level sensor.
- Proximity sensor etc..
Alright friends, that’s all for today, I hope I have conveyed some knowledge and helped you people in some way. If you have some queries, then ask in comments. Subscribe us via email to get these tutorials straight in your inbox. Till next tutorial, take care and be safe !!! :)
Seven Segment Display Using 555 Timer in Proteus ISIS
Hello friends, hope you all are fine and enjoying. Yesterday I got a mail from a friend, and he requested me to explain a tutorial about Seven Segment Display. So today, I am going to share my new project tutorial which is Seven Segment Display using 555 Timer in Proteus ISIS. It is a very simple project to understand Modern Digital Electronics.
As you all know, now a days all the Digital Display’s uses Seven Segment Display. So first of all let’s have a little introduction about Seven Segment Display. How they are fabricated and how their LED’s glow in such a beautiful manner? Seven Segment Display (SSD) is the form of electronic device, used to display decimal numbers. Seven Segment Displays are commonly designed in Hexagonal shape but according to our project’s requirement we can also design them in some other shapes like rectangle, triangle, trapezoid etc. Seven Segment Displays may uses LIQUID CRYSTAL DISPLAY (LCD) or LIGHT EMITTING DIODE (LED) for each display segment. In Seven Segment Display all the positive terminals (Anode) or all the negative terminals (Cathode) are brought together to a common pin and such arrangements are known as “Common Anode” or “Common Cathode” arrangement. In this project we will be using Common Cathode arrangement and Hexagonal shape of Seven Segment Display. A simplest form of Seven Segment Display is shown in the image below:
From the above shown image, we can see that we have total 7 LEDs and we will make them glow in such a scheme that the final image will look like a Numerical number. Now if you recall one of our previous project tutorial which was Sequential LED Blinking using 555 Timer, In that project, we are using a 555 Timer in collaboration with a Shift Register. 555 timer continuously provides clock to the Shift Register and Shift Register gives data to its output pins in parallel manner. In today's project, we are also going to use the same concept. We will use a 555 Timer which will continuously provide clock to Shift Register it will enable it's pin accordingly. We can gather this whole information into a single table and also the sequence in which LED's will blink. Such table is called TRUTH TABLE and it is shown in the image given below:
In the above image, '1' means ON state and '0' means OFF state of a particular LED of Seven Segment Display. Above was a little introduction of Seven Segment Display and now, lets move towards Hardware and see How this beautiful display is actually formed.
You can download the complete simulation of above project by simply clicking on the image given below:
Download Seven Segment Display Project Using 555 Timer
Seven Segment Display Using 555 Timer
- First of all place all the components in your proteus workspace, as shown in the image given below:
- First of all 555 Timer is installed, after that a Shift Register is added. 555 Timer will give clock to the Shift Register. Since we are using common cathode arrangement. So, the 7 input pin of SSD are connected to the output pins of Shift Register and the common cathode pin is connected to circuit's main cathode. If you have placed all the components in their exact positions and all the connections are OK. then, the resultant simulation will look like as shown in the image below:
- Now if you look closely at the upper portion of the image then, you will notice that i have added 2 buttons in the circuit. Left Button in Button # 1 and Right Button is Button # 2.
- If both the Buttons are kept open and when you will run the simulation then, numerical values will start to come on seven segment display. you can also see it in the below image:
- Now the switching of button # 1 includes a very interesting feature. First of all play the simulation and Digits will start to run on Seven Segment Display and at any stage when you will press Button # 1 then Seven segment display will vanish but counting will keep on going in the back. And when you will open the Button#1 again then it will show that digit, up-to which counting have reached. Below is a very interesting feature included:
- During State#1 when Seven Segment Display was showing digit no.2 , we pressed button#1 then, display vanished which can be seen in the state#2. After that when we re-opened the switch#1 then, Seven segment display didn't show the digit no.3 but it shows digit # 8. and this thing can be seen at state#3.
- Now moving forward, the function of switch # 2 is very simple and easy. During simulation running, when we will press the Button # 2 at any instant then, display will immediately stop at that point. So, we can say that this project can also be used as stop watch and button # 2 controls the stop watch. It can also be seen in the image below:
Seven Segments Displays have a large no of applications. Some of them are listed below:
- Digital Clocks.
- Electronic Meters.
- Basic Calculators.
- Electronic Devices to Display Numerical Values. (Generally 14-segments or 16-segments display is used to display full alphanumeric values).
Alright friends, that’s all for today, I hope I have conveyed some knowledge and helped you people in some way. If you have some queries, then ask in comments. Subscribe us via email to get these tutorials straight in your inbox. Till next tutorial, take care and be safe !!! :)
Design a 5V Power Supply in Proteus
Hello friends, hope you all are fine and enjoying in your life. In the previous post, we have seen How to use Oscilloscope in Proteus ISIS, today I am going share a new and a very important Tutorial which is How to Design a 5V Power Supply in Proteus? This project is very simple and of basic level but importance of this project is that it is used as a base in almost all large electronics project, designed now-a-days. When I start working on any project then the first thing, I need to design is this DC power supply, because without powering up the components, we can't use them. :)
While designing a 5V Power Supply in Proteus ISIS, we will be using Voltage Regulator IC, which is commonly known as 7805. This voltage regulator is used to regulate or change the voltage level of supply voltage. As we all know, most of the batteries available in market are of 12 volts. For example, if you have UPS at your homes then check its battery, it will be of 12V. Similarly, the battery of car or motorcycle is also of 12V. So, 12V has become the standard of electrical batteries. Now, we have known that all batteries are of 12V but the problem comes when we are dealing with sensitive electronic components because they are all designed to operate on 5 volts. Now, as I described earlier that, voltage source available is 12 volts and the operating equipment needs 5 volts to operate. So, we need an intermediate source or such type of DC Power Supply, which can convert the source voltage (12 volts) to operating voltage (5 volts). This problem is eliminated by using 7805 IC, and that’s why it is called Voltage Regulating IC.
So dear Friends, today we will design a 5V power supply, which will be able to change Voltage Level and will provide us our desired voltage. But as I always say, that practice makes a man perfect. Try to design it yourself so that, you also get to know the real application of Voltage Regulator IC. So, let's get started with designing of 5V power supply in Proteus ISIS.
How to Design a 5V Power Supply in Proteus
- You can download the complete simulation of 5V Power Supply in Proteus by clicking the below button:
Design a 5V Power Supply in Proteus
- Voltage Regulating IC 7805 has 3 pins.
- Pin # 1 is used as input pin and it is connected to supply voltages. It is marked as (VI). DC +12 volts are applied to this pin.
- Pin # 2 is called common or ground pin. It is marked as (GND). The whole circuit's common is applied to this pin.
- Pin # 3 is the output pin of 7805. If 12 volts are applied to its input than it automatically generates 5 volts on this pin. This pin is marked as (VO).
- Now, moving towards the designing of the hardware, first of all place all the components in Proteus workspace, as shown in image below:
- In Hardware implementation, first off all apply source voltage (12 volts) to the input pin of 7805 IC. 2 capacitors are also connected in parallel with the source voltage and their ratings are 1000 uf and 100pf respectively.
- On the other side of IC, we also connect 2 capacitors parallel to the gained output voltage (5 volts), and their ratings are 100pf and 100uf respectively. And a LED is also connected in parallel on the load side.
- If you have placed all the components in their perfect place and all the connections are OK, then the resultant proteus simulation will look like as shown in the below image:
- Now if you closely observe the above image then you will notice that Capacitors connected across the 12 volts are of HIGH rating while the Capacitors connected across LED are of LOW rating. The purpose of applying capacitors is to remove noise from our DC voltages. As, we all know that DC voltage source available in market is not that much pure. So, to get pure DC wave Capacitors are connected across it.
- Now when you will run the final simulation then it will look like, as shown in the image given below:
- As you can see that when i ran the simulation, the LED started to glow. Now here is an important thing to note that i have applied a resistance in series with LED. The value of resistance is very low, and very low voltages appear across this resistor. This resistor limits the current and if we directly connect the LED then, their will be chances that the LED may burn out.
- We can justify it as: From ohms law : V=IR, and by rearranging it, we get : I=V/R .
- Now if we remove resistor then R=0, which means: I=V/0 and it lead us to conclude that: I= infinity or maximum in this case. So the only purpose of the resistor is to limit current.
Alright friends, that’s all for today, I hope now you can design a 5V power supply quite easily in Proteus. If you have some queries, then ask in comments. Subscribe us via email to get these tutorials straight in your inbox. In the next tutorial, I have discussed Variable Voltage Modulation using LM317 in Proteus ISIS.