I'm planning to build a simple LED matrix with an Arduino and some 74HC595 shift registers. However my Ardiuno outputs 5 V to the registers which will pass that 5 V on. How and where along the line do I reduce this voltage to 3.3 V?
Edit: Found this after a while of Googling. Is a resistor in front of every LED all i need (which i need anyway)?
(5–3.3) / 0.02 = 85 ohm
for a 20 mA 3.3 V LED?
Edit 2: Can i provide 3 V from a different source to the Vcc pin of the shift register, but send 5 V logic on the serial pins? Im guessing that won't work but just wanted to double check.
Best Answer
There are a number of options, most of them discussed in this post. Since the communication is one way you can use:
There are shift registers that do run on 3.3V: depending on how many lines you need, an easier solution might be to shift the Arduino output to 3.3V, and feed that to a 3.3V shift register. This will likely (again, depending on your setup) in fewer lines to be level-shifted.
EDIT: Yes, you will need current-limiting resistors for your LEDs, however, voltage divider != a single resistor. Voltage divider looks like this:
simulate this circuit – Schematic created using CircuitLab
EDIT2: Usually not. You should read the datasheet for the shift register you are planning to use about its various maximum voltages. P.S. When you say "serial pins" you don't mean the
Serial TX
andSerial RX
, right? Usually, one drives shift registers using general purpuse digital IO pins. You can use serial pins for two of those, but usually you need a more pins to drive a shift register (usually at least three in the case of 74HC595). The point is 74HC595 is driven via SPI protocol, not RS-232