Relay Backeffecting the circuit

Thread Starter

Ishan Jain

Joined Nov 12, 2016
100
You don't understand how the ULN2003 works. Each channel is a darlington transistor, so the chip needs ground to operate.
If your not driving a relay (e.g. a LED), COM does not have to be connected. COM is the at the relay supply voltage and is the "other half" of all of the built in suppression diodes. If the relays were far away from the ULN chip, I MIGHT consider extra ones at the relay(s).

Datasheet: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwi10aHbmabQAhWF2YMKHfhpAMYQFgggMAA&url=http://www.ti.com/lit/ds/symlink/uln2003a.pdf&usg=AFQjCNHUdv8pRaS3Y-KFFvAIM8_JaWmeew&sig2=vng5jOPE_9sNsOAx7yhZew See section 5 for the functions of pin 9 and 10.

You will need to look at figures 7 & 8 http://www.ti.com/lit/ds/symlink/uln2003a.pdf?#page=9 along with the coil current to figure out how much voltage the driver will drop and what input current is required. You also have to make sure this exceed the pull-in voltage for the relay.

The input voltage typically has to be greater than 2.9 V to turn the driver on.
my input voltage on ULN2003 is greater than 2.9 volt i.e about 4.9 volts, then also the ULN2003 is not switching the relay.
 

eetech00

Joined Jun 8, 2013
4,705
You don't understand how the ULN2003 works. Each channel is a darlington transistor, so the chip needs ground to operate.
If your not driving a relay (e.g. a LED), COM does not have to be connected. COM is the at the relay supply voltage and is the "other half" of all of the built in suppression diodes. If the relays were far away from the ULN chip, I MIGHT consider extra ones at the relay(s).

Datasheet: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwi10aHbmabQAhWF2YMKHfhpAMYQFgggMAA&url=http://www.ti.com/lit/ds/symlink/uln2003a.pdf&usg=AFQjCNHUdv8pRaS3Y-KFFvAIM8_JaWmeew&sig2=vng5jOPE_9sNsOAx7yhZew See section 5 for the functions of pin 9 and 10.

You will need to look at figures 7 & 8 http://www.ti.com/lit/ds/symlink/uln2003a.pdf?#page=9 along with the coil current to figure out how much voltage the driver will drop and what input current is required. You also have to make sure this exceed the pull-in voltage for the relay.

The input voltage typically has to be greater than 2.9 V to turn the driver on.
Maybe you misunderstood.

I'm aware of how the COM pin is used but its doesn't have to be used. In fact, it could have been left disconnected. I recommended the diodes across the coil because I don't trust the internal diodes of the chip and I don't know how far the relay is from the chip.... +5v at the inverter input switches the output to 0.6v.

Also, I did ask the OP for the relay part number so I could lookup the specs and verify PU/DO voltage and current. And also the 7805 part number so I could verify the current capacity.
 
Last edited:

eetech00

Joined Jun 8, 2013
4,705
my input voltage on ULN2003 is greater than 2.9 volt i.e about 4.9 volts, then also the ULN2003 is not switching the relay.
Make sure your energizing the right ULN input pin.
With the ULN input pin at 4.9v, measure the voltage across the relay coil and report back.
 

AnalogKid

Joined Aug 1, 2013
12,140
But each relay should also have a diode across the each coil to suppress back EMF.
They do. See the 2003 datasheet. Each output has a suppression diode connected to the COM pin. In the schematic the TS has this pin connected to the5 V that supplies the relay coils. So, barring effects from the inductive loops of the pc board layout, each relay coil already is suppressed.

ak
 

eetech00

Joined Jun 8, 2013
4,705
They do. See the 2003 datasheet. Each output has a suppression diode connected to the COM pin. In the schematic the TS has this pin connected to the5 V that supplies the relay coils. So, barring effects from the inductive loops of the pc board layout, each relay coil already is suppressed.

ak
Yes...I know....thanks
 

Thread Starter

Ishan Jain

Joined Nov 12, 2016
100
They do. See the 2003 datasheet. Each output has a suppression diode connected to the COM pin. In the schematic the TS has this pin connected to the5 V that supplies the relay coils. So, barring effects from the inductive loops of the pc board layout, each relay coil already is suppressed.

ak
So, how can I drop that 0.69 volts at ULN2003 output pin to ground? Will a pull up resistor at the ULN input help me with this problem. Any other solution from your side is welcomed.

Thank you
 

AnalogKid

Joined Aug 1, 2013
12,140
So, how can I drop that 0.69 volts at ULN2003 output pin to ground? Will a pull up resistor at the ULN input help me with this problem. Any other solution from your side is welcomed.
A pull up resistor would increase the base current, but that is not the problem. You need to go with a non-darlington driver, wither a MOSFET a logic-level type with a low threshold voltage) or a single transistor that can handle the relay coil current. Does the relay data sheet list a minimum guaranteed pull-in voltage?

ak
 

eetech00

Joined Jun 8, 2013
4,705
Hi

You might need to use a lower voltage relay (like 3v) to make it work reliably. You need to give us the part number of the relay so we can look up its specs.
 

Thread Starter

Ishan Jain

Joined Nov 12, 2016
100
A pull up resistor would increase the base current, but that is not the problem. You need to go with a non-darlington driver, wither a MOSFET a logic-level type with a low threshold voltage) or a single transistor that can handle the relay coil current. Does the relay data sheet list a minimum guaranteed pull-in voltage?

ak
Isnt there a way I can use ULN2003 with some changes because I have to submit my project by tommorrow
 

Thread Starter

Ishan Jain

Joined Nov 12, 2016
100
Hi

You might need to use a lower voltage relay (like 3v) to make it work reliably. You need to give us the part number of the relay so we can look up its specs.
Hi

You might need to use a lower voltage relay (like 3v) to make it work reliably. You need to give us the part number of the relay so we can look up its specs.
The relay part no. is HRS4H-S-DC5V
 

JWHassler

Joined Sep 25, 2013
308
The '7805' needs more info: how much current can it supply?
The relays require 70mA each and problems can occur if all three are on simultaneously (like at power-on with the pullups enabled and the port not yet initialized( a rookie mistake I make often) )
Also: the 2003's outputs can be paralleled for more drive: the corresponding inputs, too, of course.
 

Thread Starter

Ishan Jain

Joined Nov 12, 2016
100
The '7805' needs more info: how much current can it supply?
The relays require 70mA each and problems can occur if all three are on simultaneously (like at power-on with the pullups enabled and the port not yet initialized( a rookie mistake I make often) )
Also: the 2003's outputs can be paralleled for more drive: the corresponding inputs, too, of course.
But if I want to control a single appliance through ULN2003 with my relay requirements then what else I should do? The 7805 part number is LM7805CV.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,140
If you must stay with the 2003 as the output driver, one solution is to change the relays to versions with a 12 V coil, and move the relay coil connections *and the 2003 COM pin* to the 12 V input.

ak
 

Thread Starter

Ishan Jain

Joined Nov 12, 2016
100
If you must stay with the 2003 as the output driver, one solution is to change the relays to versions with a 12 V coil, and move the relay coil connections *and the 2003 COM pin* to the 12 V input.

ak
With my HRS4H-S-5V relay can I switch it by using BC109 or BC337 transistor and connect it directly to arduino pin 13 to make my appliance ON and OFF and avoiding backing off the circuit.
 

Attachments

AnalogKid

Joined Aug 1, 2013
12,140
With my HRS4H-S-5V relay can I switch it by using BC109 or BC337 transistor and connect it directly to arduino pin 13 to make my appliance ON and OFF and avoiding backing off the circuit.
Not directly. You will need to keep the series base resistor in the circuit. The relay coil requires 100 mA of current, so you will need about 10 mA of base current minimum. Calculate the base resistor to achieve this. Because a microcontroller output pin pull very near to GND, you do not need the 10 K resistor to GND.

ak
 

Thread Starter

Ishan Jain

Joined Nov 12, 2016
100
Not directly. You will need to keep the series base resistor in the circuit. The relay coil requires 100 mA of current, so you will need about 10 mA of base current minimum. Calculate the base resistor to achieve this. Because a microcontroller output pin pull very near to GND, you do not need the 10 K resistor to GND.

ak[/QUOTE
But arduino I/O pins deliver a current of about 25mA, so why do I require a base resistor? Also the ULN2003 has a output collector current of about 500mA then why it it is not helping in the circuit?
 
Check what the output pin of the processor is doing (Voltages) WITHOUT the ULN2003 connected with a voltmeter.

What exactly is the port mode? I can't be certain if there are internal pull-ups or pull downs that need to be enabled or not.

It won;t take much leakage current to turn the ULN chip on.
 

Thread Starter

Ishan Jain

Joined Nov 12, 2016
100
Check what the output pin of the processor is doing (Voltages) WITHOUT the ULN2003 connected with a voltmeter.

What exactly is the port mode? I can't be certain if there are internal pull-ups or pull downs that need to be enabled or not.

It won;t take much leakage current to turn the ULN chip on.
what do you mean by port mode?
 

AnalogKid

Joined Aug 1, 2013
12,140
But arduino I/O pins deliver a current of about 25mA, so why do I require a base resistor? Also the ULN2003 has a output collector current of about 500mA then why it it is not helping in the circuit?
The base resistor is there to protect the external transistor by limiting its base current to a safe value. That does not apply to driving a 2003 because that part has built-in base resistors.

Yes, an individual section of a 2003 is rated to sink 0.5 A without burning up. But if you check the datasheet, you will see that the voltage drop from the output pin to GND is over 1 V at that current. This is not a problem when driving a 12 V or 24 V relay, but is a significant decrease in applied voltage to a 5 V part.

ak
 

Thread Starter

Ishan Jain

Joined Nov 12, 2016
100
The base resistor is there to protect the external transistor by limiting its base current to a safe value. That does not apply to driving a 2003 because that part has built-in base resistors.

Yes, an individual section of a 2003 is rated to sink 0.5 A without burning up. But if you check the datasheet, you will see that the voltage drop from the output pin to GND is over 1 V at that current. This is not a problem when driving a 12 V or 24 V relay, but is a significant decrease in applied voltage to a 5 V part.

ak
I calculated the value of the base resistor and is coming around 5k ohms for 10mA of current and you said that 10k resistor to ground is not needed. so whether i should use BC109 or BC337 for the circuit.
 
Top