Which LED Driver?

I've got a project with a Nano, nine buttons and LEDs, an RFID reader and an mp3 player. RFID reader and mp3 player use eight digital pins between them leaving the analogue pins and five digital pins left. I'm comfortable I can wire up the buttons to one or more analogue buttons using the equivalent of an analogue to digital converter circuit.

To use nine LEDs with the five remaining digital pins, I think I need an LED driver. But I'm not sure which one - i only want a couple of cheap 8 channel ones or maybe a single 16 channel one. Also I need a board (SPI?) not an IC. (Forgive me if haven't got the terminology quite right).

Can anybody recommend me the right board?

Look up projects using shift registers like 74HC595.

It's very unlikely that you'll find such a board. You'll have to solder wires to the LEDs, so why not also solder a chip and resistors on a prototyping PCB?

A pcf8575 board will give you 16 pins that can read buttons or drive LEDs.

download

For buttons, connect the button between the pcf pin and ground. For LEDs, connect the LED + series resistor between Vcc and the pcf pin.

Alternatively, you can connect the buttons and LEDs in a 3x3 matrix. This will require 9 Arduino pins.

The LED matrix will require 6 pins, 3 pins for rows and 3 for columns. The button matrix will also require 6 pins. However, 3 pins can be shared between the 2 matrices, so only 9 pins in total. Writing the code for this can be tricky, because the matrix must be scanned by the Arduino, and the timing must be done carefully to keep the LEDs from flickering. The forum can help you with this code.

You should not use digital pins 0, 1 on Nano. They are needed for uploading your sketch and using serial monitor.

Analog pins A6, A7 cannot be used as digital input/output pins, only as analog inputs. But A0 to A5 can be used as digital input/outputs.

I have never worked with soldering chips directly onto a pcb. I didnt realise that some chips had pins which were directly solderable to PCB prototyping board. Can you recommend a chip that'll do what I need?

Thanks - I have managed to use D0 and D1 on a previous project. As you say I couldn't do serial connection anymore - but I could still program the Nano...?

I think I'd rather use a dedicated chip/board rather than a matrix. Complexity is not my friend. Lol.

Exactly what I needed, thank you!

I'm also looking at a single IC as suggested by Diettrich.

I assume this is solderable into a prototyping pcb?

The same chips can come in different packages. For soldering to prototype PCB (stripboard, veroboard, Protoboard, tri-pad board etc) you need to buy the chip in a package with thu-hole pins on a 0.1" grid. These are often called "DIP" or "DIL" chips.

The DIP/DIL package:


SMD package (no good for protoboards):
s-l960

As a beginner, it may be safer to use chip sockets.

I prefer sockets instead of direct soldering of PTH chips.

Any chip with PTH (DIL) pinout. For 16 I/O lines with SPI or I2C look up port expanders.

Or use a board like mentioned by @PaulRB in #4.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.