Skip to main content

Industrial VS Commercial VS Residential Electrical Installation

Hey, in this article we are going to see the comparison between Industrial, Commercial, and Residential Electrical installation. We will make compare with respect to types, procedure, cost, safety, equipment, and many other essential factors. First of all, let's know what is electrical installation. Electrical installation is a procedure to install electrical circuits, wirings, equipment, and machines. The electrical installation can be divided into three major parts - 1. Installing of electrical equipment or device or machine 2. Make electrical connection or wiring for them 3. Provide them proper voltage and power to operate them. These different types of electrical installation required different types of electricians and management. For example, commercial electrical installation requires commercial electricians, industrial electrical installation requires industrial electricians, and residential electrical installation requires residential electricians. We already published an ...

Interfacing Push button switch with AT89S52 Microcontroller.

This tutorial is for beginners in the field of micro-controller. The purpose of this tutorial is to use of push-button switch with the micro-controller. It will be useful whenever a decision is to be made according to the press of a switch.

Interfacing Push button switch with AT89S52 Microcontroller.

Input/output devices are very critical components of an embedded system. The first input device we will study is the switch. It allows the human to input binary information into the microcontroller. Typically we define the Two-state, logic as true when the switch is pressed. logic false, when the switch is not pressed. A single pole single throw (SPST) switch has two connections. The switches are shown as open circuits in Figure 1. which is a normally open switch (NO), the resistance between the connections is infinite (over 1000 MΩ) if the switch is not pressed and zero (under 0.1 Ω) if the switch is pressed.

 A switch has a two-state open state and a closed state. And the state of the switch is monitored by the microcontroller at a digital input pin. A switch requires a pull-up or pull-down resistor to produce a definite high or low voltage when it is open or closed. A resistor placed between a digital input and the VCC(5v) is called a "pull-up" resistor because it normally pulls the pin's voltage up to the VCC(5v). A resistor placed between a digital input and the GND(0v) is called a "pull-down" resistor because it normally pulls the pin's voltage to the GND(0v).

In positive logic input pin of the microcontroller is normally in a low state(0V logic 0) when we press switch pin becomes a high state (Vcc-5V logic 1).

In negative logic input pin of the microcontroller is normally in a high state(Vcc-5V logic 1)when we press the switch pin becomes a low state (0V logic 0).

Circuit Diagram
Interfacing Push button switch with AT89S52 Microcontroller.

Show in above circuit diagram switch is connected with P2.0 of AT89S52. In a normal state, P2.0 is pull-up by a 10k resistor so normally P2.0 is in the high state. When we press switch P2.0 becomes low and it's monitored by the digital input pin of the AT89S52 microcontroller.

Sample Code

#include <reg51.h>// Include address of register

sbit Switch = P2^0;//Switch is connected to P2.0 of AT89S52

void main()//main function

{

 while(1)//Infinite loop  

 {

  if(Switch == 0)//switch is pressed

  {

   //When Switch is pressed  

   //type your code here ex. turn on led 

  }

  else

  {

   //In normal condition switch not pressed

  }

 }

}

Download Complete Project:

You can download entire project files here

Comments

Popular posts from this blog

What is the Joule Thief Circuit and how does it work

A joule thief is a compact, low-cost, and easy-to-build self-oscillating voltage booster that is often used to drive small loads(3.3v 5mm LED). Other names for this circuit include blocking oscillator , joule ringer , and vampire torch . The circuit is a blocking oscillator variation that functions as an unregulated voltage boost converter. The output voltage is increased at the price of a larger input current draw, but the output integrated (average) current is reduced and the luminescence brightness is reduced. This joule thief Circuit uses a 1.2 V or 1.5 V single-cell electric battery to power LEDs. However, as the supply voltage reaches 3V, the LED begins to light. The theory of operation of a Joule thief circuit Joule Thief Circuit The joule thief circuit operates on a fairly basic basis. It operates by quickly switching the transistor. When the transistor is first switched off, a tiny amount of current flows via the resistor, primary winding, and base-emitter junction, assistin...

What is an electric fuse | Fuse resistance | Functions

To avoid a short circuit or device failure, an electrical fuse is a low melting point copper or other metal wire that breaks due to heat-induced by Overcurrent or excessive load. The flow of electric current warms up the items through which it passes. Electric water heaters, light bulbs, and irons are just a few examples of electric gadgets that make use of this phenomenon. It does, however, have certain downsides. For example, if this equipment becomes overheated, it may become damaged or even catch fire! In reality, the undesirable high electric currents harm not only these gadgets, but all of the appliances in our home. Any gadget can only withstand a certain quantity of electric current. If the current surpasses that limit, the device's components heat up, perhaps resulting in a fire! Is there a way to prevent this from happening? An "electric fuse" is a device that is used to prevent this from happening. It comes in a variety of forms and sizes. This is how it usuall...

Using the IR2110 high-low side driver - explanation and circuit examples

In many situations, we need to use MOSFETs configured as high-side switches. Many a times we need to use MOSFETs configured as high-side and low-side switches. Such as in bridge circuits. In half-bridge circuits, we have 1 high-side MOSFET and 1 low-side MOSFET. In full-bridge circuits we have 2 high-side MOSFETs and 2 low-side MOSFETs. In such situations, there is a need to use high-side drive circuitry alongside low-side drive circuitry. The most common way of driving MOSFETs in such cases is to use high-low side MOSFET drivers. Undoubtedly, the most popular such driver chip is the IR2110. And in this article/tutorial, I will talk about the IR2110. Notice that the IR2110 comes in two packages – 14 pin through-hole PDIP package and the 16-pin surface mount SOIC package. Now let's talk about the different pins. VCC is the low-side supply and should be between 10V and 20V. VDD is the logic supply to the IR2110. It can be between +3V to +20V (with reference to VSS). The actual voltag...