We’re going to go out on a limb here and declare this minuscule incandescent light flasher the smallest such circuit in the world. After all, when you need a microscope to see it work, you’ve probably succeeded in making the world’s smallest something.
Even if it’s not record breaking, [Ben Krasnow]’s diminutive entry in the 2017 Flashing Light Contest, which we recently covered, is still pretty keen. For those not familiar with the contest, it’s an informal challenge to build something that electrically switches an incandescent light on and off in the most interesting way possible for the chance to win £200. [Ben] says he’ll donate the prize money to a STEM charity if he wins, and we’d say he has a good chance with this flea-sized entry.
The incandescent lamp he chose is a specialty item for model makers and scale railroad enthusiasts; we’d heard of “grain of wheat” bulbs before, but this thing is ridiculous. The bulb makes the 4.6 mm diameter SR416 hearing aid battery that powers the flasher look enormous. The driver is a clever Schmitt trigger inverter with a tiny RC network to flash the bulb at about 1 Hz. The video below shows the flasher working and details the development and the build, which featured spot welding to the battery. [Ben] has even spec’d precisely how many Joules of energy will rupture the thing steel cases on these cells — we suspect involuntarily through trial and error.
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.
Looks like another shot has been fired in the simmering Coil Gun Control War. This time, [Great Scott] is taken to the discrete woodshed with a simplified and improved control circuit using a single CMOS chip and a few transistors. Where will it end? Won’t somebody think of the children?
The latest salvo is in response to [GreatScott]’s attempt to control a DIY coil gun with discrete logic, which in turn was a response to comments that he took the easy way out and used an Arduino in the original build. [Great Scott]’s second build was intended to justify the original design choice, and seemed to do a good job of explaining how much easier and better the build was with a microcontroller. Case closed, right?
Nope. Embedded designer [fede.tft] wasn’t sure the design was even close to optimized, so he got to work — on his vacation, no less!’ He trimmed the component count down to a single CMOS chip (a quad Schmitt trigger NAND), a couple of switching transistors, the MOSFETs that drive the coils, and a few passives. The NANDs are set up as flip-flops that are triggered and reset by the projectile sensors, which are implemented as hardwired AND gates. The total component count is actually less than the support components on the original Arduino build, and [fede.tft] goes so far as to offer ideas for an alternative that does away with the switching transistors.
Even though [fede.tft] admits that [GreatScott] has him beat since he actually built both his circuits, hats off to him for showing us what can likely be accomplished with just a few components. We’d like to see someone implement this design, and see just how simple it can get.
TDR works by sending a pulse down the cable. When the pulse reaches the end of the unterminated cable it is reflected back to the source. By monitoring the delay between the original pulse and its reflection you can determine the length of the cable. We’ve seen projects that use TDR before, and it’s often used in telecoms industry to locate faults in long cable runs.
You can try TDR in your lab using only a scope to observe the delay and a function generator to create the pulse. However, the technique works a lot better with pulses that have very fast rise times. So [android] built a fast edge pulse generator based on [w2aew]s design. Then added googly eyes for good measure. His build works great and is a nice demonstration of the technique.
[John McMaster] is doing some pretty amazing work with figuring out how the circuitry in an integrated circuit works. Right now he’s reverse engineering a serial EEPROM chip one section at a time. This is a 24c02 made by ST, and he chose this particular portion of the die to examine because it looked like there were some analog components involved.
He removed the top metal using hydrofluoric acid in order to take this image. By continually removing layers this way he manages to work out the traces and even the components themselves. To help clarify the parts he uses the set of snapshots to generate a colored map using Inkscape. From there he begins labeling what he thinks the components might be, and like a puzzle the pieces start falling into place one by one. From the Inkscape drawing he lays out a schematic, then rearranges the components to make the design easier to understand. Apparently this is a Schmidt trigger.
[Jeri] threw down the geeky fashion gauntlet by building this LED enhanced dress. She chose to assemble the project for her trip to BarBot 2011, and we can’t think of a more appropriate setting for such a garment. It uses a motion sensor to set off a delayed pattern of blue lights hidden underneath the fabric.The best part of the hack is the instamatic camera. It looks like a fashion accessory, but it’s really hiding all of the circuitry for the lights.
Inside the camera a PIR sensor waits until it detects motion, sending a signal through an op-amp to the trigger circuitry. A 74LS14 Schmitt Trigger chip teams up with some resistor-capacitor timer circuits to build a delay chain for the LEDs. This way, after motion is detected the LEDs come on and off in a staggered pattern that doesn’t require a microcontroller and is very pleasing to the eye. See the Analog win for yourself after the break.
Instructables user [MacDynamo] was thinking about home security systems and wondered how much electricity is being wasted while such systems are powered on, but not activated. He pondered it awhile, then designed a circuit that could be used to turn a security system on or off depending on the time of day, but without using any sort of clock.
His system relies on a 555 timer configured as a Schmitt trigger, with a photoresistor wired to the reset pin. When the ambient light levels drop far enough, the resistance on the reset pin increases, and the 555 timer breaks out of its reset loop. This causes the circuit to power on whatever is connected to it. When the sun rises, the resistance on the reset pin drops and the 555 timer continually resets until it gets dark again. He notes that this behavior can be easily reversed if you were to put the photoresistor on the trigger pin rather than the reset pin.
We like the idea, though we are a bit wary about using this for any sort of real security system. An errant insect or debris could cause the system to be turned on, and we’d feel pretty foolish if someone disabled our alarm with a flashlight. That said, this sort of circuit still has plenty of practical, power-saving applications outside the realm of home security.