Spice me up this Schmitt trigger - Page 1
Forum section: electronics / beginners

author: soldar
author_rank: Super Contributor
timestamp: January 12, 2019, 11:39:11 am
content: Rummaging through my files I discovered this Schmitt trigger which I designed over twenty years ago, I seem to recall it was for some alarm system, quick and dirty.Now I wonder if it really works as I wanted it to. The transistors were just generic small signal and the diodes also generic small signal, like 1N4148.I do not have any simulation software so if anyone would like to model it and let me know if it performs correctly and/or any observations or improvements.

author: iMo
author_rank: Super Contributor
timestamp: January 12, 2019, 01:28:57 pm
content: I would highly recommend you to download the LTspice, it is free and easy to use.It takes you a few minutes to draw and simulate.

author: soldar
author_rank: Super Contributor
timestamp: January 12, 2019, 02:11:30 pm
content: Quote from: imo on January 12, 2019, 01:28:57 pmThanksimo! So it does seem to work. I see you simulated removing the diodes and now I remember I added them to raise the voltage of the switching points.I am still using Win XP Pro SP3 so I downloaded LTSpice IV, version 4.23l. I do not know if files created with later versions would be compatible but may be you can post the file for this circuit and I can try to open it.I will have to do some learning now. Thanks for the tip.E.T.A.: I opened one of the example files. I see they use the extension .asc which in my system is already taken by PGP keys but I guess that's not a major problem. I'll have to work around it.Here's a tip for graphics: this type of graphics are much better compressed with PNG than with JPG. The graphic is crisper and the file much smaller in size. JPG is really only appropriate for photos and similar graphics.

author: Zero999
author_rank: Super Contributor
timestamp: January 12, 2019, 02:49:41 pm
content: The circuit can be simplified to some extent.Regarding the graphics, yes PNG helps make it smaller sharper. I just paste the schematic and plot into Gimp and reduce the colour depth to 256 colours or less to save space/bandwidth.

author: soldar
author_rank: Super Contributor
timestamp: January 12, 2019, 04:18:46 pm
content: Quote from: Zero999 on January 12, 2019, 02:49:41 pmYes. I think mine would be more robust against transients. As I said, it was for some kind of alarm and the input was by way of a long loop and you have to be careful with induced transients. I probably added a capacitor at the input.

author: soldar
author_rank: Super Contributor
timestamp: January 13, 2019, 07:18:27 pm
content: Well, I have spent some hours messing with LTSpice and I have to say it is not intuitive and I think it could be improved in that regard. I guess I will learn and get used to it.I have managed to replicate the circuit.

author: Zero999
author_rank: Super Contributor
timestamp: January 13, 2019, 07:26:23 pm
content: Quote from: soldar on January 12, 2019, 04:18:46 pmWhy?Quote from: soldar on January 13, 2019, 07:18:27 pmPlease post the .asc file.

author: soldar
author_rank: Super Contributor
timestamp: January 13, 2019, 07:40:18 pm
content: Yes, sorry, I did intend to post it. BTW, in my system the .ASC extension is taken by PGP keys so I have to open these files manually with LTSpice. I tried using a different extension and associating it with LTSpice but if I use a different extension LTSpice opens it as a text file so it necessarily needs to have the ASC extension. Not a major thing but slightly annoying.

author: Zero999
author_rank: Super Contributor
timestamp: January 14, 2019, 10:49:17 am
content: The file extension issue is a flaw in Windows, more than LTSpice. There are better ways to identify what type of data a file contains, than its extension and decide what program to use, but we're stuck with it now.What load does this comparator drive?

author: soldar
author_rank: Super Contributor
timestamp: January 14, 2019, 12:08:21 pm
content: Quote from: Zero999 on January 14, 2019, 10:49:17 amNo. Think about it. It is LTSpice who is deciding how to handle the same file depending on the extension. LTSpice files are just text files and can be opened and edited with any text editor. LTSpice will open it as a text file unless the extension is .ASC in which case it opens and interprets it as an electronic model. Any other extension or no extension and it is considered a text file. It is LTSpice who is deciding how to handle the file depending on the name extension and it has nothing to do with Windows. I can change the extension to LTS and tell windows to hand .LTS files to LTSpice and Windows will do that correctly but it is LTSpice who then does what I don't want it to do.Quote from: Zero999 on January 14, 2019, 10:49:17 amIt has been so long I do not remember the details but it was the input for some kind of alarm system. I mean the circuit is unremarkable. It is just that I found the design while looking through some very old files. I seem to remember at that time I had some kind of simulator program, similar to LTSpice, but now I cannot remember the name. I have no clue of the program or circuits I may have played with. My memory ain't what it used to be but, then again, it never was.

author: Zero999
author_rank: Super Contributor
timestamp: January 14, 2019, 12:35:44 pm
content: You're right about LTSpice. You'll find this kind of issue is very common with Windows software. Have you tried the other piece of software which also uses the .asc extension?I wish programs would look at the file contents before deciding what to do, rather than relying on extensions.Regarding the circuit: is there any reason why you didn't opt for an IC? The LM311 can drive 50mA, which is enough for a small relay.

author: soldar
author_rank: Super Contributor
timestamp: January 14, 2019, 01:16:42 pm
content: Quote from: Zero999 on January 14, 2019, 12:35:44 pmJust double clicking on the .asc file results in PGP giving an error saying it is not a valid file.I have to say that I am finding learning LTSpice quite frustrating. I think it could be much more intuitive but I guess I got my money's worthQuote from: Zero999 on January 14, 2019, 12:35:44 pmI believe Linux has no concept of file name extensions but relying on extensions has some benefits. One is that the same exact file can be treated differently if you change the extension. You can have two copies of the same file and they will be opened with different programs. Or they can be opened with the same program but treated differently. PowerPoint will open .PPT in edit mode and .PPS in presentation mode. And with name extensions the OS does not need to look into the file contents which could be encrypted or otherwise unusable to the OS. A file is a file. If I take a pure ascii text file the OS has no idea what that might be because it has no header. I see the header of an LTSpice file has no specific header for OS use. It starts "Version 4 Sheet 1" and that could be anything. I believe even Linux is beginning to use extensions and associate them with programs.Quote from: Zero999 on January 14, 2019, 12:35:44 pmWell, probably just had a ton of generic transistors lying around. I seem to faintly remember building the "complementary" version with two PNP's and one NPN because that way the variable resistor which provided the input would be tied to GND rather than the 12 V rail.