Sunday, 26 June 2016

MEASUREMENT OF DIRECT CURRENT IN BATTERY USING ACS712 CURRENT SENSOR CIRCUIT


CODE ::::


void setup()
{
Serial.begin(9600);
}
void loop()
{
float average = 0; //SET initially average value or dc value of current to zero
for(int i = 0; i < 1000; i++)
{
        average = average + (.0264 * analogRead(A0) -13.51);
        delay(1);
        }


Serial.println("Direct Current Value = ");
Serial.print(average);
Serial.println(" mA");
}






Keep Watching my YouTube Channel.
MEASUREMENT OF CURRENT IN BATTERY USING ACS712 
CURRENT SENSOR CIRCUIT



Wednesday, 22 June 2016

                     Project 7 How to make a ammeter using Arduino UNO and ACS712 current sensor .
                                                               For 3-Phase Line

                                 The code for making this project is given below,,,

const int sensorIn1 = A0;                       /*FOR Current measurement Sensor 1*/
const int sensorIn2 = A1;                       /*FOR Current measurement Sensor 2*/
const int sensorIn3 = A2;                      /*FOR Current measurement Sensor 3*/

int mVperAmp = 66;                          // use 100 for 20A Module and 66 for 30A Module & 185 for 10A module
 
double Voltage1 = 0;
double VRMS1 = 0;
double AmpsRMS1 = 0;

double Voltage2 = 0;
double VRMS2 = 0;
double AmpsRMS2 = 0;

double Voltage3 = 0;
double VRMS3 = 0;
double AmpsRMS3 = 0;

void setup(){

  Serial.begin(9600);                   // Setting the baud rate of Serial Monitor (Arduino)
  delay(100);
}

void loop(){

 Voltage1 = getVPP1();
 VRMS1 = (Voltage1/2.0) *0.707;
 AmpsRMS1 = (VRMS1 * 1000)/mVperAmp;
 Serial.print(AmpsRMS1);
 Serial.println(" Amps RMS1");

  Voltage2 = getVPP2();
 VRMS2 = (Voltage2/2.0) *0.707;
 AmpsRMS2 = (VRMS2 * 1000)/mVperAmp;
 Serial.print(AmpsRMS2);
 Serial.println(" Amps RMS2");

  Voltage3 = getVPP3();
 VRMS3 = (Voltage3/2.0) *0.707;
 AmpsRMS3 = (VRMS3 * 1000)/mVperAmp;
 Serial.print(AmpsRMS3);
 Serial.println(" Amps RMS3");

}

float getVPP1()
{
  float result1;
  int readValue1;                         //value read from the sensor
  int maxValue1 = 0;                 // store max value here
  int minValue1 = 1024;           // store min value here
 
   uint32_t start_time = millis();
   while((millis()-start_time) < 1000)            //sample for 1 Sec
   {
       readValue1 = analogRead(sensorIn1);
       // see if you have a new maxValue
       if (readValue1 > maxValue1)
       {
           /*record the maximum sensor value*/
           maxValue1 = readValue1;
       }
       if (readValue1 < minValue1)
       {
           /*record the maximum sensor value*/
           minValue1 = readValue1;
       }
   }
  
   result1 = ((maxValue1 - minValue1) * 5.0)/1024.0;      // Subtract min from max
   return result1;
 }

 float getVPP2()
{
  float result2;
  int readValue2;                         //value read from the sensor
  int maxValue2 = 0;                 // store max value here
  int minValue2 = 1024;           // store min value here
 
   uint32_t start_time = millis();
   while((millis()-start_time) < 1000)              //sample for 1 Sec
   {
       readValue2 = analogRead(sensorIn2);
       // see if you have a new maxValue
       if (readValue2 > maxValue2)
       {
           /*record the maximum sensor value*/
           maxValue2 = readValue2;
       }
       if (readValue2 < minValue2)
       {
           /*record the maximum sensor value*/
           minValue2 = readValue2;
       }
   }
   result2 = ((maxValue2 - minValue2) * 5.0)/1024.0;   // Subtract min from max
   return result2;
 }

 float getVPP3()
{
  float result3;
  int readValue3;                           //value read from the sensor
  int maxValue3 = 0;                   // store max value here
  int minValue3 = 1024;              // store min value here
 
   uint32_t start_time = millis();
   while((millis()-start_time) < 1000)              //sample for 1 Sec
   {
       readValue3 = analogRead(sensorIn3);
       // see if you have a new maxValue
       if (readValue3 > maxValue3)
       {
           /*record the maximum sensor value*/
           maxValue3 = readValue3;
       }
       if (readValue3 < minValue3)
       {
           /*record the maximum sensor value*/
           minValue3 = readValue3;
       }
   }
   result3 = ((maxValue3 - minValue3) * 5.0)/1024.0;         // Subtract min from max
   return result3;
 }


If you have any query please comment below & keep watching.

Saturday, 23 April 2016

Project 7 How to make a ammeter using Arduino UNO and ACS712 current sensor .

In here i describe how to make a ammeter using Arduino UNO and ACS712 current sensor.

The code for making this project is given below,,,

const int sensorIn = A0;/*FOR Current measurement*/
int mVperAmp = 66; // use 100 for 20A Module and 66 for 30A Module & 185 for 10A module
double Voltage = 0;
double VRMS = 0;
double AmpsRMS = 0;



void setup(){
  Serial.begin(9600);    // Setting the baud rate of Serial Monitor (Arduino)
  delay(100);
}

void loop(){


 Voltage = getVPP();
 VRMS = (Voltage/2.0) *0.707; 
 AmpsRMS = (VRMS * 1000)/mVperAmp;
 Serial.print(AmpsRMS);
 Serial.println(" Amps RMS");
}

float getVPP()
{
  float result;
  
  int readValue;             //value read from the sensor
  int maxValue = 0;          // store max value here
  int minValue = 1024;          // store min value here
  
   uint32_t start_time = millis();
   while((millis()-start_time) < 1000) //sample for 1 Sec
   {
       readValue = analogRead(sensorIn);
       // see if you have a new maxValue
       if (readValue > maxValue) 
       {
           /*record the maximum sensor value*/
           maxValue = readValue;
       }
       if (readValue < minValue) 
       {
           /*record the maximum sensor value*/
           minValue = readValue;
       }
   }
   
   // Subtract min from max
   result = ((maxValue - minValue) * 5.0)/1024.0;
      
   return result;
 }

I make a video on this please check it


Monday, 21 March 2016

Project- 2: How to make a USB light by using a unsupported USB cable.

PROJECT : 2
How to make a USB light by using a unsupported USB cable
           
       
               In here i describe how a USB light can make from simply 2 LED and a unsupported USB.
Just you have to cut the USB and select red and black wire and connect a LED to this. when you connect this USB to your PC or mobile charger or OTG cable then light is on.

From USB you get around 3 to 5 V and in red and black wire you get that so i just use that and lights on those LED.

USB light


If any one want to ask any question please command below.

Thank You and keep WATCHING my YouTube channel.

Saturday, 19 March 2016

Project-1:How to make a 9VDC source from 220 V AC system by using bridge rectifier circuit.

Project-1:
    How to make a 9VDC source from 220 V AC system by using bridge rectifier circuit. 

              A bridge rectifier is an arrangement of four or more diodes in a bridge circuit configuration which provides the same output polarity for either input polarity. It is used for converting an alternating current (AC) input into a direct current (DC) output. A bridge rectifier provides full-wave rectification from a two-wire AC input, therefore resulting in lower weight and cost.

     A bridge rectifier circuit given here,
                                                     
BRIDGE RECTIFIER
LM 7809 IC description means where input and where output you connect given in the figure below,


In this video i describe how one can make a 9 VDC source from our domestic 220 VAC source.I use basically a transformer,a bridge rectifier circuit and a voltage regulator.

PROJECT- 1




You can buy transformer from the side mention below,

http://www.electroncomponents.com/15-0-15-500ma-15v-Transformer

http://www.amazon.co.uk/Secondary-30VA-Transformer-15-0-15-Ouputs/dp/B00FDUSUEU

Keep watching my YouTube channel and visit my blog.If you have any query write in command below.

Saturday, 27 February 2016

What's inside a magnetic ballast which is used to start tube light


Magnetic Ballast
           An electrical ballast is a device intended to limit the amount of current in an electric circuit. A familiar and widely used example is the inductive ballast used in alternating current fluorescent lamps, to limit the current through the tube, which would otherwise rise to destructive levels due to the negative differential resistance artifact in the tube's voltage-current characteristic.

     In below i give you a link where you can get information about types of magnetic ballast.


Wait for my next post.If you any query you can command below.

Monday, 22 February 2016

What's inside an Electrical Starter use to start tube light


           Inside a electrical starter there is basically two things are present one is capacitor another is a bi-metallic strep. This bi-metallic strip is normally in closed condition but when current passes through it due to heat loss this strip is going to increase it's length, and as a result the circuit is going to disconnected.

Check this video

Actually starter works with choke coil, to release photon from tube light it is required to ionized the tube gas and for starting stage it requires high voltage, now concept E= L*di/dt when rate of change of current is high then emf will be high, so starter works very fast and when the voltage reaches at required limit to start the tube then starter out from circuit of tube light electrically.
 
 
My next video will describe the inner parts of a electrical choke or ballast.