Author Topic: Kemet EC2-5NU relay problem  (Read 1051 times)

ElectricDruid

Kemet EC2-5NU relay problem
« on: December 29, 2020, 08:02:54 AM »
Hi all,

Can I get a sanity check, please?

I'm trying to get a uP to switch a Kemet EC2-5NU relay on and off. Should be fine - it's a 5V coil, switches at 3.75V:

https://docs.rs-online.com/865e/0900766b81719676.pdf
https://docs.rs-online.com/b92d/0900766b817166b9.pdf

I've got an LED+470R resistor in parallel with the coil, and a 1N4148 diode in reverse parallel. The LED lights up so I know the uP output is switching ok. Without the relay in place, I get 4.89V from the uP pin. With the relay in place, that drops to 3.2V and the relay doesn't switch since that's lower than 3.75V.

It looks like the relay coil is dragging the output right down, but that doesn't seem much use!

What am I doing wrong? I'm feeling like a right idiot not being able to get something this simple working...

Thanks!
  • SUPPORTER

ElectricDruid

Re: Kemet EC2-5NU relay problem
« Reply #1 on: December 29, 2020, 08:13:08 AM »
Just checked the datasheet and the coil resistance is only 178R. With 5V across it, it'll draw 5/178=0.028 = 28mA. The PICs output can only provide 25mA  max, so no wonder the output gets pulled down.

Do I honestly need a driver transistor to drive the relay coil? What's the point of having a 5V coil then?!? I might as well use a 12V relay if I'm going to have to use a transistor to drive it. I only bought these ones because I thought I could drive them directly.

  • SUPPORTER

amz-fx

Re: Kemet EC2-5NU relay problem
« Reply #2 on: December 29, 2020, 08:31:34 AM »
It is interesting that the non-latching relay requires 28ma while the latching version only needs 20ma. Could you switch to the latching version?

regards, Jack

anotherjim

Re: Kemet EC2-5NU relay problem
« Reply #3 on: December 29, 2020, 09:19:43 AM »
You could double up the port pins if you have one spare.
I'm inherently wary of using logic to directly handle any real-world loads - relay/motor/speaker/filaments even if it should handle it.

iainpunk

Re: Kemet EC2-5NU relay problem
« Reply #4 on: December 29, 2020, 10:21:04 AM »
in school i was taught to never drive things directly with an output pin form a uP or uC, always let it drive a transistor in between.

cheers

ElectricDruid

Re: Kemet EC2-5NU relay problem
« Reply #5 on: December 29, 2020, 11:05:23 AM »
Jim, doubling up the port pins might work, but it's still putting a good load on the chip package. I notice all the "real world" examples you provide are inductive loads. Presumably you'd have no problem driving LEDs directly?

Iain, I don't see why you'd be taught that you should never drive things with a uC. Maybe in the days when uCs were expensive it made sense to always have a nice cheap transistor between the uC and the outside world, but when the uCs cost pennies now, it's just a question of power handling and so on. Plus sometimes the transistor in-between can screw up the edges of the signal, if you need speed.

Ultimately, I either need a lower-switching-power relay  or I need to stick the transistor in there. I suppose I should have read the datasheet in more detail instead of seeing "5V" and thinking it'd do. Incidentally, Benoit at Coda Effects describes the process of finding such a low power relay in his article: https://www.coda-effects.com/2016/04/relay-bypass-conception-and-relay.html

Thanks all, I think I'll go for the transistor. It has the advantage of making the whole thing much less fussy about which relay it uses.



  • SUPPORTER

iainpunk

Re: Kemet EC2-5NU relay problem
« Reply #6 on: December 29, 2020, 11:24:31 AM »
Quote
Iain, I don't see why you'd be taught that you should never drive things with a uC. Maybe in the days when uCs were expensive it made sense to always have a nice cheap transistor between the uC and the outside world, but when the uCs cost pennies now, it's just a question of power handling and so on. Plus sometimes the transistor in-between can screw up the edges of the signal, if you need speed.
you are right and i should have been more clear, they told me to always drive heavy loads like filaments, lamps, relays etc with a transistor or FET, not just anything

cheers, Iain

ElectricDruid

Re: Kemet EC2-5NU relay problem
« Reply #7 on: December 29, 2020, 11:37:51 AM »
you are right and i should have been more clear, they told me to always drive heavy loads like filaments, lamps, relays etc with a transistor or FET, not just anything

Sorry, that's me being literal-minded and somewhat pedantic, not your fault.
  • SUPPORTER

anotherjim

Re: Kemet EC2-5NU relay problem
« Reply #8 on: December 29, 2020, 04:32:05 PM »
Yeh, I don't call a LED a load - we just use a larger CLR and pick a high efficiency LED.

If a pin can sink more current than source, can you invert everything? Though most of these MCU now have equal capability.

If you don't mind wasting some power when the relay is off, you could use a resistor fed helper supply that directly puts a starting voltage on the coil but not enough for it to pick. The port pin will either add to or shunt away the helper current, but it'll have to be able to pull the coil below 1v to make it drop the contacts and the larger the helper resistor can be, the better.

Rob Strand

Re: Kemet EC2-5NU relay problem
« Reply #9 on: December 29, 2020, 09:32:58 PM »
Quote
you are right and i should have been more clear, they told me to always drive heavy loads like filaments, lamps, relays etc with a transistor or FET, not just anything


Quote
Sorry, that's me being literal-minded and somewhat pedantic, not your fault.

Driving relays directly off the micro does increase the chances of glitching the micro and getting unexplained resets (or even damage).


PRR

Re: Kemet EC2-5NU relay problem
« Reply #10 on: December 30, 2020, 01:24:06 AM »
I've always felt that logic should not drive "real" loads directly. This actually goes way before LEDs: one incandescent turn-on is MUCH more load than hundreds of 2N404 logic bases. Lamp drivers were a separate (added cost) board. This is still often true in industrial gear, where the relays may dwarf your wee clacker and it can be expedient to swap-out a dumb driver board than to re-program a replacement logic board.
  • SUPPORTER

Rob Strand

Re: Kemet EC2-5NU relay problem
« Reply #11 on: December 30, 2020, 03:44:08 AM »
Quote
This is still often true in industrial gear, where the relays may dwarf your wee clacker and it can be expedient to swap-out a dumb driver board than to re-program a replacement logic board.
I've worked on machine projects where *everything* had optos even in the same box.   You can't afford the thing to glitch.

I also worked on a project which had clock monitor that could detected missing clock cycles on the micro's clock.   It was a small mostly low voltage board not unlike a typical micro.   As it turned out the detector would occasionally trip.    The cause was very infrequent coupling of general digital signals into the micro's crystal oscillator when then glitched the micro's clock.   I've never worked on a project which had a means to detect such a thing.   It was very much an eye opener.   It drives home the point that even very simple circuits have some degree of "failure" and that's one reason why some things fail or glitch inexplicably - it just comes down to how frequent the failures occur.  It also highlights why you need robust coms protocols between devices which have error checking and retries.

ElectricDruid

Re: Kemet EC2-5NU relay problem
« Reply #12 on: January 02, 2021, 07:43:12 AM »
I've got this working now with the transistor, so everything's fine.

I wanted to mention one other thing that caught me out though, in case anyone else has the same problem and comes looking for an answer.

This Kemet EC2 relay coil *has a right way around*!! I assumed that a coil is a coil of wire and it doesn't matter, but the datasheet does show "+"and "-" symbols for the ends of the coil and if you ignore that it doesn't work.

I don't quite understand how or why, but that's how it is. Perhaps they integrated a flyback diode inside the relay? The datasheet doesn't mention anything like that, and I really *have* read it now... :icon_confused:
  • SUPPORTER

composition4

Re: Kemet EC2-5NU relay problem
« Reply #13 on: January 02, 2021, 10:35:09 AM »
It's because they make the coil out of the same wire as those directional speaker cables that you see on eBay.

It helps towards a more realistic soundstage, you're a lucky guy.

anotherjim

Re: Kemet EC2-5NU relay problem
« Reply #14 on: January 02, 2021, 10:42:49 AM »
Could it have a small permanent magnet inside? The release voltage is quite low at 0.5v. The magnet will be too weak to latch, but it will help it pick. Also it could remian picked in a low-power standby situation.
I'm not entirely convinced -  you'd think the datasheet would have something to say - but a permanent magnet would explain polarized behaviour. This is how safety-critical relays are polarized. A diode can fail short circuit which could be seriously unsafe. A permag is much more reliable.



Rob Strand

Re: Kemet EC2-5NU relay problem
« Reply #15 on: January 02, 2021, 05:07:57 PM »
Quote
Could it have a small permanent magnet inside?
I'm fairly sure they have magnets.   I'd expect any built-in diode protection to be shown on the relay schematics.   The latching relays need a polarity to define the "set" condition.

In the datasheet (second link in Reply 1) on page 15 under "Notes on Using Relays" the second last point of section 3 says "Permanent magnets are used in polarized relays"  and it warns of not placing the relays close to transformers and speakers.

Good explanation here,
https://www.omron.com.au/service_support/technical_guide/general_purpose_relay/classifications.asp
« Last Edit: January 02, 2021, 05:18:31 PM by Rob Strand »

anotherjim

Re: Kemet EC2-5NU relay problem
« Reply #16 on: January 02, 2021, 05:27:42 PM »
So the headline is that the non-latching is still polarized. So if you have two relays needed in a remote location and wire them inverse parallel, you can control either of them with just 2 wires by selecting the polarity although you can't have both picked which might otherwise be an unsafe condition for whatever job they're doing (you can't tell a motor to go forward & reverse at the same time!).

Rob Strand

Re: Kemet EC2-5NU relay problem
« Reply #17 on: January 02, 2021, 05:39:26 PM »
Quote
So if you have two relays needed in a remote location and wire them inverse parallel, you can control either of them with just 2 wires by selecting the polarity although you can't have both picked which might otherwise be an unsafe condition for whatever job they're doing (you can't tell a motor to go forward & reverse at the same time!).
Probably not wise to run them like that.    The magnet helps reduce the pull-in current.    You can't rely on the magnet to block the reverse polarity since you don't know what percentage of help it gives the coil (could vary)
« Last Edit: January 02, 2021, 06:01:14 PM by Rob Strand »

ElectricDruid

Re: Kemet EC2-5NU relay problem
« Reply #18 on: January 02, 2021, 09:57:12 PM »
Ok, thanks people. That might explain what I'm seeing.

I definitely thought it was worth pointing out, since (as far as I was concerned) it's not something you'd *expect* and it works one way around and not the other and had me scratching my head for a good while before I twigged.
  • SUPPORTER

Ripthorn

Re: Kemet EC2-5NU relay problem
« Reply #19 on: January 28, 2021, 08:32:22 PM »
I'm using these relays on a project, and am using a micro to drive a bit base connected between relay - coil and ground. When engaged, I get a distinct whistling noise. Have any of you experienced this? Terrible for a circuit with gain.