I have a 12v powered 16-channel relay board, that required 5v logic level signals to control the relays. However, I am using a Raspberry Pi to control this, which has 3.3v logic level outputs. I have previously used a 74HC125 to convert 3.3v logic to 5v logic, but this is only a 4 channel device, so instead of using 4 of these, is there an IC available that will allow me to use 2 or even 1 to drive the relay board.

The 74HC125 is labeled as a "Quad Buffer/Line Driver". I have found the 74HC541 which is similarly labeled as a "Octal Buffer/Line Driver", which I think seems like a good fit.

  • 1
    \$\begingroup\$ HC is a wrong type for this, 3.3V input is not enough for logic high when supply is 5V. And yes, there are chips available as you found one already, but any 8 channel device is suitable as long as it is of suitable type and HC is not. Also 16 channel IO expanders exist. Are you sure the relay module needs 5V input? Which module is it? Since you are basically asking what to buy this can get closed for being offtopic. \$\endgroup\$
    – Justme
    Jun 26, 2021 at 10:32
  • \$\begingroup\$ Shopping questions are off-topic, but 8-channel buffers/shifters abound: e.g. 74HC*541 \$\endgroup\$
    – Reinderien
    Jun 26, 2021 at 13:39
  • \$\begingroup\$ Download the schematic for the relay module and post it, from that we can determine if it will work with 3.3V. Many will but not all. You can always test it with about 2.8 volts, if it works at that level you should be good to go. I am assuming it has an optocoupler to isolate it from the controller. \$\endgroup\$
    – Gil
    Jun 26, 2021 at 23:02

1 Answer 1


The 74HCT541 (not the HC version!) will work fine for your application.

The difference between the HC and HCT version is that the HCT version accepts TTL input signals which have a lower "high" signal voltage. The HC chip expects your Raspberry Pi to output 0V/5V (CMOS levels), while the HCT chip accepts TTL levels (roughly 0V/3V). The latter is exactly what you need.

  • \$\begingroup\$ Thanks @jonathan-s! Yes, I ommited the T as while researching I didn't notice the difference, but looking back the previous chip I used it is the 74HCT125. \$\endgroup\$
    – spazhead
    Jun 26, 2021 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.