Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

howto operate a 12 volt dc RELAY with 89C51

Status
Not open for further replies.

A 6VDC relay consume a minimum of 10 to 20 mA upon 5VDC, which is not possible to switch on directly from a microcontroller,

I have also faced same problem.I burnt my 3 NXP microcontrollers while controlling 12v relay.Does resistor bitween base and controller pin is neccessary because controller current is very minimum.when we use resistance it becomes very very small.
2.ground of supply of microcontroller should connected to 12v supply ground.
3.can I use bc337 transistor or ULN 2003 and 2803.
4.what is need of flyback diode.
 

Hi,

I wish you can provide us a schematic of your circuit. Better if you name each component differently also all the nodes. Obviously the analysis could be done more accurate if you also give the values.

For instance, is your MCU pin (used for output) of open collector type (or drain) or else? (this is given on its datasheet). The one I use has open collector pins.

Kerim
 

A 6VDC relay consume a minimum of 10 to 20 mA upon 5VDC, which is not possible to switch on directly from a microcontroller,

I have also faced same problem.I burnt my 3 NXP microcontrollers while controlling 12v relay.Does resistor bitween base and controller pin is neccessary because controller current is very minimum.when we use resistance it becomes very very small.
2.ground of supply of microcontroller should connected to 12v supply ground.
3.can I use bc337 transistor or ULN 2003 and 2803.
4.what is need of flyback diode.

:-o Too many questions in one time :-D, i'll try to answer your all questions.

1. Yes their is need to put a suitable resistor in between a transistor and microcontroller pin, this resistor produces suitable voltage drop which is required for both micro as well as transistor. For 5V we normally use transistor in between 1K to 4.7 K ohm, which is depends upon transistor, you may use 2.2K to 4.7K ohm for general purpose transistors.

2. Yes ground connections are OK for this, all supplies ground should be common.

3. for driving PCB mount normal relay, you don't need ULN Darling ton pair Transistors IC, BC337 is more 800mA, its too big but you may use it, you may also use 2N2222, BC547, 2SC945, 2SC828.

4. Its Freewheeling diode not Flyback diode, it is for consuming stored energy in Relay after powering OFF, Actually A Relay stored energy in a current form and it returns or release energy back after powering OFF or switching OFF Relay. So a Freewheeling Diode is use to consume or neutralize this energy, otherwise this energy may cuase damage to other electrical and electronics components
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top