Author Topic: Driving open collector output at higher than VCC  (Read 499 times)

0 Members and 1 Guest are viewing this topic.

Offline richard_stTopic starter

  • Newbie
  • Posts: 4
  • Country: se
Driving open collector output at higher than VCC
« on: March 11, 2024, 01:59:02 pm »
I'm designing a simple fan controller circuit, currently I'm using an AS393P-E1 to report the fan RPM back to the host device. In my design I'm using a 3.3v regulator to power my logic ICs.

From my testing, some PC motherboards pull the RPM sense line to 3.3v, but some pull it to 12v.

I've tested this with the AS393P-E1 and everything seems to work as expected, but is this reliable long-term, or might this damage the chip somehow?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14210
  • Country: de
Re: Driving open collector output at higher than VCC
« Reply #1 on: March 11, 2024, 02:05:39 pm »
The datasheet somehow miss out on the maximum spes for the voltage at the outputs. This should be OK up to the normal maximum supply (36 V) at least. It is common to use similart comparators (e.g. LM393 , LM339 as the quad version) with JFET switches. These are regularly used up to some 40 V - though a few (but not many) faults happen.

So the 12 V max should be pretty save.
 
The following users thanked this post: richard_st

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12862
Re: Driving open collector output at higher than VCC
« Reply #2 on: March 11, 2024, 02:20:00 pm »
The datasheet says "Differential Input Voltage Range Equals to the Power Supply Voltage" so connecting a signal with a 12V pullup is *risky* to an input unless you run the AS393P-E1 from 12V (with its OC output pulled up to 3.3V for your logic).

Going the other way, the OC output is certainly good up to the supply voltage, but as it doesn't have a spec for the max. output voltage, above the supply is risky as you have no idea of the output transistor's isolation structure from the rest of the die.  However power it at 12V and again the problem goes away.
« Last Edit: March 11, 2024, 02:26:18 pm by Ian.M »
 
The following users thanked this post: richard_st

Offline richard_stTopic starter

  • Newbie
  • Posts: 4
  • Country: se
Re: Driving open collector output at higher than VCC
« Reply #3 on: March 11, 2024, 02:25:48 pm »
You aren't connecting the open collector OUTPUT to the fan tach signal, you are connecting one of the inputs to it.

In my use case I am connecting the OUTPUT pin of the comparator to the RPM sense pin on the motherboard, that would normally go to the fan tach.

i.e. my circuit is both pulling the actual RPM sense line to 3.3v, and also generating a signal to go back to the host.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12862
Re: Driving open collector output at higher than VCC
« Reply #4 on: March 11, 2024, 02:27:05 pm »
I just realised that and revised my post accordingly.
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1361
  • Country: ua
Re: Driving open collector output at higher than VCC
« Reply #5 on: March 11, 2024, 02:43:48 pm »
See the block diagram at https://www.ti.com/lit/ds/symlink/lm393.pdf, section 7.

The 393 comparator has an NPN transistor on the output which doesn't care what VCC is, as, regardless of the value of VCC, it'll have a maximum of one p-n diode drop across its base and emitter.

You need to care about two things: 1) not to exceed its allowed sink current (which depends on the value of the pull up resistor and the rail it's connected to); 2) not to exceed its max allowed Vce voltage (which is 36 V that's way above the worst case of 12 V).

p.s. it would help to draw a schematic of how you are going to connect things to avoid any possible confusion and misunderstanding.
 
The following users thanked this post: richard_st

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2007
  • Country: us
Re: Driving open collector output at higher than VCC
« Reply #6 on: March 11, 2024, 02:50:28 pm »
If you have a comparator you could sacrifice in a test, it might be interesting to ramp up the OC voltage and see where it fails.  If you get to 40V and it's still working fine, then 12V is almost certainly ok, even for the long run.

But an alternative would be to find an NPN transistor that is speced for high C/E voltage, and insert it into the output line.  Its emitter would be connected to the comparator output, its collector to the PC's sense line, and its base, through a resistor, to the 3.3V supply.  Then the comparator output would never see higher than 3.3V, and polarity is maintained.  But that doesn't help you on current, if that's a problem.

Edit:   For future reference, I want to substitute an N-channel mosfet for the NPN transistor.  That's because at a high enough C/B voltage, that junction may start to act like a zener, with unpredictable results.  My memory is that might happen at about 8V.


« Last Edit: March 11, 2024, 08:13:05 pm by Peabody »
 
The following users thanked this post: richard_st

Offline richard_stTopic starter

  • Newbie
  • Posts: 4
  • Country: se
Re: Driving open collector output at higher than VCC
« Reply #7 on: March 11, 2024, 02:56:59 pm »
The 393 comparator has an NPN transistor on the output which doesn't care what VCC is, as, regardless of the value of VCC, it'll have a maximum of one p-n diode drop across its base and emitter.

I guess the concern would be if the AS393 is designed differently. That's the comparator I had on hand but I could swap it for a 'real' LM393.

If you have a comparator you could sacrifice in a test, it might be interesting to ramp up the OC voltage and see where it fails.  If you get to 40V and it's still working fine, then 12V is almost certainly ok, even for the long run.


I might give that a go later this evening. I don't think I can go quite that high without other problems but should be able to manage 20-25V.
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1361
  • Country: ua
Re: Driving open collector output at higher than VCC
« Reply #8 on: March 11, 2024, 03:30:22 pm »
I guess the concern would be if the AS393 is designed differently. That's the comparator I had on hand but I could swap it for a 'real' LM393.
Pretty sure it's the same stuff, hence the naming. It's a jellybean part produced by many companies. Absolute maximum ratings in the datasheet suggest this too.

Besides, how would you implement an open collector output otherwise?
« Last Edit: March 11, 2024, 03:31:53 pm by shapirus »
 
The following users thanked this post: richard_st

Offline richard_stTopic starter

  • Newbie
  • Posts: 4
  • Country: se
Re: Driving open collector output at higher than VCC
« Reply #9 on: March 11, 2024, 07:50:33 pm »
If you have a comparator you could sacrifice in a test, it might be interesting to ramp up the OC voltage and see where it fails.  If you get to 40V and it's still working fine, then 12V is almost certainly ok, even for the long run.

Just tried this, with a 5V fan powered from an independent supply. Gradually ramped up to 30V with no issues.

Think I'll stick with these comparators for the final build.
 
The following users thanked this post: Ian.M

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Driving open collector output at higher than VCC
« Reply #10 on: March 12, 2024, 12:26:53 am »
See Intel 4-wire PWM fan specification.  The PWM and tach signals are open collector at less than 30kHz frequencies; no need for an analog comparator.

I use NX138AK N-channel MOSFETs in SOT23-3 (AKA TO-236AB) for this; see e.g. my dual fan ATtiny85 controller, and my 5V to 12V PWM fan adapter.

The gate to the MOSFET is the input from either the fan (tach) or motherboard (PWM), and can handle ±20V.  Even if shorted to ground or 12V, it doesn't mind.  The source is always to ground, and the drain is the signal, pulled up to whatever VCC is used (down to 2V works fine) using a suitable resistor.  10kΩ is just a value I decided on looking at the current ranges one can expect based on the spec, that also seemed to behave well in simulations with acceptable amounts of waste (heat).

For PWM output (to the fan) or tach output (to the motherboard), the output from my circuit is always an open collector one using NX138AKs.  The drain can be pulled up to 60V without damage; my circuits don't do above 12V or 24V.  For safe level translation, I use two NX138AKs in sequence, simply because a single one will invert the signal.

My own controller circuits has the microcontroller handle inverted signals, so only one translator per signal (in either direction) is needed for safe inputs and outputs.

It would be trivial to modify the dual ATtiny85 controller to act like a PWM modifier stage with additional potentiometer input, so that the PWM duty cycle from the motherboard is mapped arbitrarily to the actual PWM duty cycle sent to the microcontroller, and the tachometer rate similarly arbitrarily mapped from the fan to the motherboard, using just four NX138AKs, making this absolutely safe with any motherboard and fan following the Intel 4-wire fan spec at least roughly.

While there are many other N-channel enhancement mode MOSFETs like BSS138 that can do the job just as well, I picked NX138AKRs because they are cheap (5.5€ for a lot of 100 at Mouser; $0.0327 each at JLCPCB assembly, 2.66€ for a lot of 100 at LCSC), easily modeled using LTspice or KiCAD/ngspice (NX138AK.lib spice model), they tolerate up to ±20V between gate and source (enough for my MOSFET needs!), and behave quite well in this configuration up to pretty high frequencies (faster than BSS138 and and smaller gate charge than BSS138, but not relevant here, since the PWM is just 25 kHz, and the tach signal is just two pulses per revolution, under 1 kHz for up to 30k RPM).  It's basically my current 3.3V logic level N-channel enhancement mode MOSFET for signal uses.
« Last Edit: March 12, 2024, 12:34:19 am by Nominal Animal »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf