# Submission in progress, 555 Schmitt Trigger

#### Wendy

Joined Mar 24, 2008
23,421
555 Schmitt Trigger

PARTS AND MATERIALS

• One 9V Battery
• Battery Clip (Radio Shack catalog # 270-325)
• Mini Hook Clips (soldered to Battery Clip, Radio Shack catalog # 270-372)
• One Potentiometer, 10 KΩ, 15-Turn (Radio Shack catalog # 271-343)
• One 555 timer IC (Radio Shack catalog # 276-1723)
• Two light-emitting diodes (Radio Shack catalog # 276-026 or equivalent)
• Two 1 KΩ Resistors
• One DVM (Digital Volt Meter) or VOM (Volt Ohm Meter)

CROSS-REFERENCES

Lessons In Electric Circuits, Volume 3, chapter 8: Positive Feedback
Lessons In Electric Circuits, Volume 4, chapter 3: Logic Signal Voltage Levels

LEARNING OBJECTIVES
• Learn how a Schmitt Trigger works
• How to use the 555 timer as an Schmitt Trigger
SCHEMATIC DIAGRAM

Schmitt Triggers have a convention to show a gate that is also a Schmitt Trigger, shown below.

The same schematic redrawn to reflect this convention looks something like this:

ILLUSTRATION

INSTRUCTIONS

The 555 timer is probably one of the more versatile "black box" chips. Its 3 resistor voltage divider, 2 comparators, and built in set reset flip flop are wired to form a Schmitt Trigger in this design. It’s interesting to note that the configuration isn’t even close to the op amp configuration shown elsewhere, but the end result is identical.

The defining characteristic of any Schmitt Trigger is its hysteresis. In this case it is 1/3 and 2/3 of the power supply voltage, defined by the built in resistor voltage divider on the 555. The built in comparators compare the input voltage to the references provided by the voltage divider and use the comparison to trip the built in flip flop, which drives the output driver, another nice feature of the 555. The 555 can drive up to 200ma off either side of the power supply rail, the output driver creates a very low conduction path to either side of the power supply connections. The circuit "shorts" each side of the LED circuit, leaving the other side to light up.

Try adjusting the potentiometer until the lights flip states, then measure the voltage. Compare this voltage to the power supply voltage. Adjust the potentiometer the other way until the LED’s flip states again, and measure the voltage. How close to the 1/3 and 2/3 marks did you get?

Try substituting the 9V battery with a 6 volt battery, or two 6 volt batteries, and see how close the thresholds are to the 1/3 and 2/3 marks.

Schmitt Triggers are a fundamental circuit with several uses. One is signal processing, they can pull digital data out of some extremely noisy environments. The other big use will be explored in the following chapters, that of an extremely simple RC oscillator.

#### Wendy

Joined Mar 24, 2008
23,421
There seems to be a bug in the forums editing software. I can't get rid of the gap under the Parts and Materials section.

It also inserts a line feed between paragraphs and deletes a line feed after the bullets every time I edit it. I'll work around.

************

OK, the gap went away. I seems to have a problem with cut and pasted text being different, even though it is the same font and the same size, there is a slight difference between them.

Last edited:

#### Dave

Joined Nov 17, 2003
6,969
It looks fantastic Bill, if this has been drawn completely from your PaintCAD tools then I am impressed!

As for the gap, I'm not sure why there is a gap inserted after lists, it does it even with basic lists. I'm not sure how it looks on WYSIWYG editor, but I use the standard editor and all you do is remove the extra lines.

I don't know if you want to reference the reader to where the notion of the Schmit Trigger is introduced in the e-book: it isn't a dedicated section but falls under the Logic signal voltage levels section.

Keep us posted, the work thus far is very promising.

Dave

#### Wendy

Joined Mar 24, 2008
23,421
This is the first of 4 definite articles I've been thinking about, each building on the other, about 555's. This weekend I've been busy making the tools and learning the idiosyncrasies of forum editing. I figure these would go after the existing 555 articles.

The bug with the gap has more to do with pasting what should be identical fonts and sizes but isn't. It was the transition between this fonts that was the core issue.

There is a second bug when using bullets. The forum software inserts spaces around the bullets every time you edit.

Neither of these are a showstopper, and are easy to work around. Might be something the VBulliten guys might need to have feedback on.

I need to learn how to do symbols like ohm and math equations in the forum, but this doesn't relate to SubML, so it's not hot. I'd hate to resort to graphics, actually, no I wouldn't.

You've probably noticed I'm not adverse to lifting existing graphics off the other areas, such as the DVM. Like anyone who draws (I hesitate to call it art) I have ideas of how it should look, which is driving my work.

Learned another reason to use .png format. I needed to rotate the clips to an odd angle and was able to do it with PHotoSuite. I couldn't do that with Paint. After I did it I put the rotated clips back into the PaintCAD database.

Keep the critiques and ideas coming, I'm at that stage.

Last edited:

#### Wendy

Joined Mar 24, 2008
23,421
OK, other than tweaks and SubML it is done. I redrew the illustration a bit to shrink it's size. Please let me know what you think.

#### Wendy

Joined Mar 24, 2008
23,421
OK, I've put the working documents here so I can work on them in several locations. When I'm done the with the SubML converstions I'll let you know Dave.

I've done several redraws of the illustration. I think the last is best, but I'm interested in feedback. The other drawing can be found in my albums. http://forum.allaboutcircuits.com/album.php?albumid=7

**********************

OK, I've SubML marked it up, but for the life of me I don't see how to do the header without the numbers. You know, twice the size and blue "555 Schmitt Trigger" at the beginning of the article. What am I missing?

#### Attachments

• 36 KB Views: 47
Last edited:

#### Dave

Joined Nov 17, 2003
6,969
I've done several redraws of the illustration. I think the last is best, but I'm interested in feedback. The other drawing can be found in my albums. http://forum.allaboutcircuits.com/album.php?albumid=7
Bill, when you sat the last one is best, are you referring to this one? I personally think this is the best because it is the clearest in terms of organisation - having the battery connection away from the circuit allows for the reader to focus on the circuit arrangement on the BB.

Can I ask, have you connected the circuit up as per the diagram and tested it?

Btw, this experiment is looking great. Thanks for the effort Bill.

OK, I've SubML marked it up, but for the life of me I don't see how to do the header without the numbers. You know, twice the size and blue "555 Schmitt Trigger" at the beginning of the article. What am I missing?
Hopefully Dennis can give you some feedback on this.

Dave

#### Dcrunkilton

Joined Jul 31, 2004
422
OK, I've SubML marked it up, but for the life of me I don't see how to do the header without the numbers. You know, twice the size and blue "555 Schmitt Trigger" at the beginning of the article. What am I missing?
I don't know anything about the "numbers". However, the blue header is a function of AAC, perhaps a CSS style sheet specific to the AAC web site.

Compare this example at ibiblio.org:

http://openbookproject.net//electricCircuits/Exper/EXP_2.html#xtocid24490

to this at AAC:

There is no blue in the header (html) at ibiblio.org, nor in the subml.

If you produce .sml which produces .html looking like the html at ibiblio.org, then it will look like the copy at AAC (blue header) when it is moved there by the AAC administrators.

You will also see some other differences between the two sites.

#### Dave

Joined Nov 17, 2003
6,969
Apologies, I didn't read the question properly first time. When AAC updates from the ibiblio master version the header will be formatted as you see in the AAC version - this is done AAC side and as long as you follow the same formatting as the existing sections at ibiblio then the AAC update scripts will do the rest.

Dave

#### Wendy

Joined Mar 24, 2008
23,421
Testing the circuit and and checking the SubML is all that's left. My confidence in the breadboard is high, but I still have to do it. My confidence in SubML isn't so high, but then I'll do it too. If I was using 98SE with a DOS prompt it might go easier, but I think I know how to do it in XP command prompt.

I agree with the last drawing being the best. I was going for a smaller image as well as cleaning it up. If I ever go for a dual supply I'll mirror the arrangement on the top.

#### Dave

Joined Nov 17, 2003
6,969
Testing the circuit and and checking the SubML is all that's left. My confidence in the breadboard is high, but I still have to do it. My confidence in SubML isn't so high, but then I'll do it too. If I was using 98SE with a DOS prompt it might go easier, but I think I know how to do it in XP command prompt.

I agree with the last drawing being the best. I was going for a smaller image as well as cleaning it up. If I ever go for a dual supply I'll mirror the arrangement on the top.
Sounds good. Keep us posted.

Dave

#### Wendy

Joined Mar 24, 2008
23,421
OK, I'm trying to do the conversions from .txt to .htm using sed with no luck using XP's command prompt.

I have put this in a unique directory at C:\my documents\all about circuits, and have moved to this directory in the command prompt.

I type the command:

sed -f 555st.txt > 555.htm

and I get the following error...

sed: file 555st.txt line 1: Unknown command

I tried renaming the file to 555st.sed and get the exact same result. What am I doing wrong?

I'm not clear on what the attribute -f does either.

The files are in the zip file in an earlier post on this thread. As I change it I'll update the files. I'm hoping that sed is compatible with XP, if not there is always 98SE.

Thanks.

Last edited:

#### Dave

Joined Nov 17, 2003
6,969
SED is a UNIX command and is not available in Windows as standard, hence why you are getting the error. There are probably add ons for Windows that will give the functionality of SED but I'm not sure what they are at the moment. What version of XP do you have? Would MS Services for UNIX work?

Dave

#### Dave

Joined Nov 17, 2003
6,969
Here is one such Win32 implementation of SED, but I don't know a) if it works, or b) if it is appropriate as a Windows implementation.

The universal availability of this project means that it is geared towards OS development such as Linux. Perhaps we should look at this with Dennis to see if we can make the guidelines more obvious for users of Windows (it may be CS but is by far and away the most popular system).

Dave

#### Wendy

Joined Mar 24, 2008
23,421
OK, when I get a chance I'll drop down to Win98SE, which is supposed to be compatible with the SED I'm using.

Could you do me a favor, and check the basic format of the file I've saved (555st.txt)? Also, is the command I'm using basically correct (see below)? I'm assuming the -f attribute is file output or some such. I just want to make sure I'm not doing anything boneheaded.

sed -f 555st.txt > 555st.htm

My normal OS is XP Pro, though I've been known to use XP Home. I've mentioned it before, but I use removable hard drives, so dropping to 98SE is no big deal. The only Linux I've really used to date is Knoppix 5.0, which is entirely dependent on the DVD drive, and has no long term memory nor does it see my hard drives. Eventually I'll set a Linux OS up on yet another drive, but not today.

Thanks again.

***********

OK, partial success.

I wasn't using the sml2htm.sed script properly. I had some trouble downloading it, every time I clicked on it it came up as an HTML page on my browser. I copied and pasted it to notepad, saved it, renamed it, and included it in the command. First time I tried it it crashed, but when I retyped the command again it worked, sort of.

Somewhere I'm dropping my linefeeds, but I'll get back to this when I have more time.

Bet with the command change it works the same in XP.

sed -f sml2htm.sed 555st.txt > 555st.htm

Last edited:

#### Dcrunkilton

Joined Jul 31, 2004
422
sed -f sml2htm.sed 555st.txt > 555st.htm
I don't think I am giving you any new information. The above command looks good to me. The -f parameter tells sed to take the commands from the file sml2html.sed.

Shift-click will sometimes down load to a file instead of displaying as a page.

#### bloguetronica

Joined Apr 27, 2007
1,541
That is a very good article, Bill. Keep going!

#### Wendy

Joined Mar 24, 2008
23,421
Thanks. And congrats on the 1000 posts mark. In my other forum you would now be a Major Geek.

OK, Mostly done with SubML. The only thing I haven't figured out is <OMEGA>, it will not come through no matter what I do. Am I missing something or is it an idiosyncrasy of my setup? My browser is set up for unicode as required.

I also tried to use <superscript><subscript> to show 1/3 and 2/3 in proper perspective, with no luck. I've left a SubML document in the form of 555st2.txt in the zip file to show the problem. Basically I've given up on doing it this way.

Now for the physical hands on part...

Couple of suggestions though, put a zip file in the submissions section that has all the script files, not everyone uses Linux. The only working script I currently have (and will have due to the hassle) is sml2htm.sed, and there is a chance my other problems stem from something not translating quite right during my HTML to .sed conversion, which really was a kludge. The good news is everything works fine in XP.

The other thing is a different example being available, in the form of a SubML document for an existing article. I was using http://www.allaboutcircuits.com/vol_6/chpt_6/7.html as my baseline for comparison.

Is this how I should do future submissions? I figure there is some benefit from it being open, in that other people can watch the progress and input suggestions while it is easy to implement them. I do expect it to go a lot smoother in the future, most of this thread was learning curve.

Thanks.

Last edited:

#### Dave

Joined Nov 17, 2003
6,969
OK, Mostly done with SubML. The only thing I haven't figured out is <OMEGA>, it will not come through no matter what I do. Am I missing something or is it an idiosyncrasy of my setup? My browser is set up for unicode as required.

I also tried to use <superscript><subscript> to show 1/3 and 2/3 in proper perspective, with no luck. I've left a SubML document in the form of 555st2.txt in the zip file to show the problem. Basically I've given up on doing it this way.
This is something Dennis will need to advise on - he is the expert on this side of things.

Now for the physical hands on part...

Couple of suggestions though, put a zip file in the submissions section that has all the script files, not everyone uses Linux. The only working script I currently have (and will have due to the hassle) is sml2htm.sed, and there is a chance my other problems stem from something not translating quite right during my HTML to .sed conversion, which really was a kludge. The good news is everything works fine in XP.
I agree. There is a slight conflict here in that this project encourages software freedom from its very core - a principle I fully support (I run Linux myself as well as Windows). However (rightly or wrongly) this is a Windows world (certainly for the time being). The majority of people who might be interested in contributing to this project are more than likely going to be using Windows and the current focus potentially presents a barrier.

I think there is scope for us to bang our heads together and come up with two options:

1. Details of how to do this soley on Windows.
2. Details of how to create a VM install of Linux where the existing methods can be used.

I speak from personal opinion, however I think encouraging a wider scope might be preferetial.

The other thing is a different example being available, in the form of a SubML document for an existing article. I was using http://www.allaboutcircuits.com/vol_6/chpt_6/7.html as my baseline for comparison.

Is this how I should do future submissions? I figure there is some benefit from it being open, in that other people can watch the progress and input suggestions while it is easy to implement them. I do expect it to go a lot smoother in the future, most of this thread was learning curve.

Thanks.
Yes, I would suggest you stick to your use of the 555 oscillator as a baseline. Please forgive my ignorance, but does the documentation recommend a particular article form the e-book as a base-line to work to?

Dave

#### Wendy

Joined Mar 24, 2008
23,421
Mostly everything applies in windows, I don't think anything that special is needed. I wasn't familiar with SED, so that was a stumbling block for me. Is this kind of command set common in Linux? It really isn't any worse than BASIC, and a heck of a lot easier than Z80 Assy code (I have done it, but I never was proficient in it). I learned several dialects of assy for fun, 6502 is easy after the rest.

The alternate packing of scripts is needed. Windows XP treats ZIP as its very own, I can pull files in and take them out as if they were folders. I've never unpacked the oscilloscope software, I ran it right out of the ZIP file.

The only example I am aware of is the tutorial, which is definitely information overload. The articles show you where you want to go, but not how to get there. It took me forever to find <bigspace>. When this is all done I'll start another thread and ask some questions about commands I never did see what they did, even after trying to use them.

This has been a really busy weekend for me. My boy graduated from high school, and we had two major events for DeMolay (the boy's youth group I'm an adviser to), one Friday to recruit, and an all day 50th anniversary for the Richardson Chapter of DeMolay on Saturday, where my main job was one of the cleanup crew.

I use the heck out of my computer, which is one of the reasons for removable drives. It would be bad for it to die, so I have backup machines out the wazoo. Since I use a lot of commercial software I go with the flow.

When my 555 article is finished, really finished, then I guess we have an example ready to go for other folks. My experience is the vast majority of people would rather take a whipping than write something like an article (posts are OK, go figure), so I don't expect too much competition.