I'm working on a project as something to do over the summer, and I'm at the point where I need someone more experienced than me to help put the finishing touches on the design!
I'm working with a Basys 3 FPGA dev board (which I needed for a class last semester), as I really enjoy working with Verilog - as such, this circuit is intended to run at 3.3V because that's what the interfaces between the board and the outside world (what Digilent calls 'PMOD' connectors) run at. My goal is basically to achieve automatic control of signals for a train layout through the use of light sensors - but that's not the focus of this thread.
Currently, my design looks something like this:
http://bricksafe.com/files/Phoxtane/automatic-lego-train-control-with-fpga/track_signal_board_v1.pdf .
The idea is that I take a two-bit signal from my controller, and send it through the 74HC139 (which is perfectly fine with running at 3.3V unlike the 74LS139) decoder chip in order to select one of three outputs - active low, in this case. Since the chip can't deal with the current from running the LEDs I've chosen, there's a common collector transistor setup on each LED in order to provide enough current to the LED. In the schematic, I'd connect three LEDs to each 1x6 connector, running wires up to the signal itself while hiding the controller somewhere under the layout.
I only have one signal breadboarded out right now, but each decoder chip actually has two decoder units inside it.
The nice thing about this breadboard power regulator is that I can switch between 5V and 3.3V at will - currently I have an Arduino Uno hooked up so that I could play with blinkenlights, so it's all running at 5V. I'll have to tweak each resistor value since the voltage drop is different across each LED and I'm actually overdriving the red one slightly, but for now the lights actually turn on and off properly! Except for one... this is where the problems show up.
The Arduino loops through the four possible configurations of the input pins in order to test all four outputs. The red LED is both A0 and A1 low, yellow LED is A0 high and A1 low, green LED is A0 low and A1 high... and the last output, selected by A0 and A1 high, isn't actually connected to anything. That'll be my default 'safe' state when initializing the controller and such. However, switching to that output doesn't actually do anything - whatever LED was lit up last stays on for the duration of that block of code, and then the pattern continues as normal. As such, I can't actually turn off all LEDs at once!
That's the big problem right now, but I was hoping to get some feedback on the decoupling capacitors, as well as some pullup resistors. The last resistors I had were 100k ohm resistors connected to VCC and attached to A0 and A1; at that point, I was driving the signal by hand by manually plugging those wires into the + and - rail on the breadboard. When I left them connected to the negative rail (leaving the red LED on), I burned myself on them because they were so hot.
The weirdest thing is that selecting the 'off' output for the signal circuit worked just fine when I was plugging the wires by hand, but it doesn't work when doing it with the Arduino.
EDIT: Before I forget, part numbers and such:
74HC139: Texas Instruments SN74HC139N
Transistors: Fairchild Semiconductors BC32725TA