Sorry to nag in on an other persons post but i just wanted to know(learning) 1)how did you set the value of the FB resistor(by trial and error?)
2)why there is the need for 2 comparators since one can compare the voltage wrt ot the batteries?
hi,
The amount of +feedback should be between 1mV and 10mV to ensure fast switching on slowly rising input voltages.
When a LM393 is configured as a NI comparator and it has a 10K source input, adding a 10M0 +feedback resistor will give about 10mV.
However, when used in some applications the user wants a wider hystersis in order to control the switching levels.
One such application would be a daylight detector switching a charger.
The user may decide for example that a 0.2V change in switching level between ON/OFF is required, so a lower value feedback resistor would be used in order to 'widen' the voltage band.
If you want to adjust the hysteresis, a simple way is to connect a pot say 50K from the output of the LM393 to 0V,
then connect the usual feedback resistor to the pot wiper.
To get the precise switching voltage points will require adjusting the pot and checking the switching limits.
With ref the second half of the OP's circuit for the LM393, it isnt required, but its not my design.
IIUC the OP is experimenting/learning electronics and is asking questions about his design, he is not asking for a fully design circuit.
If he did, most members would tell him to post his work to date.
If I can help with your design please ask away.
EDIT: added a pdf that explains hysteresis in a more mathematical way.