What are DLD Logic Gates? Symbol | Truth Table | Simulation

Hello Mentees! I hope you all are doing well. In today's article, we'll learn about the very basic pillar of Digital Logic Circuits i.e. Logic Gates. As we know, the digital world depends on Boolean digits either 0 or 1. So, there's always a need to perform different operations on these boolean numbers i.e. addition, subtraction, multiplication, shifting etc. In order to perform these operations on the binary signals, we use Digital Logic Gates in DLD circuits.

So, let's have a look at What is a Logic Gate:

What is a Logic Gate?

  • Logic Gates are designed to perform a specified operation(i.e. addition, bit shift etc.) on the input signals and generate the output signal.
  • For example, a simple NOT gate takes a single binary input and returns its inverse in the output, i.e.
    • If Input is 0, the Output will be 1.
    • If Input is 1, the Output will be 0.
  • We can design Logic gates using basic electronic components i.e. resistor, diode, transistor, etc. However, in order to design gates for commercial use, two main manufacturing technologies are used, i.e:
  • TTL(Transistor-Transistor Logic): TTL Logic gates use NPN & PNP Bipolar Junction Transistors in their circuitry i.e. 7400 series.
  • CMOS(Complementary Metal Oxide Silicon): CMOS Logic Gates use MOSFET or JFET transistors(i.e. 4000 series)yea ri and are quite popular because of their ultra-quick response.

Symbolic Representation

  • Each Logic gate is assigned a symbol for its representation, which simplifies the designing of their circuit diagrams.
  • The symbolic representation of 4 basic logic gates is as follows:

Truth Table

  • Every logic gate has a truth table(also called a logical table), used to provide the output states for all the possible combinations/conditions of its inputs.
  • It's a convention to write the outputs in the right-side columns and the inputs in the left-side columns.
  • The truth table of NOT Gate(used to inverse input), is shown in the below figure:
Input
Output
0 1
1
0
  • As you can see in the above figure, the table has 2 rows in total giving us all the possible input conditions.
  • The number of rows in a truth table depends on the number of inputs used. The formula is, if we have "n" number of inputs in a logic gate, its truth table will have 2n rows in total. So, if we have 2 inputs, the rows of its truth table will be 22 = 4.

Truth tables are useful in Boolean and mathematical operations as the relationship between the Input and Output can be understood at a glance.

Now let's have a look at the Circuit Designing of Logic Gates:

Logic Gates Circuit Designing

As we discussed earlier, different Manufacturing Techniques are used to design logic gates. These techniques decide the characteristics of the logic gates i.e. response time, noise immunity, voltage level for logic shifting etc. We can use simple electronic components i.e. diode, transistor, resistor etc. to design logic gates. The normal practices for designing logic gates with simple electronic components are:

  • RTL (Resistor-Transistor Logic)
  • DTL ( Diode-Transistor Logic)
  • ECL (Emitter-Coupled Logic)
  • DRL (Diode-Resistor Logic)

Such logic gates are quite simple in designing and normally have quite low response time and may also provide false output because of noise. So, in order to overcome these issues, these two manufacturing techniques are used:

  • TTL(Transistor-Transistor logic)
  • CMOS(Complimentary Metal oxide Semiconductors)

Simple NPN and PNP transistors are used in TTL logic gates and thus have better response time as compared to basic logic gates. In the CMOS technique, MOSFET and FET are used to control the logic and thus provide the best response time and are quite immune to noise. So, among all these manufacturing techniques, CMOS is considered the most popular technique for logic gate designing.

Logic Gates Designing with Basic Components

Here is an example of an AND Gate design with a Diode-Resistor Logic(DRL) and a NAND gate designed with Diode-Transistor Logic (DTL):

As you can see in the above figure, these circuits are quite easy to design, as simply using diodes, resistors, and transistors. But these circuits are not used in commercial ICs because of their high power loss(pull-up resistor) and gate delay(propagation delay). That's why, CMOS and TTL are considered the better option to design digital logic gates.

TTL Logic Gates

In TTL Logic Gates, NPN and PNP transistors are used for designing logic gates. The ideal TTL logic gate is the one that gives the LOW(0) Logic at 0V and HIGH(1) Logic at 5V. In a real TTL Logic Gate, the logic will be considered LOW(0), if the voltage level lies between 0-0.8V and the logic will be considered HIGH(1), if the voltage level is in the range of 2-5V. The voltage level between 0.8-2V is considered a "no man's land" and normally external pull-up or pull-down resistors are used to avoid this region. Examples of TTL Logic Gates ICs are 74Lxx, 74LSxx, 74ALSxx, 74HCxx, 74HCTxx, 74ACTxx etc. The switching voltage varies from group to group according to their internal structure and material used. 

CMOS Logic Gates

In CMOS Logic Gates, FET(Field Effect Transistor) and MOSFET are used to design the logic gates. CMOS logic gates provide a LOW(0) logic, if its voltage is in the range of 0-1.5V and it will give HIGH(1) logic, if it's in the range of 3-18V. The below table shows the voltage levels of both TTL and CMOS logic Gates:

Logic Gates
LOW(0)
HIGH(1)
TTL
0-0.8V
2-5V
CMOS
0-1.5V
3-18V

Now, let's have a look at the Types of Logic Gates:

Types of Logic Gates

  • There are numerous types of Logic gates available based on the quantity of input/output channels and the type of logic to be applied.
  • Based on the specified logic, gates are divided into 3 basic types, i.e.
    1. AND Gate.
    2. OR Gate.
    3. NOT Gate.
  • These 3 basic gates are the building blocks of all advanced logic gates. So, we can design any advance logic gate with these 3 basic logic gates.
  • The most commonly used Advance Logic Gates are:
    1. NAND Gate.
    2. NOR Gate.
    3. XOR Gate.
    4. XNOR Gate.
  • The above-mentioned 7 logic gates are the most commonly used ones. Following logic gates are not that common but are in practice:
    • MIN(Minimum) Logic Gate.
    • MAX(Maximum) Logic Gate.
    • INH(Inhibit) Logic Gate.
    • MAJ(Majority) Logic Gate.
    • IMP(IMPLY) Logic Gate.

It's quite difficult to cover all these gates in a single lecture. So, we will only discuss the basic 7 gates i.e. AND, OR, NOT, NAND, NOR, XOR and XNOR. Today, we will have a brief overview of these 7 logic gates but in the upcoming lectures, we will cover each one of these individually in full detail. Here are the symbols of few logic gates:

So, let's get started:

AND Logic Gate

  • AND Gate is a basic logic gate and gives  HIGH output, when all of its Inputs are HIGH and generates LOW output, if any of its Inputs got LOW.
  • The AND Gate performs the Logical conjunction. We denote it with the DOT between the inputs i.e. A.B = Y where A & B are the inputs and Z is the output.
  • The Inputs in AND Gate is always more than one i.e. Inputs >= 2 and it will always generate a single output.
  • The logical symbol of the AND gate is shown in the below figure:

Truth Table:

  • Here's the truth table of AND gate in tabular form:
A B A.B
0 0 0
0 1 0
1 0 0
1 1 1

As you can see in the truth table of AND Gate, the Output is 1 only when both of its inputs are 1, otherwise, it's 0.

Proteus Simulation of AND Gate

Proteus has an AND Gate component in its components library. We are going to use it to verify the truth table of AND Gate. We will use the following components for designing this AND Gate Simulation:

  1. AND Gate
  2. LED
  3. Logic Toggle
  4. Ground Terminal

Here's the Proteus simulation of all possible states of the AND Gate with 2-inputs:

  • I have placed a Logic State at the inputs of the AND gate and an LED at the output.
  • The LED glows only when both of its Inputs are 1(HIGH).

OR Gate

  • OR gate performs the Disjunction Logic on the inputs i.e. The output will be 1(HIGH), if any of its Inputs is 1(HIGH) and the output will be 0(LOW), if all of its Inputs are 0(LOW).
  • OR Gate is denoted by a plus sign "+" between the inputs i.e. A+B = Y, where A & B are the inputs and Y is the output.
  • Identical to AND Gate, OR Gate also has a minimum of two inputs and only one output.
  • The OR Gate Symbol is shown in the below figure:

Truth Table:

  • Here's the truth table for the OR Gate:
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1

In the case of OR Gate, the output is LOW, only when all of its inputs are LOW, otherwise its HIGH.

Proteus Simulation of OR Gate

  • The simulation is quite the same as that of the AND gate, we simply replace the AND Gate with OR Gate, present in the Proteus components library.
  • The below figure shows that the output LED is OFF, only when both inputs of OR gate are LOW.

NOT Gate

  • In Logic Circuits, the NOT Gate performs the inversion.
  • This is a unary logic Gate that implies it has only one input and a single output.
  • The output of NOT Gate is denoted by a Bar or Complement on the input symbol i.e. If the input is A, the output will be A'.
  • Here's the symbolic representation of NOT Gate:

Truth Table:

  • Here's the truth table of NOT gate, quite simple isn't it?
A B
0 1
1 0
 

Proteus Simulation of NOT Gate

  • Grab the NOT Gate from the Proteus components library.
  • Attach LED and logic toggle at output and input respectively.
  • Here are the results:

So, today we discussed the basic logic gates i.e. AND, OR and NOT Gate and simulated them in Proteus. In upcoming lectures, we'll use these gates to design advance gates and circuits. Take care!!!

JFET Applications | Constant Current Source | Chopper

Hi Pupils, Welcome to another Experiment of Proteus at The Engineering Projects. Previously, we saw what are the Junction Field Effect Transistors. Today we'll learn about some of the applications of Junction Field Effect Transistors.

Just before the Experiment, it is useful to revise that: Transistors are three terminal, unipolar Devices. The terminals of Junction Field Effect Transistor are named as :
  • Drain
  • Source
  • Gate
The Gate Terminal is common to both Source and Drain. Prior to start, let's clear some Concepts about Junction Field Effect Transistor.

Resistor

Resistor is an electrical device. we define the resistors as:
"A Resister is a two terminal Passive electrical device that shows the electrical resistance and is useful in almost every Circuit.
Resistors can be used to reduce or control the flow of current , terminate transition lines and such other functions.

Pinch off voltage

The basic Definition of Pinch off voltage is:

"The voltage applied between the Drain and the source at which the current maximum current flows through the circuit provided the Gate voltage is zero is called the Pinch off voltage."

when the value of voltages is less than the pinch off region, the voltage enters to another region called ohmic region of JFET and the transistor acts as a resistor in this region.

Controlling Voltage

The Controlling Voltage of Junction field effect transistor is defined as: "The controlling Voltage is the voltage of transistors from gate to source.  To set its value, the Voltage from gate to source is made negative and it is referred as Vgs." FET's are widely used in the worlds of electronics because of their size and the performance. We'll apply JFET's in the making of two of circuits:
  1. Constant Current Source.
  2. Chopper.
During the Implementation of the Circuits, we'll use N-type JFET because of the better flow of electron of this kind of JFET. In N-type JFET the majority charge carriers are electrons. I am going to explain it one after the other.

Constant Current Source

A Field Effect Transistor can be use as a constant current Source. That spell out that if JFET's are designed so, they can provide a constant current across the load resistor, no matter how much current is provided at its input. The ability is due to the near horizontal line in the drain characteristics of the JFET. Recall that resistor is a two terminal Device that reduces the current flow, divide voltage or adjust signal lines. But, carefully Controlled JFET can be used to overcome the resistance through the resistor that come in between the JFET and the Voltage source. In the circuit, when the Vgs is greater than the pinch off voltage. mathematically,

V-IR>|V|

Implementation in Proteus ISIS

To make the circuit for Constant current Source, we need the Components as:

Component Required:

  1. Junction Field Effect Transistor
  2. Resistor
  3. Ground Terminal
  4. Direct Current Power Supply
  5. Connecting Wires

Procedure

  • Fire up your Proteus Software.
  • Choose the JFET and Resistor from the Pick library through the "P" button.
  • Take the Ground Terminal from Terminals library from the left most tab.
  • Take DC power source from the "Generator mode".
  • To measure the Current we'll add a DC ammeter from the "Virtual Instrument Mode".
This is the step where the Circuit should be arranged so, to get the required output.
  • Connect the Source with the Drain thorough a wire.
  • Join the Ground Terminal with the wire that connects Source and Gate.
  • Connect the Components on the Working area according to the diagram:
  • Double Click the Battery and give it a value of 9 volts.
  • Double click the voltmeter and change the display Range to milliamps.
  • By the same token, Double tap the resistor and give it the value of 1k ohm.
NOTE: you can also use a variable resistor.
  •  Record the values of the ammeter.
  • At first observations, Change the value of resistor to 1kohm.
  • Pop the play button.
The ammeter shows the value of the 0.40 miliamps.
  • Take seven reading by changing the value of resistor and make a table.
    Resistance Current
    1k ohm 0.40 *10-3
    2k ohm 0.40 *10-3
    3k ohm 0.40 *10-3
    4k ohm 0.40 *10-3
    5k ohm 0.40 *10-3
    6k ohm 0.40 *10-3
    7k ohm 0.40 *10-3
     
The same experiment can be done by varying the value of battery and recording the values.

Chopper

A Chopper is the application of Transistor that show us the output as the square wave. We define the Chopper as: "Chopper is an electronic circuit used to take the amplified Direct current by using some type of transistor or other device." One can use any kind of transistor  e.g Bipolar Junction Transistor tor make the Chopper circuit. But, Junction Field Effect Transistors are better for this purpose due to the field control of the JFETs. In Choppers, the FET act as a variable resistance.   Lets rush towards Proteus to apply the circuit.

Implementation of Choppers in Proteus ISIS

  • Fire up your Proteus ISIS.

Material Required

  1. Junction Field Effect Transistor
  2. Resistor
  3. Alternating current source
  4. Ground
  5. Oscilloscope
  • Pick the Vsine , Resistor and JFET from the Pick library by the mean of "P" button.
  • Take the Oscilloscope form "Virtual Instrument Mode" and fix it just above the Circuit.
  • Connect Channel A just after the AC source and channel B with the Source.
  • Put the Ground terminal below the circuit by choosing it from "Terminal".
  • Change the value of resistance connected to AC as 100ohm.
  • Change the value of resistance connected to Source as 200ohm.
  • Give the frequency to 1000Hz and Amplitude of 12V to Vsine.
  • Join the circuit according to the image given below:
Seems like our circuit is complete now.
  • Press the Play button to simulate the graph.
  • Set the Value of Channel A to 1V.
  • Set the channel B to 20V.
The Output of the circuit is:   This Conversion is important in some Circuits. The output of the Chopper is in the form of square waves. Thus, today we learnt about the JFET along with the applications of JFET as Constant current and Chopper in detail and saw their Implementation in the Proteus.

Prevent Data Loss Risk In Raid-Based Storage

Hi Guys! Hope you’re well today. Happy to see you around. In this post today, I’ll detail how to prevent data loss risk in raid-based storage. RAID (Redundant Array of Independent Disks) is a data storage virtualization technology used for data redundancy and performance improvement in an Operating System. It has redefined how storage systems store and retrieve data, and its architecture comprises multiple physical disk drive components distributed over one or more logical units.

Prevent Data Loss Risk In Raid-Based Storage

RAID levels vary from RAID 0 to RAID 51 (and beyond). Different levels have different types of redundancy offered; however, a compromise has to be made when it comes to fault tolerance and performance. Although different RAID levels provide significant protection mechanisms against data loss due to hardware failure of hard disks, the technology is not invincible. Therefore, it is advisable to safeguard your data from any unexpected loss when using a RAID array. If one of the hard drives in a RAID storage array fails, one should consider replacing it instantly. Not doing so or delaying it for too long can cause unexpected data loss as it is highly likely that the other hard drives will fail soon. This is because the entire batch of hard drives in a RAID array often has the same manufacturing date and service life. The type, manufacturer, and other atmospheric variations play an important role in the service life of the hard drives.

Contact Data Recovery Specialist

Preventing to get into such conditions of severe data loss is something you should never divert your focus from because it can be debilitating. Especially, it is more complicated to recover data when it comes to a complex storage system. If you are not well-versed in the required knowledge, you should not take the risk of opting for the DIY mode for recovering the lost data from your RAID system. At such times, it is recommended to contact a reliable data recovery specialist. Doing so can help rebuild the RAID system, bypass the hard drive failures, and examine if any updates are needed in the residing virtualized architecture. This can make the recovery attempt quite time-consuming but reassuringly successful. But for this, it is necessary to make sure that you are choosing the right service provider with proper experience and expertise to recover data in varied data loss events.  

Maintain a Back-up

Different types of RAID configurations operate on different redundancies to diminish data loss and develop a storage system architecture that can provide data loss prevention. Monitoring and recording a RAID array usage is an essential task to be included in the data recovery strategy for efficient business continuity. In severe conditions, the pre-defined recovery strategies may not be helpful and can cause severe data loss. Hence, it is crucial to maintain a back-up and be prepared for such unfortunate cases of system failure or data loss. In such severe conditions of RAID failure, the entire data can disappear forever. Even if a corrupted hard drive overtakes the RAID array's redundancy and the hard disks fail abruptly, it is possible to rebuild your RAID array and recover your data by getting in touch with an expert data recovery professional. Among a few renowned data recovery service providers, Platinum Data Recovery Services has been a prominent name in offering considerate services like G-RAID data recovery and other types of RAID data recovery services when your data has been disappeared or made inaccessible due to corrupted hard drives, flash drives, memory cards, or RAID. That's all for today. I hope you've enjoyed reading this article. If you have any questions, you can approach me in the section below. I'd love to help you the best way I can. Thank you for reading the article.

Introduction to Arduino MKR NB 1500

Hi Guys! Hope you’re well today. Happy to see you around. In this post today, I’ll walk you through the Introduction to Arduino MKR NB 1500. The Arduino MKR NB 1500 is mainly developed for working in remote areas where no power or internet connection is available. This board is based on a SAMD21 Cortex-M0+ 32bit low power microcontroller and comes with an operating voltage of 3.3V. Admit it. The Arduino board is a remarkable addition to the development of many automation and embedded projects. These boards are incorporated with a series of digital and analog pins that can be connected with the expansion boards or other breadboards. Most of the Arduino boards are integrated with 8-bit Atmel AVR microcontrollers. And all these boards incorporate different flash memory size to store the code. The two-way serial communication is added in the boards and some boards are given with the facility of the USB port that is used for the direct connection with the computer systems and to program and test the boards on the go. Arduino is an open-source platform that means you can edit and modify the hardware and software based on your requirements. The Arduino IDE software is used to program all kinds of Arduino boards. These boards are programmed using C and C++ language. I suggest you read this post all the way through, as I’ll walk you through the Introduction to Arduino MKR NB1500 covering datasheet, pinout, features, programming, pin description, and applications. Let’s jump right in.

Introduction to Arduino MKR NB 1500

  • The Arduino MKR NB 1500 is an Arduino board based on the SAMD21 Cortex-M0+ 32bit microcontroller that is mainly developed for applications in remote areas with no power or internet connection. On-field monitoring systems use these Arduino boards.
  • These are 22 digital I/O pins incorporated on the board. 7 analog and 12 PWM pins are also included in the chip.
  • The Rx and Tx pins are added to the board for the UART serial communication where Rx is used to receive the serial data and Tx is used to transmit the serial data.
  • Moreover, I2C and SPI communication protocols are also included in the device.
  • The power delivered to the board by USB is 5V. Plus, the board also incorporates a Li-Po charging circuit that makes the board run in two ways: either from the external 5V source or from battery power.
  • The clock speed of the oscillator is 32.768 kHz (RTC), 48 MHz which is required for the synchronization of the internal functions.
  • You can also interface the micro-sim with the board, however, micro-sim is not provided with the board. You need to purchase it separately.
  • You can interface breadboard with this board, giving you the ability to actually test and run your project on a breadboard before switching to the PCB design of the electrical circuit.
  • The board’s flash memory is 256KB. And it doesn’t incorporate EEPROM memory while the SRAM memory is 32KB.
  • The Arduino Program (sketch) is stored in the flash memory and SRAM memory is used to generate and manipulate variables when it runs.

Arduino MKR NB 1500 Datasheet

Before you apply this device to your electrical project it’s better to scan through the datasheet of the device that features the main characteristics of the board. You can download the datasheet of Arduino MKR NB 1500 by clicking the link below.

Arduino MKR NB 1500 Pinout

The following figure shows the pinout diagram of Arduino MKR NB 1500. There are three LEDs on the board. One is a built-in LED, and the other power LED and battery charger LED.

Arduino MKR NB 1500 Pin Configuration

Hope you’ve got a brief idea about this board. In this section, we’ll discuss the pin description of the pins incorporated on the board.

Digital I/O Pins

There are total 8 digital I/O pins integrated on the board which you can use as an input or output according to the requirements. They remain either HIGH or LOW. When they are HIGH they receive 5V and when they are LOW they receive 0V.

Analog Pins

There are total 7 analog pins incorporated on the board. As they are analog pins, they can get any number of values in opposed to Digital pins that only get two values i.e. HIGH or LOW

PWM Pins

The board comes with 12 PWM pins on board. When these pins are activated, the board generates analog result with digital means.

SPI Pins

This board incorporates SPI (serial peripheral interface) pins that are mainly employed to develop the communication between the controller and other peripheral devices such as sensors or shift registers. Two pins… MISO (Master Input Slave Output) and MOSI (Master Output Slave Input) are used for SPI communication. These pins are used to receive or send data by the controller.

I2C Pins

I2C is a two-wire communication protocol. That uses two lines i.e. SDA and SCL. The SDA is a serial data line mainly used to carry the data while SCL is a serial clock line mainly used for the synchronization of all data transfer through the I2C bus.

UART Pins

This device supports UART serial communication. Two pins Rx and Tx are used for the transmission and receiving of serial data.

Battery Connector

If you want to power up the board with the battery be sure to find the female 2 pin JST PHR2 Type connector. Polarity:  while you look at the board connector pins… Polarity is Left = Positive and Right = GND Vcc – This pin generates 3.3V using the on-board voltage regulator. 5V – This pin generates 5V when powered from the Vin pin of the board or from the USB connector. Vin – This pin provides power to the board using a regulated 5V source. If you supply power using this pin, the power through the USB port will be disconnected. This way you can power the board not using USB.

Arduino MKR NB 1500 Features

Microcontroller = SAMD21 Cortex®-M0+ 32bit low power ARM MCU Power Supply (USB/Vin) = 5V Operating voltage = 3.3V Digital I/O Pins = 22 Analog Pins = 7 PWM Pins = 12 I2C = 1 SPI = 1 UART = 1 DC current per I/O pin = 7mA EEPROM = no SRAM = 32KB Flash Memory = 256KB Supported Battery = Li-Po Single Cell, 3.7V, 1500mAh Minimum External Interrupts = 10 (0, 1, 4, 5, 6, 7, 8, 9, 16 / A1, 17 / A2) Size = 25 x 67 mm Weight = 32gr

Arduino MKR NB 1500 Programming

  • You can program this board using Arduino IDE (integrated development environment) software. This software is launched by Arduino.cc you can get this software by going to their site.
  • This board comes with a built-in Bootloader where you can burn the internal program, setting free from the hassle of burning and testing the program with the external burner.
  • This tiny device incorporates a USB port through which you can connect this device with the computer and run and test the program directly from the computer.

Arduino MKR NB 1500 Applications

This tiny little beast is used for a range of applications. Following are some major applications of this device.
  • Automatic Pill Dispenser
  • USB Joystick
  • USB Trackpad
  • Creating a wireless keyboard
  • Water Level Meter
  • Electric Bike
That’s all for today. I hope you’ve enjoyed reading this article. If you’re unsure or have any questions, you can pop your comment in the section below. I’d love to help you the best way I can. Feel free to share your valuable suggestions around the content we share so we keep producing quality content tailored to your exact needs and requirements. Thank you for reading the article.

AD623 Instrumentation Amplifier Datasheet, Pinout, Features & Applications

Hi Friends! I welcome you on board. Happy to see you around. In this post today, I’ll walk you through the Introduction to AD623.

The AD623 is an instrumentation amplifier integrated with a rail-to-rail feature. It is mainly used in battery-operated applications due to the low current of 500uA. It features a bandwidth of around 800 kHz which doesn’t require impedance matching since it incorporates buffer amplifiers that are attached to their input pins.

I suggest you buckle up as I’ll detail the complete Introduction to AD623 featuring datasheet, pinout, features, equivalents, and applications. Let’s jump right in.

Introduction to AD623

  • The AD623 is an instrumentation amplifier that falls under the category of differential amplifiers that incorporate buffer amplifiers attached to their input pins, making it a suitable pick for test and measurement equipment.
  • This device doesn’t require impedance matching which is a practice of making one impedance appear like another.

  • Rail-to-Rail feature is used in this amplifier which allows the output voltage to reach its full potential of positive rail voltage or negative rail voltage.
  • In a normal amplifier, this feature is not available as the output voltage of the amplifier is not equal to the supply voltage due to the presence of stage transistors which keep the amplifier from reaching its maximum positive or maximum negative voltage. Rail-to-Rail feature is used to overcome this problem.
  • Moreover, this device comes with very high input impedance, high common-mode rejection ratio, low noise, low drift, and low offset.
  • This kind of amplifier is mainly employed in the circuits where remarkable stability and accuracy is required.
  • Instrumentation amplifier is a type of differential amplifiers where the internal amplifiers are arranged in a way ­– one amplifier is used to generate desired output with enough impedance and the other amplifier is used to buffer each input (+,-)
  • Instrumentation amplifiers can be developed using standard individual amplifiers and precision resistors but also come in an integrated chip. This AD623 amplifier comes in an integrated chip that incorporates laser-trimmed resistors that provide a remarkable common-mode rejection ratio.

AD623 Datasheet

Before you incorporate this device into your electrical project, it’s wise to go through the datasheet of the component that features the main characteristics of the device. Click the link below to download the datasheet of AD623.

AD623 Pinout

The following figure shows the pinout diagram of AD623. The following table shows the pin description of each pin incorporated on the device.
Pin Description of AD623
Pin No. Pin Description Pin Name
1 Inverting Gain Terminal connected to a resistor to set gain value Gain (-Rg)
2 The Inverting input pin of the Op-Amp Inverting Input (IN-)
3 The Non - Inverting Input Pin of Amplifier Non- Inverting Input (IN-)
4 Negative supply terminal Power (-Vs)
5 Output reference input. Normally connected to common Reference
6 Amplifier output pin Output
7 Positive supply terminal Power (+Vs)
8 Non - Inverting Gain Terminal connected to resistor to set gain value Gain (+Rg)

AD623 Features

The following are the main features of AD623.
  • Gain Range = 1 to 1000
  • Set gain with only one resistor
  • Rail to Rail Instrumentation Amplifier
  • Bandwidth = 800KHz
  • Can operate on Single and Dual supply voltage
  • Operating current Max. = 550uA
  • Available Packages = 8-Pin PDIP, VSSOP and SOIC packages

AD623 Equivalents

The following are the alternatives to AD623.
  • JRC4558
  • LM4871
  • IC6283
  • AD620
Before you apply these alternatives to your project, it’s wise to double-check the pinout of the alternatives as it’s quite possible the pinout of the alternatives may differ from the pinout of the AD623.

AD623 Applications

The following are the main applications of AD623.
  • Employed in calibration and test equipment
  • Used in difference amplifiers
  • Used in the control system process
  • Employed in data Acquisition devices
  • Incorporated in low Power Medical instrumentation
  • Used in power-sensitive applications

That’s all for today. That was all about the Introduction to AD623. If you’re unsure or have any questions, you can pop your comments in the section below. I’d love to help you the best way I can. You’re most welcome to share your valuable feedback and suggestions around the content we share so we keep producing quality content customized to your exact needs and requirements. Thank you for reading the article.

Introduction to Arduino Pro Micro

Hi Folks! Hope you’re well today. Happy to see you around. In this post today, I’ll walk you through the Introduction to Arduino Pro Micro. Arduino Pro Micro is an Arduino compatible microcontroller board that is based on ATmega32u4. It operates at a frequency of 16MHz and 5V. It comes with 4 analog pins, 12 digital I/O pins, and 5 PWM pins. Moreover, it also supports serial communication UART with pins Rx and Tx. Arduino is an open-source platform provided by Arduino.cc that offers both hardware and software customization. Open-source means you can use, edit, or customize the board and software based on your requirements. Arduino boards are introduced in 2005 in Italy with the aim to provide a single platform where non-tech persons can get a hold of these boards and develop electronic devices that can interact with the environment using actuators and sensors. These boards are so easy to operate that even a common man with little knowledge about the boards can use them. These boards come in different sizes, memory space that you can incorporate in your electrical project. Not only can you program these boards, but you can also interface them with other shields and breadboard through digital I/O pins. Loading program from the personal computer is just one click away as some boards incorporate USB (universal serial bus) through which you can test and upload program directly from computers. This board is slightly different from the Arduino Micro board. The Arduino Pro Micro doesn’t include a reset button, 13 pin LED, and ICSP header and is smaller in size compared to the Arduino Micro board. I suggest you buckle up as in this tutorial I’ll detail the complete Introduction to Arduino Pro Micro covering pinout, pin description, features, communication and programming, and applications. Let’s jump right in.

Introduction to Arduino Pro Micro

  • Introduced by Sparkfun, Arduino Pro Micro is an Arduino compatible microcontroller board based on ATmega32u4.
  • This board operates at the frequency of 16 MHz which is required for the synchronization of the internal functions.
  • It comes with a built-in micro USB port that helps you test and program the Arduino board with a computer.
  • Though this tiny beast is small in size, it can perform functions like regular Arduino boards. This board comes with a flash memory of 32KB. And SRAM and EEPROM memories are 1KB and 2.5KB respectively.
  • The flash memory is the memory where the Arduino Program (sketch) is stored. While EEPROM memory is used to store long-term information and SRAM memory is used to produce and manipulate variables when it starts running.
  • In addition, this board is compatible with breadboards which makes it an ideal pick for a range of testing projects before you actually incorporate this device into your electrical project.
  • This board supports UART serial communication with two pins Rx and Tx. The former is the receive data line used to receive serial data while the latter is the transmission line used to transmit serial data.
  • The board incorporates resettable poly-fuse mainly employed to secure the USB port. It keeps the board from consuming too much power from the computer. When the current exceeds the given limit, the resistance of this polymeric material increases while it heats up. When the overcurrent is removed from the device, this fuse cools down and its resistance comes back to its original value.

Arduino Pro Micro Datasheet

Before you install this board into your electrical project, it’s wise to go through the datasheet of the board that contains the main characteristics of the board. Click the link below to download the datasheet of Arduino Pro Micro.

Arduino Pro Micro Features

The following are the main features of the Arduino Pro Micro board. CPU = 8bit Microcontroller = Atmega32u4 Digital I/O pins = 12 Oscillator = 16MHz USB = 1 ADC = 4x 10-bit ADC inputs PWM pins = 5 UART = 1 Reset button = no ICSP header = no Pin 13 LED = no Software Used = Arduino IDE Flash memory = 32KB EEPROM = 1KB SRAM  = 2.5KB Size = 34mm x 18mm

Arduino Pro Micro Pinout

The following figure shows the pinout diagram of Arduino Pro Micro.

Arduino Pro Micro Pin Description

Hope you’ve got the sneak peek of this Arduino board. In this section, we’ll detail the pin description of pins incorporated on the board.

Digital I/O Pins

There are 12 digital I/O pins available on the board that are either used as input or output based on the requirement. These pins are either OFF or ON. When they are ON they receive 5V and are considered as HIGH and when they are OFF they receive 0V and are considered LOW.

Analog Pins

This board incorporates 9 channels of 10-bit ADC. These are analog pins that receive any number of values in contrast to digital pins that get only two values i.e. HIGH and LOW.

PWM Pins

The Pro Micro board features 5 PWM channels which are used to get some of the analog output’s functions. When the PWM pins are triggered, the board creates analog results with digital means.

UART Pins

Moreover, it supports UART serial communication with two pins Rx and Tx. Both pins are used to transmit and receive serial data.

SPI Pins

This board comes with a serial peripheral interface (SPI) used to layout communication between the microcontroller and other peripheral devices such as and sensors shift registers. There are two pins for SPI communication i.e. MOSI (Master Output Slave Input) and MISO (Master Input Slave Output) – these pins are employed for sending and receiving the data by the microcontroller.

I2C Pins

  • Two pins are used for I2C communication which is a two-wire communication protocol. One is SDA and the other is SCL.
  • The former is a serial data line used to carry the data and the latter is a serial clock line used for the synchronization of all data transfer over the I2C bus.

Programming

  • The Arduino IDE (integrated development environment) software is used to program this Arduino board. This software is introduced by Arduino.cc which is used to program all kinds of Arduino boards.
  • This software is easy to use. As you install the software, you are given some basic LED blinking programs through which you can easily test the board on the go.
  • This tiny little beast contains a built-in Bootloader that is used to burn the program and it sets you free from the drill of compiling and burning the program from the external burner.
  • With a micro USB port, you don’t require a secondary processor as it appears to an attached computer as a keyboard and mouse. With this port, you can test and program the Arduino board directly from the computer.

Difference between Arduino Pro Micro and Arduino Micro

  • Through both boards incorporate Atmega32u4 microcontroller they differ in few features.
  • The Micro board comes with a reset button and ICSP header while the Pro micro board doesn’t incorporate those features.
  • Moreover, pro micro is smaller than micro board thus fewer pins are brought out to the Arduino terminal pins.
  • The missing pins include AREF, A4, A5, SS, 11, 12, and 13. This also projects that pin 13 doesn’t carry LED but it still supports Tx and Rx pins with LEDs for serial communication.
  • In addition, you cannot use the SPI interface in slave mode in the case of the Pro micro board as this board doesn’t bring out SS pin. And since the pro micro board cannot bring out AREF, the external ADC reference voltage ability is absent.
  • It is important to note that, though the board doesn’t carry ICSP connector, still it supports ICSP interface through which you can program the board.

Arduino Pro Micro Applications

The ability to easily groove in hard to reach places makes this board an ideal pick for a range of applications. This board can be used in the following projects.
  • Windows PC lock/unlock application
  • USB Trackpad
  • USB Joystick
  • Water Level Meter
  • Electric Bike
  • Creating a wireless keyboard
  • Automatic Pill Dispenser
That’s all for today. I hope you’ve got a clear idea about this Arduino Pro Micro board. If you have any questions, you can approach me in the section below. I’d love to help you the best way I can. Feel free to share your valuable feedback and suggestions around the content we share, so we keep producing quality content customized to your exact needs and requirements. Thank you for reading the article.

Introduction to Arduino USB Host Shields

Hello Everyone! Hope you’re well today. I welcome you on board. In this post today, I’ll walk you through the Introduction to Arduino USB Host Shields. With Arduino USB host shield you can interface the USB device to your Arduino board. This USB host shield is based on MAX3421E which is mainly known as the USB host controller that contains the analog circuitry and digital logic required to apply the USB full speed peripheral to USB specifications rev. 2.0. Moreover, this shield is compatible with TinkerKit which projects you can plug this TinkerKit module with the Arduino Boards.

Introduction to Arduino USB Host Shields

  • Arduino USB host shield is used to connect a USB device with the Arduino Board. Simply put, USB host shields provide the USB host capabilities to the Arduino boards.
  • With this USB host shield, you can connect any USB device with the Arduino boards.
  • What does this USB host mean? To understand this, you need to understand the USB protocol that comes with two types of devices. One is called the peripheral (client) and the other is called a host (server).
  • When the mouse or keyboard is attached to the computer through a USB port, your system acts as a host and the keyboard acts like a peripheral (client).
  • Successful communication is carried out using this USB protocol when one of the devices acts like a host which indicates you cannot attach two keyboards for the communication because both are peripheral devices.
  • The USB Host shield incorporates MAX3421E which is a separate chip that is mainly used to provide the USB host support to the Arduino board.
  • Once you connect this shield with the Arduino board, the board starts behaving like a host with you can attach other peripheral devices like a keyboard or mouse.
  • USB host shield is normally installed on the top of the Arduino boards.

Device Classes

The shield supports the following device classes.
  • Game controllers = Nintendo Wii, Sony PS3, Xbox360.
  • ADK-capable Android phones and tablets.
  • Bluetooth dongles.
  • USB to serial converters = FTDI, PL-2303, ACM, as well as certain cell phones and GPS receivers.
  • Mass storage devices: External hard drives, memory card readers, USB sticks.
  • Digital cameras: Powershot, Canon EOS, generic PTP, Nikon DSLRs and P&S
  • HID devices = keyboards, joysticks, mice, etc.

MAX3421E USB Peripheral/Host Controller with SPI Interface

  • Recall, MAX3421E chip known as the USB host controller that contains the analog circuitry and digital logic required to apply the USB full speed peripheral to USB specifications rev. 2.0.
  • This chip comes with a built-in transceiver that contains ±15kV ESD protection with programmable USB disconnect and connect.
  • SIE stands for (serial interface engine) which is mainly employed to control the low-level USB protocol details including bus retries and error checking.
  • The SPI interface can access the register set which is used to operate the chip and works at the frequency 26MHz.
The following figure shows the pinout diagram of the chip.
  • When MAX3421E operates as a host it provides a huge collection of USB peripherals to DSP, ASIC, and microprocessor.
  • The SPI interface operates at a voltage between 1.4V and 3.6V due to the internal level translators.
  • The MAX3421E comes in a 32-pin TQFN package (5mm x 5mm) and 32-pin TQFP package (5mm x 5mm) with operating temperature range from -40°C to +85°C

MAX3421E Datasheet

Before you apply any component to your electrical project, it’s wise to go through the datasheet of the component that contains the main characteristics of the device. Click the link below to download the datasheet of MAX3421E.

Applications

  • Embedded Systems
  • Microprocessors and DSPs
  • Medical Devices
  • Cameras
  • PDAs
  • Custom USB Devices
  • PLCs
  • MP3 Players
  • Set-Top Boxes
  • Instrumentation
  • Desktop Routers
That’s all for today. I hope you have enjoyed reading this article. If you’re unsure or have any questions you can approach me in the section below. You’re most welcome to share your valuable feedback and suggestions around the content we share so we keep producing quality content customized to your exact needs and requirements. Thank you for reading the article.

TDA1554 Audio Amplifier Datasheet, Pinout, Features & Applications

Hi Guys! Hope you’re well today. I welcome you on board. In this post today, I’ll walk you through the Introduction to TDA1554.

The TDA1554Q is an integrated class-B output amplifier mainly used for car radio applications. This device features 4 x 11 W single-ended or 2 x 22 W bridge amplifiers. It comes in a 17-lead single-in-line (SIL) plastic power package.

I suggest you buckle up and read this entire post till the end as I’ll discuss the complete Introduction to TDA1554 covering datasheet, pinout, features, and applications. Let’s get started.

Introduction to TDA1554

  • TDA1554 is a 4*11W single-ended or 2*22W power amplifier IC which means the internal circuitry features a 4*11W single-ended or 2*22W bridge amplifier.
  • It is an integrated class-B output amplifier that comes in a 17-lead single-in-line (SIL) plastic power package mainly used for car radio applications.

  • Out of four amplifiers incorporated in the device, two are non-inverting and two are inverting amplifiers.
  • Moreover, each amplifier comes with a gain of 20dB (26dB in BTL).
  • These amplifiers carry low thermal resistance and are thermally protected.
  • This device generates high output power and fixed gain.
  • Plus, a mute or standby switch is incorporated with the device helping you mute the amplifiers anytime you want.
  • This device can handle high energy on outputs and low voltage offsets at outputs and comes with good ripple rejection.

TDA1554 Datasheet

Before you apply this device to your electrical project, it’s better to scan through the datasheet of the component that features the main characteristics of the component. You can download the datasheet of TDA1554 by clicking the link below.

TDA1554 Pinout

The following figure shows the pinout diagram of TDA1554. The following table represents the pin configuration of each pin incorporated on TDA1554.
Pin Description of TDA1554
Pin No. Pin Description Pin Name
1 Non-inverting input 1 NINV1
2 Inverting input 1 INV1
3 Ground (signal) GND
4 Supply voltage ripple rejection RR
5 Positive Input Voltage 1 VP1
6 Output 1 OUT1
7 Power Ground 1 GND1
8 Output 2 OUT2
9 Not connected NC
10 Output 3 OUT3
11 Power Ground 2 GND2
12 Output 4 OUT4
13 Positive Input voltage 2 VP2
14 Mute/Stand-by switch M/SS
15 Not connected NC
16 Inverting input 2 INV2
17 Non-inverting input 2 NINV2

TDA1554 Features

  • Needs a few external components
  • Mute/standby switch
  • Remarkable ripple rejection
  • High output power and fixed gain
  • Flexibility in use - Quad single-ended or stereo BTL
  • Can handle high energy on outputs (VP = 0 V)
  • DC and AC short-circuit-safe to ground and VP
  • Low offset voltage at outputs (important for BTL)
  • Identical inputs (inverting and non-inverting)
  • Protected with Electrostatic Discharge, Load Dump, and Reverse Polarity
  • Low thermal resistance
  • Thermal protection

TDA1554 Power Ratings

  • Output Current = 4A
  • DC output offset voltage = 100mV
  • Supply Voltage Range = 6V to 18V
  • Input Impedance range = 50k? to75k?
  • Total Quiescent Current = 160mA
  • Stand-by Current = 10uA
  • Supply Voltage Rejection Ratio = 48dB

TDA1554 Applications

This component is mainly designed for car radio applications.

That’s for today. I hope you’ve enjoyed reading this article. If you have any questions, you can approach me in the section below. I’d love to help you according to the best of my expertise. Feel free to share your valuable feedback and suggestions around the content we share so we keep producing quality content tailored to your exact needs and requirements. Thank you for reading the article.

myRIO Ultrasonic Sensor Interfacing

Hello everyone! I hope you all will be absolutely fine and having fun. Today, I will give you a detailed discussion on myRIO Ultrasonic Sensor Interfacing. In this tutorial, you will learn about NI myRIO ultrasonic sensor interfacing. We will go into the details of the ultrasonic sensor and then will move forward towards its interfacing with myRIO. I have already shared many articles on ultrasonic sensors and will share their link in this article as well.

The ultrasonic sensor is also known as SONAR (Sound Navigation and Ranging). As it is clear from its name, it transmits sound waves and these waves are received back to it after getting reflected from any object. It measures the total time elapsed during the entire transmission as well as during the reception of the reflected waves. The sum of both the times is usually known as RTT (Round Trip Time). This RTT is equal to the distance between any external object and the sensor itself. Optical sensors have a transmitter for the transmission of optical waves and a receiver at the receiving end. But in comparison to an optical sensor, the SONAR sensor has a single structure for both transmission and receiving purposes.

SONAR sensor has four pins to perform different actions. It is the most common device and is specially used for obstacle avoidance purposes in robotics. It can also be used to estimate the distance of different objects. It is an inexpensive device and is easily available in the market these days. There is another sensor similar to the ultrasonic sensor available in the market named as PNG sensor. But it has three pins, that is the only difference between PNG and ultrasonic sensor. Both can be used for distance measurement and obstacle avoidance purposes. Further detail about the ultrasonic sensor and myRIO ultrasonic sensor interfacing will be provided later in this tutorial.

myRIO Ultrasonic Sensor Interfacing

An ultrasonic sensor is an electronic device/sensor/module used to estimate the distance of different objects. It works on a very simple principle. It transmits ultrasonic waves and these waves get reflected from the objects in surroundings. It receives the reflected waves and measures the time elapsed during the whole process which is equal to the distance between the specific object and the SONAR sensor. It has a wide range of applications including robot sensing, liquid level control, full detection, stacking height control, people detection for counting, presence detection, vehicle detection, thread/wire break detection etc. The ultrasonic sensor is shown in the figure given below.

Note: I have shred many tutorials on ultrasonic sensor introduction, about its libraries and its interfacing with a different microcontroller. Now, I am going to share their links again, you must go through all these articles for having a better understanding of the SONAR sensor.

Ultrasonic Sensor Pins

  • It has four pins having different individual tasks to perform.
  • Ultrasonic sensor pins are listed in the table shown in the figure below.
  • The ultrasonic sensor along with its pin names is given in the figure shown below.

Ultrasonic Sensor Pins Description

  • As we know each of them has been assigned a different task, so we should about each pin.
  • Ultrasonic sensor pins description is provided in the table given in the figure shown below.s
3. Ultrasonic Sensor Dimensions
  • The ultrasonic sensor is divided into different segments.
  • Dimensions of each segment are shown in the figure given below.
4. Ultrasonic Sensor Working Principle
  • It works on a very simple principle based on sound waves.
  • It transmits sound waves in the surroundings.
  • These sounds waves collide with the external objects.
  • After colliding with the external objects they reflect back to ultrasonic sensor.
  • It measures the total time elapsed during the transmission and receiving the reflected wave.
  • The total time is known as a Round Trip Time (RTT) and is equal to the distance between the object and the sensor.
  • That was the entire working principle of SONAR sensor.
  • I have provided the visual description of its working principle as given in the figure shown below.
5. Ultrasonic Sensor Features
  • The features of any electronic device that can make a device more popular among its competitors.
  • Ultrasonic sensor features are listed in the table shown in the figure given below.
6. Ultrasonic Sensor Ratings
  • Ratings show the voltage, power and current requirements of any electronic device.
  • Ultrasonic sensor ratings are listed in the table shown in the figure below.
7. Ultrasonic Sensor Applications
  • Electronic devices such as small sensors are usually known on the basis of their applications.
  • Ultrasonic sensor has a wide range of applications in real life.
  • Some of them are listed in the table given in the figure shown below.
8. myRIO Ultrasonic Sensor Interfacing Wiring Diagram
  • I have made a completely labelled wiring diagram for myRIO ultrasonic sensor interfacing.
  • A complete wiring diagram is given in the figure shown below.
 
9. LabVIEW Final Front Panel Design
  • As a result I have provided a complete front panel window for myRIO ultrasonic sensor interfacing.
  • The LabVIEW front panel window is given in the figure shown below.
 
  • Our team has designed this LabVIEW simulation with a lot of several testing stages.
  • After a lot of testing we got the accurate results, so we have imposed a very low cost on it.
  • But, the imposed cost is as low, that even a student can easily buy it.
In the tutorial myRIO Ultrasonic Sensor Interfacing, I have provided an environment where you can easily visualize and learn about the basics of ultrasonic sensor and its interfacing with NI myRIO. I have also shared the links of my previously shred articles for the interfacing of SONAR sensor with other micro-controllers. I hope you have enjoyed this tutorial and will appreciate my efforts. I will also share different articles on myRIO interfacing with the other sensors as well, in my upcoming tutorials. Till my next tutorial take care and bye bye :)

C# ProgressBar Control

I hope you are doing good, In the tutorial, I'm going to explore C# ProgressBar Control. C# ProgressBar is used to express progress of any process. When you have to perform a long process within your desktop application then you have to use C# ProgressBar to show a user how much time left or how much progress is done. You can use C# ProgressBar for multiple purposes such as the downloading of life and result retrieving.

C# ProgressBar Control

A progress bar is used to show the progress of any process which takes a long time compared to normal processes. Mostly you have viewed these kinds of progress bar during the installation of software. C# ProgressBar has three parameters, Maximum, Minimum and the value. Maximum represents the max progress or upper range of progress and minimum represent the min progress or lower value or range, where the value is the current point of a progress bar. By default in C# ProgressBar, the value of minimum is set to zero and maximum is 100. Progress bar filled from left to right as the universal standard. You can easily drag and drop the C# ProgressBar from the GUI toolbox to your desktop application. By default, the first instance of C# ProgressBar named as the ProgressBar1. If you are wanted to preview the outcome of progress bar then you can simply set the value in the initialize phase, as you can observe in the following code we have used four progress bar with different values.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TEPArticle
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            progressBar1.Value = 25;
            progressBar2.Value = 50;
            progressBar3.Value = 75;
            progressBar4.Value = 100;
        }      
    }
}
You can observe that we have used four progress bars which have values as 25, 50, 75 and 100. As you know the default value of the minimum range is zero and max range is 100 that's why we have used above values to demonstrate the states of the progress bar. In the following image, you can be observed the output of above code with progress bar states. Default instance named as progressbar1,2,3 and so on following. If you want to rename the object name of progress bar according to you then you have to visit the properties tab after selecting the relative progress bar and then change the name as you can be observed in the following image. If you are wanted to change the size of ProgressBar according to absolute values then there are two methods which you can use. The first method is, you have to select the relative ProgressBar then go to the properties tab and search for the size where you can insert the absolute values to resize the ProgressBar according to your requirements. In the following image, you can be observed the flow of actions. The second method is to do the same action with the help of programming code. We have to use the Size property and pass the values of the width and height in the constructor of Size. You can be observed the following code for better understanding.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TEPArticle
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            TEPprogressBar1.Value = 25;
            TEPprogressBar1.Size = new Size(100,23);
            
        }      
    }
}
If you are looking to change the ProgressBar style then you can change that from the properties tab. There are three styles for the ProgressBar, by default its set to block and others are Continuous and Marquee. Even that you can set the ProgressBar styles from the following code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TEPArticle
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            
            TEPprogressBar1.Style = ProgressBarStyle.Blocks;
            TEPprogressBar2.Style = ProgressBarStyle.Continuous;
            TEPprogressBar3.Style = ProgressBarStyle.Marquee;

            TEPprogressBar1.Value = 25;
            TEPprogressBar2.Value = 50;
            TEPprogressBar3.Value = 75;

        }      
    }
}
We have used three progress bars, before copy, the above code inserts the three progress bar in your desktop application. Then you can be used the above code but replaced the TEPprogressBar1,2,3 with the instance names which are using for your ProgressBars. If you are wanted to make Right to left moving progress bar then you have to activate two properties for this. First, you have to make RightToLeftLayout true and then you have set RightToLeft.Yes as the value of a RightToLeft property of relative progress bar. From the following code, you can get the idea.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TEPArticle
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            
            TEPprogressBar1.Style = ProgressBarStyle.Blocks;
            TEPprogressBar1.RightToLeftLayout = true;
            TEPprogressBar1.RightToLeft = RightToLeft.Yes;

            TEPprogressBar1.Value = 25;
            

        }      
    }
}
Now you can observe the above code, we have activated two properties which are compulsory to change the progress bar flow. We have also attached the Image below which is the exact output of the above code.

C# ProgressBar Event Handlers

After learning the basics, its time to move to advanced level to play with a progress bar. In C# there are several built-in functions which are known as the event handler because they only execute on specific situations. Such as you are wanted to perform any task whenever the user will click on the progress bar. Then you will use a relative event handler to tackle this situation. There are several event handlers which you can use with ProgressBar. In the following section of the article, we are going to explore each event handler to demonstrate their purpose of use.
  • C# ProgressBar Click Event Handler
  • C# ProgressBar MouseEnter Event Handler
  • C# ProgressBar MouseHover Event Handler
  • C# ProgressBar MouseLeave Event Handler
  • C# ProgressBar Resize Event Handler

C# ProgressBar Click Event Handler

This event is designed to perform functionality whenever the user will once click on the progress bar. As much time the user will click on the progress bar that much times function is executed which is declared within the braces of click event handler. Most developers used to execute the notifications and the messages on click event handler, like the warnings. First, you have to activate the click event handler for relative progress bar then you can add your functionalities with that like in the below code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TEPArticle
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            
        }

        private void TEPprogressBar1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("You have clicked on the TEP ProgressBar");
        }
    }
}
In the above code, you can observe we have used the message box as the functionality which will be performed on the single click. You can declare any kind of functionality like change the color, size and value of progress bar. In the following image, there is the exact output of above code.

C# ProgressBar MouseEnter Event Handler

This event handler is used to execute any functionality when the mouse cursor enters in the boundaries of the progress bar. The visible part of the progress bar is considered as the boundaries. When you slightly enter the cursor within the visible part this event handler will get executed. You can experiment this situation by the following a code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TEPArticle
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            
        }

        private void TEPprogressBar1_MouseEnter(object sender, EventArgs e)
        {
            MessageBox.Show("MouseEnter in the TEP ProgressBar");
        }
    }
}
In the above code, you can be observed that we have used message box as the functionality within MouseEnter Event handler. So that whenever user will enter the mouse cursor within the visible part of progress bar message will get executed. Below is the exact output of the above code is attached.

C# ProgressBar MouseHover Event Handler

This event is designed to perform an action whenever the user will hover the mouse in the visible part, hovers mean to stay for a moment during movement over visible part. Until you will moving the mouse over progress bar it will not execute, you must have to stay for a while over progress bar to activate this event handler. In the following code, we have created the proper code for above scenario.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TEPArticle
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            
        }
   
        private void TEPprogressBar1_MouseHover(object sender, EventArgs e)
        {
            MessageBox.Show("MouseHover in the TEP ProgressBar");
        }
    }
}
You can observe that we have used the message box as the functionality. When the MouseHover event occurs message box prompt and shows a message which is defined by the MouseHover event handler. We have also attached the output of above code which you can preview below.

C# ProgressBar MouseLeave Event Handler

This event is designed to perform functionality whenever the mouse cursor will leave the visible boundaries of ProgressBar. In short, we can be said it is the reciprocal or inverse of MouseEnter event handler. Now we are going to create the code with MouseLeave event handler. After the activation of this event handler, you have to write functionality which you want to perform within MouseLeave event handler. From the following code, you can be observed the sequence of a program which we are going to execute.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TEPArticle
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            
        }

        private void TEPprogressBar1_MouseLeave(object sender, EventArgs e)
        {
            MessageBox.Show("MouseLeave the TEP ProgressBar");
        }
    }
}
In the above code, we will observe we have used the message box. So that whenever mouse cursor will leave the visible part of progress bar it will get executed. You can perform any functionality instead of message box as you are required, for this tutorial we have used the message box. In the following image, you can observe the exact output which will come after execution.

C# ProgressBar Resize Event Handler

This event handler is designed to perform whenever the size of a progress bar is get changed in any mean such as the change in width or height. Now we are going to perform this event handler. You have to place a button on which click event handler you will declare the size changed functionality for a progress bar. So that, when you will click on the button size of a progress bar, is get changed. Then we will be used the Resize event handler for a relative progress bar. When size is get changed resize progress bar get executed. You can copy the below code and execute on your computer to get a clear idea.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TEPArticle
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            
        }

        private void TEPprogressBar1_Resize(object sender, EventArgs e)
        {
            MessageBox.Show("TEP ProgressBar Size is Changed Now !!");
        }

        private void button1_Click(object sender, EventArgs e)
        {
            TEPprogressBar1.Size = new Size(100, 30);
        }
    }
}
In above code, you can observe that we have used message box as the functionality to be executed within Resize event handler. Before copy the above code you must have to place the progress bar and button on your desktop application and don't forget to change their name. Following is the image of exact above code which is taken after execution. In this tutorial, we have tried to summarize the C# ProgressBar in depth. So that beginner can understand their usage in software development. After this, you are able to create your own small application in which you can reflect processing via C# ProgressBar. For further advanced topics, you can read, C# PictureBoxC# Checked ListBoxC# CheckBox, and C# RadioButton. Don't forget to share it with your friends if you found this tutorial informative.  
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