# Shift register with relays

**URL:** <https://forum.arduino.cc/t/shift-register-with-relays/891678>\
**Category:** Programming\
**Created:** [August 2, 2021, 5:07pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678 "2021-08-02T17:07:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![boopesh\_boo](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@boopesh\_boo](https://forum.arduino.cc/u/boopesh_boo)\
**Post date:** [August 2, 2021, 5:07pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/1 "2021-08-02T17:07:29Z")

</div>

Hi, i finished my project of automatic staircase with 4 sonic sensors. To control 16 leds with 2 shift register outputs.  
Project works perfect with using leds as outputs. Today I tried to replace leds with the relay module.. But it's not working. I know module gets triggered when LOW so even I did change that in code..still relays isn't working.. I mean it's not getting triggered.and same time if I try with led it works.  
This is the module I'm trying to use

> **[8 Channel 5V Relay Module buy online at Low Price in India - ElectronicsComp.com](https://www.electronicscomp.com/8-channel-5v-relay-module-with-optocoupler?search=Relay%208%20channel)**
>
> Buy 8 Channel 5V Relay Module online at lowest price in India with best quality only on ElectronicsComp.com. Purchase now with Free Shipping and COD option.

And this is the schematic

 ![aaaaaaaaaaaaaaaaaaaa](https://europe1.discourse-cdn.com/arduino/original/4X/e/4/4/e44e50a7f3c2d5bb071c20d207c740b808dc1f2f.jpeg)

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 2, 2021, 5:13pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/2 "2021-08-02T17:13:28Z")

</div>

Can you measure the output voltage of the IC? That the voltage that triggers the relay.

---

<div class="post-metadata">

**Author:** ![boopesh\_boo](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@boopesh\_boo](https://forum.arduino.cc/u/boopesh_boo)\
**Post date:** [August 2, 2021, 5:19pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/3 "2021-08-02T17:19:04Z")

</div>

@er_name_not_found yeah.... I tried to check the voltage from shift register outputs to led using resister and it shows 2.7v  
When I try that with relay it shows 0.07.. Less than a volt and I know the module needs minimum of 1v.  
Not sure why that's happening. Also arduino is powered separately and relay is powered separately.  
Not sure what's going wrong here.  
Eveytime I think when my project works.. Their is always some issue.

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 2, 2021, 5:22pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/4 "2021-08-02T17:22:27Z")

</div>

There's your issue. You need 5V presumably for the relay signal.

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 2, 2021, 5:23pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/5 "2021-08-02T17:23:29Z")

</div>

Your power supply is 5V?

---

<div class="post-metadata">

**Author:** ![boopesh\_boo](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@boopesh\_boo](https://forum.arduino.cc/u/boopesh_boo)\
**Post date:** [August 2, 2021, 5:24pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/6 "2021-08-02T17:24:02Z")

</div>

Yeah... I'm using separate 5v supply for arduino and separate 5v supply for relays and their gnd are connected together.  
And the module I have can trigger with 1v to 5v.

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 2, 2021, 5:30pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/7 "2021-08-02T17:30:10Z")

</div>

Is that relay high triggered or low triggered?

---

<div class="post-metadata">

**Author:** ![boopesh\_boo](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@boopesh\_boo](https://forum.arduino.cc/u/boopesh_boo)\
**Post date:** [August 2, 2021, 5:30pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/8 "2021-08-02T17:30:24Z")

</div>

LOW triggered  
And this is the relay I'm using

> **[16 Channel 5V Relay Module with Optocoupler buy online at Low Price in India...](https://www.electronicscomp.com/16-channel-5v-relay-module-with-lm2596-power-supply?search=Relay%2016%20channel)**
>
> Buy 16 Channel 5V Relay Module with Optocoupler online at lowest price in India with best quality only on ElectronicsComp.com. Purchase now with Free Shipping and COD option.

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 2, 2021, 5:36pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/9 "2021-08-02T17:36:36Z")

</div>

Start here:

> **[Arduino : How To Connect Relay With 74HC595 Shift Register](https://thecustomizewindows.com/2018/09/arduino-how-to-connect-relay-with-74hc595-shift-register/)**
>
> It is Common To Ask How To Connect Relay With 74HC595 Shift Register With Arduino Board. It Demands Good Knowledge To Work With Components & AC.

---

<div class="post-metadata">

**Author:** ![boopesh\_boo](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@boopesh\_boo](https://forum.arduino.cc/u/boopesh_boo)\
**Post date:** [August 2, 2021, 5:40pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/10 "2021-08-02T17:40:06Z")

</div>

Thanks... But it's almost same as my schematic... Still not sure why it's not working only for me 😕

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 2, 2021, 5:42pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/11 "2021-08-02T17:42:13Z")

</div>

You read the entire article in 3 minutes?

---

<div class="post-metadata">

**Author:** ![boopesh\_boo](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@boopesh\_boo](https://forum.arduino.cc/u/boopesh_boo)\
**Post date:** [August 2, 2021, 5:44pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/12 "2021-08-02T17:44:30Z")

</div>

I read that article long before during my initial project ideas... Even I have the same article bookmarked.

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 2, 2021, 5:45pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/13 "2021-08-02T17:45:11Z")

</div>

Ah, very good.  
What's different between the two schematics?

---

<div class="post-metadata">

**Author:** ![boopesh\_boo](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@boopesh\_boo](https://forum.arduino.cc/u/boopesh_boo)\
**Post date:** [August 2, 2021, 5:49pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/14 "2021-08-02T17:49:24Z")

</div>

Well... their isnt changes though. in the article , this is what works for me  
`There are one type of 8 channel relay boards has 10 pins (8 + 5v + GND) to directly connect with 74HC595.`  
this is the module im using .  
One more chnage I would say is.. In article they used digital pins for shift register. But I have used analogue pins... Apart from this i don't see any changes.  
may be i should gnd the relay with the gnd of shift register..

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 2, 2021, 6:13pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/15 "2021-08-02T18:13:33Z")

</div>

Measure the voltage between the 5V pin on the Nano and the IC.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [August 2, 2021, 6:44pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/16 "2021-08-02T18:44:07Z")

</div>

> [@er\_name\_not\_found](#):
>
> Start here:

Did you write that?

> [@er\_name\_not\_found](#):
>
> two schematics?

Where are these schematics?

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [August 2, 2021, 6:59pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/17 "2021-08-02T18:59:17Z")

</div>

Where are the bypass capacitors for the '595?

---

<div class="post-metadata">

**Author:** ![gcjr](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/gcjr/32/314015_2.png) [@gcjr](https://forum.arduino.cc/u/gcjr)\
**Post date:** [August 2, 2021, 7:10pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/18 "2021-08-02T19:10:26Z")

</div>

the [74hc595](https://www.ti.com/lit/ds/symlink/sn74hc595.pdf?ts=1627915511055&ref_url=https%253A%252F%252Fwww.google.com%252F) may not have enough current to drive the relay. it may only be able to source 6 ma.

an arduino output pin can source 40 ma

---

<div class="post-metadata">

**Author:** ![boopesh\_boo](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@boopesh\_boo](https://forum.arduino.cc/u/boopesh_boo)\
**Post date:** [August 2, 2021, 7:12pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/19 "2021-08-02T19:12:46Z")

</div>

thanks for everyone. its fixed and works now.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [August 2, 2021, 7:47pm UTC](https://forum.arduino.cc/t/shift-register-with-relays/891678/20 "2021-08-02T19:47:51Z")

</div>

I rate this topic 1 out of 20. That 1 was for @anon57585045 's question.

[Next page](https://forum.arduino.cc/t/shift-register-with-relays/891678.md?page=2)
