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.
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).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.