[Bob] wanted to build a pinball-drop-style resetting target that he could use while practicing with his pistol. His first idea was to make the targets sturdy enough for use with 9 mm ammunition, and he planned to use 1/2” thick steel for the targets and 11-gauge steel tubing for the frame. However, the targets weighed 50 pounds together and that was more weight than the pneumatic actuators could lift. He ended up using 1/4” steel and thereby halving weight. The downside was that [Bob] had to switch out the nine for a .22.
Controlling everything is a 555 circuit. When triggered, it opens up a relay for one second, which trips the solenoid valve controlling the pneumatic actuators. Originally he wanted to have switches under each target, and only by dropping all four would the reset circuit be triggered. However, he built a simpler solution: a bulletproof button off to one side–effectively a fifth target–that when triggered resets the targets.
HaD have some pretty good shots in our number but we’d probably end up hitting the pneumatic actuators at least once. [Bob] did add 16-gauge steel sheeting to protect the air lines and wires from bullet splatter, which in his experience is more of a threat than a direct hit.
“Dammit Jim, I’m a hacker, not a musician!”, to paraphrase McCoy Scotty from the original Star Trek series. Well, some of us are also musicians, some, like me, are also hack-musicians, and some wouldn’t know a whole note from a treble clef. But every now and then the music you want is in the form of sheet music and you need to convert that to something your hack can play. If you’re lucky, you can find software that will read the sheet music for you and spit out a MIDI or WAV file. Or, as with my hand-cranked music player, you may have to read just enough of the music yourself to convert musical notes to frequencies for something like a 555 timer chip. We’ll dive into both cases here.
Hardly a week goes by that some Hackaday post doesn’t elicit one of the following comments:
That’s stupid! Why use an Arduino when you could do the same thing with a 555?
That’s stupid! Why use a bunch of parts when you can use an Arduino?
However, we rarely see those two comments on the same post. Until now. [ZHut] managed to bring these two worlds together by presenting how to make an Arduino blink an LED in conjunction with a 555 timer. We know, we know. It is hard to decide how to comment about this. You can consider it while you watch the video, below.
There is an old saying: “In theory, theory and practice are the same. In practice, they are not.” We spend our time drawing on paper or a computer screen, perfect wires, ideal resistors, and flawless waveforms. Alas, the real world is not so kind. Components have all kinds of nasty parasitic effects and no signal looks like it does in the pages of a text book.
Consider the following problem. You have a sine wave input coming in that varies between 0 V and 5 V. You want to convert it to a square wave that is high when the sine wave is over 2.5 V. Simple, right? You could use a CMOS logic gate or a comparator. In theory…
The problem is, the sine wave isn’t perfect. And the other components will have little issues. If you’ve ever tried this in real life, you’ll find that when the sine wave is right at the 2.5 V mark the output will probably swing back and forth before it settles down. This is exacerbated by any noise or stretching in the sine wave. You will wind up with something like this:
Notice how the edges of the square wave are a bit fat? That’s the output switching rapidly back and forth right at the comparator’s threshold.
The answer is to not set the threshold at 2.5 V, or any other single value. Instead, impose a range outside of which it will switch, switching low when it leaves the low end of the range, and high when it exceeds the high end. That is, you want to introduce hysteresis. For example, if the 0 to 1 shift occurs at, say, 1.9 V and the 1 to 0 switch is at 0.5 V, you’ll get a clean signal because once a 0 to 1 transition happens at 1.9 V, it’ll take a lot of noise to flip it all the way back below 0.5 V.
You see the same effect in temperature controllers, for example. If you have a heater and a thermal probe, you can’t easily set a 100 degree set point by turning the heater off right away when you reach 100 and then back on again at 99.9999. You will usually use hysteresis in this case, too (if not something more sophisticated like a PID). You might turn the heater off at 99 degrees and back on again at 95 degrees, for example. Indeed, your thermostat at home is a prime example of a system with hysteresis — it has a dead-band of a few degrees so that it’s not constantly turning itself on and off.
Schmitt Triggers and How to Get One
A Schmitt Trigger is basically a comparator with hysteresis. Instead of comparing the incoming voltage with VCC / 2, as a simple comparator would, it incorporates a dead band to ensure that logic-level transitions occur only once even in the presence of a noisy input signal.
Assuming you want a Schmitt trigger in a circuit, you have plenty of options. There are ICs like the 74HC14 that include six (inverting) Schmitt triggers. On a schematic, each gate is represented by one of the symbols to the right; the little mark in the box is the hysteresis curve, and the little bubble on the output indicates logical negation when it’s an inverter.
You can also make them yourself out of transistors or even a 555 chip. But the easiest way by far is to introduce some feedback into a plain op amp comparator circuit.
Below are two op amps, one with some positive feedback to make it act like a Schmitt trigger. The other is just a plain comparator. You can simulate the design online.
If you haven’t analyzed many op amp circuits, this is a good one to try. First, imagine an op amp has the following characteristics:
The inputs are totally open.
The output will do whatever it takes to make the inputs voltages the same, up to the power supply rails.
Neither of these are totally true (theory vs. practice, again), but they are close enough.
The comparator on the right doesn’t load the inputs at all, because the input pins are open circuit, and the output swings to either 0 V or 5 V to try, unsuccessfully, to make the inputs match. It can’t change the inputs because there is no feedback, but it does make a fine comparator. The voltage divider on the + pin provides a reference voltage. Anything under that voltage will swing the output one way. Over the voltage will swing it the other way. If the voltages are exactly the same? That’s one reason you need hysteresis.
The comparator’s voltage divider sets the + pin to 1/2 the supply voltage (2.5 V). Look at the Schmitt trigger (on top). If the output goes between 0 V and 5 V, then the voltage divider winds up with either the top or bottom resistor in parallel with the 10K feedback resistor. That is, the feedback resistor will either be connected to 5 V or ground.
Of course, two 10K resistors in parallel will effectively be 5K. So the voltage divider will be either 5000/15000 (1/3) or 10000/15000 (2/3) depending on the state of the output. Given the 5 V input to the divider, the threshold will be 5/3 V (1.67 V) or 10/3 V (3.33 V). You can, of course, alter the thresholds by changing the resistor values appropriately.
Schmitt triggers are used in many applications where a noisy signal requires squaring up. Noisy sensors, like an IR sensor for example, can benefit from a Schmitt trigger. In addition, the defined output for all voltage ranges makes it handy when you are trying to “read” a capacitor being charged and discharged. You can use that principle to make a Schmitt trigger into an oscillator or use it to debounce switches.
If you want to see a practical project that uses a 555-based Schmitt, check out this light sensor. The Schmitt trigger is just one tool used to fight the imprecision of the real world and real components. Indeed, they’re nearly essential any time you want to directly convert an analog signal into a one-bit, on-off digital representation.
Sometimes you use a Raspberry Pi when you really could have gotten by with an Arudino. Sometimes you use an Arduino when maybe an ATtiny45 would have been better. And sometimes, like [Bill]’s motorcycle tail light project, you use exactly the right tool for the job: a 555 timer.
One of the keys of motorcycle safety is visibility. People are often looking for other cars and often “miss” seeing motorcyclists for this reason. Headlight and tail light modulators (circuits that flash your lights continuously) are popular for this reason. Bill decided to roll out his own rather than buy a pre-made tail light flasher so he grabbed a trusty 555 timer and started soldering. His circuit flashes the tail light a specific number of times and then leaves it on (as long as one of the brake levers is depressed) which will definitely help alert other drivers to his presence.
[Bill] mentions that he likes the 555 timer because it’s simple and bulletproof, which is exactly what you’d need on something that will be attached to a motorcycle a be responsible for alerting drivers before they slam into you from behind.
We’d tend to agree with this assessment of the 555; we’ve featured entire 555 circuit contests before. His project also has all of the tools you’ll need to build your own, including the files to have your own PCB made. If you’d like inspiration for ways to improve motorcycle safety in other ways, though, we can suggest a pretty good starting point as well.
You try to be good, but the temptation to drown out the noise of parenthood with some great tunes is just too much to resist. The music washes over you, bringing you back to simpler times. But alas, once you plug in the kids started running amok, and now the house is on fire and there’s the cleaning up to do and all that paperwork. Maybe you should have tried modifying a baby monitor to interrupt your music in case of emergency?
Starting with an off-the-shelf baby monitor, [Ben Heck] takes us through the design goals and does a quick teardown of the circuit. A simple audio switching circuit is breadboarded using an ADG436 dual SPDT chip to allow either the baby monitor audio or music fed from your favorite source through to the output. [Ben] wisely chose the path of least resistance to detecting baby noise by using the volume indicating LEDs on the monitor. A 555 one-shot trips for a few seconds when there’s enough noise, which switches the music off and lets you listen in on [Junior]. The nice touch is that all the added components fit nicely in the roomy case and are powered off the monitor’s supply.
When [Kerry]’s son asked him if there was a way to make a mouse click rapidly, he knew he could take the easy way and just do it in software. But what’s the fun in that? In a sense, it’s just as easy to do it with hardware—all you have to do is find a way to change the voltage in order to simulate mouse clicks.
[Kerry] decided to use the venerable 555 timer as an astable oscillator. He wired a momentary button in parallel with the left mouse button. A 50k mini pot used as the discharge resistor allows him to dial in the sensitivity. [Kerry] found that he maxed out around 5 clicks per second when clicking the regular button, and ~20 clicks per second with the momentary button as measured here. The mouse still works normally, and now [Kerry]’s son can totally pwn n00bs without getting a repetitive stress injury. M1 your way past the break to check out [Kerry]’s build video.
There are lots of other cool things you can do with an optical mouse, like visual odometry for cars and robots.