I have been trying to simulate the circuit to LTspice.
The Resistors values are for reference
.
I don't have any expirience with ltspice and althought i managed to upload LM393 from this link
https://www.ti.com/product/lm393 and run the simulator of this circuit i don't know if this is ok
To upload LM393 i did the below from this very helpful post:
https://forum.allaboutcircuits.com/threads/importing-models-into-ltspice.36456/
1. On
the link you posted, scroll down to the PSpice model, unzip the folder, and open LM339_5.1 with notepad. Save the file in C:/program files/LTC/LTspiceIV/lib/sub as LM339.sub. Change "save as type" to "All files".
2. If LTspice is already open, close and then reopen it.
3. Open a new schematic window (Leftmost icon on toolbar).
4.Click on the component icon (the AND gate on the toolbar).
5. Double-click on [Opamps].
6. Scroll all the way to the end and select opamp2.
7. Click OK.
8. Left-click to place opamp2 symbol on schematic.
9. Right-click on symbol to open Component Attribute Editor.
10. Left-click on Value.
11. In the edit window that says Value = opamp2, change opamp2 to LM339. In general, the value you enter here must be identical to the subcircuit name in the subcircuit file. In this case, that line reads
.SUBCKT LM339 1 2 3 4 5
12. Left-click on the .op icon (rightmost on the toolbar). This is the spice directive icon .
13. Type .lib LM339.sub in the window. Left-click on OK.
14. Place this spice directive on the schematic by dragging it to where you want to place it, and then left-clicking.
15. You are now ready to place and connect other components before simulating.
Can someone more expirenced help ?