7
\$\begingroup\$

I have circuit where I am trying to enable a buck converter only when the input power is above 11.5V. And it should turn OFF when its below that voltage. I have a two voltage dividers. One with a Zener diode that holds the voltage at 5.1V and another using a potentiometer and resistor. The issue I am having is that at the trigger point the comparator output doesn't go from Vcc to 0V, it goes down/up very slowly, Vcc>3V>2V>0V. This happens within 0.3V from the trigger voltage.

I tried changing feedback resistor value, changing comparators, etc. Any suggestions?

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ have you tried removing R5? Also, don't forget your bypass cap on the power pins. \$\endgroup\$ Commented Aug 14 at 17:16
  • \$\begingroup\$ yep, no changes! \$\endgroup\$ Commented Aug 14 at 17:19
  • \$\begingroup\$ There is not net named Vcc on the schematic. Value of PWR INP? Also, value of R3? \$\endgroup\$ Commented Aug 14 at 17:21
  • \$\begingroup\$ I am using a 10K trimmer to target voltage. And the power input (PWR INP) changes from 8-13V. \$\endgroup\$ Commented Aug 14 at 17:36

4 Answers 4

5
\$\begingroup\$

Typically, a DC voltmeter reads an oscillating or PWM output as its mean DC level, ignoring the AC / switching noise on the node.

You need a faster instrument to resolve what's going on here: an oscilloscope. The output can toggle in the low MHz, well beyond what a DMM can see. It might be as low as some kHz, if due to Vcc bounce due to the load switching on and off. Thus you should also read Vcc (or whatever the equivalent is here), and both inputs.

Note that Vcc pulling down, can provide negative feedback that might override your meager(?) positive feedback amount (R5). The solution in that case is to reduce the feedback resistor to ensure a suitable hysteresis band. Sufficient bypass capacitance (actual capacitance under DC bias; this varies by capacitor type!) is also required.

This calculator on my website,
Resistor Dividers | Calculators | Seven Transistor Labs, LLC
can be used to select resistor values.

Matter of fact, this is a useful article that I've been meaning to write, so here we go;
Designing A Hysteresis Band | Articles | Seven Transistor Labs, LLC
I'll forward some highlights here; check the link for further commentary.

(Note that, as you've not labeled any nodes on the schematic, I'll just redraw the schematic, using my own node names and part numbers. You'll have to recognize which is which in your schematic. If you wish for greater clarity in the future, more specific schematics make this easier for answerers to deliver.)

enter image description here

Suppose we want 11.5V rising and 11.0V falling thresholds; a hysteresis band of 0.5V. Observe that, around the switching point, the output pull-up R5 makes a divider with R6, from 11.25V (take the average for simplicity) to OUT to B (about 0.7V when on). OUT when high, will be about 1.66V then, and OUT when low, <0.4V (call it 0.2V typical). This ~1.4V swing, feeds back to the R2-R3 divider via R1, making a sort of two-way divider. We want R1, R2 and R3 such that, for a 1.4V swing here, we have 0.5V swing at VCC.

Note: we actually want the case where VOH = VOL, and VS is changing; this isn't quite an accurate use of this calculator, but for small changes like this, we can make a reasonable approximation by using the same relative variance in VO instead. That is, for thresholds of 11.5 and 11.0V, scaled down to ~5.1V, we get 5.23 and 5.0V instead. So, entering these values into the calculator:
VIH = 1.66
VIL = 0.2
VOH = 5.23
VOL = 5
VS = 11.25
R1 = 100000

we find R2 = 35.67k and R3 = 39.3k.

The resistor values can be changed all together by simple proportion; there may be standard values that fit better, in other ranges, than these starting with R1 = 100k exactly. You may find it desirable to adjust the value further, anyway, to account for the above approximations, or for other circuit tolerances.

Bonus schematic, in the resident simulator:

schematic

simulate this circuit – Schematic created using CircuitLab

Note that I'm approximating an open-collector type comparator as an op-amp with ideal diode. The included TL081 model does not include output saturation voltage correctly, which is bad when you want a TL081, but in fact gives the correct result here. This simulation gives thresholds of 10.7 and 11.3V, slightly below desired; not bad given the rough models used.

\$\endgroup\$
4
\$\begingroup\$

The TL331B comparator output (pin 4) is open collector. If you want pin 4 voltage to go close to supply voltage (pin 5) then the pull-up resistor (R9) must be less than the load resistor R10. You have R9 = 10k, R10 = 1k, try swapping these.

What is the value of R5? I can't read the schematic. Try 470k or 1meg, ie: 100 times the resistance at positive input (pin 3). A small cap (say, 22pF) in parallel with R5 will help speed up the transitions at comparator output.

You need to use a scope to debug this circuit, a volt meter will be way too slow.

\$\endgroup\$
2
\$\begingroup\$

Solder jumper 2 and R10 aren't helping, delete them, replace with wire.

R10 does basically nothing it's in series with 10K.

If glass shield D1 from light - all diodes are photodiodes.

Jumper 2 changes the voltage on the comparator output from 10V to about 1V. that's going to cause more confusion than any probable utility. (if you want to test without driving EN_PWR open J9 instead)

R5 value looks wrong. start at 220K and adjust as necessary.

The circuit may be oscillating, feeding back via the power-supply, or converting power supply ripple into PWM. reducing R5 may help. an oscilloscope will be useful in disgnosing this. Testing with a power supply as similar to the intended end user power supply as possible will give the most useful results.

\$\endgroup\$
1
\$\begingroup\$

There's a half chance that when you enable the buck converter the power input voltage drops taking you back below the threshold for enabling the buck converter but, capacitors on the power rails may make this more of an oscillating event and give the impression that the comparator is not switching on and off correctly.

If you can get hold of an oscilloscope this should be revealed more clearly. I suspect you might be using a volt meter (DVM) to measure the comparator output voltage and, this won't show oscillations of course unless they are very slow (again unlikely in your scenario).

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I disconnected jumper 7 and measured the voltage. That's where I noticed that the voltage changes gradually. \$\endgroup\$ Commented Aug 14 at 17:38
  • \$\begingroup\$ Nevertheless, it's something that may happen when you have the buck converter fully operational @Drona \$\endgroup\$ Commented Aug 14 at 18:26

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.