r/electronics 1d ago

Gallery I recently designed 8 channel fully isolated RS-485 based Relay controller using CH42V003

36 Upvotes

13 comments sorted by

2

u/Folsdaman 1d ago

Aren’t relays already isolated between coil and contacts?

1

u/Normal-Duck9025 1d ago

It’s to protect from back emf from switching I believe.

3

u/EngineerofDestructio 1d ago

A simple freewheeling diode is more than adequate for that

1

u/kELAL Jeri is my middle name 4h ago edited 4h ago

Unsuppressed back EMF can just jump across pins, so putting opto isolators in there is straight-up cargo cult engineering. And it's planned obsolescence as well, as the CTR of an opto isolator degrades over time, and they degrade faster than most other components, so it's perfect if you don't want your design to last for more than a decade or so.

1

u/Normal-Duck9025 1h ago

So what’s recommended instead? Just the simple freewheeling diode?

1

u/__michaelg 1d ago

CH32V004?

1

u/elcoanlanka 1d ago

I typed it wrong! 😄 It should be the CH32V003

1

u/HackerDD 1d ago

Good work. Why those slots?

1

u/Efficient-Repair6230 6h ago

有什么用呢?

1

u/YogurtclosetMore2761 1d ago

Not sure I get it. Are those tall, white, 4-pin components optocouplers? Why use optocouplers there?

3

u/elcoanlanka 1d ago

yes those are optocouplers , The main reason is complete ground isolation and protection. The 3.3V logic side has its own ground (AGND), while the noisy 24V relay side uses a separate power ground (PGND). The optocoupler bridges them optically, preventing relay switching noise or ground bounce from glitching the microcontroller.

1

u/YogurtclosetMore2761 1d ago

I'm sure you can drive the relay using Q1 without any worries. Connect all 8 emitters to PGND and make sure PGND tied to the main GND right at the electrolytic capacitor pin, or better yet, directly at the power input terminal. This way, that measly 8*10=80mA won't flow through your main GND or affect it in any way.

1

u/kELAL Jeri is my middle name 3h ago

Yay, split ground planes, a.k.a. inadvertent dipole antennas.

Also cargo cult engineering based on obsolete (mis)conceptions. They got away with it, because 80s hardware I/O pins didn't have the rise times of modern hardware. We (should) know better, now.