Saturday, 17 January 2015

State of charge Determination/Current measurement

In this post i am going to explain how to find state of charge of the battery using current sensor ACS712 30 A sensor.connect the load in series to the current sensor.

float rawvalue;
float current;
float soct=100;

void setup()
{
  Serial.begin(9600);
}
void loop()
{
  float averagecurrent=0;
  for (int i=0;i<5;i++)
{
 rawvalue=analogRead(A0);

 current=((0.0049*rawvalue)-2.5)/0.066;
 averagecurrent=averagecurrent+current;
 delay(1000);
}
soct=soct-((averagecurrent)/18000)*100;
Serial.print( averagecurrent );
Serial.print(" ") ;
Serial.println( soct );
}

The above program shows how to find the soc using ACS712 

3 Stage Battery Charger

3 stage battery charger is the best way to charge batteries efficiently and fast rather than using  a constant voltage or constant current charger.In constant voltage charger for a 12 V battery a constant voltage of around 13.8V or higher according to the battery specifications is applied which takes long duration for charging the battery and may over voltage and damage the battery if not cut off after fully charged.Similarly in constant current charger a current source is used to provide constant current to charge it is not good because we need to provide some time for battery to recover while giving charge which is not provided in constant current method.

The three stages of 3 stage battery charger are

1)Constant Current (Bulk Charge)
2)Constant Voltage(Absorption Charge)
3)Constant Voltage(Float charge)


In the stage of bulk charge a current source is used to apply  constant current to the battery of 20% (the value depends on he manufacturer specifications)of battery capacity specified at 20 hours i.e C@20.
            Then a constant voltage is applied across battery of 14.4 V(2.4 to 2.45 V per cell) till the stage the amount of current battery takes come to a point of 0.1 C.Then a constant voltage of 13.8 volt is applied to compensate self discharge of the battery .





in the above circuit the switching is done by reading the current using ACS712 and voltage by using voltage divider circuit and the data is given to micro controller like Arduino for switching purpose
   

Friday, 16 January 2015

Current Source and Voltage source

A current source is a device that provides constant current irrespective of the load applied to it.A current source can be made by using  a constant voltage regulator and  resistor in series which determines the amount of current flowing.We can use lm317to make a current source of 1A.These current sources have the applications  in electronic circuits and in battery chargers.
Similarly a voltage source is the circuit that provides constant voltage in the circuit connected linear voltage regulators and switched mode power supply will provide constant voltage by using electronic components

Battery Voltage measurement/High voltage measurement using arduino

Voltage is a parameter that has to be monitored for any kind of application.In this tutorial we are going to find the voltage across a battery pack of  3*12V lead acid batteries by using a voltage divider circuit using two precision resistors.The two resistors are chosen such a way that the voltage across R2 is maximum of 5V(because he maximum voltage rad by arduino is 5V)when a voltage source is connected across the voltage divider circuit.Here we are choosing R1 as 1MOhm and R2 as 100KOhm and choosing of resistors should be such a way that the current passing to this circuit should be as minimum of possible.






Here if i connect a 36V battery the current through these resistors would be (48/1.1Mohm=current flowing) 43 microamps which is very small and wouldn't affect the Power source.Now we are using arduino analog input to read the voltage across  R2 and write a code to find voltage across battery.Here we are reading the divided voltage and scaling it back to get the original battery voltage.The scaling factor can be found by measuring the battery voltage using multimeter and dividing with the voltage measured across resistance R2.The precision of the measurement is affected by the resolution of the ADC that is being used in the microcontroller.


float rawvalue;
float inputvoltage;
float batteryvoltage;
void setup()
{
  Serial.begin(9600);
  pinMode(A0,INPUT);
}

void loop()
{
  rawvalue=analogRead(A0);
  inputvoltage=((rawvalue)/1024)*5;
  batteryvoltage=inputvoltage*10.6;
  Serial.println(batteryvoltage);
  delay(1000);
}



The code is simple where we initialize the pin A0 as input where we read the voltage across R2,here rawvalue is defined to measure the value that is read across the resistor and input voltage is defined o convert the digital value to analog value and multiplying with scaling value to get the battery voltage 

Thursday, 15 January 2015

Temperature Measurement

Temperature measuremnet can be used in applications such as 3D printers,common house hold applications,Electric vehicles  etc.The proper management of battery temperatures will effect the performance  and the life cycle of batteries. If not managed properly and temperature goes over optimum working conditions of the battery the rate of chemical reaction increses which will increse the performance temperorily but will degreade the life of the batteries because of the formation of unwanted reactions and sometimes can lead to conditions of thermal runway where heavy explosions can take place,if the temperature goes below optimum conditions (25 C) the chemical reactions process decreses but life incvreses but we cannot get hte performance that we expected that is the reason why electric vehicles does not provide expected mileage in the winter.By proper thermal management electric vehicle battery performance can be boosted and also provides saftey to vehicles.
There are various sensors available in the market such as LM35 from texas instruments and TMP36 from analog devices where you can buy and interface with a microcontroller such as Arduino and can measure with accuracy.The good thing about htese sensors is that they do ot require any calibration and easy to wire with just three pins named ground,Vcc,Output.the output of these type of sensors is a analog which has to be measured using analog pins.

I will write the code for finding the temperature of the sourroundings using microcontroller arduino.


float rawvalue;
float rawvoltage;
float tempC;
void setup()
{
  Serial.begin(9600); //initialising
  pinMode(A0,INPUT); //pin A0 as input where output of the sensor is read
}
void loop()
{
 rawvalue=analogRead(A0);
 rawvoltage=(rawvalue/1024)*5; //converting digital value to millivolts
 tempC=rawvoltage*100; //converting the raw voltage to temperature in centigrade
 Serial.print(tempC);
 Serial.println('C');
 delay(3000); //reading the temperature for every 3 seconds
}

why rawvoltage *100?
It is done because the sensor outputs temperature in value of 10mv/C.So to convert voltage in to temperature we multiply it with 100


If u have any doubts on above topic you can post in comment box or can mail me to avinashkalluri@gmail.com



Friday, 2 January 2015

how waste plastic can be recycled?

Plastic plastic everywhere around us and cannot be neglected from part of our life. This waste plastic can be used intelligently to develop various products. Some of the products that are being made from waste plastic are
1) Jeans
2) Fuel
3) Medium to pave roads

Levis made an initiation to make jeans from waste plastic bottles in order to decrease the adverse effect of waste plastic on environment. The final product jeans is assumed to contain about 20% of plastic recycled content which is about 12 to 20 oz (one ounce is about 28 grams) bottles per pair. The process of making jeans from plastic starts by sorting the plastic bottles and shredding them. This is done in order to remove unwanted liquid left in the bottles that have been used by us and later transformed in to pieces where this material is heated up and processed to make a fiber by adding some additives, from this cloth is made.
                   
      Plastic can be recycled to produce fuel, the process start by shredding and heating the plastic pieces in the absence of oxygen which is named as pyrolysis after heating in vacuum chamber the plastic is boiled which is filtered and distilled to produce fuel. This process is not harmful because it happens in the absence of air where plastic is melted not burned and no harmful gases are released in to the environment and the gases and sludge formed during the process of heating are reused as fuel for machine itself, the important part of this conversion is the choosing of type of plastic material to produce fuel. 
                                If we burn pure hydrocarbons, such as polyethylene and polypropylene we will end up in producing a fuel that burns fairly clean but burning PVC, and large amounts of chlorine will corrode the reactor and pollute the environment. HDPE (jugs) and LDPE (bags and films) are basically polyethylene usable as fuel as well, just slightly more polluting as a thicker heavier fuel is created. But additional processing can turn even HDPE into a clean diesel.

Similarly Plastics waste made out of PE, PP and PS can be used to pave roads,the process starts  cut into a small size of 4.75mm using shredding machine. The aggregate mix is heated around 165°c and transferred to mixing chamber. Similarly the bitumen is to be heated up to a maximum of 160°c to have good binding and to prevent weak bonding. At the mixing chamber, the shredded plastics waste is to be added. It get coated uniformly over the aggregate within 30 to 60 seconds, giving an oily look. The plastics waste coated aggregate is mixed with got bitumen and the resulted mix is used for road construction.