What are he specs of the relays?... I'm not sure that you can drive relays directly from a 74HC595 output. Spec says: +-6mA @ 5V. It is a good idea to use a shift register to save pins... you can then even cascade the shift registers and this way you can control almost any number of channels - with just 4 pins. Especially nice is that you have control over latching and output enable.
Even the TTL 74LS596 - which has same functionality as CMOS 74HC595 - AND HAS open collector outputs can sink maximum 55mA - Icc, sum of all pins - before going up in flames.
You can go with a 74HC595 but need to add a (darlington) driver array, for example, ULN2803 - it may look as an overkill - 500mA, but I'm not aware of something in between.
I'd go for a test, because the spec says ILN2803 needs 3.5V - either TTL or CMOS - for driving it - it has all the network init, such as resistors and clamping diodes. Driving the inputs from a 74HC595 on 3.6V may not be good enough, so you need to run the 74HC595 also on 5V.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
What are he specs of the relays?... I'm not sure that you can drive relays directly from a 74HC595 output. Spec says: +-6mA @ 5V. It is a good idea to use a shift register to save pins... you can then even cascade the shift registers and this way you can control almost any number of channels - with just 4 pins. Especially nice is that you have control over latching and output enable.
Even the TTL 74LS596 - which has same functionality as CMOS 74HC595 - AND HAS open collector outputs can sink maximum 55mA - Icc, sum of all pins - before going up in flames.
You can go with a 74HC595 but need to add a (darlington) driver array, for example, ULN2803 - it may look as an overkill - 500mA, but I'm not aware of something in between.
I'd go for a test, because the spec says ILN2803 needs 3.5V - either TTL or CMOS - for driving it - it has all the network init, such as resistors and clamping diodes. Driving the inputs from a 74HC595 on 3.6V may not be good enough, so you need to run the 74HC595 also on 5V.