Solved: Cooling Fan Relay Drive

All Megasquirt 1 support questions. See also the Documentation

Moderators: jsmcortina, muythaibxr

Post Reply
jammy86
Helpful MS/Extra'er
Posts: 81
Joined: Tue Sep 09, 2008 7:26 pm
Location: Wiltshire, UK

Solved: Cooling Fan Relay Drive

Post by jammy86 »

Hello,

I am having a problem with the relay control for my cooling fan. This is made up using the general purpose output circuit on the MSextra PCB. It seems there is not sufficient current to pull the relay in. I have checked that the high side of the coil has 12V and that the low side is pulled to ground when the output is active and it all checks out OK. If I shock the relay to get the actuator to bounce the MS is able to hold it in and so I think there is insufficient current to pull in the relay. I have checked that the relay is good. My understanding transistors is that the emitter current is proportional to the base current. Assuming the output of the CPU is 3.3V with a 1kohms base resistor and a beta value of 40 this results in a current capacity of 100mA (I might be wrong!??) this suggests to me that I want to drop the base resistor to 200ohms to achieve 0.5A.

Will this work? Can the output of the CPU supply ~14mA? (2.7volts/200ohms). Is there anything else I should check instead?

TIA
Last edited by jammy86 on Tue Jun 21, 2016 1:51 pm, edited 1 time in total.
Matt Cramer
Super MS/Extra'er
Posts: 17507
Joined: Thu Apr 16, 2009 8:08 pm

Re: Cooling Fan Relay Drive

Post by Matt Cramer »

CPU output is 5 volts.

What transistor are you using?
Matt Cramer -1966 Dodge Dart slant six running on MS3X
jammy86
Helpful MS/Extra'er
Posts: 81
Joined: Tue Sep 09, 2008 7:26 pm
Location: Wiltshire, UK

Re: Cooling Fan Relay Drive

Post by jammy86 »

slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Cooling Fan Relay Drive

Post by slow_hemi6 »

If I shock the relay to get the actuator to bounce
Much more indicative of a relay with a bad/sticking armature. I switch automotive relays all the time with 2n2222 or BC337. Absolutely no need to have the base resistor lower than 1K.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
jamies
Master MS/Extra'er
Posts: 525
Joined: Tue Apr 07, 2009 12:22 am

Re: Cooling Fan Relay Drive

Post by jamies »

I prefer to use BD139 or BD681 to drive relays etc. much better than the 2222's
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Cooling Fan Relay Drive

Post by slow_hemi6 »

Never hurts to spend a few more cents and run an upgraded device. The BD681 is a darlington, hfe is 750. Op was wrong in saying beta for 2n2222a was 40 IIRC it is more like min value 100, max value 300 for hfe wich is pretty much DC beta.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
jammy86
Helpful MS/Extra'er
Posts: 81
Joined: Tue Sep 09, 2008 7:26 pm
Location: Wiltshire, UK

Re: Cooling Fan Relay Drive

Post by jammy86 »

slow_hemi6 wrote:
If I shock the relay to get the actuator to bounce
Much more indicative of a relay with a bad/sticking armature. I switch automotive relays all the time with 2n2222 or BC337. Absolutely no need to have the base resistor lower than 1K.
I don't think so, exact same signs as not having enough current to pull the relay in but having enough to hold it it. All tested it with several relays too.

I'll knock up a test circuit later to measure the current through the coil but I think I might just need a transistor with a higher beta value and my calcs suggest I've only got ~100mA on a 1k base resistor.

Sadly I need to replace a core plug today so I'll look in to this while the sealant is setting.
jammy86
Helpful MS/Extra'er
Posts: 81
Joined: Tue Sep 09, 2008 7:26 pm
Location: Wiltshire, UK

Re: Cooling Fan Relay Drive

Post by jammy86 »

slow_hemi6 wrote:Never hurts to spend a few more cents and run an upgraded device. The BD681 is a darlington, hfe is 750. Op was wrong in saying beta for 2n2222a was 40 IIRC it is more like min value 100, max value 300 for hfe wich is pretty much DC beta.

If I read this datasheet correctly and the beta is ~40 for 500mA.. http://uk.farnell.com/multicomp/2n2222a ... nsku=false

I recon I can stretch to £0.52 :) http://uk.rs-online.com/web/p/darlingto ... s/3133204/

I'll measure the current and report back.
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Cooling Fan Relay Drive

Post by slow_hemi6 »

The beta you are seeing listed is related to the transistors use as an AC signal amplifier. When you are looking at using the transistor as a DC switch then you should be using the figures from the data sheet that show DC current gain which you will also see vary with Ic and Vce. An auto relay is around 100 to 150mA coil current and we obviously have a Vce around 13v. The DC current gain or Hfe is shown as being between 100 and 300 for Ic 150mA and Vce 10v. I am not going to argue with the data sheet.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
DaveEFI
Super MS/Extra'er
Posts: 4175
Joined: Sun Apr 15, 2012 12:55 am
Location: SW London, UK

Re: Cooling Fan Relay Drive

Post by DaveEFI »

slow_hemi6 wrote:Never hurts to spend a few more cents and run an upgraded device. The BD681 is a darlington, hfe is 750. Op was wrong in saying beta for 2n2222a was 40 IIRC it is more like min value 100, max value 300 for hfe wich is pretty much DC beta.
A Darlington pair is used where you need more gain.

I've never had a problem with a 2N2222 driving a relay from a 5v signal. It is capable of handling 1 amp - about 5 times the current of the average auto relay.

I've come across 2N2222 marked transistors with different pinouts. If you have a transistor test function on your DVM, check the one in use is what you think it is, pinout wise.
Rover SD1 3.5 EFI
MS2 V3
EDIS
Tech Edge O2
London UK.
jammy86
Helpful MS/Extra'er
Posts: 81
Joined: Tue Sep 09, 2008 7:26 pm
Location: Wiltshire, UK

Re: Cooling Fan Relay Drive

Post by jammy86 »

slow_hemi6 wrote:The beta you are seeing listed is related to the transistors use as an AC signal amplifier. When you are looking at using the transistor as a DC switch then you should be using the figures from the data sheet that show DC current gain which you will also see vary with Ic and Vce. An auto relay is around 100 to 150mA coil current and we obviously have a Vce around 13v. The DC current gain or Hfe is shown as being between 100 and 300 for Ic 150mA and Vce 10v. I am not going to argue with the data sheet.
Ah OK cool, thanks. I'll get the dvm out and investigate the transistor.
jammy86
Helpful MS/Extra'er
Posts: 81
Joined: Tue Sep 09, 2008 7:26 pm
Location: Wiltshire, UK

Re: Cooling Fan Relay Drive

Post by jammy86 »

Hello,

I checked the transistor and found that with the relay coil connected and the output from the cpu low (checked at the CPU side of the base resistor), I had 0.5v on base and a collector emitter voltage of 6V which suggested the transistor was conducting slightly. With the output from the CPU high the Vce voltage dropped by ~0.2V. I thought this meant the transistor had failed and swapped it with one from another circuit I knew was working (Dont have any spares right now). I now have similar behaviour although the Vce when the CPU is high is 3V. The coil pulls in weakly but doesn't let go. I could have two bad transistors (I'll stick the other one back in the other circuit and test).

Any thoughts?

Edit: Old transistor works fine in the shiftlight circuit driving an LED
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Cooling Fan Relay Drive

Post by slow_hemi6 »

Ok straight off my test bench.
3 std auto relays, they have coils that vary from 87 to 90 ohm and draw from 136 to 140mA.
Test transistor PN2222A to-92 case (not to-18)
12.2v bench supply, 12.18Vce with relay deenergised. 4.5V supply to transistor base.
1k base resistor pulls relay easily with a base current of 3.65mA.
Pot substituted for base resistor to find minimum pull current @ 4.5v.
Limit to pull the relay was found @ 0.25mA roughly 15.56K base @ 4.5v.
The max practical DC hfe found for this set of values is 550.

Your values are showing you have issues. Check your relay is in spec and is not the kind with inbuilt diode or resistor, Check your transistor pinout is correct and do try a different type of transistor just in case those are bad. I have not seen a metal can to-18 sold as new for many years. Quick google suggests they could be coming from India.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
DaveEFI
Super MS/Extra'er
Posts: 4175
Joined: Sun Apr 15, 2012 12:55 am
Location: SW London, UK

Re: Cooling Fan Relay Drive

Post by DaveEFI »

jammy86 wrote:Hello,

I checked the transistor and found that with the relay coil connected and the output from the cpu low (checked at the CPU side of the base resistor), I had 0.5v on base and a collector emitter voltage of 6V which suggested the transistor was conducting slightly. With the output from the CPU high the Vce voltage dropped by ~0.2V. I thought this meant the transistor had failed and swapped it with one from another circuit I knew was working (Dont have any spares right now). I now have similar behaviour although the Vce when the CPU is high is 3V. The coil pulls in weakly but doesn't let go. I could have two bad transistors (I'll stick the other one back in the other circuit and test).

Any thoughts?

Edit: Old transistor works fine in the shiftlight circuit driving an LED
There's not by any chance a diode built in to the relay? Try reversing the connections to the relay coil.
Rover SD1 3.5 EFI
MS2 V3
EDIS
Tech Edge O2
London UK.
jammy86
Helpful MS/Extra'er
Posts: 81
Joined: Tue Sep 09, 2008 7:26 pm
Location: Wiltshire, UK

Re: Cooling Fan Relay Drive

Post by jammy86 »

Thanks Gents. I think the relay may have a resistor for flyback but I'll need to check. Even if it did have a diode then I should still have a greater Vce with the output from the CPU being off and no voltage at the base. I'll try another transistor and a relay without any flyback protection in it to see if this helps.

Does anyone have an RScomponents link to a known good transistor? What about this? http://uk.rs-online.com/web/p/bipolar-t ... s/7390381/
DaveEFI
Super MS/Extra'er
Posts: 4175
Joined: Sun Apr 15, 2012 12:55 am
Location: SW London, UK

Re: Cooling Fan Relay Drive

Post by DaveEFI »

Are you in the UK? Electronics suppliers like RS tend to vary with things like a minimum charge and or free postage which can make a big difference with small orders.
So worth checking CPC and Rapid too, for the best total price. Even Ebay.
Rover SD1 3.5 EFI
MS2 V3
EDIS
Tech Edge O2
London UK.
jammy86
Helpful MS/Extra'er
Posts: 81
Joined: Tue Sep 09, 2008 7:26 pm
Location: Wiltshire, UK

Re: Cooling Fan Relay Drive

Post by jammy86 »

Yes in the UK and RS is free delivery :)
jammy86
Helpful MS/Extra'er
Posts: 81
Joined: Tue Sep 09, 2008 7:26 pm
Location: Wiltshire, UK

Re: Cooling Fan Relay Drive

Post by jammy86 »

Thanks to all for your help. I replaced the transistor with this http://uk.rs-online.com/web/p/bipolar-t ... s/7390381/ and it's all tickety boo! No idea why the other one didn't work, but it didn't.... Thanks again.
DaveEFI
Super MS/Extra'er
Posts: 4175
Joined: Sun Apr 15, 2012 12:55 am
Location: SW London, UK

Re: Cooling Fan Relay Drive

Post by DaveEFI »

jammy86 wrote:Thanks to all for your help. I replaced the transistor with this http://uk.rs-online.com/web/p/bipolar-t ... s/7390381/ and it's all tickety boo! No idea why the other one didn't work, but it didn't.... Thanks again.
Does the new transistor look exactly the same as the old? As I said earlier, I've seen different versions of the 2N2222 with different pinout.
Rover SD1 3.5 EFI
MS2 V3
EDIS
Tech Edge O2
London UK.
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Solved: Cooling Fan Relay Drive

Post by slow_hemi6 »

The datasheet that was initially posted was the to-18 tin can version.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
Post Reply