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.

How control a Relay with PIC

Status
Not open for further replies.

terka

Advanced Member level 4
Full Member level 1
Joined
Dec 15, 2003
Messages
100
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Activity points
936
Hi

I want control a relay with PIC
I need some eschematic for this

Thank you
 

not to be rude, but there are billions of circuits available on the internet that does that. Maybe you could look in google first?


ASIC
 

OK
sorry for my question, but I had contribute to this forum board too.

Bye
 

For small current relays and cheap circuit I use transistors to drive the relay from the PIC ports.
A NPN general transistor (BC547) can be used to drive up to 100mA coils. More than this you can use a darlington transistor or use a MOSFET (drivered by bipolar transistor).
Vcc
___!___
! !
_ !
1N4007 Λ Rly coil
!______!
!
!
C
PIC port >--Resistor----B NPN transistor
E
!
GND

Just remember to use 1N4007 diodes to Back Voltage generated by the coil.
The relay is activated by high logic level (4.7V in the PICs). The resistor is calculated:

R = (4.7V - Vbe)/Ib

Ib = Ic / transistor beta (Ib cannot be greater than 25mA)
Ic = current in the coil
Vcc must be at less the coil voltage + Vce saturation


The PIC I/O ports can source or drain up to 25 mA, so they can be connected directly to small reed relays (use the diodes reversed).
 

rkodaira, you should use tag "code" to preserve formatting of your picture, otherwise it is like mess.

As to relay control, small example with double-transistor is attached.

For many relay outputs I would suggest to use ULN2003 driver - it has Darlinghton and protection diode inside for 7 channels.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top