LED direction board

for many years I wanted to do this project, it’s so simple and I already bought the parts for it. All it does is detect the state of an IO pin on a microcontroller. The special thing is it detects high, low, or high-z. It’s green/red so it’s especially not useful to Frank, but I like it a lot. You can use it on logic that goes down to *just over* 3.3v because of the way I designed it.

The special thing I did is use LEDs that are wired against each other, if the voltage flows one way one LED lights up, if it flows the other way, the other one lights up. If the pin is high-z, then no current flows and nothing lights up. This is accomplished by one leg of the LED being tied (through a resistor) to the microcontroller pin and the other leg being tied to a voltage regulator set for exactly half of Vcc. I say ‘exactly’ but if your LEDs have different voltage drops and you want the same current through both of them with one resistor you may have to tweak the voltage off of center to accomplish that. I installed a spot for fixed or variable voltage regulators based on the 1117 style (pretty much the successor to the 78xx/317/337 stuff).

teeny, but I could cram those resistors closer, or use a resistor network, and make the regulator able to be snapped off so multiple boards can use one regulator

The problem with this design is that you need LEDs that are a bit below half the voltage drop so there’s room to regulate that current with a resistor. You can’t find much below 1.65v LEDs, not in this package. I have thought about how else to do this. I can just have one LED pulled high and one LED pulled low from an IO pin, but the problem there is will I get both LEDs to light for a high-z signal? I think that would happen for logic levels over 3.3v, but for levels between 3.3v and 1.7v only one will light because of the forward voltage drop of both LEDs in series being too much for the voltage rails to push through. I could do something like this with comparators, but how do I detect a third state? perhaps 2 resistors and some transimpedance amplifiers? Yeah, I’ll bet you never thought you’d actually hear that word outside of college. The problem there is that I need 2 op amps per IO pin, that’s a lot bigger board and I’d rather keep things simple. Anyway, it works, board files here:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: