MRCecil
Member
I originally used these equations:
Vtriplow = Vref*R2/(R1+R2) and Vtriphigh = Vref*R2/(R1+R2) + Vcc*R1/(R1+R2)
where R2 is my hysteresis resistor and R1 is the resistor after Vref.
However, I redid my calculations with nodal analysis at the noninverting input and received a hysteresis resistor of 10k and the two resistors in the divider network as 40k. This gives me a perfect 1.5 volt trigger level and 3.5 volt threshold level. But this is with an output of 4 volts at high and 1 volt at low. How are you getting an actual 0 for low output? Does the LM324 not have a limit on it's output voltage of about 1 volts, thus a 4volt high and 1volt low?.
I used 0V for Vol based on the datasheet; you can look at it here:
https://www.electro-tech-online.com/custompdfs/2011/02/LM124.pdf
They list the Vol at 5mV typical and 20mV max with Vcc @ 5V on page 4. If you look at page 2, you can see the reason for this on the schematic's output. Also, I am using a model of the LM324 in LT Spice and it places Vol in operation at ~27mV. The model you are using doesn't get down there, so with it you will not get true results in your simulations. I can send you the model I'm using if you wish.
I just went out to my bench and tested two 324; one ST and one National. The Vol ranged from 2mV to 10mV, so I'm fairly confident about using 0V for calculating the hysteresis. The fly in the ointment is the Voh was right at 3.7V with a 10k load without a pullup. With a pullup and a load, there was essentially no change. I'll be checking that out a bit further to see if anything can be done with that situation. Too bad your instructor didn't pick a rail-to-rail amp.