Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 12th February 2004, 08:06 PM   (permalink)
Default 89C51 and Relays

hello
Dear I m using 89c51. i want to drive 12 5 volt relays. i m using 2n2907 and 4.7k resistance but relay is not opreate.
pls help me.
naimidrees is offline  
Old 12th February 2004, 10:03 PM   (permalink)
Default

post your circuit ... but i'll try to describe how to connect it. First, you probably want to use NPN transistors and NOT the PNP you mentioned. For instance a TIP31 or 2N2222.

The collector of the transistor goes to +Vcc, the base through a 1k or so resistor to the output pin of your micro. The emitter goes to one of the coil pins on your relay. The other coil pin goes to ground. You also want to put one or two diodes in the circuit. I usually use two. One of them has the anode at the emitter of your transistor and the cathode at +Vcc. The other has the anode at ground and cathode at the emitter. This way any back emf from the relay wont blow your transistor and/or micro port. Not many micros like 500V at their outputs.
crust is offline  
Old 13th February 2004, 07:13 PM   (permalink)
Default

Quote:
Originally Posted by crust
post your circuit ... but i'll try to describe how to connect it. First, you probably want to use NPN transistors and NOT the PNP you mentioned. For instance a TIP31 or 2N2222.

The collector of the transistor goes to +Vcc, the base through a 1k or so resistor to the output pin of your micro. The emitter goes to one of the coil pins on your relay. The other coil pin goes to ground. You also want to put one or two diodes in the circuit. I usually use two. One of them has the anode at the emitter of your transistor and the cathode at +Vcc. The other has the anode at ground and cathode at the emitter. This way any back emf from the relay wont blow your transistor and/or micro port. Not many micros like 500V at their outputs.

please can u give me the diagrame
i m very thankfull of u.
naimidrees is offline  
Old 14th February 2004, 10:50 AM   (permalink)
Default way to connect

Hi man, this is the circuit for u. For more efficient switch u can use the 74541 buffer, but still the circuit can work properly if u ignore the buffer. one more thing, i've isolated the microcontroller circuit with opto coupler, this is for protect the uE circuit from heavy power in output, anyway if ur project is simple and not costy u may ignore the optocoupler. thanks.
Attached Images
File Type: jpg circuit_172.jpg (21.1 KB, 647 views)
__________________
--Turn arround, Smell What You Dont See---
kumar_3k is offline  
Old 14th February 2004, 11:44 AM   (permalink)
Default

The optoucoupler isn't connected right. As it's a NPN it can only switch negative, not positive. Connect it's emitter to ground, it's collector to the base of the 2N2222 and a pull up resistor from that same base to +
Exo is offline  
Old 15th February 2004, 02:53 AM   (permalink)
Default

replase 4.7k to 470 ohm.
Attached Images
File Type: jpg relay.jpg (10.1 KB, 614 views)
tanveerriaz is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 04:41 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker