0

I'd like to read from a relay on a CNC machine with a microcontroller running at 3.3V, the wire will be 1-1.5m twisted pair from the micro to the relay and screwed in to a terminal.

There's a lot of noise in these machines as there's 3 phase servo drivers and lots of other stuff going on.

I'd like to ideally just be able to read a rising or falling edge to count the number of times the relay activates.

Having read around the subject:

Trying to keep it simple (No mosfets) I think there's reasonable noise suppression in this design. Since most of the time the Normally Closed(NC) switch will leave the input pin HIGH I think this is fairly robust. I'm wondering if you could help with the following questions please:

A) If I need a series inductor to deal with larger current spikes?

B) I won't be installing this unfortunately, and I can't guarantee someone won't short the GND (V+ should be OK since there's a current limiting resistor) to a positive voltage somewhere, or cause some kind of Electro-Static Discharge (ESD). I'm wondering if maybe a Resettable Fuse (PTC) in series with the GND return would be sensible? Or maybe a TVS to V+?

Relay:

CNC Relay

Circuit Design:

Relay input design

Thanks in advance!

foldone
  • 61
  • 5
  • The caps could introduce more problems vs the field wired scenario (e.g. if charged up the wrong way). My usual answer is bidirectional TVS on the outside, series diode is good but make sure it has enough V rating (100V at least), unidirectional TVS on the inside, pullup is good, and series resistance. (but there's more than one way to do it). If you need the filtering, maybe use an RCR T filter in place of series R – Pete W Mar 05 '21 at 18:25
  • Hi, thanks for the comments on the caps, might leave them unsoldered and see what happens without - by TVS on the outside do you mean in parallel at the last point before the connector? What do you mean by TVS on the *inside* please? – foldone Mar 06 '21 at 09:36
  • sorry... was lazy / that's my own shorthand language, implying that "outside" is the side exposed to the field connection -- where the caps are drawn now. "inside" is the direction toward the node you are protecting -- the other side of the series diode as drawn. Should have just drawn it but I am on mobile for most of the weekend...... – Pete W Mar 06 '21 at 15:06
  • No problem. I appreciate the help, and the clarification! Thanks very much, just needs building and testing now – foldone Mar 06 '21 at 15:58
  • @PeteW Can I just ask for one last clarification please?! Does the diode on the inside (cathode to input) need to be a TVS, if so, why? Wouldn't a normal diode suffice here? Also, would [this](https://datasheet.lcsc.com/szlcsc/Nexperia-PESD3V3L1BA-115_C51450.pdf) be considered equivalent to a TVS, even though it's just called an ESD protection diode? Thanks! – foldone Mar 09 '21 at 11:51
  • Hi foldone - Yes. In this case, the "inside" diode is there primarily for the negative voltages, due to both reverse voltage hookup *and* negative overvoltage. Depending on the series diode, there may be some positive surge voltage that makes it past also, which is why I thought may as well use a TVS diode there, but a schottky is probably ok also (the chip has some protection of its own). Thinking about it more, the reverse-voltage scenario means we also have to limit negative current for that, so you probably do need some series resistance right after the series diode that is drawn. Maybe 1K – Pete W Mar 09 '21 at 12:27
  • The PESD series, I'm not sure why the difference in nomenclature exactly, it may be because of their relatively small size, and that they're not rated for the 10/1000 type transients. If you look closely at the datasheet, sometimes the small ones work differently too, like they have some kind of SCR added to them to lower the Vdrop and power dissipation, although these don't seem to (they usually provide a V-I diagram for the SCR types to show the turn-on behavior). For a machine tool environment, going bigger on the protection parts might be worth it. – Pete W Mar 09 '21 at 12:36
  • Right fair enough, thanks for your help! I think it's easy to start overanalysing everything - will get something together and test it out. Again - thanks for your help! – foldone Mar 09 '21 at 12:42
  • Ok. Let me know if there are any surprises! – Pete W Mar 09 '21 at 12:42

0 Answers0