This simple project is a little test box that includes 6 LEDs that can be safely driven from the GPIO ports of any MCU. The device is very useful for quick testing of prototypes - a few lines of code can drive LEDs on any spare pin of the prototype to provide a visual indication of what it is doing. I tend to set up these indicators and leave them largely unchanged, and use the serial monitor for detailed debugging information. It works like a very simple logic analyzer.
The box has connections for 5v and Gnd, and an input pin for the six LEDs. The inputs are buffered so that the load on each input is about 1.6mA each: that is well within the 20mA per-pin maximum of the Arduino UNO, and also well within 200mA total for all pins.
DM/SN7407 Hex buffer, or similar (eg, 7417)
6 x LEDs with dropping resistors to suit. This project uses bright
white LEDs with 120 ohm resistors. Standard red or green LEDs typically
use 220 ohm resistors.
Prototype board approx. 4cm x 6cm. Many styles would work.
Headers: 2 x 3-pin, 1 x 6-pin.
3D printed case.
The 7407 medium-scale integrated circuit is a hex
buffer/driver with open collector outputs. Hex simply means there
are six separate buffers/drivers within the chip. Open collector
means that the output is a transistor switch - on or off - that switches
the supply from some external source to ground. In this case the
external voltage source is actually the same 5v supply that powers the
chip, but in other applications it could be a supply of up to about
30v. The maximum current for each switched circuit is 40mA - well
within the 20mA typically required for a LED. These chips are easily
recovered from obsolete equipment - they are large enough to solder with a
typical hobby soldering iron, but small enough to fit into a suitable
device case. Note that there are several variations of this chip, such as
'LS' and 'S', and also 5407 which is a lower voltage military version: any
of these variants is suitable for this project.
Note that the notch at the end of the chip defines the pin numbering. With the notch at the left-hand end, looking from above, pin numbers start at the lower left-hand corner and proceed anti-clockwise. The lettering is usually aligned with the notch at the left, but do not rely on it.
The case is a simple two-part assembly, with a base that the prototyping board sits down into, and which then screws through countersunk holes from the back into standoffs in the lid. The lid has cutouts for the LEDs and the headers. The screws self-thread into the holes in the lid - a solution that is adequate for such a small case. The screws were slightly too big for the holes in the prototyping board: the corners could be cut away completely because the board is held securely between the base and the lid.
If the +5v supply does not come from the Arduino then it is critical that the GND from the test unit is connected to the Gnd on the Arduino.
Note that this circuit does not separate the +5V supply for the 7407 IC and the positive supply to the open collector drivers. These drivers can take up to 30v. If using a chip like this with a higher driver voltage then the 7407 Vcc supply must be provided separately at 5v. Of course, whatever the drivers are driving must be configured correctly for the higher voltage.