18

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!!

you are viewing a single comment's thread
view the rest of the comments
[-] Max_P@lemmy.max-p.me 3 points 1 year ago

Yeah, decoupling cap here might as well just help OP fry the chip more effectively by ensuring it can sink all that current.

Solution here is probably a transistor/MOSFET that the chip turns on, which in turn turns on the relay. Relay coils are inductors, so that probably also needs a diode to protect the transistor from inrush current and also the kickback when it turns off: inductors resist changes, so it'll try to keep sinking the current and result in temporary spike of very high voltage: https://spinningnumbers.org/a/inductor-kickback.html

[-] ryanomite@discuss.tchncs.de 1 points 1 year ago

Thanks so much! It turns out that the relay (8x) module I'm using - https://www.amazon.com/gp/product/B00LX3UH9C - has isolated relays... but I'll try a diode, too.

this post was submitted on 03 Jul 2023
18 points (95.0% liked)

Ask Electronics

3173 readers
2 users here now

For questions about component-level electronic circuits, tools and equipment.

Rules

1: Be nice.

2: Be on-topic (eg: Electronic, not electrical).

3: No commercial stuff, buying, selling or valuations.

4: Be safe.


founded 1 year ago
MODERATORS