Synopsis: Cygwin is a POSIX-like/Linux-like environment available for Windows; we only wish that its package manager (non-initiates, read: “app store”) were a bit more like apt-get/Synaptic et al.
Concept
Multi-shot (Multiple monostables on one timer)
The circuit described here triggers three (or an arbitrary number) monostables with differing but related widths. What’s different about this one than others I’ve seen is that this circuit has only one timing signal; in particular, there is only one RC network among all, which could potentially reduce the parts count and, more importantly, increase consistency among the timers.
The timing network is actually sort of a modified RC using a transistor and a voltage reference to charge the capacitor with a constant current. The timing is determined by the base voltage of the PNP transistor, the resistance at the emitter resistance, and the capacitance at the collector. The voltage drop across the resistor is the Vcc – Vb + Veb[1]. As long as none of these three values vary significantly in the application, the resistor’s voltage drop can be considered constant. If the resistor is, as expected, also constant, then the current through it is constant as well: I = V/R. The transistor will adjust as necessary, if possible, to maintain that current through the transistor[2]. If the supply voltage is well regulated, the base voltage can be set with a voltage divider.
The output of this constant current timing network, in contrast to the tricky curve of a regular RC network, is a linear ramp. This makes it easier to calculate the desired control voltage for each monostable. In the example above, the control voltages are 1V, 2V, and 3V, where the 1V and 2V timers produce a pulse exactly 1/3 and 2/3, respectively, the width of the 3V timer pulse. The values need not be this regular. A normal RC network could be substituted if you’re willing to do the math.
The monostable with the longest delay should have its discharge pin connected with its threshold pin in order to discharge the capacitor.
This approach gets a little unfortunate where setting the control voltages comes in. The CV is preset internally with a three-step resistor divider network. The CV itself is roughly 5k from Vcc and roughly 10k from ground. If I’ve done the math correctly, this is equivalent to a 2Vcc/3 supply through a 3.3k resistance. This means that you can’t trivially set the control voltage with a divider—something with a low (ideally zero) output resistance is necessary. Here are some things that might be worth trying:
- Resistor divider with proper buffer (2 resistors, 1/4 to 1 op amp IC). If you’re not willing to complicate the calculations, an op amp can output the same voltage as the input, with no base-emitter drop. As a bonus, it’s an op amp, which is capable of a whole lot more. If restricted to Radio Shack, I’d pick up two TL082 JFET dual amps (or an LM324 quad if they’re out), then use three of the amps with a resistor ladder to set CVs and the one left over to upgrade the current source. I’d guess this is the option that would involve the least hair-pulling. (Edit: An example of a buffered resistor divider, complete with redone current source, in terms of a 7805 voltage regulator. Would require a supply voltage above 7 volts or so, but it’s an easy out in 2-3 ICs and about 10 resistors, plus the transistor and RC already in the circuit.)
- Resistor divider with unity gain transistor (2 resistors, 1 NPN transistor). Similarly to the current source, the emitter voltage is a nearly fixed drop below the base voltage.
- Trimmer (1 potentiometer, potentially up to 2 biasing resistors) if you’re okay with a bit of tuning.
- Linear voltage regulators/references. Would probably work really well, but might be expensive depending on where you buy[3] and in this case requires a fairly small one (probably around 1V). The LM317 can be treated as a precision 1.25V drop, as long as the minimum load requirement is met.
- Diode drops (1 diode). In the simulator, I was able to get the circuit to work with a ladder of diode drops for the control voltages (i.e., around 0.7, 1.4, and 2.1V). I’ve read that in practice this doesn’t work nearly as well.
By the way, the intended purpose is to trigger some D flip-flops to read serial data in an experimental line encoding I’ve conceived. It’s a variation of one I discussed way back, but the initial rising edge is followed by three bits of data before the mandatory fall. If it works, it could mean a simple output interface for PCs (e.g. via monitor or sound card) to devices that only understand data in terms of data, clock, and latch. What does this mean? You guessed it—semi-headless 74HC595 displays. (Okay, maybe not so much, but that’d at least be a good way to test it.)
Concept: Four 555 timers into a gated D latch
Today, figured out how to make a (possibly low-speed) transparent D latch out of an R-/S latch, plus a couple of logic gates, and an inverter. Each of these four things can be constructed from a 555 timer (or half of a 556). Alternatively, each of the gates can be replaced by three diodes[1] and a resistor, and the inverter by an NPN transistor and a resistor. Not pictured is the AC coupling[2] on the E input that would make this an edge-triggered flip-flop instead of a latch.
The significance of this is that a D flip-flop, a 1-bit static RAM and an important element of sequential logic, can be constructed very easily with stuff readily available from Radio Shack, which doesn’t stock logic ICs anymore but does carry 555s and 556s (as well as diodes, resistors, and transistors). Naturally, I have the best interests of the impatient experimenter in mind. :-)
- [1] With Schottky diodes you could probably get away with omitting the output diode. ↩
- [2] In this case, an RC highpass is used, an inline capacitor of about 0.1µF followed by a 10kΩ pull-down resistor. ↩
Concept: Push and Pull

This circuit has not been tested. It might work. It might not. Who knows? All diodes should probably be Schottky.
I contrived a diode-transistor logic (DTL) circuit for a SR latch[1] with a CMOS push-pull output and a break-before-make mechanism to prevent simultaneous push and pull (shoot-through). I have no idea whether it actually works and there are probably easier ways to do it, but it was kinda fun.
The upper schematic lays out the concept in terms of OR gates with different inversions (clockwise from upper left: NOR, OR, AND, NAND). The output is fed back into the inputs through diode-resistor level shifts so that the one being fed into the high side is high when the output is high but low if the output is either low or off (high-impedance), and the one into the low side is low when the output is low, but high if the output is high or off. This feedback should prevent either output FET from turning on until the complement is turned off (or close to off).
The lower schematic is the upper schematic rendered in diode-transistor logic. The lower-left gate, a NAND, is implemented using the textbook DTL NAND with an NPN transistor. The NOR in the upper left is actually the same as the NAND, but with the diodes reversed and a PNP on the output. Note that in both cases the feedback diode-resistor shift is now part of the gate itself. The other two gates are just diode logic since OR (upper right) and AND (lower right) can be implemented without a transistor on the output.
This contrivance is for a power logic buffer; the intended supply voltage would be somewhere from 12 to 48 volts and the current capacity on the output MOSFETs would be at least a couple of amps. I haven’t tested the thing. Please don’t use it, except in test circumstances, unless you know what you’re doing.
- [1] Technically, an S AND NOT R latch. ↩
Loose spec for multi-system classic gamepad adapter
The following draft description runs down the basics for a single port that allows the direct connection of Sega Genesis controllers and connection via a mostly passive adapter for several other systems’ controllers, including NES, SNES, PlayStation and PS2, Nintendo 64, and GameCube. Additional styles could be added later, and a structure is made available for controllers custom-built to this spec. Read More
Potential: Super Box
[Strong Bad's e-mail has undergone a tremendous Interface Screw, and the screen on his computer has literally drained all of its content onto the floor.]
Homestar: Never fear, Strong Bad! I know how to fix your computer box.
Strong Bad: No, no, don’t touch that!
Homestar: Your super box needs words.
— sbemail 118
While cleaning up for an event at my house yesterday, I happened upon the lifeless husk of a DVD player that was ruined by a lightning strike just over a year ago.
Today being my day off, I took it apart just to see what might be salvageable. Granted, the defibrillation it took probably derated most or all of its electronic components, but perhaps some of the switches and connectors came through intact. While I was taking it apart, it occurred to me that its most attractive feature would have been untouched by the strike: Its case. On the front, it has a panel of six tactile buttons on a breakout board (if they were damaged, they’re a common style that’s easily replaced), three optic pipes on the right for PCB-mounted status LEDs, a transparent area for an IR receiver, and the tray door, which is spring-biased closed by default. On the back, there is a place for a power cord and an array of analog AV connectors (RCA and S-video). And, of course, the form factor is worth noting: It’s the size and shape of a DVD player, and as such would be a good fit for a set-top box.
Now, what could I put in that box to make it useful? One possibility would be the vastly underused Acer Aspire One I bought two and a half years ago.
This computer has served me nicely on a few rare occasions that I’ve needed a computer without expecting to. However, it would have been a better fit for my previous life in DC, and most uses I had for it have fallen onto the Droid I started carrying for work. It’s no powerhouse; you’d be hard-pressed to run any particularly impressive graphics on it, or even complex Flash movies. But it runs Ubuntu, it can do YouTube, it’s adequate with emulators, and it can reportedly even run MythTV (think tinkerer-friendly TiVo). As far as I know, it doesn’t have TV in or out, but it has a DE-15F VGA connector, and my current TV (which replaced a TV that was zapped in the aforementioned incident) happens to have VGA in. Nice. The computer is easy on both power and ventilation requirements, and, well, it’s a netbook—the guts are small enough to be mounted in a wide variety of alternative cases.
This being an interesting place to have a computer, it would have to have a variety of interesting interfaces. The Acer already does wi-fi, and that’s a very good start. There’s a place for a IR receiver, and that would definitely be a must; LIRC would be the jumping-off point there.
Aside from that, you may have noticed that I’ve been writing a lot lately about game controller interfaces. I’ve been turning over in my head the possibility of a DE-9M gameport that is electrically compatible with controllers for Sega (Genesis), Nintendo (NES, SNES, N64, GameCube), and Sony (PS, PS2), with firmware extensible to more designs as necessary. It would be possible to connect a Sega controller directly; all of the others would utilize an almost-passive[1] adapter. DE-9 connectors are compact (most of the aforementioned controller connectors are huge by comparison) and very easy to source and replace.
Using a single connector on the console end instead of a smattering[2] simplifies the wiring and the board design while offloading the hairy details to external adapters. This last point is important because it’s tricky to find many controller connectors in panel-mount forms[3], but extension cables are common as accessories, usually not as tricky to source.
So, folks, interesting possibilities!
- [1] Adapters for non-Sega controllers would contain circuitry to identify which alternate configuration it should use, probably as simple as a transistor and two resistors totaling less than a quarter in parts. ↩
- [2] The RetroN 3 takes this approach, with two ports and a cartridge slot each for three different systems. ↩
- [3] I’ve actually made panel-mount PS controller ports using extension cables, metal L-shapes, and a generous application of epoxy. Didn’t turn out too badly, either. ↩
Thoughts: Machines I haven’t made (yet)
A hard truth that I think everyone who makes stuff has to come to terms with is that it’s basically impossible to do everything one wants to do within a lifetime. The proportion of imagination (the plans) to wherewithal (the means) has got to be at least exponential. (Perhaps that’s for the best.)
In other words, my time and resources have never really been able to keep up with my ideas. At any given time, unless I’m worn out or recuperating from something, I can expect to have several new ideas in the hopper before I’ve finished the one I’m already on. This doesn’t end well. Some of the time I can actually slog my way through to the end of what I’m working on, generally at the expense of the exciting new ideas. More frequently, however, I end up with another project at 30 to 50 percent completion. I think I inherited this from my dad. He was a very smart and inventive guy, and my childhood was practically littered with impressive projects started by him and then preempted by life.
Anyway, my angle here is that I have ideas that I like but am not currently working on. I offer a sampling [Edit: See Back Burner for an up-to-date version of this list.]:
- Arcade-style dance machine. Summarily, a StepMania/DDR cabinet with custom input and output interfaces. This was my timesink around 3 or 4 years ago. I invented a special soft-touch sensor square that offers a bit of shock absorption and has LEDs embedded in the top of the panel. I created an RS-232 interface for animating LEDs. I was even working on convincing an 18F PIC to identify itself to a computer as a USB gamepad so I’d have something better to deliver than a hacked-apart controller. I bought a used TV for the purpose.
- A solid-state dual AC switch/dimmer with opto-isolated microcontroller input. This would be more or less a twin solid-state relay (SSR) with dimming capabilities. It could be used to make a computer turn on the marquee light of an arcade machine or act as a speed controller for a rotary tool. This circuit could easily be built into an outlet box with a pair of sockets. An application note by Fairchild (AN3003, PDF warning) has as figure 9 a very basic SSR that seems suitable. I’d be making one of these per outlet.
- A knockoff of a Griffin PowerMate that isn’t made out of a scroll wheel. Basically, a rotary encoder with a hand-sized cap attached.
- A really big rotary encoder wheel. Actually, that was part of the DDR machine concept. I bought and dismantled a pair of rollerblades from Goodwill to harvest their bearings. Those are also still waiting for my attention.
- A RepRap. But who doesn’t want one?
- Not to mention all sorts of creative apparatus, including a 3D plotter, CNC mill, CNC vinyl cutter, on down to a UV station for photoresist boards, but these are far more likely to be bought than made.
And I’m confident that I’m capable of making all of these things and many, many more, but not necessarily in the same lifetime.
Fortunately, I’m not presently in despair about this; it’s merely an irritation. It’s frustrating to know from the get-go that whatever I’m starting isn’t likely to come to a meaningful conclusion.
On the other hand, someone of the mindset that it’s not the destination but the journey would call this a victory—a life that’s all journey and no destination. Sometimes I can see it this way, also. :-)
Whiteboard: Cheapo motion sensor
After being unpleasantly startled that our jaw-style rat trap had, uh, done its job on a much smaller rodent, I decided that a less shocking audible warning might be useful. [Edit: See revision later in this post.]


This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Nice coding. Has it got a name?
I have a self-clocking line/signaling code in mind. I don’t know what it’s called, and I’m having a rough time finding out.
Whiteboard: Fridge thermostat (possibly beer-centric)
Coincidentally to my recent discussion of thermostats, I got a request from a co-worker today. He asked for a refrigerator that doesn’t care about the temperature of anything in the fridge except the beer. I’m not really into beer, but I know where he’s coming from.





