First of all, I apologize for the lack of a “formal” schematic… I tried to draw one out, but got buried in the nuances of it :)

Second, I’ve done enough research to have some idea of what my problem is: namely, I need a decoupling capacitor in the mix. Problem is, I’m new enough to this that I’m not 100% sure where to put it, nor what capacitance I should use.

So the setup: -I’m using a Wemos(like) D1 Mini to drive 8 relays via an HC595 shift register -The D1 Mini microcontroller, HC595, and relay module are all powered by the same 5V DC and ground -The microcontroller addresses the shift register via 3.3VDC data pins -The relays power a water valve via a separate 24VDC power supply and transformer - plugged into the same AC outlet

And the problem: everything works just fine UNTIL I actually add the 24VDC power load. Once that’s done, the results are very erratic… usually turning on the correct valve correctly, but rarely turning it off in the same way. As I mentioned, I intuitively suspect noise in the data caused by the sudden power to the valve… but it doesn’t make too much sense since everything is on different power supplies.

Any guesses as to where I need to put some capacitor(s)? Thanks!!

  • ryanomiteOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Thanks for your thoughtful response… and sorry it took so long to get back to you. I tried different combinations of capacitors, a diode on the load lines, etc… nothing worked. And then I put a 0.1uF capacitor directly between the power leads on the valve itself… and everything started working fine. Admittedly, I’m not 100% sure why… but I won’t complain :)

    • pneumapunk@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      That makes sense, it forms a simple snubber network. A capacitor in series with a low-value resistor might work even better. Did you try a freewheeling diode directly across the valve leads?