74HC595 can't drive relay with load

Hi guys!

I'm trying to switch soldering machine through relay controlled by 74HC595 output shift register. I obsered a strange behaviour when I connect with load(soldering machine).

Let me keep it simple, I tried to switch the relay through direct (ESP-32)MC-output pins and it works well.

When I try to control using 74HC595, The relay is triggering as expected but surprisingly, when any load is connected through the relay, the shift register triggers random pins.

I'm like How!!!! how does the register knows it is connected to a load/not as the relay is to isolate the things!?

Please help me how to fix it.

Please post a schematic of your project

Capacitors, isolation and switching noise will help you understand this.

Yeah I completely understand the importance of capacitors and isolation with the below discussion but my problem is unique.

Hi Please have the below details for more clarity

const int dataPin = 26;   // DS pin 26
const int latchPin = 27;  // ST_CP pin 27
const int clockPin = 14;  // SH_CP pin 14
int delayx = 500;

void setup() {
  Serial.begin(115200);
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(latchPin, OUTPUT);
}

void loop() {
Pin_All_On();
delay(delayx);
Pin_All_Off();
delay(delayx);
}
void Pin_All_Off() { shiftWrite(65535); Serial.println("All_Pins-Off"); }
void Pin_All_On() { shiftWrite(0); Serial.println("All_Pins-On"); }

Please have the below details for cross check.

Driver config:

Reffered example:

You later say "any load"; your connection picture show a light bulb.

So do you literally mean any load? Like a battery hooked to an LED with series current limiting resistor switched on/off by the relay?

a7

Please ignore it. as I dont get soldering machine in fritzing, I placed a bulb as similar supply through. But does it make a point of which device we use?

I'm so confused if the relay is trggering perfectly in no load condition, how it may flicker when a load is applied?

for more clarity, I also tried different loads like
AC - Soldring
DC - 24v Motor
DC - 12v - Soleniod.
whatever the load it behaves the same.

See post #3, which is to say yes, it matters.

OK, I see you tried other loads. All those will potentially give you what I think is your problem.

a7

Ok I tried 10,33 and 100micro farad capacitors through IC supply as refered from other discussions mentioned in post #4
I can lightup an led only, even if i try to switch a BC547 transistor or opto coupler 817 , I can't. it flickers on load and works normal when no load.

Tried diff chips too. same result.

Could just be a bad relay, do you have another to try??
Those relays are not the greatest in my opinion, I wouldn't switch line voltage with them..
Interesting thread here..
relays were burning up..

you diagram shows the line voltage output crossing the ground, that could induce a current, kill ground..
breadboards are not the best of things either, could be just a faulty connection..
and you are switching a 5v relay with 3.3v, so you are already border line any disturbance in the power/ground and it will probably start to fail..
but really, could just be a bad relay..

good luck.. ~q

Hi, @murugesh_rcpilot

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

That way you have access to all component symbols.

Can you please post some images of your project?
So we can see your component layout.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

Hi, Yeah I switched relay - same result
and my relay is a optocoupler driven module which is completely isolated from AC/higher wattage line. and they are 5v obviouly I supplying 5v.
its not the point of relay alone even if I try to connect a transistor or separated opto coupler driven its behaving the same.

Sure will make a clean sketch and update here with realtime pics.
I have observed a crazy thing and loughed dead.
Please have a look below

Guys! i have separated two supplies with opto coupler with NO-Common-Grounding
even now, the relay flickers when connect the load. if there is no load, it works superb.
I wonder how optical isolation is been detected or affects the register.

I have gone throught the page which was closed unresolved. I'm having the same issue and tried all their suggestions but after this isolation method I'm like :upside_down_face:

I will back with good sketch. Please help to find out :sweat_smile:

Hi, @murugesh_rcpilot
Thats a bit better.

Some pictures would be great.

Tom... :smiley: :+1: :coffee: :coffee: :coffee: :australia:

I read all the posts in your topic and I couldn't identify any of the recommendations for using snubber.

I saw that you only have problems when using the soldering machine operated by the relay.

A soldering machine is an inductive load device, and therefore when turned on/off it generates high amounts of electrical noise.
These strong noises can sometimes even cause Arduinos to reset in general.

My recommendation is that you use snubber in parallel with your relay contacts.

Try adding some pull up resistor and decoupling capacitor to the shift register. Pull up on serial input and the clock pins.

Guys No changes.
I'm thinking about a way, please let me know if its possible.
I'm using ESP32S3 which has 3 UARTS. I'm using 2 for hardware comm and 1 for Serial communication with my laptop.

If I have another port, I can use it to transfer data to another MC and through the data from Primary MC to Secondary, I can controll the GPIO's of Secondary MC and use it as output instead of 74HC595.

Is there anyway to use UART?
I dont have much idea about software serial can someone suggest me is it possible to use software serial in this case? if so, can i have any ref please...

As i searched, they used below board for UART extension but i dont have it in market.

Hi,
Tell us the specification of the

Power, voltage and or current ratings.

Why do you need the 74HC595?

Can you please post some images of your project?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Hi Tom,

I faced a lot of failures in GPIO extensions and finally gona stick using UART to control other MC's in chain for only GPIO drive.

Insted of posting picture of my current project, showing my private video.