Showing posts with label Electrical Components. Show all posts
Showing posts with label Electrical Components. Show all posts

Thursday, June 3, 2021

Batteries: Explained.

 

Can you imagine a world where all electrical appliances have to be plugged in? Flashlights, cellphones, and toys would be tethered to electrical outlets, making them clumsy, and inconvenient?

Batteries:



            Batteries provide portable and convenient sources of energy for powering devices without wires or cables. A dry cell is a common type of battery, used today. It basically converts stored chemical energy into electrical energy.

Basic structure:

In the most basic terms, a battery cell is made up of three components:

·         An anode

·         A cathode

·         The electrolyte

Working of a Battery:

In the dry cell, zinc is the anode. The graphite core is the cathode, and ammonium chloride paste acts as an electrolyte. Due to a chemical reaction within the battery, the anode builds up an excess of electrons. This causes an electrical difference between the anode and the cathode. The electrons want to rearrange themselves and displace the extra electrons in the cathode. However, the electrolyte ensures that the electrons cannot travel directly to the cathode.

When the circuit is closed with the help of a conductive path between the anode and cathode, the electrons can travel to the cat holder. This in turn provides power to any appliance placed along the way over time. This electrochemical process alters the chemical makeup. In the anode, and cathode, and eventually, they stop providing electrons.

This is how a battery dies. Batteries provide us with a mobile source of power that makes many model conveniences possible.

 

 

This is how a battery works.

Stay tuned.

Bye.


 

 

 

Monday, May 31, 2021

Voltage Regulators: Explained.

Introduction:

    In the world of electronic circuit design, the selection of the right voltage regulator is one of the most important decisions. Virtually, every product that runs on DC power employs voltage regulation.


                                        

Voltage Regulators:

    Athe name indicates, voltage regulators take a variable or unstable input voltages and convert them to higher or lower constant output. That matches the voltage and current needs of an electronic circuit. Basic regulators of the linear IC type regulators simply drop down the source to the desired level and shed the rest as heat while the others such as the switching type are more efficient. Simply stated, rapidly switching a voltage input on and off results in an averaged voltage output, depending upon switching frequency. A wide range of voltages is possible from a single source. Some regulators employ additional features to handle large voltage spikes, reverse polarity protection, or remove unwanted signal noise, automotive alternators.

For use in electrical systems and charging the vehicle's battery, most alternators employ a built-in AC to DC rectifier and a robust voltage regulator that is capable of delivering 13.5 to 14.5 volts DC above 100 amps. Each device in the electrical system may have its own voltage regulator depending on its specific needs. Common voltages are 12 volts DC for lighting and accessories and 5 volts DC for sensors and control modules. 



Types:

Linear regulators use a transistor that is controlled by feedback from a differential amplifier circuit and a reference voltage to control the output voltage. They may feature fixed or adjustable output. Output current is determined by the input current minus circuit operation losses. Linear regulators are simple to add and give a fast response time but are not very efficient. The output of a linear regulator is always lower than the input and drops out if the input voltage is too low. 

Switching regulators are very efficient but can be difficult to design. As mentioned, earlier switching regulators use controllers to rapidly connect and disconnect either the positive or negative component of the source voltage from the rest of the converter circuit to produce desirable changes in voltage and current. A feedback loop from the output to the controller helps to determine the switching rate. The arrangement of inductors, capacitors, and diodes in basic switching converters determines if the output voltage is increased or decreased.

Buck-boost converters can increase or decrease voltage but

reverse the polarity.
Fly-back transformers increase the voltage to 
very high levels but at very low current by collapsing the field of an energized coil much like the ignition system in some
automobiles.



These are the basic functionality, types, and common
applications of voltage regulators. 
























Stay tuned. Bye.


Wednesday, May 26, 2021

Make Automatic Room light

Automatic Room Light Using Ultrasonic Sensor

Things Required:

·         Arduino

·         HC SR-04 Ultrasonic Sensor

·         5V Relay Module

·         Jumper Wires

Connections:

 


Code for Arduino:


#define TRIGGER_PIN  12  // Arduino pin tied to trigger pin on the ultrasonic sensor.

#define ECHO_PIN     11  // Arduino pin tied to echo pin on the ultrasonic sensor.

#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). The maximum sensor distance is rated at 400-500cm. [this is an arbitrary number]

 

#define RELAY_LINE1_PIN 8

 

#include "NewPing.h"

NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.

 

 

unsigned int critical_distance_cms = 50;  // Cutoff distance at which the light will switch [this is an arbitrary number]

bool state = 0;

 

void setup() {

  Serial.begin(9600); // Open serial monitor at 115200 baud to see ping results.

  pinMode(RELAY_LINE1_PIN, OUTPUT);

  digitalWrite(RELAY_LINE1_PIN, HIGH);  // Turn the light off

}

 

void loop() {

  delay(5);                     // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.

  unsigned int distance = readDistance(); // Current distance of any object facing the ultrasonic sensor

 

  Serial.print("Ultrasonic: ");

  Serial.print(distance); // Send ping, get distance in cm and print result (0 = outside set distance range)

  Serial.println("cm");

 

  // Someone is near the door

  if (distance < critical_distance_cms)

  {

    while (distance < critical_distance_cms)

    {

      // Check if they moved away

      distance = readDistance();

 

      delay(5); // Do nothing until the person moves away from the door

    }

 

    state = !state; // Change the state of the relay

 

    if (state)

    {

      Serial.println("Door Open!");

      digitalWrite(RELAY_LINE1_PIN, LOW); // Turn the light on

    }

    else

    {

      Serial.println("Door Closed!");

      digitalWrite(RELAY_LINE1_PIN, HIGH);  // Turn the light off

    }

  }

}

 

// Updates the value of the Ultrasonic reading

unsigned int readDistance()

{

  // Read 7 values from the ultrasonic and get the median value ( median filter )

  // Gets rid of noisy reading

  unsigned int distance = sonar.convert_cm(sonar.ping_median(7));

 

  // The value 0 indicates that the ultrasonic sensor is reading nothing in front of it

  // Set this distance to max distance so the light doesn't switch unnecessarily

  if (distance == 0)

  {

    distance = MAX_DISTANCE;

  }

 

  return distance;

}

 

Note:

            You can change the range of ultrasonic sensor by changing the value in the code which is mentioned in the third line of the code.

If you are facing a problem, contact me: rizwanmahad606@gmail.com


Stay tuned.

Bye.


Scanners: Explained.

 Introduction:           If you need a copy of a document that is sitting on your table. For this, with your PC, you use your flatbed scan...