Why buffer is used between micro controller and relays?

Hi,

Buffers usually provide protection to the microprocessor from what is called, `back EMF`(also called spiking) in layman's terms, or the energy created in the coil as the control voltage is released. Also, since most micro's have limited output current capabilities, the buffer could serve as a relay driver, providing the power necessary to energise the relay.

Hope this helps,

Cubby

Cubby is right, mostly the maximum current that a micro controller can source or sink is 25ma, where as most of the relays require 50ma-200ma so a buffer is required to provide the necessary current to activate the relay coil, moreover a back emf is generated when the relay is turned OFF which can damage the controller so buffer also protects the controller from this back EMF......check this link to know more about interfacing relay to a micro controller

http://www.dnatechindia.com/index.php/Tutorials/8051-Tutorial/Relay-Interfacing.html