help with uln2003a with pic16f84a

Status
Not open for further replies.

ernestclydeachua

Junior Member level 1
Joined
Aug 5, 2012
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,380
can some one help me im using pic16f84a and a driver ic and i want to energize a 6vdc relay
 

Connect:

1. output pin of PIC to input pin of ULN2003
2. output pin of ULN2003 to one side of the relay coil. The other side of the relay coil goes to +6V.
3. the GND (pin 8) of the ULN2003 goes to ground (-ve side of the supply).
4. the Common pin (pin 9) of the ULN2003 goes to the same +6V as the relay.

When you make the PIC pin high, the output of the ULN2003 will go low and 6V will appear across the relay coil to operate it.

Brian.
 

The following link shows how to use an ULN 2083 (The eight NPN Darlington connected transistors array) with a PIC16F84A.

You will get the idea. Your ULN2003A consist of seven npn Darlington pairs.
https://www.edaboard.com/threads/231528/




you can use ULN 2003 for connecting seven relays or ULN 2803 for connecting eight relays. Above Figure shows how to connect a relay to microcontroller using ULN 2003/ULN 2803. These IC’s are high voltage, high current Darlington transistor arrays with open collector outputs and free-wheeling clamping diodes hence there is no need of a diode across the relay. Also there is no need of the series base resistor as the IC has an internal resistor of 2.7KΩ see more

- - - Updated - - -

(CODE in the first link above)
 
Last edited:

I don't get your point of connecting pull-ups to the processor outputs, except you want to activate the outputs when processor is reset respectively not operating. Usually you want just the opposite, which is achieved by the internal ULN2003 pull-down resistors.

Pull-ups would be required with 8051 open-drain IOs, but not for PIC processors.
 

Here is the source code

Code:
#define RELAY PORTB.F0

void main() {
     TRISB = 0x00;
     PORTB - 0x00;
     while(1) {
              RELAY = 1;
              Delay_ms(3000);
              RELAY = 0;
              Delay_ms(3000);
     }
}
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…