Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

89C51 and Relays

Status
Not open for further replies.

naimidrees

New Member
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.
 

crust

Member
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.
 

naimidrees

New Member
crust said:
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.
 

kumar_3k

New Member
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.
 

Attachments

  • circuit_172.jpg
    circuit_172.jpg
    21.1 KB · Views: 1,004

Exo

Active Member
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 +
 
Status
Not open for further replies.

Latest threads

Top