• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help configuring NPN Amp switch for 12V Relay

Status
Not open for further replies.

stuhagen

Member
I need some help confirming this diagram I have made. What this circuit does:

There is a switching output from an automotive ECU to the Fuel Pump ECU. It is either 2.5V or it is 5.0V. Basically a trigger to change the fuel pump voltage between 9V and 12V. I am sending this signal to a Comparator as the trigger, and I am using a 5.0V regualtor for the referance voltage. Once the ECU kicks the voltage to 5.0V the Comparator will trigger and send out the 12V signal to the NPN transistor. This NPN Amp is rated at 25 Amps, so there s/b sufficient current to trigger the relay.

Where I am not sure, is if I need to add a diode, a resistor, or a capacitor anywhere. And if I even have this diagram drawn fairly accurately.

The purpose to this is to switch over to a voltage enhancer to increase the speed of the fuel pump motor increasing its output.

TIA

Stu
 

Attachments

mvs sarma

Well-Known Member
I need some help confirming this diagram I have made. What this circuit does:

There is a switching output from an automotive ECU to the Fuel Pump ECU. It is either 2.5V or it is 5.0V. Basically a trigger to change the fuel pump voltage between 9V and 12V. I am sending this signal to a Comparator as the trigger, and I am using a 5.0V regualtor for the referance voltage. Once the ECU kicks the voltage to 5.0V the Comparator will trigger and send out the 12V signal to the NPN transistor. This NPN Amp is rated at 25 Amps, so there s/b sufficient current to trigger the relay.

Where I am not sure, is if I need to add a diode, a resistor, or a capacitor anywhere. And if I even have this diagram drawn fairly accurately.

The purpose to this is to switch over to a voltage enhancer to increase the speed of the fuel pump motor increasing its output.

TIA

Stu
Welcome to Electro-tech-online !
the modded schematic is appended. it is self explanatory, perhaps.
Base resistor (added now)value to be calculated, as tentative value shown there.
the relay has to see a voltage at pin 86(coils) and diode added to protect the transistor.
Snubbers (may be R-C or MOV) need to be designed to meet the need
 

Attachments

Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
hi,
In addition to Sarma's idea.

The 8K2 in the base of the power transistor will only give a base current of 1.4mA.
The gain of the transistor at Ic=500mA is 50, so the collector current will be about 50 *1.4 mA = 70mA.

Whats the resistance of the relay coil.?
 

rezer

New Member
I would use a pull-up resistor at the base of the transistor, maybe 1K-3.3KO. The LM311 is open-collector and will need proper biasing that a series resistor will not give. The series resistor is not required. Also go with a voltage divider instead of the 5V regulator as the reference. Since your trigger voltage is 5V as well, this may or may not be higher than the 5V reg. Use a resistor combo that will give you about 3.3V at the reference of the comparator. Use say a 4.7KO to the 12V rail in series with a 1.8KO to ground. This will give you about 3.3V for your reference.
Question: Do you want the 5V to trigger the relay, or the 2.5V?
If you want the relay to trip with 5V input, than you will have to switch the inputs of the comparator and use the non-inverting side as the input. Let us know how things work out.
Important: It is a good idea to use a flyback diode across the coil of your relay to protect your transistor and other components, like what has been suggested.
 

rezer

New Member
Sorry, the non-inverting symbol doesn't show up very well on your schematic. Your good there. What if you went with a different comparator, say an LM339 that can deliver more current? You could then eliminate the transistor and pull-up resistor on the output. You would have to swap your inputs and use the inverting side.
 

stuhagen

Member
WOW~! Thanks to everyone for these answers, this is great. I graduated in Electronics many years ago, but really never worked in the field, just as a hobbiest.

Anyways, a couple of answers. The relay is a standard Bosch automotive relay. I can measure the coil tonight, but I'd imagine it to be pretty low.

I want to basically "trigger" this relay when the onboard car computer signal voltage jumps to 5V. That is the signal that tells the fuel pump to kick it up to a full 12V.

The voltage on the (-) side of the comparator just needs to be above 2.5 and below 5.0v. I originally was going to use a 3.5V regulator, but this is what I had. Are you saying that I could eliminate the regualtor, and just use the car's 12V supply through some resistors? If so, please help me figure those values, or draw what your saying 4.7KO in series to 1.8KO.

Also, what value Diode should I use for this "flyback" diode.

Also, are you saying that I could eliminate the NPN alltogether by upgrading the comparator?? I really like that Idea, less components, less costs. And yes, the NPN was inserted because of the higher current that the relay might need.

So in summary, I could possibly just use a larger capacity comparator for this and be done?

(PS what is a snubber?)


Thanks Again,

Stu

Sorry, the non-inverting symbol doesn't show up very well on your schematic. Your good there. What if you went with a different comparator, say an LM339 that can deliver more current? You could then eliminate the transistor and pull-up resistor on the output. You would have to swap your inputs and use the inverting side.
 

rezer

New Member
View this schematic. It should work with what you need.
A snubber is usually an RC circuit used to suppress the rise of voltage or current to protect contacts of a relay from welding. Of course this depends on what load you are driving as well. They are also used with solid-state devices to protect them as well.
One thing I forgot to note on the schematic is the values of the R and C for the snubber. You can try a 1KO, 1W and .22uF cap.
 

Attachments

audioguru

Well-Known Member
Most Helpful Member
An LM339 is a quad comparator. An LM393 is the same but is a dual cpmparator. They are low power so they have a very low output current of only 6ma minimum with a saturation voltage loss of 1.5V max. it is much too wimpy to drive an automotive relay.

NTE parts are very expensive replacements for real parts. The NTE datasheet is missing all the details of the part but is shown on the datasheet from the original manufacturer.
The NTE1951 is a low dropout regulator that goes crazy if it doesn't have the input capacitor and output capacitor shown on the datasheets. The type of capacitor is important but is not discussed on the brief datasheet from NTE.
 

stuhagen

Member
Awesome~! I have a question for the "coil" portion of the relay. I see you running +12V on top, but below where the comparator is out putting, do I need to be grounding anything? I mean, I always thought 12V relays needed to be grounded somewhere for completing the circuit path loop. Or is it in this case that all we are doing is "energizing" the relay so it clicks over to "NO"-12V operation.

Also--"Audioguru"---can you recommend a different Comparator that may better handle this current? I checked on Digikey, but they don't search for this parameter. I got tired on reading every single one.

Stu


Oh forgot to ask....Is the way you have the "+" and "-" for the comparator reference's correct? If so, then I had mine backwards, in other words, I had the "Input" going to the "+", not the "-"



View this schematic. It should work with what you need.
A snubber is usually an RC circuit used to suppress the rise of voltage or current to protect contacts of a relay from welding. Of course this depends on what load you are driving as well. They are also used with solid-state devices to protect them as well.
One thing I forgot to note on the schematic is the values of the R and C for the snubber. You can try a 1KO, 1W and .22uF cap.
 
Last edited:

rezer

New Member
That's a good point about the automotive relay audioguru. The LM339 is capable of sinking 16mA. The LP339 can sink 30mA. What is the coil resistance of the relay you are using. Automotive or not, that is what you need to know to select the proper device to drive it. The LM/LP339 is twice the size as the LM393, but as audioguru indicated, is only good for up to 6mA. You can go with a quad comparator like the LP339 if you don't mind only using one of the comparators. But if your coil resistance is less than 400 ohms (750 ohms for the LM339), you will need something beefier. The relative difference in price between a dual and quad is negligable. This is an automotive relay you are using, correct?
 

stuhagen

Member
Heh~! Now I know why I may have needed the Amp. I just measured the coil and it reads 90 ohms. So this is pretty low. Is there a comparator that can handle this? Or am I back to needing the NPN Amp.

Stu


That's a good point about the automotive relay audioguru. The LM339 is capable of sinking 16mA. The LP339 can sink 30mA. What is the coil resistance of the relay you are using. Automotive or not, that is what you need to know to select the proper device to drive it. The LM/LP339 is twice the size as the LM393, but as audioguru indicated, is only good for up to 6mA. You can go with a quad comparator like the LP339 if you don't mind only using one of the comparators. But if your coil resistance is less than 400 ohms (750 ohms for the LM339), you will need something beefier. The relative difference in price between a dual and quad is negligable. This is an automotive relay you are using, correct?
 

Mikebits

Well-Known Member
I have a question/comment. For the 2.5/5v signal, are you sure it is a solid 5v rather than say 4.5v? I ask because if you set your VRef for 5vdc and the signal is say 4.5vdc your device will not trigger.

Also, using unregulated 12vdc through a divider as vref may not work so well as auto 12vdc goes from ~12 to 15 V
 

audioguru

Well-Known Member
Most Helpful Member
Comarators are used with low currents. If you need a high current then the comparator drives a transistor or Mosfet.

An LM339 quad comparator has a minimum output current of only 6mA. A typical one has more output current but you get whatever they have and it might be minimum. So a weak LM339 or LM393 can't drive an automotive relay without adding a transistor or two.

The output of the comparator goes to ground with a minimum current of only 6mA. A pullup resistor from the output to the positive supply voltage causes the output to go high but it cannot drive a relay coil.
 

stuhagen

Member
You are correct. I think the output might be around 4.8 to 5.1v I can't imagine it being dead nuts on. I think that 3.3v should work, because this is a Computer voltage output, and is controlled.

I should be a bit more clear. My "input" signal will be either 2.5V (9V operation) or it will be 5.0V (12V operation) There are 2 computers going on here. The main engine management, and the secondary Fuel Pump computer. It is the "main" engine management computer that sends these 2 voltage signals to the fuel pump computer. The fuel pump computer is what kicks out either 9V or 12V depending on the main computer signal. I am only working off the "output" signal from the main computer going to the fuel pump computer. So when the main computer tells the fuel pump computer that it is time to raise the pump voltage up to full 12V operation, it sends out this 5V signal. I want to take this signal to "trigger" the comparator. So the "referance" voltage should be higher than lets say 3.0V and lower than 5.0V. Where I get "mixed" instructions, is where to put the "referance" signal, and were to put the "computer" signal. ( meaning "-" pin ot the "+" pin on the comparator. The of course getting enough "amp" output to trigger the relay.

Stu


I have a question/comment. For the 2.5/5v signal, are you sure it is a solid 5v rather than say 4.5v? I ask because if you set your VRef for 5vdc and the signal is say 4.5vdc your device will not trigger.

Also, using unregulated 12vdc through a divider as vref may not work so well as auto 12vdc goes from ~12 to 15 V
 

stuhagen

Member
So this being said, can someone help me based on my original picture, or add in the NPN to the new drawing that "rezer" made. That is where I am having problems configuring this NPN into the schematic.

Stu


Comarators are used with low currents. If you need a high current then the comparator drives a transistor or Mosfet.

An LM339 quad comparator has a minimum output current of only 6mA. A typical one has more output current but you get whatever they have and it might be minimum. So a weak LM339 or LM393 can't drive an automotive relay without adding a transistor or two.

The output of the comparator goes to ground with a minimum current of only 6mA. A pullup resistor from the output to the positive supply voltage causes the output to go high but it cannot drive a relay coil.
 

audioguru

Well-Known Member
Most Helpful Member
An LM311 is a normal power single comparator that has over 8 times the output current of a comparator in a low power LM339 or LM393.
It drives a TIP31 which is a medium power power transistor.
You didn't say how much current your relay coil uses but this circuit should provide plenty of current and there are no extra comparators to disable.
 

Attachments

rezer

New Member
The LM311 is only capable of sinking 50mA. His relay will draw at least 133mA (90 ohm coil). He will have to use a transistor to drive the relay. A 2N3904 should work nicely (200mA continuous current). Again, going back to your original circuit, use the non-inverting input for input signal. You can use the LM311, like audioguru suggested. This will save real estate on your design.
You will want to add the things that were suggested earlier such as the snubber, flyback diode, voltage divider and pull-up resistor on the output of the LM311 (since it is open-collector). You may want to put a diode in series with your transistor base as well since the output of the LM311 will not saturate to 0V. This will require the output to be 1.4-1.5V before the transistor turns on. Otherwise, depending on things like the output current and temperature, may cause the transistor to go into conduction prematurely. Try using a 2KO resistor for the pull-up to keep the output current low. This will help in decreasing the saturation point
 
Last edited:

stuhagen

Member
rezer...I have done some modifications to the circuit you drew. I added the NPN as recommended. Not specifically yours mentioned below.

2 questions, is the flyback resistor R4 in my drawing? It is now at 240 ohm, is that the one you recommend 2K ohm?

"The "diode" in series with the base".......did I draw it correctly here? If so, what is a recommended value for that? Same as the other one in paralell with the coil?

Otherwise, I think I have added everything as you said, and as given. Looks like I am ready to etch a board here if this new design works.

Stu




The LM311 is only capable of sinking 50mA. His relay will draw at least 133mA (90 ohm coil). He will have to use a transistor to drive the relay. A 2N3904 should work nicely (200mA continuous current). Again, going back to your original circuit, use the non-inverting input for input signal. You can use the LM311, like audioguru suggested. This will save real estate on your design.
You will want to add the things that were suggested earlier such as the snubber, flyback diode, voltage divider and pull-up resistor on the output of the LM311 (since it is open-collector). You may want to put a diode in series with your transistor base as well since the output of the LM311 will not saturate to 0V. This will require the output to be 1.4-1.5V before the transistor turns on. Otherwise, depending on things like the output current and temperature, may cause the transistor to go into conduction prematurely. Try using a 2KO resistor for the pull-up to keep the output current low. This will help in decreasing the saturation point
 

Attachments

rezer

New Member
rezer...I have done some modifications to the circuit you drew. I added the NPN as recommended. Not specifically yours mentioned below.

2 questions, is the flyback resistor R4 in my drawing? It is now at 240 ohm, is that the one you recommend 2K ohm?

"The "diode" in series with the base".......did I draw it correctly here? If so, what is a recommended value for that? Same as the other one in paralell with the coil?

Otherwise, I think I have added everything as you said, and as given. Looks like I am ready to etch a board here if this new design works.

Stu
Yes, R4 is the resistor I was referring to as 2KO. Again, yes, the diode is drawn correctly. You want to connect R4 to the anode side of the diode. A 1N914 (1N4148) diode will work. Use what is marked on your schematic for the flyback diode across the coil of the relay, 1N4001.
I am assuming by your statement "...if this new design works." to mean that you will test it out on a breadboard first.:)
 
Last edited:

stuhagen

Member
If anyone of you are interested, this is how I drew it up for my final breadboarding. How it works, is during cruising, and under a certain RPM, the onboard ECU sends a 2.5V signal to the fuel pump ECU. That in turn then outputs a 9V power supply to the FP. As you can see, through the SPDT relay, the car is operating in this matter. You will also see a SPST relay on the left that is always supplying the fuel pump enhancer a 12V input. (armed)

When the car goes into higher RPM range (4K), the ECU sends a 5.0v signal to the FP ECU, and that in turn bumps the voltage up to 12V. Now the 3rd function is the pump enhancer. This is not quite activated as yet, but it is fully "armed". So when the Hobbs switch is activated (5.5K rpms), the enhancer (BAP) jumps the voltage to the fuel pump to 18V.....Increasing the fuel flow by quite a bit. The comparator is set to see this voltage change, and sends the signal to the coil to activate the relay and switch power to the BAP enhancer.

My concern about this whole set up was not having the enhancer unit kick from either (9v or even 12v) all the way to 18V in one switch. I wanted to do it in "steps"

Lets hope it works~!...Thanks to everyone, and I will report back after testing.

Stu
 

Attachments

Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top