Monday, 3 February 2014

Home made switch mode power supply

Switch Mode Power Supply For Automotive Applications

Introduction:-

      Switch mode power supply (SMPS) is a type of an electronic power converter which switches current at a fast rate to increase, decrease, regulate or condition the output voltage or current.
    In other words like every other power supply a SMPS transfers the power from the input to the output like every other power supply but the advantages are discussed later on.
    That being said the most important aspect of a switch mode power supply is the high switching frequency. All SMPS operate at a very high switching frequency typically from 25 Khz up to 1Mhz. 

Types of SMPS

    They are of two basic types:-
Isolated
Non-isolated
     Non-isolated switch mode power supplies have no electrical isolation between input and output. These types of SMPS do not use a transformer at the output but instead uses an inductor and capacitor as an energy storing components and by using these and variable duty cycle the output voltage and current can be controlled or converted. These are used in low power applications, typically lower than 100 watts. Some types of non-isolated SMPS are:-
Buck converter
Boost converter
Buck boost converter
Charge pump/switched capacitor converter

Isolated

    Isolated SMPS contains a transformer at the output so there is electrical isolation between input and output. This power supply has the advantage over the non-isolated types that it is much safer when used for mains powered power supply. These types of SMPS are used for higher power applications 100 watts and above. These power supplies can easily produce a wide range of voltages within the same power supply by simply using different secondaries .Types of non-isolated SMPS are :-
Push pull
Flyback
Half-bridge
Full-bridge
Forward converter
Advantages And Disadvantages of  SMPS

Advantages

Much more efficient as compared to linear power supplies because it uses components as switches rather than resistive elements.
Smaller and lighter.
Cheaper at higher power levels (sometimes in lower power as well).
Regulation is easy and efficient to implement .

Disadvantages

The circuit is much more complex as compared to linear PSUs.
EMI/RFI which is inherent in SMPS is difficult to suppress.
Electronic noise at the output and input terminals.
Implementation 
      To make a switch mode DC to DC converter for automotive application the topology used is push pull converter. This topology is selected because it uses less amount of switching devices as compared to others.
    Circuit Diagram
     control board 

                   
power stage

     SG3525

     The control board uses sg3525 PWM controller IC. This IC generate the high frequency pulses required to drive the MOSFETs. It has the following pinout:-
 
    The switching frequency is given by the formula shown. Capacitor Ct is connected between pin 5 and ground and Rt is connected between pin 6 and ground .Rd is known dead time resistor which is explained later.
     Pin 14 and 11 are inverted outputs which would be connected to each bank of MOSFETs. The frequency at these pins are half the switching frequency set by the above formula. It can source and sink up to 400 ma peak.
     A capacitor is connected at pin 8 is known as soft start capacitor which when used causes the output pulse width to increase slowly when the circuit is switched on. Without it there would a large inrush current during start up which may damage the MOSFETs.
    Pin 1(inverting) and 2 (non-inverting) are the inputs to the onboard error amplifier. These pins are used to control the output pulse width. Often they are used with feedback to make regulated power supplies. When the voltage on the inverting input is greater than the voltage on the  non-inverting input the duty cycle decrease. Similarly when the voltage in the inverting input is lower than the non-inverting input the duty cycle increase
   Pin 16 is the output for the built in voltage reference module whose voltage is equal to 5.1v .This reference voltage is often used for one of the input to the error amplifier to set up feedback with regulation or for a constant duty cycle mode as used in our application.   

Working Principle

     There are two banks of MOSFETS which turn on alternatively but both the banks never turn on simultaneously.

    As seen from this image the gate waveform show that at a time only one MOSFET will be on. Also the on time of one bank is a bit different from the off time of the other bank. This difference is known as dead time. It ensure that one bank of MOSFET do not turn on until the other bank is fully off. Without dead time there would be large ringing and spikes in the primary and secondary.
     When one MOSFET turns on it causes the production of magnetic flux in one direction and when the other MOSFET turns on the production of magnetic flux is in the opposite direction. Doing so is very important because otherwise the transformer would saturate due to flux in one direction only causing large losses and rendering the transformer useless.



Transformer Design

    For our particular application we need to wind the core ourselves because the transformer we need are not available with the required windings. For high frequency applications the iron core transformer cannot be used because the eddy current losses would be too high. We need a transformer core which have high permeability and  low electrical conductivity .It should have initial permeability of 2500-3000 and maximum flux density of 4500-5000 .This is only possible by sing ferrite transformer.
     The transformer used is ETD49 .It is a ferrite core transformer. To calculate the number of turns required at the primary we use the following formula:-

Where the maximum magnetic flux is 1300-2000 gauss we. For our application we use 1500 gauss.
 Ac ic the effective cross-sectional area of the transformer in cm^2 which for ETD49 is 2.11cm^2. 
The frequency is equal to 66 khz.
With all these values we get 2 turns primary center tap. I.e. 2 turns then center tap and then another 2 turns.
The transformation ratio is 2.5. so we need 5 turns secondary then center tap and then another 5 turns.

Results

The power supply was made and we got the following results 
Input voltage =12v
Output voltage =+-30v
Maximum power =400 watts (theoretical)
Measured power =200 watts
Voltage drop at 200 watts =+-2.5v
Efficiency = 92.5% (measured at 90 watts)

 Home made picts



ferric cloride solution 



home made drill





control circuit using IC






mosfets


  


home made transformer 







home made heat sink for mosfets from aluminium used for window making








utrafast diodes connection



home made transformer














Thursday, 2 January 2014

Radio frequency identification

                                                     

Radio frequency identification (RFID) means wireless  use  of radio frequency electromagnetic fields to transfer the data and to track the objects, RFID use tags attached to mobile objects , which contain electronically stored information , some tags are power bye and work at short range via electromagnetic induction ,  other use local power source such is battery , else have no battery but collect energy from  EM field , which emit microwaves at high frequency , this type of tags operate at hundred meters
   
 



             
RFID  tags are used in many manufacturers products and in many industries , e.g. jeans ,shampoo, which embed tiny tracking chips in merchandise , the chips can follow goods from the time they leave the plant until you buy them at your local shopping mall a, even after u take them home
RIFD chips offer a wealth of advantages to product maker and retailers ,they can tell shippers when trucks are delayed, and they can alert store security when products are being stolen ,
RIFD is use in national identity cards, visa card, ATM cards, SIM cards, jeans , shoes etc  and one can also fit it in human body in order to track some one.
                            

Sunday, 29 December 2013

C++ programming

this article is related with my previous topic , which was about c++ programming , here i m going to discuss that article more.

C++ programming

Std::cout

Standard output stream object
“Connected” to the screen
std:: specifies the "namespace" which cout belongs to
std:: can be removed by the use of using statements
with the help of using statement we can write cout instead of std::cout as we would observe in the next program.
<< 
Stream insertion operator 
Value to the right of the operator (right operand) inserted into output stream (which is connected to the screen)

std::cout << “Welcome to C++!\n”;



Indicates that a “special” character is to be output 


There are multiple ways to print text. Following are some more examples.

output 

Testing and debugging 

Bug
A mistake in a program
Debugging
Eliminating mistakes in programs
Term used when a moth caused a failed relay on the Harvard Mark 1 computer.  Grace Hopper and other programmers taped the moth in logbook stating:          “First actual case of a bug being found.”

Program errors

Syntax errors
Violation of the grammar rules of the language
Discovered by the compiler
Error messages may not always show correct location of errors
Run-time errors
Error conditions detected by the computer at run-time
Logic errors
Errors in the program’s algorithm
Most difficult to diagnose
Computer does not recognize an error

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

                                              murad ali shah .......... mobile zone;;;;;;;;;;;;;;we engineer the nation future 



computer programming in C++

in this article and in the incoming next articles i will cover all those topic , that will help you in writing a program , that is used in many designing eg in making calculator , logical operation etc , here its some describation of programming and a computer, or some mobile etc these programe are built in a device and come by default.

What is computer?

Computer
A device capable of performing computations and making logical decisions
A machine that manipulates data according to a list of instructions.
A programmable device that can store, retrieve, and process data.

Computer programs

Sets of instructions that control a computer’s processing of data

Hardware
Physical part of the computer
Various devices comprising a computer
Examples: keyboard, screen, mouse, disks, memory, CD-ROM, and processing units

Software
A collection of computer programs, procedures and documentation that perform some tasks on a computer system
Programs that run a computer

Computer organization

There are Six logical units in every computer:
Input unit
Obtains information (data and computer programs)  from input devices (keyboard, mouse)
Output unit
Outputs information to output device (screen, printer) or to control other devices.
Memory unit
 Rapid access, low capacity, stores input information
Arithmetic and logic unit (ALU)
Performs arithmetic calculations and logic decisions
Central processing unit (CPU)
Supervises and coordinates the other sections of the computer
Secondary storage unit
Cheap, long-term, high-capacity storage, stores inactive programs

Computer languages

Computer languages are divided into three types.
Machine languages
Machine language is machine dependent.
Strings of numbers giving machine specific instructions
Example:
+1300042774 +1400593419 +1200274027

Assembly languages

English-like abbreviations representing elementary computer operations (translated via assemblers)
Example:
  LOAD BASEPAY ADD OVERPAY STORE GROSSPAY
     Translator programs called assembler were developed to convert assembly language programs to machine language programs at computer speed.

High-level languages

Similar to everyday English, use mathematical notations (translated via compilers)
Example:
grossPay = basePay + overTimePay
C, C++ are the most widely used high level languages. Some other examples are
FORTRAN (formula translator)
         Used in scientific and engineering applications
COBOL (common business oriented language)
         Used to manipulate large amounts of data
Pascal
          Used to teach structured programming
Translator programs called Compilers converts high-level language programs into machine language

Object technology

Models the real world with groups of interacting objects

Object technology is a packaging scheme that helps create Meaningful software units
Date objects, time objects, paycheck objects, invoice objects, audio objects, video objects, file objects, record objects, etc.
Any noun can be represented as an object
Reusable software components that model real world items
More understandable, better organized and easier to maintain than procedural programming
Favor modularity
Java and C++ are popular object oriented languages.
Allows development of more error free and reliable software.

Basics of C++ environment 

Phases of C++ Programs    
       to be executed        
      1     EdiD
      2   process
      3    Compile
      4   Link
       5   Load
        6  Execute

Program organization

Program statement
Definition
Declaration
Action

Executable unit
Named set of program statements
Different languages refer to executable units by different names
Subroutine:  Fortran and Basic
Procedure: Pascal
Function : C++

C++ programming 

C++ program
Collection of  definitions, declarations and functions
Collection can span multiple files

Advantages
Structured into small understandable units
Complexity is reduced
Overall program size decreases
Pseudo code
Artificial, informal language used to develop algorithms
Similar to everyday English

Not executed on computers
Used to think out program before coding
Easy to convert into C++ program
Only executable statements
No need to declare variables
Algorithm
A sequence of precise instructions which leads to a solution
Program
An algorithm expressed in a language the computer can understand

program design 

Programming is a creative process

Program Design Process

Problem Solving Phase

Result is an algorithm that solves the problem

Implementation Phase
Result is the algorithm translated into a programming language
Program solving phase
Be certain the task is completely specified
What is the input?  
What information is in the output?  
How is the output organized?
Develop the algorithm before implementation
Experience shows this saves time in getting your program to run.
Test the algorithm for correctness

Implementation phase

Translate the algorithm into a programming language
Easier as you gain experience with the language
Compile the source code
Locates errors in using the programming language
Run the program on sample data
Verify correctness of results
Results may require modification of the algorithm and program




main program





 










comments



the part will be discuss in the next article





Sunday, 15 December 2013

Bipolar Junction Transistors

my previous article was about programming and the uses of microprocessor in mobile phone , laptop and any device which is program , today i will talk about basic circuit elements and its uses in this post and in the next incoming post , from these circuit elements the basic circuit , a skeleton of a device is made, each elements has its own function , before learning modern techtenology it is neccessary to learn these basic ,electrical engineering is impossible without knowing these things, after my study i make a short form of it , which will be easy for the readers and will not consume his valuable time too much , lets have a look of it.

Introduction

A transistor is a device which can be used as either an amplifier or a switch. Let’s first consider it’s operation in a more simple view as a current controlling device
Basic Transistor Operation
Look at this one circuit as two separate circuits, the base-emitter(left side) circuit and the collector-emitter(right side) circuit. Note that the emitter leg serves as a conductor for both circuits.The amount of current flow in the base-emitter circuit controls the amount of current that flows in the collector circuit. Small changes in base-emitter current yields a large change in collector-current.
Transistor Structure
With diodes there is one p-n junction. With bipolar junction transistors (BJT), there are three three layers and two p-n junctions. Transistors can be a either pnp or npn type. 

Transistor Characteristics and Parameters

As previously discussed, base-emitter current changes yields large changes in collector-emitter current. The factor of this change is called beta
beta = IC/IB
There are three key dc voltages and three key dc currents to be considered. Note that these measurements are important for troubleshooting. 
IB: dc base current 
IE: dc emitter current
IC: dc collector current
VBE: dc voltage across base-emitter junction
VCB: dc voltage across collector-base junction
VCE: dc voltage from collector to emitter
For proper operation the base-emitter junction is forward biased by VBB and conducts just like a diode. 
The collector-base junction is reverse biased by VCC and blocks current flow through it’s junction just like a diode.
Remember current flow through the base-emitter junction will help establish the path for current flow from the collector to emitter. 
Analysis of this transistor circuit to predict the dc voltages and currents requires use of Ohm’s law, Kirchhoff’s voltage law and the beta for the transistor. 
Application of these laws begins with the base circuit to determine the amount of base current. Using Kichhoff’s voltage law, subtract the .7 VBE and the remaining voltage is dropped across RB. Determining the current for the base with this information is a mThe collector current is determined by multiplying the base current by beta. atter of applying of Ohm’s law.  VRB/RB = IB

What we ultimately determine by use of Kirchhoff’s voltage law for series circuits is that in the base circuit VBB is distributed across the base-emitter junction and RB in the base circuit. In the collector circuit we determine that VCC is distributed proportionally across RC and the transistor(VCE)
Collector characteristic curves gives a graphical illustration of the relationship of collector current and VCE with specified amounts of base current. With greater increases of VCC , VCE continues to increase until it reaches breakdown, but the current remains about the same in the linear region from .7V to the breakdown voltage.
With no IB the transistor is in the cutoff region and just as the name implies there is practically no current flow in the collector part of the circuit. With the transistor in a cutoff state the the full VCC can be measured across the collector and emitter(VCE)
Current flow in the collector part of the circuit is, as stated previously, determined by IB multiplied by . However, there is a limit to how much current can flow in the collector circuit regardless of additional increases inOnce this maximum is reached, the transistor is said to be in saturation. Note that saturation can be determined by application of Ohm’s law. IC(sat)=VCC/RC The measured voltage across this now seemingly “shorted” collector and emitter is 0V. IB. 
The dc load line graphically illustrates IC(sat) and Cutoff for a transistor
The beta for a transistor is not always constant. Temperature and collector current both affect beta, not to mention the normal inconsistencies during the manufacture of the transistor.
There are also maximum power ratings to consider. 
The data sheet provides information on these characteristics..
in the next article i will let u know about transistor amplifier and transistor switch . be in tough with this blog and learn more and more..................continue