I want to switch several (10-20) relays with a raspberry pi. I will use darlington arrays like the ULN2003 to drive the relays, and a shift register to not use up all of my GPIO pins.
I will use an external 5V power source just to be extra safe, in case I switch all the relays at once.
Since the raspberry uses 3.3V TTL logic, while my relays require 5V, I was looking for a shift register that converts the 3.3V to 5V. I found the 74HCT595, which works off of 5V and is TTL compatible and can be cascaded. However, it seems noone sells it in a DIP package, and the stores I looked at have none in stock and need months to restock (mouser europe). Also, I'd really prefer a large package.
The 74HC595 (same data sheet, no "T") barely meets the requirements for the 3.3V input, and is available as PDIP. Would that be an alternative, or will I get erratic behaviour?
Another alternative I found is the SN74AHCT595N, which seems viable as well, however I am unsure if I can cascade it. I want to avoid buying the wrong part (again ;-/ ) and since I barely find any information on this part, I need some help ( all searches turn up the information on the parts without "A").
The datasheet mentions cascading, but it is not completely clear to me which pins I should use? Can I just connect QH' to SER of the subsequent register? (for the other registers there was always some pin called SEROUT or somesuch. Also, can I both source and sink current using this register, or are there some limitations? And where would I find this information in the datasheet, I don't see it.
Or should I use another shift register altogether? I'd be happy for any pointers, thanks.
edit: I checked the datasheet of the mentioned TPIC6x595 (where "X" is "B" or "C") and they seem nice, however now I have more questions. Both mention relay applications. The relays are dual coil latching KMET EA2-5TNJ and have an operating power of 140mW at 5V. The "B" outputs 140mA continous current, so I am covered, but will I still need darlington arrays to take care of the back-action during switching, or can I leave them out?
However, the initial idea was to use the raspberry 3.3V logic. If I tie the relays to an external 5V and use the "B" driven by 3.3V logic to sink current, then I can switch to 0V just fine, and both coils of the relay will turn on when I want them to (The set voltage of the relays is 3.75V for both coils). While this may work, it doesn't seem proper, since I can never turn the coils off properly. Outputting high on the shift register gives me 3.3V, which means the coils are not active (5V-3.3V = 1.7V < 3.75V), however they aren't completely off either.
So in summary:
- Do I need a darlington array with the TPIC6B595?
- Should I just use a level shifter and be done with it, or can I make do without?
- In case I need a level shifter, which one would be a normal one to use? Would a SN74AHCT245N be okay?