Author Topic: Op-amp hysteresis problem  (Read 1356 times)

0 Members and 1 Guest are viewing this topic.

Offline SiddhatTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: np
Op-amp hysteresis problem
« on: July 09, 2020, 05:35:49 am »
Hey guys! Namaste.
The schematic attached implements hysteresis on a LM358 comparator IC. The circuit was designed following the guidelines from texas instruments. The upper threshold and lower threshold volatges were set to 2.4V and 2.3V respectively with Vcc 5V. The inverting input actually varies due to charging and discharging from a lead-acid battery whose voltage is scaled down using a voltage divider. A positive feedback hysteresis resistor was connected between the non-inverting input and the output. The output is connected to the base of a transistor which drives a realy.

The problem is: while the battery is being charged i.e. while the voltage at the inverting input increases and the upper threshold of 2.4V is set at the non-inverting input which is okay. But while the battery is discharging i.e. when the voltage is decreasing, the lower threshold is not set to 2.3V but a bit higher at about 2.33 volts. How can this problem be solved? and how can the upper and lower thresholds be set perfectly?
 

Offline SiddhatTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: np
Re: Op-amp hysteresis problem
« Reply #1 on: July 09, 2020, 05:39:22 am »
This is the designed schematic!
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7454
  • Country: pl
Re: Op-amp hysteresis problem
« Reply #2 on: July 09, 2020, 06:39:48 am »
This circuit works for a dedicated comparator IC with open collector output. LM358 is an opamp, put R3 between the output pin and the transistor's base instead.

Then re-do the hysteresis calculations taking into account that the output of the chip will swing:
- between 0V and 0.7V if you use a real comparator with R3 connected as is
- between 0V and maybe 3V if you use an LM358 with R3 moved as above
 
The following users thanked this post: Siddhat

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1478
  • Country: ua
Re: Op-amp hysteresis problem
« Reply #3 on: July 09, 2020, 10:45:35 am »
You need to increase R11 (positive feedback) to decrease hysteresis (if a problem is with hysteresis width). You may use a tuning resistor somevere betweem R7, R8 (or potentiometer) to adjust threshold value.

And yes - R3 is for real comparator IC with open collector output like LM393/LM2903 (can be used here).
« Last Edit: July 09, 2020, 10:47:46 am by Vovk_Z »
 
The following users thanked this post: Siddhat

Offline SiddhatTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: np
Re: Op-amp hysteresis problem
« Reply #4 on: July 09, 2020, 05:01:15 pm »
First of all I suspected the hysteresis width to be small of only 0.1V and tried increasing the width in search of better performance. I tried setting the upper and lower threshold voltages to 3.6 and 3.45 Volts respectively which is equivalent to battery being fully charged at 14.4 Volts and discharged at 13.8 Volts. But the problems still persisted. If the voltage is rising from 3.45 Volts, the op-amp's output changed before the voltage reached 3.6 Volts at around 3.55 volts. And while the voltage was decreasing from 3.55 volts, the op-amp's output changed before the voltage reached 3.45 volts at around 3.5 volts. The same problem persisted with the upper and the lower thresholds at 2.4 and 2.3 volts respectively.
Really stuck on this one!
 

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1478
  • Country: ua
Re: Op-amp hysteresis problem
« Reply #5 on: July 09, 2020, 08:57:23 pm »
3.55 V instead of 3.6 V is not bad. Sorry, I don't get what a problem is? (may be I'm tired a little...)
 
The following users thanked this post: Siddhat

Offline SiddhatTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: np
Re: Op-amp hysteresis problem
« Reply #6 on: July 10, 2020, 04:17:05 pm »
3.55 V instead of 3.6 V is not bad. Sorry, I don't get what a problem is? (may be I'm tired a little...)
The problem is I do not get a hysteresis at all. The lower threshold increases to a much higher value as soon as the voltage at the inverting terminal decreases and the upper threshold starts to decrease as soon as the voltage increases. And therefore, there is no hysteresis.  As far as I know the LTP and the UTP should remain the same when the voltage at the other terminal increases or decreases There should have been a hysteresis according to the calculations.
« Last Edit: July 10, 2020, 04:19:01 pm by Siddhat »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf