Rain Sensor Library for Proteus

Hello friends, I hope you all are doing great. In today's tutorial, I am going to share a new Rain Sensor Library for Proteus. I have got a lot of requests for designing this sensor. So finally it has been designed by our team and is ready to use in your Proteus Simulations. Rain Sensor, as the name shows, is used for detection of rain and is common sensor used in Embedded Systems Projects. Both analog and digital rain sensors are available these days but we have only designed the digital Rain Sensor. It will give digital output and its output will be HIGH when there's rain and will remain LOW if it won't detect any rain. As Proteus is a simulation software and we can't actually bring the rain so that's why I have placed a TestPin. If you apply HIGH to this TestPin then that's means there's rain and if TestPin is LOW then it will give LOW output and will show there's no rain. So, now let's have a look at How to download and use this Rain Sensor Library for Proteus:

Rain Sensor Library for Proteus

  • First of all, download this Rain Sensor Library for Proteus, by clicking the below button:
Rain Sensor Library for Proteus
  • You will get a zip file so extract it and you will find these three Library Files in it:
    • RainSensorsTEP.LIB
    • RainSensorsTEP.IDX
    • RainSensorsTEP.HEX
  • Now place these Library files in the Library folder of your Proteus software.
Note:
  • Now restart your Proteus software if its already open.
  • In the components search box, make a search for rain sensor as shown in below figure:
  • I have designed these two rain sensors so now place both of them in your workspace.
  • If everything goes fine then you will get something as shown in below figure:
  • So now we have to add the hex file in our sensor, so I am gonna use the Rain Sensor Blue and will double click it to open its Properties Panel.
  • In the Properties Panel, you have to find the Program File section.
  • In the Program File, browse to RainSensorsTEP.HEX File and select it.
  • We have download this file and placed it in the Library folder of our Proteus software.
  • Here's the screenshot of my Properties Panel of Rain Sensor:
  • Now after adding the Hex file, click OK to close the Properties Panel.
  • Your rain sensor is now ready to be used in your Proteus Simulation.
  • So, let's design a simple circuit to have a look at How this Rain Sensor works in Proteus.
  • Here's the screenshot of my simple Rain Sensor simulation in Proteus:
  • I have attached LogicState to TestPin and LED on the output.
  • As I have explained earlier that we can't bring rain in the Proteus software, that's why I have placed a TestPin.
  • So, now when TestPin is LOW that means there's no rain and when you change the TestPin to HIGH then sensor will detect rain.
  • I have run my simulation and here's the output:
So that was all for today. If you got into any trouble then ask in comments and I will help you out. Thanks for reading. Take care. :)

Introduction to RJ45

Hi Guys! Hope you are doing well. We always strive to give the most relevant information as per your needs and demands. Today, I'll discuss the details on the Introduction to RJ45. It is a type of standard connector mainly used for data transmission. Almost all ethernet cables come with this connector on each end, and they, sometimes, known as RJ cables. The RJ in the connector stands for registered jack while 45 defines the number of interface standard. In this post, I'll cover each and everything related to RJ45, why it used, features, and main applications. Let's dive right in and nail down everything you need to know.

Introduction to RJ45

  • RJ45 is a type of connector, mainly used for Ethernet networking including connection with PC network cards, data switches, WiFi access points, and routers.
  • It is connected to each end of Ethernet cables and acts as the main source for transferring data. RJ stands for registered jack and ethernet cables are also known as RJ cables.
  • The most common standard for RJ cables is known as CAT5 (Category 5)
  • In simple words, connectors at the end of ethernet cables are known as RJ45 connectors which also indicate how the cables are wired, while ethernet cables are termed as CAT5 (also RJ cables) which show the maximum speed the cable can attain.
  • RJ connector comes with eight pins which indicate it can house eight wires inside. All these wires come in different colors i.e four are in solid color while the remaining four are stripped. These wires are combined in twisted pairs that help in reducing the crosstalk and canceling EMI.
  • These cables are not shielded and are merely twisted for noise reduction.
  • CAT cables are mostly used in networking and can handle bandwidth around 100mbps.
  • These cables fail to work in high-speed environments, in that case, CAT5 is widely replaced by CAT6.
  • RJ45 cables deem feasible for both long and short distance, and apart from supporting ethernet protocol, they also work for ATM and serial ISDN T1 and E1.
  • RJ45 come with 8 wires and only 4 of them take part in the communication where pin 1 and 2 are used for data transmission while pin 3 and 4 are used for receiving data. (only in ethernet interface)
  • In serial and ISDN protocols, all pins take part in the communication and are wired in a straight through configuration.
  • Don't get confused between RJ connectors and RJ ports. Both are the part of RJ protocol where connectors serve as a (male) connector and port that receives the connector is known as (female) port.
 RJ45 Pinout and Wiring Standards
RJ cables are wired in two ways named T-568A and T-568B. Wiring standards in both of them are different and listed below.
  • Both wiring schemes are equally practiced and commonly supported by most of the devices, however, T-568A is preferred over other.
Following figure shows the pinout of RJ45 (T-568A). Following figure shows the pinout of the RJ45 (T-568B).
  • In some networking applications, crossover ethernet cable is a prerequisite which contains T-568B at one end and T-568A on the other end.
  • This cable is mainly used in computer-to-computer connections.
Difference between RJ45 and RJ11
  • Both connectors are different in terms of size, wires, and applications.
  • RJ45 is relatively large as compared to RJ11 and mainly used to build a connection with routers, computers, XBoxes, hardware firewalls and play stations. It comes with 8 wires.
  • While RJ11 is smaller in size, comes with 4 wires and mainly used for connection with telephone, modem, and fax machine.
  • Although RJ11 comes in smaller size and can fit in the RJ45 slot, however, it is not recommended to use this practice. Doing so can damage the slot and affect the overall working of the device in which it is plugged in.

Types of Ethernet Cables

Ethernet cables are widely used for telecommunication and networking purpose. They come in different types based on nature and data transmission speed they can carry along the length of the wire. RJ45 connectors are connected on both sides of the cables that act as a source of data transmission. Following are the main types of Ethernet cables used for networking and telecommunication purpose. CAT-1. It stands for category 1 that doesn't support TIA (telecommunication industries association). It is mainly used for standard telephone wiring and ISDN. CAT-2. Similar to CAT-1, this type of wiring is not recognized by TIA. It is mainly used for token ring wiring and capable of carrying data at the rate of 4Mbit/s. This is the old version of cable wiring and widely abandoned by advanced cable categories. CAT-3. This cable wiring is widely supported and recognized by TIA/EIA. It is mainly used for data networks and can carry data at the rate of 100Mbit/s. However, this type of wiring is also becoming obsolete because of less data transmission speed and frequency for carrying out different functions at the decent pace. CAT-4. This type of cable wiring is not supported by TIA. It is widely used for token ring networks with the capability of supporting frequency up to 20MHz. CAT-5. Category 5 cables were introduced with the intention of providing more speed as compared to their predecessors. They can transmit frequency up to 100MHz and are not recognized by TIA. This cable wiring uses two twisted pair and is not recognized by TIA. The CAT-5 cable is not recommended for recent applications, however, it is useful for 100Base-T and 1000Base-T networks as it provides suitable speed and frequency for the data networks. CAT-5e. This cable wiring is almost similar to CAT-5 with some exemptions in terms of data transmission speed and TIA recognition. It is preferred for applications where speed is a major concern as it can support speed up to 125 Mbps. The physical appearance of this wiring is similar to CAT-5 and widely used for 100Base-T and 1000Base-T networks. CAT-6. This cable wiring is recognized by TIA and stays ahead of other ethernet cables in terms of performance and speed i.e. supports up to 10Gbps. They come with an outer foil or braided shielding and cover less space as they are tightly wound as compared to CAT-5 and CAT-5e. The shielding minimizes the crosstalk and noise and protects the twisted pair of wires inside the cable. They can work and cover a distance of around 55 meters. CAT-6a. It stands for Category 6 Augmented cable. They come with higher transmission speed, encompass maximum bandwidth and are less flexible than CAT-6 cables. They can carry more data along the length of the cable as compared to their predecessors and cover more distance without losing the bit of accuracy. The shielding is added in the wiring that protects the cable and helps in removing the crosstalk. CAT-7. It supports frequency up to 600 Mbps and comes with four individually shielded pairs. It works best in many applications for carrying out data transmission at a decent pace. They are introduced for rated speed of around 10 Gigabit. CAT-7a. These cables are used for augmented specifications that can support speed around 10 Gigabit. They cover frequency up to 1000 MHz and are quite identical to CAT-7 cables in terms of physical appearance and performance capability.

How to Connect Two Computers Using Ethernet Cables

It is very easy to connect two computers for data transmission using ethernet cables. The CAT-5 or CAT-5e crossover cables are widely used for this purpose and prevent from losing any data during transmission. These cables are quite identical to straight through cables but come with twisted wires on both ends. You can use the following steps to connect two computers using ethernet cables.
  • Connect one end of the cable with RJ45 connector into the ethernet port of the computer. Plug the other end of the cable into another computer.
  • Log in to one of the computers.
  • Go to the search box at the bottom left of the computer and type "Network and Sharing Center" and click it.
  • Then go to the "Change Adaptor Settings" on the top left side.
  • Right click on the "Ethernet" and go to properties.
  • Then select "Internet Protocol version 4 TCP/IPv4" and click properties.
  • Select the IP address and subnet mask at the two computers as mentioned below.
To check the connection, restart both PC and use the below instructions.
  • ping 192.168.0.2 -t: from the second PC
  • ping 192.168.0.1 -t: from the first PC
Right click on this PC option and click on "Change Settings" option.
  • The "Workgroup" name should be identical in both PC, otherwise, ethernet connection won't work.
  • If you want to share whole drive, just right click on the drive you want to share and select share with "Advanced Sharing Options" and check the box beside share this folder option and click "OK" to apply changes.
Applications
  • RJ45 are mainly used in ethernet cables for data transmission. They come in two types i.e. T-568A and T-568B.
  • As compared to the RJ11 connector, RJ45 comes with more applications including ethernet networking, industrial automation, and telecommunications.
That's all for today. I hope I have given you everything you need to know about RJ45. However, if you are feeling skeptical or have any question, you can approach me in the comment section below. I'd love to help you in any way I can. Feel free to keep us updated with your valuable feedback and suggestions, they help us provide you quality work so you keep coming back for what we have to offer. Thanks for reading the article.

Infrared Sensor Library for Proteus

Hello friends, I hope you all are doing great. In today's tutorial, I am going to share a new Infrared Sensor Library for Proteus. This IR sensor is not available in Proteus and we are sharing this library for the first time. I hope it will help in your Embedded Systems Projects particularly related to robotics and automation. So, if you want to work on this IR Sensor then I would suggest you to first design its simulation and then try your luck with hardware. There are different types of Infrared Sensors & modules available in the market. Some of these modules have transmitter & receiver on separate chips and are mostly get activated when someone interrupts the light. The one we have designed has a transmitter & receiver on a single chip. The IR signal transmits from the IR transmitter and if it has some obstacle in front of it then it bounces back and received by the IR receiver. You should also have a look at this list of New Proteus Libraries for Engineering Students. So, let's have a look at How to use this Infrared Sensor Library for Proteus: Note:
Where To Buy?
No.ComponentsDistributorLink To Buy
1Arduino UnoAmazonBuy Now

Infrared Sensor Library for Proteus

  • First of all, download the Library files of this IR Sensor by clicking the below button:
Infrared Sensor Library for Proteus
  • After downloading this file extract it and you will find three Library files in it, named as:
    • InfraredSensorsTEP.IDX
    • InfraredSensorsTEP.LIB
    • InfraredSensorsTEP.HEX
  • Place all these three files in the Library folder of your Proteus software.
Note:
  • Once you have added the files in the Library folder, then restart your Proteus software.
  • In the components section, make a search for Infrared Sensor, as shown in below figure:
  • Now place this IR Obstacle Sensor in your Proteus and if everything goes fine then you will get something as shown in below figure:
  • As you can see in above figure that we have four pins on our Infrared sensor, which are:
    • Vcc => You need to provide +5V to this pin.
    • GND => It should be grounded.
    • OUT => That's output pin and it will get HIGH when this sensor will find some obstacle in front and will remain LOW in normal condition.
    • TestPin => As Proteus is a simulation software so we can't actually place something in front of this sensor. That's why I have used this TestPin. If this Pin is LOW, then sensor will remain normal and if it's HIGH then sensor will behave as it has something in front of it.
  • Now double click this Infrared Sensor and its Properties Panel will open up.
  • In the Program File section, browse to the file InfraredSensorTEP.HEX which you have already downloaded and placed in the Library folder of Proteus.
  • Here's the screenshot of Properties Panel for this Infrared Sensor:
  • I have encircled the Program File in above figure and you can see I have selected the InfraredSensorsTEP.HEX.
  • So, now let's design a simple circuit and have a look at how to use this Infrared Sensor in Proteus.
  • Here's the screenshot of Infrared Sensor Simulation in Proteus:
  • So, now let's run our Proteus simulation and if everything goes fine then you will get results, as shown in the below figure:
  • I will interface this sensor with different Microcontrollers e.g. Arduino, PIC Microcontroller etc. in my coming tutorial.
  • As you can see in the above figure that when TestPin is LOW then OUT Pin is also LOW means there's no obstacle and when TestPin gets 1 then OUT Pin will go HIGH and that means we have some obstacle.
So, that's all for Infrared Sensor Library for Proteus. I hope it will help you guys in your engineering projects. Let me know if you have any suggestions. Take care & have fun !!! :)

Introduction to Arduino Mega 2560

Hey Fellas! Hope you are doing well. Today, I am going to unlock the details on the Introduction to Arduino Mega 2560. It is a microcontroller board based on Atmega 2560 microcontroller. Arduino Boards have revitalized the automation industry with their easy-to-use platform where everyone with little or no technical background can get started with learning some basic skills to program and run the board.

I have updated articles previously on Arduino Uno, Arduino Nano, and Arduino Pro Mini. All these boards function similarly in one way or the other. There are some basic features like PCB layout design, size, number of analog pins and breadboard friendly nature that make them different from each other. In terms of coding, all these boards are programmed in Arduino IDE software and you don't need to attach extra components or devices to put them in running condition. Everything is already built in the board that makes this device readily available. Just plug and play with the board as per your requirement. Here's the video presentation of Arduino Mega 2560:

All the boards mentioned above work perfectly for a number of Arduino Projects when you require a simple task to be completed with fewer I/O pins and memory. However, when the project goes complex, a board with less memory fails to complete the task. This is where Arduino Mega 2560 comes in handy. This board comes with 54 pins and 16 analog pins with more memory to store the code. Sounds crazy, isn't it? Thanks to technology that keep your covered in every aspect and provides support in any way when it comes to fulfilling your technical needs.

I'll try to cover each and everything related to Arduino Mega 2560, what is this about, the main features, working, technical specifications and everything you need to know. Let's jump right in.

No. Pin Number Pin Description
1 D0 - D53 54 Digital Input / Output Pins.
2 A0 - A15 16 Analog Input / Output Pins.
3 D2 - D13 12 Pulse Width Modulation ( PWM ) Pins.
4 Pin # 0 (RX) , Pin # 1 (TX) Pin # 19 (RX1) , Pin # 18 (TX1) Pin # 17 (RX2) , Pin # 16 (TX2) Pin # 15 (RX3) , Pin # 14 (TX3)  4 Serial Communication Ports (8 Pins).
5 Pin # 50 ( MISO ) Pin # 51 ( MOSI ) Pin # 52 ( SCK ) Pin # 53 ( SS ) SPI Communication Pins.
6 Pin # 20 ( SDA ), Pin # 21 ( SCL ) I2C Communication Pins.
7 Pin # 13 Built-In LED for Testing.
Other Arduino Boards:
You should also have a look at these other Arduino board, you might find them interesting as well. Compare their features and find the most suitable one for your project. Here's the list of other Arduino boards:
Where To Buy?
No.ComponentsDistributorLink To Buy
1Arduino Mega 2560AmazonBuy Now

Introduction to Arduino Mega 2560

  • Arduino Mega 2560 is a Microcontroller board based on Atmega2560. It comes with more memory space and I/O pins as compared to other boards available in the market.
  • There are 54 digital I/O pins and 16 analog pins incorporated on the board that make this device unique and stand out from others.
  • Out of 54 digital I/O, 15 are used for PWM (pulse width modulation).
  • A crystal oscillator of 16MHz frequency is added on the board.
  • This board comes with USB cable port that is used to connect and transfer code from computer to the board.
  • DC power jack is coupled with the board that is used to power the board. Some version of the Arduino board lacks this feature like Arduino Pro Mini doesn't come with DC power jack.
  • ICSP header is a remarkable addition to Arduino Mega which is used for programming the Arduino and uploading the code from the computer.
  • You can download the Arduino Mega 2560 datasheet bu clicking below button:
Download Arduino Mega 2560 Datasheet
  • This board comes with two voltage regulator i.e. 5V and 3.3V which provides the flexibility to regulate the voltage as per requirements as compared to Arduino Pro Mini which comes with only one voltage regulator.
  • There is no much difference between Arduino Uno and Arduino Mega except later comes with more memory space, bigger size and more I/O pins.
  • Arduino software called Arduino IDE is used to program the board which is a common software used for all boards belonged to Arduino family.
  • Availability of Atmega16 on the board makes it different than Arduino Pro Mini which uses USB to serial converter to program the board.
  • There is a reset button and 4 hardware serial port called USART which produces a maximum speed for setting up communication.
  • The following figure shows the specifications of Arduino mega 2560.
  • Arduino Mega is specially designed for the projects requiring complex circuitry and more memory space. Most of the electronic projects can be done pretty well by other boards available in the market which make Arduino Mega uncommon for regular projects. However, there are some projects that are solely done by Arduino Mega like making of 3D printers or controlling more than one motors, because of its ability to store more instructions in the code memory and a number of I/O digital and analog pins.
  • There are three ways to power the board. You can either use a USB cable to power the board and transfer code to the board or you can power it up using Vin of the board or through Power jack or batter.
  • Last two sources to power the board are required once you already built and compile code into the board through USB cable.
  • This board comes with resettable polyfuse that prevents the USB port of your computer from overheating in the presence of high current flowing through the board. Most of the computers come with an ability to protect themselves from such devices, however, the addition of fuse provides an extra layer of protection.
  • It can be used either way i.e. for creating stand-alone projects or in combination with other Arduino boards. Most complex projects can be created using this board.
Let's have a look at Arduino Mega 2560 Pinout:

Arduino Mega 2560 Pinout

  • Following figure shows the pinout of Arduino Mega 2560:
  • Each pin comes with a specific function associated with it. All analog pins can be used as digital I/O pins.
  • Designing of a project using Arduino Mega gives you the flexibility of working with more memory space and processing power that allows you to work with a number of sensors at once. This board is physically larger than other Arduino boards.

Arduino Mega 2560 Pin Description

  • 5V & 3.3V. This pin is used to provide output regulated voltage around 5V. This regulated power supply powers up the controller and other components on the board. It can be obtained from Vin of the board or USB cable or another regulated 5V voltage supply. While another voltage regulation is provided by 3.3V pin. Maximum power it can draw is 50mA.
  • GND. There are 5 ground pins available on the board which makes it useful when more than one ground pins are required for the project.
  • Reset. This pin is used to reset the board. Setting this pin to LOW will reset the board.
  • Vin. It is the input voltage supplied to the board which ranges from 7V to 20V. The voltage provided by the power jack can be accessed through this pin. However, the output voltage through this pin to the board will be automatically set up to 5V.
  • Serial Communication. RXD and TXD are the serial pins used to transmit and receive serial data i.e. Rx represents the transmission of data while Tx used to receive data. There are four combinations of these serial pins are used where Serail 0 contains RX(0) and TX(1), Serial 1 contains TX(18) and RX(19), Serial 2 contains TX(16) and RX(17), and Serial 3 contains TX(14) and RX(15).
  • External Interrupts. Six pins are used for creating external interrupts i.e interrupt 0(0), interrupt 1(3), interrupt 2(21), interrupt 3(20), interrupt 4(19), interrupt 5(18). These pins produce interrupts by a number of ways i.e. providing LOW value, rising or falling edge or changing value to the interrupt pins.
  • LED. This board comes with built-in LED connected to digital pin 13. HIGH value at this pin will turn the LED on and LOW value will turn it off. This gives you the change of nursing your programming skills in real time.
  • AREF. AREF stands for Analog Reference Voltage which is a reference voltage for analog inputs.
  • Analog Pins. There are 16 analog pins incorporated on the board labeled as A0 to A15. It is important to note that all these analog pins can be used as digital I/O pins. Each analog pin comes with 10-bit resolution. These pins can measure from ground to 5V. However, the upper value can be changed using AREF and analogReference() function.
  • I2C. Two pins 20 and 21 support I2C communication where 20 represents SDA (Serial Data Line mainly used for holding the data) and 21 represents SCL(Serial Clock Line mainly used for providing data synchronization between the devices)
  • SPI Communication. SPI stands for Serial Peripheral Interface used for the transmission of data between the controller and other peripherals components. Four pins i.e. 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS) are used for SPI communication.

Arduino Mega 2560 Dimensions

Follwoing figure shows the dimensions of the Arduino Mega 2560:
  • Arduino Mega is comparatively larger than other boards available in the market. It comes 4-inch length and 2.1-inch width. However, USB port and power jack are slightly extended from the given dimensions.

Shield Compatibility with Arduino Mega 2560

  • Arduino Mega is compatible with most of the shields designed for other Arduino boards.
  • Before you intend to use a shield, make sure the operating voltage of the shield is compatible with the board voltage. Most of the shields operate at 3.3V or 5V which is compatible with this board, however, shields with higher operating voltage can damage the board.
  • Also, the header distribution of the shield must resonate with the pin distribution of the board, so you can simply attach the shield with the board and make it in a running condition.

Arduino Mega 2560 Programming

  • Arduino Mega 2560 can be programmed using Arduino Software called IDE which supports C programming.
  • The code you make on the software is called sketch which is burned in the software and then transferred to the board through USB cable.
  • This board comes with a built-in bootloader which rules out the usage of an external burner for burning the code into the board.
  • The bootloader communicates using STK500 protocol.
  • Once you compile and burn the program on the board, you can unplug the USB cable which eventually removes the power from the board. When you intend to incorporate the board into your project, you can power it up using power jack or Vin of the board.
  • Multitasking is another feature where Arduino mega comes handy. However, Arduino IDE Software doesn't support multitasking feature but you can use other operating systems like FreeRTOS and RTX to write C program for this purpose. This gives you the flexibility of using your own custom build program using ISP connector.

Arduino Mega 2560 Applications

Arduino Mega 2560 is an ideal choice for the projects requiring more memory space to used with more number of number pins on the board. Following are the main applications of the Arduino mega boards.
  • Developing 3D printer
  • Controlling and handling more than one motors
  • Interfacing of number of sensors
  • Sensing and detecting temperature
  • Water level detection projects
  • Home automation and security systems
  • Embedded Systems
  • IoT applications
  • Parallel programming and Multitasking
That's all for today. I hope you have found this article useful. However, if you are unsure or have any question you can ask me in the comment section below. I'd love to help you according to best of my expertise. Feel free to keep us updated with your feedback and suggestions, they help us provide you quality work that resonates with your field of work and helps you keep coming back for what we have to offer. Thanks for reading the article.

Introduction to Arduino Pro Mini

Hey Friends! Hope you are doing well. Today, I am going to give you a detailed Introduction to Arduino Pro Mini. It's a microcontroller board developed by Arduino.cc and is based on the Atmega328 microcontroller.

Arduino Pro Mini is quite similar to Arduino UNO in overall functionality however the main difference lies in its size and built-in programmer. Arduino Pro Mini is very small in size & it lacks a built-in programmer & USB Port. Arduino Uno comes with two onboard voltage regulators (i.e. 5V and 3.3V) while Arduino Pro Mini comes with a single voltage regulator.

There are two versions of Arduino Pro Mini available, first one operates at 5V & runs at 16MHz while the second one is of 3.3V runs at 8MHz.

Arduino boards are mainly used for the development of automation, robotics, embedded systems and other electronics projects. These boards were developed with the intention of providing easy hardware and software combination that gives a quick pathway to people with no technical background.

Arduino Pro Mini Key Features
No. Feature Value
1 Microcontroller ATmega328
2 Operating Frequency/Crystal Oscillator 16MHz/8MHz
3 Digital I/O Pins 14
4 Analog Pins 8
5 PWM(Pulse Width Modulation) Pins 6
6 Built-in Programmer Not available.
7 USB Port Not available.
8 Flash Memory 32KB
9 SRAM 2KB
10 EEPROM 1KB
11 Bootloader 0.5KB in Flash Memory.
In today's tutorial, I'll discuss each and everything related to Arduino Pro Mini so you don't need to scrape through the internet and find all information in one place. Let's get started.
Where To Buy?
No.ComponentsDistributorLink To Buy
1Arduino Pro MiniAmazonBuy Now

Introduction to Arduino Pro Mini

  • Arduino Pro Mini is a compact, small-sized & application-type microcontroller board, developed by Arduino.cc and comes with an Atmega328 microcontroller incorporated on the board.
  • This board comes with 14 Digital I/O Pins, out of which 6 pins are used for providing PWM output.
  • Arduino Pro Mini Pinout also consists of 8 Analog Pins.
  • The size of Arduino Pro Mini is 1/6th of the size of Arduino Uno, so it's quite small as compared to Arduino UNO.
  • Depending on operating voltage, Arduino Pro Mini is of two types:
    1. Operating Voltage: 5.0V, Crystal Oscillator: 16MHz, Voltage Regulator: KB33.
    2. Operating Voltage: 3.3V, Crystal Oscillator: 8MHz, Voltage Regulator: KB50.
  • In order to reduce the size, the USB port & built-in programmer are removed from Arduino Pro Mini, so after uploading code you can simply place it in your application(that's why also termed as application-type).
  • Official Arduino Software called Arduino IDE (Integrated development environment) is used to write & upload programming code. The code we write to program this board is normally called a sketch.
  • Arduino Pro Mini also has a Reset Button and a small LED connected to pin number 13.

Arduino Pro Mini Memory Allocations

  • Arduino Pro Mini comes with 3 types of built-in memories:
    1. Flash Memory of 32KB out of which 0.5KB is used by the bootloader code.
    2. SRAM of 2KB.
    3. EEPROM of 1KB.
Now let me give you a brief overview of these memories, I have explained them in detail here: What is a Microcontroller?
  • Flash Memory is a non-volatile memory and is used for storing the programming code. As it's a non-volatile memory so it stores information even if the connection with the power supply is lost.
  • SRAM(Static Random Access Memory) usually referred to as RAM memory is a volatile memory and is used to store temporary data i.e. variables. It loses data if we cut off the power supply.
  • EEPROM is a semi-volatile memory and thus can be erased by programming.

Arduino Pro Mini Specifications

Here, I have shared a few more specifications and functionalities of Arduino Pro Mini.
  • This board doesn't come with connectors already soldered which gives you the flexibility to solder the connectors in any way you want, based on the requirements and space available for your project.
  • There is only one voltage regulator incorporated on the board i.e 3.3V or 5V based on the version of the board.
  • The labeling on the voltage regulator defines the version of the board i.e. KB33 represents 3.3V edition and KB50 represents 5V edition. However, the board version can also be indicated by measuring the voltage between Vcc and GND pin.
  • Overcurrent protection is another feature available in Arduino Pro Mini.
  • The following figure shows the specifications of the board.

Arduino Pro Mini Datasheet

  • You can download Arduino Pro Mini Datasheet by clicking the below button:
Download Arduino Pro Mini Datasheet Now let's have a look at the Pinout of Arduino Pro Mini in detail:

Arduino Pro Mini Pinout

  • As we know, each pin of the Microcontroller is assigned with multiple functions.
  • In the below table, I have shared the key points of the Arduino Pro Mini pin diagram and labeled functions assigned to them:
Arduino Pro Mini Pinout
No. Pin Number Pin Description
1 Pins 0 - 13 14 Digital I/O Pins.
2 Pins A0 - A7 8 Analog Pins.
3 Pins 3, 5, 6, 9, 10 & 11 6 Pulse Width Modulation ( PWM ) Pins.
4 Pins 0(RX) & 1(TX) Serial Communication Pins.
5 Pins 10, 11, 12 & 13 SPI Communication Pins.
6 Pins A4 & A5 I2C Communication Pins.
7 Pin # 13 Built-In LED for Testing.
8 Pins 4 & 5 External Interrupt Pins.
  • Here's the Circuit Diagram of Arduino Pro Mini Pinout:

Arduino Pro Mini Power Pins

  • Vcc: Arduino Pro Mini Pinout consists of 2 Vcc Pins. It gives the regulated voltage i.e. 5V or 3.3V depending on the type of the board.
  • GND: There are 3 GND(ground) pins incorporated on the board.
  • RAW. This pin is used for supplying raw voltage to the board. You can power connect an external power supply ranging from 5V to 12 V.
  • Reset: Pro Mini board comes with 2 Reset Pins, which comes in handy if the board hangs up in the middle of the running program, making this pin LOW will reset the board.
  • In the below figure, I have highlighted the Power Pinout of Arduino Pro Mini:

Programming Header Pins

  • Programming Header: FTDI six-pin programmer is connected with these pins and is used to upload programming code on the Pro Mini board.

Arduino Pro Mini I/O Pins

  • Digital Pins: Arduino Pro Mini has 14 Digital I/O Pins in total labeled from 0 to 13, where Pin 0 is RX1 and Pin 1 is TX0.
  • Analog Pins: It has 8 analog pins labeled from A0 to A7. These pins are used to input analog signals and come with a total resolution of 10bit.
I have encircled digital pins with green color and analog pins with orange color in the below figure:

Arduino Pro Mini Communication Pins

  • Arduino Pro Mini supports 3 Communication Protocols for the transmission of data with other peripherals i.e. sensors, registers etc. and are named as:
    1. Serial Protocol.
    2. I2C Protocol.
    3. SPI(Serial Peripheral Interface) Protocol.
  • TXD & RXD Pins: These pins are used for serial communication. TXD represents the transmission of serial data while RXD is used for receiving the data. Code is also uploaded through Serial Protocol.
  • SPI Pins: Four pins 10(SS), 11(MOSI), 12(MISO), and 13(SCK) are used for communicating through SPI Protocol.
  • I2C Pins: Two Pins(A4 and A5) are used for developing I2C communication. A4 is known as serial data line (SDA) which holds the data and A5 shows serial clock line (SCL) which provides data synchronization clock.

Other Pinouts

  • PWM. There are 6 digital pins labeled as 3,5,6,9,10, and 11 available on the board that provide PWM (pulse width modulation).
  • External Interrupts. There are two external interrupts available called T0(at Pin 4) and T1(at Pin 5). They are also known as hardware interrupts.

Arduino Pro Mini Vs Other Arduino Boards

  • Most of the Arduino boards come with a USB port that is used to send the program from the computer to the board. However, in the case of Arduino Pro Mini, all of the USB circuitry is removed to make it as compact and small as possible. You can program the board using a USB to serial converter cable. The FT232RL USB serial module is very handy and preferable for programming this board. A six-pin FTDI header can be connected to a USB to serial converter that provides the USB power.
  • If you have already worked on the Arduino Uno board, then no need to buy a USB to serial converter cable as you can program the Pro Mini using Uno board. Make sure, the Pro Mini version you are working on comes with 5V regulation as it runs at 16MHz like Arduino Uno board. Programming your 3.3V Pro Mini board will not be compatible with the Arduino Uno board, hence making it very difficult to program the 3.3V version of the Pro Mini board.
  • The form factor is another major difference that makes this device unique.
  • Pro Mini comes in a very small and compact size which makes this device suitable for most applications. But small size comes with one limitation i.e. it doesn't compatible with Arduino Shields unless you hard-wire the board with Arduino Shield.

Arduino Pro Mini Set Up

  • First, you need to install the Arduino IDE software on your computer, which is the official software used to program Arduino boards.
  • Connect the board with USB to Serial converter (FTDI serial module) that is used to transfer the program from computer to the board.
  • Write the program in the IDE software in C language.
  • No separate burner is required to burn the code. You can directly burn the code in the IDE software and transfer it to the board.
  • Once you have burned and transferred the program to the board, the next step is to power the board to make it compatible with your project.
  • Apart from using FTDI serial module, there are two ways to power the board. You can power the board through the RAW by setting the voltage range anywhere between 5V to 12V. It will automatically regulate to 3.3V based on the version of the board. However, if your project comes with a regulated voltage of 3.3V, then you can connect it directly to the Vcc pin of the board. Make sure, the board version is KB33 that runs at 3.3V, another version KB50 will run at 5V.
  • These two ways of powering up the board are useful when you have disconnected the board with the computer and already burned the program using FTDI module.

Applications of Arduino Pro Mini

There are many applications of Arduino Boards, but the small size and ease of use make Arduino Pro Mini stand out from others, especially where space requirement of the project is highly concerned. That's all for today. We always strive to give you quality work based on your needs and requirements. However, if you are unsure or have any question, you can approach me in the comment section below. I'd love to help you according to best of my knowledge. Keep your suggestions coming; they help us provide you best content so you keep coming back for what we have to offer. Thanks for reading the article.

Introduction to Arduino Uno

Hi Friends! Hope you are doing great. Today, I am going to give you a detailed Introduction to Arduino Uno. It is a microcontroller board developed by Arduino.cc and is based on Atmega328 Microcontroller. The first Arduino project was started in Interaction Design Institute Ivrea in 2003 by David Cuartielles and Massimo Banzi with the intention of providing a cheap and flexible way for students and professionals to learn embedded programming.

Arduino UNO is a very valuable addition in electronics that consists of a USB interface, 14 digital I/O pins(of which 6 Pins are used for PWM), 6 analog pins and an Atmega328 microcontroller. It also supports 3 communication protocols named Serial, I2C and SPI protocol. You should also have a look at this video presentation on Arduino UNO:

  • Few main features of Arduino UNO are shown in the below figure:
Arduino UNO Features and Technical Specs
No. Parameter Name Parameter Value
1 Microcontroller Atmega328
2 Crystal Oscillator 16MHz
3 Operating Voltage 5V
4 Input Voltage 5-12V
5 Digital I/O Pins 14 (D0 to D13)
6 Analog I/O Pins 6 (A0 to A5)
7 PWM Pins 6 (Pin # 3, 5, 6, 9, 10 and 11)
8 Power Pins 5V, 3.3V, Vin, GND
9 Communication UART(1), SPI(1), I2C(1)
10 Flash Memory 32 KB (0.5KB is used by bootloader)
11 SRAM 2 KB
12 EEPROM 1 KB
13 ICSP Header Yes
14 Power sources DC Power Jack & USB Port

I'll try to cover each and everything related to Arduino Uno, so you get a clear idea of what it does, its main features, working and everything you need to know. Let's get started.

Where To Buy?
No.ComponentsDistributorLink To Buy
1Arduino UnoAmazonBuy Now

Introduction to Arduino Uno

  • Arduino Uno is a microcontroller board, developed by Arduino.cc, based on the Atmega328 microcontroller and is marked as the first Arduino board developed(UNO means "one" in Italian).
  • The software used for writing, compiling & uploading code to Arduino boards is called Arduino IDE (Integrated Development Environment), which is free to download from Arduino Official Site.
  • It has an operating voltage of 5V while the input voltage may vary from 7V to 12V.
  • Arduino UNO has a maximum current rating of 40mA, so the load shouldn't exceed this current rating or you may harm the board.
  • It comes with a crystal oscillator of 16MHz, which is its operating frequency.
  • Arduino Uno Pinout consists of 14 digital pins starting from D0 to D13.
  • It also has 6 analog pins starting from A0 to A5.
  • It also has 1 Reset Pin, which is used to reset the board programmatically. In order to reset the board, we need to make this pin LOW.
  • It also has 6 Power Pins, which provide different voltage levels.
  • Out of 14  digital pins, 6 pins are used for generating PWM pulses of 8-Bit resolution. PWM pins in Arduino UNO are D3, D5, D6, D9, D10 and D11.
  • Arduino UNO comes with 3 types of memories associated with it, named:
    • Flash Memory: 32KB
    • SRAM: 2KB
    • EEPROM: 1KB
  • Arduino UNO supports 3 types of communication protocols, used for interfacing with third-party peripherals, named:
    • Serial Protocol
    • I2C Protocol
    • SPI Protocol
  • You can download the Arduino UNO datasheet by clicking the below button:
Download Arduino UNO Datasheet
  • Apart from USB, a battery or AC to DC adopter can also be used to power the board.

Features of Arduino Uno Board

  • Arduino Uno comes with a USB interface i.e. USB port is added on the board to develop serial communication with the computer.
  • Atmega328 microcontroller is placed on the board that comes with a number of features like timers, counters, interrupts, PWM, CPU, I/O pins and based on a 16MHz clock that helps in producing more frequency and number of instructions per cycle.
  • It is an open-source platform where anyone can modify and optimize the board based on the number of instructions and tasks they want to achieve.
  • This board comes with a built-in regulation feature that keeps the voltage under control when the device is connected to the external device.
  • A reset pin is present in the board that resets the whole board and takes the running program in the initial stage. This pin is useful when the board hangs up in the middle of the running program; pushing this pin will clear everything up in the program and starts the program right from the beginning.
  • There are 14 I/O digital and 6 analog pins incorporated in the board that allows the external connection with any circuit with the board. These pins provide flexibility and ease of use to the external devices that can be connected through these pins. There is no hard and fast interface required to connect the devices to the board. Simply plug the external device into the pins of the board that are laid out on the board in the form of the header.
  • The 6 analog pins are marked as A0 to A5 and come with a resolution of 10bits. These pins measure from 0 to 5V, however, they can be configured to the high range using analogReference() function and AREF pin.
  • Only 5 V is required to turn the board on, which can be achieved directly using a USB port or external adopter, however, it can support an external power source up to 12 V which can be regulated and limit to 5 V or 3.3 V based on the requirement of the project.

Arduino Uno Pinout

Arduino Uno is based on an AVR microcontroller called Atmega328. This controller comes with 2KB SRAM, 32KB of flash memory, 1KB of EEPROM. Arduino Board comes with 14 digital pins and 6 analog pins. ON-chip ADC is used to sample these pins. A 16 MHz frequency crystal oscillator is equipped on the board. The following figure shows the pinout of the Arduino Uno Board.

Arduino UNO Pin Description

There are several I/O digital and analog pins placed on the board which operates at 5V. These pins come with standard operating ratings ranging between 20mA to 40mA. Internal pull-up resistors are used in the board that limits the current exceeding the given operating conditions. However, too much increase in current makes these resisters useless and damages the device.
  • LED. Arduino Uno comes with a built-in LED which is connected through pin 13. Providing HIGH value to the pin will turn it ON and LOW will turn it OFF.
  • Vin. It is the input voltage provided to the Arduino Board. It is different than 5 V supplied through a USB port. This pin is used to supply voltage. If a voltage is provided through a power jack, it can be accessed through this pin.
  • 5V. This board comes with the ability to provide voltage regulation. 5V pin is used to provide output regulated voltage. The board is powered up using three ways i.e. USB, Vin pin of the board or DC power jack.
  • USB supports voltage around 5V while Vin and Power Jack support a voltage ranges between 7V to 20V. It is recommended to operate the board on 5V. It is important to note that, if a voltage is supplied through 5V or 3.3V pins, they result in bypassing the voltage regulator that can damage the board if the voltage surpasses its limit.
  • GND. These are ground pins. More than one ground pins are provided on the board which can be used as per requirement.
  • Reset. This pin is incorporated on the board which resets the program running on the board. Instead of physical reset on the board, IDE comes with a feature of resetting the board through programming.
  • IOREF. This pin is very useful for providing voltage reference to the board. A shield is used to read the voltage across this pin which then selects the proper power source.
  • PWM. PWM is provided by 3,5,6,9,10, 11pins. These pins are configured to provided 8-bit output PWM.
  • SPI. It is known as Serial Peripheral Interface. Four pins 10(SS), 11(MOSI), 12(MISO), 13(SCK) provide SPI communication with the help of the SPI library.
  • AREF. It is called Analog Reference. This pin is used for providing a reference voltage to the analog inputs.
  • TWI. It is called Two-wire Interface. TWI communication is accessed through Wire Library. A4 and A5 pins are used for this purpose.
  • Serial Communication. Serial communication is carried out through two pins called Pin 0 (Rx) and Pin 1 (Tx).
  • Rx pin is used to receive data while Tx pin is used to transmit data.
  • External Interrupts. Pin 2 and 3 are used for providing external interrupts. An interrupt is called by providing LOW or changing value.

Communication and Programming

Arduino Uno comes with the ability of interfacing with other Arduino boards, microcontrollers and computers. The Atmega328 placed on the board provides serial communication using pins like Rx and Tx. The Atmega16U2 incorporated on the board provides a pathway for serial communication using USB com drivers. A serial monitor is provided on the IDE software which is used to send or receive text data from the board. If LEDs placed on the Rx and Tx pins will flash, they indicate the transmission of data. Arduino Uno is programmed using Arduino Software which is a cross-platform application called IDE written in Java. The AVR microcontroller Atmega328 laid out on the base comes with built-in bootloader that sets you free from using a separate burner to upload the program on the board.

Applications of Arduino UNO

Arduino Uno comes with a wide range of applications. A larger number of people are using Arduino boards for developing sensors and instruments that are used in scientific research. Following are some main applications of the board.
  • Embedded System
  • Security and Defense System
  • Digital Electronics and Robotics
  • Parking Lot Counter
  • Weighing Machines
  • Traffic Light Count Down Timer
  • Medical Instrument
  • Emergency Light for Railways
  • Home Automation
  • Industrial Automation
There are a lot of other microcontrollers available in the market that are more powerful and cheap as compared to the Arduino board. So, why you prefer Arduino Uno? Actually, Arduino comes with a big community that is developing and sharing knowledge with a wide range of audiences. Quick support is available pertaining to the technical aspects of any electronic project. When you decide Arduino board over other controllers, you don't need to arrange extra peripherals and devices as most of the functions are readily available on the board that makes your project economical in nature and free from a lot of technical expertise. That's all for today. I hope you have got a lot of information regarding the Arduino Uno board. However, if you are unsure or have any questions you can approach me in the comment section below. I'd love to help you according to the best of my knowledge. Keep your feedback and suggestions coming; they help us provide you quality work that resonates with your needs and requirements. Thanks for reading the article.

Introduction to 8051 Microcontroller

Hello Friends! Hope you are doing great. I am back to give you a daily dose of valuable information so you can excel and grow in your relevant field and keep coming back for what we have to offer. Today, I am going to unlock the details on the Introduction to 8051 Microcontroller. This is an 8-bit Microcontroller developed by Intel in the 1980s. It is considered as a small system on an integrated chip that comes with CPU, I/O ports, timers, counters, RAM and ROM. The Microcontroller is a one step forward to a microprocessor. Both Microcontrollers and microprocessor work in a similar way with some exceptions. Microcottler comes with everything required to run an embedded system like CPU, I/O ports and inbuilt peripherals like timers, counters, and interrupts. While processor comes with the processing unit and in order to make it work like a microcontroller, separate peripherals are required to connect with the microprocessor. Other examples of microcontrollers are PIC Microcontroller, Atmel & Arduino etc. The 8051 is the most common used microcontroller nowadays. If you are a newbie and trying to get your hands on very first time with a microcontroller you will be advised to start with 8051. It is the most commonly used Microcontroller in Embedded Systems. Technology is evolving and becoming more advanced day by day. Gone are days, when you required separate systems or chips to perform a specific task. Now, most of the chips and electronic systems are developed with the purpose of performing multiple tasks using a single system that comes with a number of integrated circuits incorporated in it that sets you free from the hassle of spending lot of money on the individual system, making our project highly economical in nature. I'll try to discuss each and everything related to 8051, so you get a clear idea of what it does, its main features, working, applications and everything you need to know. You should also have a look at these 8051 Microcontrollers Projects. So, let's get started with Introduction to 8051 Microcontroller:

Introduction to 8051 Microcontroller

  • The 8051 Microcontroller is a 40-Pin integrated chip that comes with CPU and other peripherals like I/O, timers, counters, RAM and ROM.
  • It is widely used in an embedded system, consumer electronics, automotive systems, robotics and security cameras.
  • The 8051 microcontrollers have made a renowned place in the market in terms of their availability, low cost, and operational flexibility.
  • Before the inception of microcontroller, everything that required automatic action was designed with the processor. That made overall project more costly that would cover more space.
  • The 8051 was developed using Intel 8051 MSC-51 architecture.
 
  • Older versions of 8051 used assembly programming language, however, recent editions can be programmed using more advanced language like C, Python or JavaScript.
  • Microcontrollers have revitalized the robotics and removed the need for extra devices to make them function like an automatic system.
  • Earlier, microcontrollers were produced using N-MOS technology that came with more power consumption and less efficiency. However, recent CMOS technology introduced in the development of the microcontrollers requires less power as compared to its predecessor.
  • 8051 comes in a variety of packages but the most common package is a DIP (dual inline package). However, it is also available in other surface mount packaging like 44 - Lead TQFP (Thin Quad Flat Package) and 44 – Lead PLCC (Plastic Leaded Chip Carrier).

8051 Architecture

Following features of the microcontroller define the overall architecture of the controller.
  • CPU. The central processing unit is considered as the main part of the controller that is capable of performing different tasks based on the instructions given by the user.
  • It is a like a brain of the device that reads instructions from data memory (ROM). However, a user has no direct control over the internal function of CPU except code with a number of instructions embedded into the unit through the compiler.
  • Storage Memory. CPU is used to call and execute the set of instructions. A memory is required to store those number of instruction. There are two sets of memory locations present in the device called ROM and RAM.
  • The ROM comes with 4k bytes memory while RAM comes with 128 bytes. The information stored in the ROM memory is known as code or program memory. This memory is non-volatile where information sustains over a long period of time and doesn't require a constant source of power supply to hold information in it.
  • While RAM memory is volatile in nature and stores information for short period of time and requires a constant source of power supply to retain information in it. As you remove the power supply the RAM memory removes from the memory location.
  • Interrupts. Interrupts are very useful in case of emergency. They are used to put the main program on hold when a specific function is required to perform over the main function.
  • The system switches to the main program after the interrupt is called and executed properly. There are five interrupts present in the architecture of 8051 known as INT0, TF0, INT1, TF1, R1/T1
  • All these interrupts are used to pause the main program. TF0 and TF1 are timer interrupts while INT0 and INT1 are external interrupts. R1/T1 is a serial port interrupt.
  • All external interrupts are low level triggered where flags are cleared when the processor is connected to the interrupt service routine.
  • Serial Port. The 8051 comes with UART (Universal Asynchronous Receiver/Transmitter) which is used for serial communication in 8051. The serial port is duplex i.e. it can transfer or receive data. Serial port comes with three pins called Tx, Rx and ground.
  • Buses. Buses are the valuable addition in the development of the microcontroller that are used for the data transmission. Mainly two buses are used for the communication called Data Bus and Address Bus and are 8 bit and 16 bit respectively.
  • The size of the address bus predicts the amount of memory a system can address. The 16-bit address bus determines it can address memory up to 2 (64k).
  • Address bus comes with four addressing modes called immediate addressing mode, direct addressing modes, register addressing mode, register indirect addressing mode.
  • The Data Bus is used for the transfer of data for a particular application within microprocessor and memory I/O devices. It is bi-directional and used for sending and receiving data.
  • The CPU's circuitry determines the width of the data bus.
  • I/O Ports. Microcontroller comes with four I/O ports called P0, P1, P2, and P3. These ports are used to interface controller with other devices. Each port comes with 8 pins, making it an 8-bit port. Once these ports are reset, they are used as an output port. However, we need to program them in order to use them as an input port.
  • Timers/Counters. 8051 microcontroller comes with two 16 bit timers and counters. Timers are used to count the internal signal of a particular function of the controller while counters are used to count the external signals of the peripherals connected to the controller. These timers are further divided into an 8-bit register.
  • Oscillator. It is added in the controlled for generating clock pulses. It works as a clock source for CPU of the controller. The oscillator works over a certain frequency when a certain voltage is applied.

8051 Basic Circuit

Following figure shows the pin diagram of 8051 microcontroller. As figure shown above, 8051 comes with 40 - Pin Dip that contains 20 pins on each side. It has four ports and 8 pins are associated with each port. Let's describe the function of each port one by one. Port 0. Pin number from 32 to 39 belong to Port0. These pins are bidirectional and come with internal pull-up resistors. Port0 is multiplexed with data and address bus. Port 1. Pin from 1 to 8 falls under Port 1 that is the 8-bit port where each pin is bidirectional. This port comes with internal pull-up resistors. Port 2. Pin from 21 to 28 falls under Port 2. All the port 2 pins are bi-directional like port 1 and are used as I/O pins. Port 2 pins behave like a higher order address/data bus when external memory is accessed. Port 3. Port 3 contains pins from 10 to 17 number. All pins of the port 3 come with special functions. Following are the main functions associated with each pin. RST. Pin 9 represents the reset pin. The controller will be reset by holding RST HIGH for at least two machine cycles. GND and Vcc. Pin 20 represents the ground pin that represents 0V and connected to the negative terminal of the power source, while Pin 40 represents the power source pin that requires 5 V. PSEN. Pin 29 is PSEN (Program Stored Enable Pin) which is used for reading external program memory. ALE. Pin 30 is ALE ( Address Latch Enable) that is mainly used for separation of external address from data. VPP. Pin 31 is external access enable pin used for external program memory. If this pin is set LOW, it can fetch the code from external program memory.

Applications

The 8051 comes with a wide range of applications, but it is mainly used for the embedded system. Following are some applications it is used for.
  • Industrial automation
  • Process control devices
  • Home Applications (Camcorder, Music InstrumentsTVs, VCR, Video Games, Oven)
  • Safety devices and automotive applications
  • Temperature sensing and safety devices
  • Parking indication system
  • Fire detection and defense applications
  • Defense and medical equipment
  • Arduino DC motor speed control
  • GSM based electricity meter billing
  • Voice controlled system
  • Communication Systems (Intercoms, Answering Machines, Mobile Phones, Paging Devices)
  • Aeronautical and Space systems
  • Robotics and Automation
So, that was all for today. I hope you have enjoyed today's tutorial about 8051 Microcontroller. Will meet you guys in the next tutorial. Take care and have fun !!! :)

Smoke Detector with Arduino & MQ2 Sensor

Hello everyone, I hope you all are  doing great. In today's tutorial, we are gonna have a look at How to design a Smoke Detector with Arduino. Its quite a simple project but if you are working on any security project then you must add this feature in it. You should also download this Gas Sensor Library for Proteus, and design its simulation. I will use gas sensor MQ2 for this project. I have purchased MQ2 Gas Sensor module as its quite easy to interface with Arduino. Arduino board I'm using is Arduino UNO. I have also designed an LPG Gas Leak Detect using Arduino using this MQ2 Sensor. So, let's get started with How to design Smoke Detector with Arduino & MQ2 Sensor.

Smoke Detector with Arduino & MQ2 Sensor

  • First of all, we need to connect some jumper wires between Arduino and MQ2 smoke sensor shield.
  • Here's the image of our Gas sensor and you can see, it has four pins in total.
  • This gas sensor has four pins in total, which are:
    • Vcc: We need to provide +5V.
    • GND: We need to ground it.
    • D0: Digital Output.
    • A0: Analog Output.
  • So now you will need four male to female jumper wires and connect them as shown in below figure:
  • Sensor's pins are labelled on the back side and I have connected these four pins as follows:
    • White Wire: Vcc of Sensor connected with +5V of Arduino.
    • Black Wire: GND of Sensor connected with GND of Arduino.
    • Grey Wire: D0 of Sensor connected with Pin # 8 of Arduino.
    • Orange Wire: A0 of Sensor connected with A0 of Arduino.
  • So, now let's design our code in Arduino software in which we will detect whether there's smoke around or not.
  • I'm gonna use the analog output of our sensor and will first display the analog value in my Serial Monitor.
  • I have used the below code, so copy it and upload in your Arduino board:
int Input = A0;
int SensorVal = 0;

void setup() {
  Serial.begin(9600);
  pinMode(Input, INPUT);
  Serial.println("Interfacing of Smoke Sensor with Arduino");
  Serial. println("Design by www.TheEngineeringProjects.com");
  Serial.println();
}

void loop() {

  SensorVal = analogRead(Input);
  Serial.println(SensorVal);
  delay(500);
}
  • Now open the Serial Monitor of Arduino to check the analog values coming from our sensor.
  • If everything goes fine then you will get something like this in your Serial Monitor:
  • You can see we are getting the values in range of 420 to 450.
  • You should read How to do Arduino Serial Communication, if you don't know how to get data serially.
  • Now let's place a burning cigarette near it for smoke. (Cigarettes are injurious to health :P )
  • When the sensor will sense smoke in its surroundings then its value will start to increase and in my case it reached to around 650.
  • So, let's place a check in our Arduino coding to detect whether there's smoke or not.
  • So add below code in your Arduino software and upload it to your Arduino board.
int Input = A0;
int SensorVal = 0;

int Check = 0;

void setup() {
  Serial.begin(9600);
  pinMode(Input, INPUT);
  Serial.println("Interfacing of Smoke Sensor with Arduino");
  Serial. println("Design by www.TheEngineeringProjects.com");
  Serial.println();
}

void loop() {

  SensorVal = analogRead(Input);
  if((SensorVal > 500) && (Check == 1))
  {
    Serial.println("Smoke Detected . . .");
    Check = 0;
  }

  if((SensorVal < 500) && (Check == 0))
  {
    Serial.println("All Clear . . .");
    Check = 1;
  }
  //Serial.println(SensorVal);
  delay(500);
}
  • After uploading the code to Arduino, open your Serial Monitor.
  • If everything goes fine then you will get something as shown in below figure:
  • Now let me bring the cigarette close to get some smoke. (Cigarettes are injurious to health :P )
  • You will get the warning as soon as it will detect smoke as shown in below figure:
  • We got the detection of smoke in our Serial Terminal.
So, that's how we can easily design a Smoke Detector with Arduino & MQ2 Sensor. I think now you can quite easily design this smoke detector project at home. I hope you will enjoy it. Will meet you guys in next tutorial. Till then take care and have fun !!! :)

Introduction to Transistor

Hi Guys! Hope you are doing fine. Today, I am going to give you a detailed Introduction to Transistor. A transistor is a semiconductor device that comes with three terminals, where a small current at one terminal is used to control current at the other terminals. Transistors are mainly used for the amplification of electronic signals. Transistors were first invented by American Physicists John Bardeen in 1947. Before the inception of transistors, vacuum tubes were used to control the electronic signals. These vacuum tubes come with anode & cathode arrangement and the potential difference across these ends produces the electric current. In the later versions, a filament is added which is used to provide heat to the cathode that directs the electrons towards the anode side. Their complex design, more power consumption set a pathway for the development of the transistors that play an important role in the creation of modern electronic devices. Before you get ahold of the transistor, I'd highly suggest you read the article on which is the building block of the transistor.

What is Diode?

Before going into the details of the transistor, let's first recall some points from the previous lecture Introduction to Diode:
  • A diode is a semiconductor device, that is developed when two types of semiconductor materials(i.e. N-Type and P-Type) are joined together.
  • In the construction of the diode, the PN junction is formed by the combination of P-type & N-type material.
  • Electrons(-ve charge) are major charge carriers in the N-Type material and Holes(+ve charge) are major charge carriers in the P-Type material.
Transistors are formed when an extra layer is added to this PN junction. Transistors come in various types including BJTs, JFETs, MOSFET. BJTs are the bipolar junction transistors which use two charge carriers i.e. electrons and holes for electrical conduction. And BJTs are the current controlled devices where small current at one terminal is used to control large current at other terminals. While JFETs are the unipolar devices where conduction is carried out by the movement of only one charge carrier. Let's dive in and explore what is the main function of a transistor and how it is used for the development of many electronic circuits.

Introduction to Transistor

  • A transistor is a three-terminal electronic device where small current at one terminal is used to control large current at other terminals. Transistors are mainly used for the amplification of the electronic signals.
  • Transistor comes with three terminals called emitter, base, and collector which are used for the external connection with electronic circuits.
  • Transistors were created with the intention of providing cheap electronics. They are available individually, however, most of the time they are packed together in integrated circuits which are then used for the developments of processors, computer memory chips, and complex ICs.
  • A transistor is a combination of two words i.e. transfer and varistor where each layer comes with an ability to transfer current to other layers when a proper biasing voltage is applied across one of the layers.
  • Transistor comes with three layers and two PN junctions where an emitter-base junction is forward biased and the collector-base junction is reverse biased.
  • Most of the transistors are created using silicon and germanium that are less expensive to vacuum tube and require less power to operate.
  • Based on the mobility of major charge carriers, transistors are divided into two types NPN and PNP transistors. Both are different in terms of electrical behaviors and physical construction.
  • The NPN transistors comes with three layers i.e. two N-doped layers and one P-doped layer. The P-doped layer is sandwiched between two N-doped layers. In NPN transistors, conduction is carried out by both charge carriers i.e. electrons and holes, however, electrons are major charge carriers in NPN transistors.
  • Similarly, PNP transistors comes with three layers i.e. two P-doped layers and one N-doped layer. The N-doped layer exists between two P-doped layers. Actually, N-doped layer is responsible for triggering transistor action. When a proper bias voltage is applied at the P-doped layer, it draws current which is then used to control large current at other terminals.
  • Transistors that come in NPN and PNP configurations are nothing but the combinations of two diodes joined back to back.
  • In NPN transistor current flows from collector to emitter, while in PNP transistor current flows from emitter to collector.
  • The current directions and voltage polarities are always opposite in both transistors. Suppose, if a current is flowing in a clockwise direction in NPN transistor and comes with positive polarity at the base terminal, it will flow in an anticlockwise direction in PNP transistor where voltage polarity becomes negative.
  • PN junction formed between two semiconductor material is a building block of the transistor. When PN junction is formed, major charge carriers in N-region (electrons) cross the junction and reach the P-region where they recombine with holes. Similarly, major charge carriers in P-region (holes) cross the junction and reach the N-region where they recombine with electrons.
  • The diffusion of electrons and holes depends on the biasing voltage applied across the junction.
  • The voltage is said to have forward biased when P-region is connected with positive terminal of the battery and N-region is connected with the negative terminal of the battery.
  • Under the forward biased condition, holes and electrons can easily cross the junction and maintain a current across the junction. When this diffusion occurs, it will generate the region across the junction which is depleted with major charge carriers. This region is known as depletion region.
  • As long as the forward biased voltage is applied, current flows across the junction. Diffusion of holes and electrons create an electric field within the junction. This electric field resists the further diffusion of charge carriers.
  • As said earlier, transistor comes with two PN junctions where one junction is forward biased and other junction is reverse biased.

Modes of Transistor

Transistor comes with different modes of operation. Let's discuss them one by one.
Active Mode
  • Active mode is used for amplification of the electronic signal where small current at the base terminal is being amplified at the collector terminal.
  • The base terminal is responsible for the transistor action which controls the number of main charge carriers (electrons in case of NPN transistor and holes in case of PNP transistor) flowing through it and draws a small current when a proper bias voltage is applied.
Cut-Off Mode
  • In this mode, transistor works as an open switch and no current flows across the terminals where a base voltage is less than a voltage at other terminals.
Saturation Mode
  • This mode is considered as an ON switch where current flows freely from collector to emitter.
  • In this condition, the voltage difference between collector and emitter is zero, and the collector current is restricted by a supply voltage and load resistance.
  • In saturation mode, both junctions are forward biased and base voltage is greater than the voltage at other terminals.
Reverse Active Mode
  • This mode acts as an active mode with one exception i.e. current direction is reversed.
  • Current flows from emitter to collector which is proportional to the base current.
  • The base current is highly influenced by the bias voltage applied at the terminal which then controls large current at other terminals.
  • The voltage at the terminals is related in the following way.

Current Gain

Current gain plays an important role in the function of the transistor. Following are two common current gains in a transistor.
Common-Emitter Current Gain
  • Common-Emitter current gain is a ratio between collector current and base current.
  • This is also known as an amplification factor which defines the amount of current being amplified.
  • It is called beta and denoted by ß. The beta value ranges from 20 to 1000, however, most of the time its value is taken as 50.
Common-Base Current Gain
  • Another current gain is common-base current gain which is a ratio between collector current and emitter current.
  • It is called alpha and denoted by a. The alpha value is taken as unity.
Applications of Transistor
  • Transistors are mainly used for the amplification of low and high-frequency AC signals.
  • No current is produced at the collector terminal unless there is a current at the base terminal. This process allows the transistor to work as a switch. The transistor can be turned ON and OFF by controlling the bias voltage at the base terminal.
  • Based on requirements, a transistor can be made to operate in cut-off or saturation region for switching applications.
  • Integrated circuits added in the development of the processors are made from transistors.
  • Used in the development of logarithmic converters and logic gates.
  • Transistors are widely used in modern electronics especially where signal processing and radio transmission is required.
That's all for today. I hope you have found this article useful. We always keep your demands on the top and develop a content that truly resonates with your field of interest. If you are unsure or have any question, you can ask me in the comment section below. I'd love to help you in any way I can. Thanks for reading the article.

What is PN Junction? Forward-Biased | Reverse-Biased

Hey Guys! I hope you all are doing great. In the previous tutorial, we studied the basics of Semiconductors, where we briefly discussed the PN Junction. Today, we are going to have a detailed overview of PN Junction.

But before getting into the details of PN Junction, we need to first recall a few concepts from the previous lecture:

Semiconductor Basics

As we know, the conductive power of a semiconductor material lies between a conductor and an insulator. So, it can act as a pure conductor as well as a pure insulator, depending on the applied conditions.

Semiconductors are divided into two types:

  • Intrinsic Semiconductor.
  • Extrinsic Semiconductor.

Intrinsic Semiconductor

  • A semiconductor in its pure form is called an Intrinsic semiconductor.
  • In this state, the outermost valance shell of the semiconductor has an equal number of electrons and holes(which is 4).
  • These four valance electrons in the outermost shell of an Intrinsic semiconductor remain bound to their positions and thus no conduction is allowed.
  • So, an Intrinsic Semiconductor acts as a pure insulator.
  • The elemental Silicon(Si) or Germanium(Ge) in its pure form is an intrinsic semiconductor.

Extrinsic Semiconductor

  • In order to increase the conductive power of semiconductors, small amounts of impurities(in the ratio of 1 to 106) are added to them, by a method called Doping.
  • Such doped/impure semiconductors are called Extrinsic Semiconductors.
  • Impurities added in the semiconductors are of two types i.e.
    • Pentavalent (Arsenic, Antimony, Phosphorous etc.).
    • Trivalent (Aluminium, Boron, Indium, Gallium etc.)
  • If the semiconductor is doped with a Pentavalent impurity, it's called N-Type Semiconductor.
  • If the doping element used is trivalent, the extrinsic semiconductor produced will be called P-Type Semiconductor.

So, now we need to understand the formation of N-Type and P-type semiconductors, because PN Junction is formed by joining these two types.

N-Type Semiconductors

  • Pure semiconductors normally belong to the 4th column of the periodic table and thus have an equal number of electrons & holes in their valance shell(which is 4).
  • So, in pure form, there's no free electron or hole available for the conduction of electricity and thus it acts as an insulator. (We discussed conduction energy levels in detail in our last lecture)
  • The pentavalent elements belong to the 5th column of the periodic table and have 5 electrons in their outermost shell.
  • So, when a pure semiconductor i.e. Silicon(Si) is doped with a pentavalent impurity i.e. Boron(B), the four valance electrons of the Boron(B) will create a covalent bond with the closest Silicon(Si) atoms, but the 5th electron won't find a pair and will become a free electron.
  • This free electron increases the conductive ability of the semiconductor.
  • As an electron carries a negative charge, such extrinsic semiconductors are called Negative-Type Semiconductors or N-Type Semiconductors.
  • In N-Type Semiconductors, the majority charge carriers are free electrons(negative), while the holes(positive) are present in very small numbers(called minority charge carriers).

Now let's have a look at the formation of P-Type Semiconductors:

P-Type Semiconductors

  • When a semiconductor is doped with a trivalent impurity i.e. Aluminium(Al), the extrinsic semiconductor produced is called P-Type Semiconductor and has positively charged holes as majority charge carriers.
  • Trivalent elements belong to the 3rd column of the periodic table and have 3 electrons in their outermost shell(valence shell).
  • So, if we dope Silicon(Si) with Aluminium(Al), the 3 valence electrons of the impurity element(Al) will create a covalent bond with the neighboring Silicon(Si) atoms.
  • The 4th valence electron of Si won't find a pair and thus a positively charged Hole will be originated. A Hole is a vacant space, has a positive charge and is ready to accommodate an electron(if available).
  • This Hole generated in the Si crystal will increase its conductivity and such doped semiconductor will be called Postive-Type Semiconductor or P-Type Semiconductor.

So far, we have created N-Type and P-Type Semiconductors by adding pentavalent and trivalent impurities respectively in separate semiconductor crystals. Now, we are going to add both impurities in a single semiconductor crystal to create a PN Junction. So let's get started:

What is PN Junction?

  • When a single crystal of semiconductor is doped with both pentavalent(i.e. Boron) and trivalent(i.e. Aluminium) impurities, a special barrier is created at the boundary of the two regions(N-Type & P-Type) which stops the flow of charge carriers. This barrier is called PN Junction.
  • The most basic semiconductor component called Diode is a real-life application of the PN Junction.

Now let's have a look at the formation of this PN Junction:

PN Junction Formation

  • As we know, electrons are the majority charge carriers in N-Type Semiconductors and Holes are the majority charge carriers in P-Type Semiconductors.
  • Now, when we dope a single Si crystal with both impurities, an N-Typer region is created on one side and a P-Type region is created on the other side of the crystal.
  • Electrons(in the N-Type region) present near the boundary get excited and diffuse into the P-Type region. Similarly, the Holes(in the P-Type region) close to the boundary move towards the N-Type region.
  • This generates a potential difference at the boundary of the two regions, which gradually increases and at one point, restricts the further flow of electrons or holes in the neighboring region. (electron-hole diffusion stops)
  • This region at the boundary with electrons in the P-Type region and Holes in the N-Type region is called the depletion region.
  • The width of this depletion region depends on the amount of impurity added to the semiconductor.
  • This Junction/boundary of the P-Type and N-Type regions is called the PN Junction.
  • Under normal conduction, when there is no voltage applied across the PN junction, the junction is said to be in an equilibrium state. The potential difference at the junction in that state is called built-in potential which is 0.7 V for Silicon(Si) and 0.3 V for Germanium(Ge).
  • When an external voltage is applied at the PN Junction, we get two behaviors of PN Junction depending on the external voltage polarity, named:
    1. Forward-Biased.
    2. Reverse-Biased.

Let's discuss these diode states, one by one:

Forward-Biased PN Junction

  • If the positive terminal of the battery is connected to the P-region and the negative terminal to the N-region, the PN Junction will be said to be operating in a Forward-Biased State.
  • The external voltage should be greater than the built-in potential i.e. 0.7V for Si and 0.3V, so that it could melt the depletion region.
  • In the Forward-Biased State, the Holes start to move towards the N-region and the electrons start flowing towards the P-region.
  • As a result, the width of the depletion region starts reducing and finally depletes out.
  • The current starts flowing through the semiconductor, as soon as the depletion region gets removed. We can say the semiconductor is acting as a conductor.
  • In this state, the semiconductor has maximum conductivity and quite low resistance.

Reverse-Biased PN Junction

  • If the P-region is connected with the negative terminal of the external source and the N-region with the positive terminal, the PN-Junction will operate in the reverse-biased state.
  • As the P-region is connected to the negative voltage, the holes in the P-region will get attracted towards the external voltage, so start flowing away from the depletion region. The same will be the case with the electrons.
  • So, no current will flow through the PN Junction in a reverse-biased state.

PN Junction as a One-Way Switch

In a normal conductive wire, current can flow in both directions but in a PN Junction, the current will flow only in one direction and will get blocked in the opposite direction. So, we can say that a PN-Junction is a One-Way Switch, allowing the current to flow in one direction only. On the top of my head, it could be used to avoid the back emf generated by the motors. This One-way switch literally bought a revolution in electronics.

Breakdown Region

  • While the PN Junction is operating in the reverse-biased state, if the external voltage exceeds a certain limit, the PN Junction will collapse, resulting in an excessive amount of current flow(short-circuit). This external voltage is called breakdown voltage and the PN Junction is said to be operating in a breakdown region.
  • PN Junction can't recover from the breakdown region so it should be avoided, though it also has a few advantages, which we will cover in the Zener Diode Chapter.
  • The breakdown voltage depends on the semiconductor used and the amount of impurity added.

Characteristic Curve of PN Junction

The following figure shows the I vs V characteristic curve of a silicon diode:

  • As we can see in the above characteristic curve of PN Junction, it has two sections i.e. forward-biased and reverse-biased.
  • In the forward-biased state, if the voltage is lower than the built-in potential(i.e. 0.7 for Si), a small amount of current is flowing through the PN Junction but if the voltage overcomes the built-in potential, the current jumps to its maximum value and we can say the PN Junction is conducting.
  • In the reverse-biased state, there's no current flowing through the PN Junction until the breakdown voltage is reached.
  • At the breakdown voltage, the current starts flowing in the opposite direction and we can say the PN Junction collapsed.
  • The small current flowing under reverse bias normal condition is known as leakage current. Germanium(Ge) has more leakage current as compared to Silicon(Si).

So, that's all for today. I hope you have enjoyed today's lecture. In the next lecture, we will discuss the Basics of Diodes, where I am going to repeat today's lecture :)) But I will keep the practical approach in it, so there will be a lot to learn. If you have any questions, you can approach me in the comment section below. Keep your suggestions and feedback coming, they help us deliver quality content. Thanks for reading the article.

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir