Almost jellybeans

September 30, 2010 2:38:38 AM CDT

'Jellybeans' are components you use all the time.. 1k & 10k resistors, .1uF capacitors, that kind of thing. The stuff you sprinkle around a circuit like candy.

When I build and test circuits, I want a signal to pump through them. That's what these little guys do. They're square wave generators.

The SOT753 package on the left is a single Schmitt inverter.. an MC74HC1G14, to be exact. Above it and to the left is a 1 megohm resistor whose right end connects to the inverter's output, and whose left end connects to the input. Below and to the left is a 1uF capacitor which sits between the inverter's input and ground.

When the inverter's output goes high, the capacitor charges through the resistor. When the voltage across the capacitor reaches the inverter's HIGH threshold (about 2v for a 3v supply), the inverter switches state, and its output goes low.

When that happens, the capacitor discharges through the resistor until it reaches the inverter's LOW threshold (about 1.5v for a 3v supply), and the output goes high again.

The result is a (roughly) 1Hz square wave.

The SOT753 package to the right is a 74LVC1G126 3-state buffer. It passes the high/low value of the inverter along to the output pad (bottom right) and an indicator LED (bottom center).

The inverter can source or sink 12.5 milliamps, which is arguably enough to run an LED (this one is limited by a 1k resistor, so it only draws about 1.5mA when it's on), but it's always a good idea to buffer your timing networks.

Besides, the buffer can crank out 50 milliamps.

The LED is admittedly a minor case of blinkenlights, but it's also a fast and easy way to make sure the circuit is working and to see what state it's in. I've spent quite enough of my life poking around a circuit that refused to work, only to find that the power had come disconnected, thankyousoverymuch.

The top pair of solder pads are power. The middle pair are ground. The bottom pad is output from the oscillator.

Why two pads for power and ground?

Because often as not, I use these little guys to test circuits as I assemble them. Under those conditions, there's no other power supply. The pads on the left bring power and ground into the oscillator, the pads on the right take power, ground, and signal out to the circuit I'm testing.

The board layout is shown to the right, because those traces that run under the inverter and buffer aren't immediately obvious when you look at the final product. The file is an 800dpi PNG, if you want to make your own, and here's a link to the SVG source file if you feel like playing with the design.

(If you're doing toner transfer, remember that this image shows a view of the board looking down from the top. You have to flip the image horizontally to get the right orientation for a transfer)

At any rate, I use these things often enough that I decided to build myself a whole batch of them, so I always have a few on hand. The ones with yellow LEDs have 1uF caps and blink at about 1Hz, the ones with green LEDs have .1uF caps, and blink at about 10Hz, and the ones with red LEDs have 10uF caps, and blink at about .1Hz.

.. not that you can tell the color of the LED from looking at an unpowered board ..

Hmm.. I'll probably have to run red, yellow, and green stripes across the backs of the boards with a Sharpie one of these days.

If you're thinking about making your own, I buy my components from Mouser, usually in multiples of 100. At that volume, the inverters, buffers, and LEDs cost about 5c each. The resistors and caps run about 2-3c each. So overall, you're looking at about a quarter's worth of parts per board.. cheap enough to count (in my book) as 'almost jellybeans'.

As of today, the cheapest parts with acceptable tolerances (1% resistors cost the same as 5% resistors, and I'm sorry, but capacitors with -20% / +80% variation don't do it for me) are:

Single Schmitt Inverter 74HC1G14GV
Single 3-State Buffer 74LVC1G126GV
0805 Resistors
1 kilohm 292-1.0K-RC
1 megohm 292-1.0M-RC
0805 Capacitors
.1 microfarad C0805C104K3RAC7210
1 microfarad C0805C105K4PACTU
10 microfarads GRM219R60J106KE19D
0805 LEDs
Red 598-8110-107F
Yellow 598-8140-107F
Green 598-8170-107F