Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Off-topic

???
02/10/04 05:28
Read: times


 
#64374 - RE: to drive a relay from 8051
Responding to: ???'s previous message
Its very true what Russell said.
But if you want to drive only one relay then that might increase cost.

Try this

Pin 1 (P1.0) of 8051 microcontroller to a cathod of an Opto coupler. Connect the opto couplers Anode to 5V supply. Then connect the 12V ground to the emitter of opto coupler, and connect the collector to the base of the base of a PNP transistor (SL100) then connect its emitter to 12V and the collector to the relay and connect the other trminal of the relay to 12V ground.
Connect a diode accross relay terminals with catod connected to the terminal where the collector of the PNP transistor is connected.

Now in the program when you want to turn the relay on just make pin 1 i.e. P1.0 low

CLR P1.0


(I am assumming that you are using controller simillar to AT89C51 and you have seperately generated 12 & 5 volt supplies if not then 12V ground is same as 5V ground.
Opto coupler is used to isolate the 12V circuit from 5V circuit. This blocks any unwanted fluctuations penetrating the 5V ground which inturn may spoil the microcontroller behaviour)

Erik if I am any where wrong please let me know

Sachin

List of 5 messages in thread
TopicAuthorDate
to drive a relay from 8051            01/01/70 00:00      
   RE: to drive a relay from 8051            01/01/70 00:00      
      RE: to drive a relay from 8051            01/01/70 00:00      
   RE: to drive a relay from 8051            01/01/70 00:00      
   RE: to drive a relay from 8051            01/01/70 00:00      

Back to Subject List