• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Esp32 driving opto isolated mechanical relays module via 74HC595 shift register glitches when switching 240VAC load

Q&A Forum › Category: Questions › Esp32 driving opto isolated mechanical relays module via 74HC595 shift register glitches when switching 240VAC load
0 Vote Up Vote Down
HERMAN SURIATO asked 3 months ago

Dear All,
I am trying to built an ESP32 controlled PLC.

The connection is:
ESP32 —> 16 channels 74HC595 shift register —> opto isolated 5VDC relay modules —> 240 VAC load
Without the AC load, the switching performed as programmed. However when the AC load is connected to the relay output, even the slightest AC load such as electrical test pen, will cause occational glitches.
Please advise the cause and the solution.

Best regards,
Herman

3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 months ago

Hi.
Can you be more specific? What kind of glitches?
What exactly happens?
Regards.
Sara

0 Vote Up Vote Down
Barry answered 2 months ago

This sounds like an issue with the pcb layout or system wiring coupling noise into the cpu. Do you have an experienced EE available to dig into this?
I am 100% certain the problem is not software related.

1 Vote Up Vote Down
William Lucid answered 2 months ago

Hi Herman,

Details on kick back diodes for DC and MOV’s for AC:

 
Today
 

Relays and kick back diodes 240 V. A.C.? detail kick back diodes

Relays are electromagnetic switches often used to control high-power circuits, and they can generate voltage spikes when the current through their coils is suddenly interrupted. These spikes, known as “inductive kickback,” can damage other components in the circuit.
For DC circuits, a flyback diode (also called a kickback diode) is commonly placed across the relay coil to suppress these spikes. The diode provides a path for the current to dissipate safely when the relay is turned off, protecting the circuit. However, in AC circuits like 240 V AC, the situation is different. Since the current alternates direction, a single diode isn’t effective. Instead, other methods like snubber circuits (a combination of resistors and capacitors) or MOVs (Metal Oxide Varistors) are used to suppress voltage spikes.

–from Microsoft’s Copilot

Regards,
William

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.