Author Topic: Spice me up this Schmitt trigger  (Read 2266 times)

0 Members and 1 Guest are viewing this topic.

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Spice me up this Schmitt trigger
« on: January 12, 2019, 11:39:11 am »
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.
« Last Edit: January 12, 2019, 11:41:51 am by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
Re: Spice me up this Schmitt trigger
« Reply #1 on: January 12, 2019, 01:28:57 pm »
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.
« Last Edit: January 12, 2019, 01:45:35 pm by imo »
Readers discretion is advised..
 
The following users thanked this post: soldar

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Spice me up this Schmitt trigger
« Reply #2 on: January 12, 2019, 02:11:30 pm »
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.
Thanks imo! 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.
« Last Edit: January 12, 2019, 02:25:47 pm by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Spice me up this Schmitt trigger
« Reply #3 on: January 12, 2019, 02:49:41 pm »
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.
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Spice me up this Schmitt trigger
« Reply #4 on: January 12, 2019, 04:18:46 pm »
The circuit can be simplified to some extent.
Yes. 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.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Spice me up this Schmitt trigger
« Reply #5 on: January 13, 2019, 07:18:27 pm »
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.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Spice me up this Schmitt trigger
« Reply #6 on: January 13, 2019, 07:26:23 pm »
The circuit can be simplified to some extent.
Yes. I think mine would be more robust against transients.
Why?

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.
Please post the .asc file.
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Spice me up this Schmitt trigger
« Reply #7 on: January 13, 2019, 07:40:18 pm »
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.

All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Spice me up this Schmitt trigger
« Reply #8 on: January 14, 2019, 10:49:17 am »
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?
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Spice me up this Schmitt trigger
« Reply #9 on: January 14, 2019, 12:08:21 pm »
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.
No. 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.

What load does this comparator drive?
It 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. :)

All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Spice me up this Schmitt trigger
« Reply #10 on: January 14, 2019, 12:35:44 pm »
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.
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Spice me up this Schmitt trigger
« Reply #11 on: January 14, 2019, 01:16:42 pm »
Have you tried the other piece of software which also uses the .asc extension?
Just 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 worth :)

I wish programs would look at the file contents before deciding what to do, rather than relying on extensions.
I 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.

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.
Well, 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.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf