Author Topic: Handle Flyback voltage (back EMF) ?  (Read 4260 times)

0 Members and 1 Guest are viewing this topic.

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Handle Flyback voltage (back EMF) ?
« on: April 01, 2014, 11:53:15 am »
Hi,

I have a latched relay (G6CU-2117P-US), placed in its own circuit.  The relay is turned on by a 3V pulse, and off by reversing polarity.

Since the relay is a inductor, i see some flyback (back emf) on my scope.  What i'm trying to do is to have a red LED blink when the relay is switched on, and the green led when the relay is switched off. Its only about the blink, the relay is latched so there is only a short pulse send.

I have a simple circuit:



            |----|
W1  |-------- R1K -------|-------|
 (-/+)      |----|      (-)     (+)
-------               ------  ------
|RELAY|               |LED1|  |LED2|
-------               ------  ------
 (+/-)                  (+)     (-)
W2   |-------------------|-------|




The relay is part of a bigger ciruit (not mine). I just placed 2 wires over the pins (catching the pulse).

The problem is that both LED blink when i switch on or off the relay (send pulse). The flyback is causing this (makes sense).

My question, what would be the best way to have only one LED blink on the pulse?

The goal is that LED1 only blinks when sending the ON pulse, and LED2 when sending the OFF pulse.


I did read about flyback diodes and sender diodes (back to back), but I'm not sure how that would solve my problem. In fact, depending on the polarity one of the LEDS acts as a flyback diode.

EDIT:

To clarify the problem better, if W1 has a + Voltage, LED2 switches ON. However, when i switch off the power, the RELAY sends a flyback voltage over W2 (+), which blinks LED1 shortly. The question is how can i neutralize this flyback? Moreover, if i reverse polarity, send + voltage over W2, i have the same problem (LED1 blinks shortly).

To put i in perspective. Im trying to register each time the relay is switched on and off. Since the relay is latched, it reverse polarity and its only send a short pulse.


Many thanks!
« Last Edit: April 01, 2014, 09:21:13 pm by onesixright »
 

Offline michaelym

  • Regular Contributor
  • *
  • Posts: 65
Re: Handle Flyback voltage (back EMF) ?
« Reply #1 on: April 01, 2014, 07:32:53 pm »
In your circuit the second led is acting as the flyback diode.

Maybe you need a more complex solution involving transistors?
 

Offline pa2ees

  • Contributor
  • Posts: 39
  • Country: us
Re: Handle Flyback voltage (back EMF) ?
« Reply #2 on: April 02, 2014, 02:52:45 am »
I would consider changing the LED configuration.  Place an LED and resistor in series from W1 to ground.  Place your other LED and resistor in series from W2 to ground.  This should prevent your flyback voltage from turning the wrong LED on. 

Then to prevent your flyback voltage from ruining any other part of the circuit, I would put a regular diode from ground to W1, and another from ground to W2 (so that they are reverse biased when the turn-on pulse is on).  That way it suppresses the negative voltage that occurs when the turn-on pulse goes off.

Hopefully that does it.

 - Erik
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: Handle Flyback voltage (back EMF) ?
« Reply #3 on: April 02, 2014, 03:33:57 pm »
@Erik, thanks for your input!

I tried that, but once the diodes are in place, the relay doesn't switch on/off anymore. I guess the current takes the shortest route to ground, therefor not enough current is reaching the relay.

Im going to try a JFET, and disable the anode on the 'opposite' LED. Or does that sound like a dump idea ? Maybe I need to add a cap. that allows the anode to be disconnect for a few ms longer.


Below a link to simulator files (Circuit).  Its pretty cool, the values are near my real setup. You also can see nicely see the flyback.

Simulator is free (http://www.falstad.com/circuit/)

and the circuits:

http://ge.tt/1tKZ13W1/v/0?c

 

Offline Fank1

  • Regular Contributor
  • *
  • Posts: 159
Re: Handle Flyback voltage (back EMF) ?
« Reply #4 on: April 02, 2014, 09:03:39 pm »
The first thing I would do is put a cap across the LED's about .1U.
It should catch the collapsing field spike and if the set / reset pulse is long enough still blink your leds.
You may have to play with the value a little to get ir right.
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: Handle Flyback voltage (back EMF) ?
« Reply #5 on: April 02, 2014, 09:31:23 pm »
You mean without the diodes? 1 cap from W1 - W2 ?

I'm trying it in my sim. but no dice  :(
 

Offline pa2ees

  • Contributor
  • Posts: 39
  • Country: us
Re: Handle Flyback voltage (back EMF) ?
« Reply #6 on: April 02, 2014, 09:31:39 pm »
The first thing I would do is put a cap across the LED's about .1U.
It should catch the collapsing field spike and if the set / reset pulse is long enough still blink your leds.
You may have to play with the value a little to get ir right.

That's a good suggestion, and I think worth pursuing.

I'm not too familiar with JFETs, so I'm not sure if your idea would work, but again, it's worth a try.

Another thought would be to instead of have the LEDs driven from W1 or W2, have the base of a NPN transistor driven from W1 and W2 (through a resistor of course), and then the current drain on W1 and W2 would be very minimal, so all your current would go through the relay coil.  Connect the emitter to ground, and the collector would be connected to an LED and current limiting resistor in series, from some voltage source.  So that when W1 goes high, it turns on the transistor, and that allows current to flow from the power rail, through the current limiting resistor, through the LED, in the collector, and to ground, turning on the LED. 

Again, make sure you have a diode, or a cap as Frank1 suggested, to try to limit the negative voltage swing.  I breadboarded an inductor, and the diode seemed to work great.  but try them both out, and see what happens.

That's the fun thing about circuits like these, they take some tinkering and different ideas, and when you've got it, you've learned a bunch in the process.

 - Erik
 

Offline Pillager

  • Supporter
  • ****
  • Posts: 65
  • Country: at
Re: Handle Flyback voltage (back EMF) ?
« Reply #7 on: April 02, 2014, 09:36:26 pm »
My thoughts:

The two LEDs should be antiparallel and in series to the relay.
That way, depending on the direction of the current, only one LED is active.
Don't forget to add the LED-Voltage to the coil-voltage to get your supply voltage.

The flyback can be taken care of two antiserial zener diodes. Be sure to select a value that is high enough to not mess with the relay's normal operation, and low enough to reduce the flyback to acceptable levels. Remember: Add 0,7 volts for the forward facing (current wise) diode to your zener voltage. You could also use a varistor or a protection diode, if you can gat the right voltage

See attachment.

Edit:
Afterthought: the LEDs might not be able to handle the current needed for the relay coil (67 mA). You could try putting a resistor parallel to the LEDs (calculate using LED voltage and 67 mA minus LED current). Theoretically it should work, haven't had time to simulate.
« Last Edit: April 02, 2014, 09:44:11 pm by Pillager »
Greets

Tom
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: Handle Flyback voltage (back EMF) ?
« Reply #8 on: April 02, 2014, 09:43:52 pm »
Maybe good to explain.

In my initial version i had 2x 4n35's. Since they take a AC signal, they both would drive one LED's (on its own power source). But the problem remained the same. The  2nd 4n35 was triggered by the flyback.  Then i tried to make it simpler, just using to LEDs. In essence the same problem.

I'm gonna give this NPN approach a try! But its similar to my 4n35 approach.

Yes your right Erik, (as a beginner) its really fun (and frustration) to figure this out. Although I know I could easily fix it within the MCU (can ignore the 2nd pulse (generated by the flyback)). Its very useful to see if you can make this work. Not because is  practical, but your learn a hell lot more. What i really like is that the sim gives a nice 'forecast', although i don't take it 'face-value'. But so-far the results are pretty much the same!

Thanks again.
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: Handle Flyback voltage (back EMF) ?
« Reply #9 on: April 03, 2014, 09:44:03 pm »
@Tom, thanks for your feedback. It looked promising, until I realized I probably wasn't clear enough. I breadboarded your solution and it works flawless, but, only if I can control the power source. The problem is i can't. Its a 3rd party circuit, i did solder two wires over the relay. But thats all i have, the relay connectors are  'perspective-wise' beside the pulse, also my source of power. The The circuit behind the relay toggle the polarity of the relay, and thats what i want to catch.

The circuit is power by 2 x AA batteries (2.4V). All i need is to catch the ON and OFF pulse.

I'm sure its possible, just need to figure out (a low energy) way  :-/O
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf