Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help needed for controlling relay

Status
Not open for further replies.
Sorry, R2/C1 (in your .png file).

Hi

Reconfigured R2/C1 so it produces a sharper rising edge.
Before doing so, I tried a simple simulation in an attempt to see which R/C config gave more reliable debounce results. (RCTest-CD4030B.png)
I tried a test by reconfiguring the FF in a standard manner, without the timing feedback circuit, and then simulated(RCTest-CD4030B-Std).
It began to produce unwanted output transitions. While interesting, I didn't think that mattered much since the debounce FF is configured as non-retriggerable anyway. So I chose Fig A.

I've been testing on a breadboard with 74HCT74 FF's, all seems to work.
I haven't had a chance to pick up a CD4013B yet..

Any suggestions welcome. :happy:
 

Attachments

  • RCTest-CD4013B.png
    RCTest-CD4013B.png
    58.4 KB · Views: 162
  • RCTest-CD4013B-Std.png
    RCTest-CD4013B-Std.png
    57.7 KB · Views: 161
  • MagLatchDrvr-CD4013B-2.png
    MagLatchDrvr-CD4013B-2.png
    46.3 KB · Views: 172
Oh...and here is the bread boarded circuit using 74HCT74...

eT
 

Attachments

  • MagLatchDrvr-74HCT74.png
    MagLatchDrvr-74HCT74.png
    62.1 KB · Views: 159
Looks like using the CLR input of one latch for the debouncing may be the better way, so incorporating that idea here's a revised version of my suggested circuit
LatchingRelayDriver2.gif
 
Looks like using the CLR input of one latch for the debouncing may be the better way, so incorporating that idea here's a revised version of my suggested circuit
View attachment 82000

Hi Alex

Ok...After some breadboard testing (actually used a CD4013B this time), attached is what I found worked the most reliably with regard to the FF portion.

Without the POR, U2 state wasn't always predictable.

The input R/C configuration shown was the most reliable and tolerant to the quality of the mom switch. The other configuration(s) produced random output transitions. I'm using a cheap Radio Shack switch and if I press and release as fast as I can, it sometimes skips a transition but not without this abuse.:happy:

One thing I noticed is that if I remove power with U2 output high, I get an output pulse from the transistor driver.

I didn't reconfigure the transistor driver, but I'll try tomorrow..

Hope this helps...
 

Attachments

  • MagLatchDrvr-CD4013B-3B.png
    MagLatchDrvr-CD4013B-3B.png
    35 KB · Views: 192
So both R8/C1 and U1/R9/C3 do some debouncing. Belt and braces.
I didn't reconfigure the transistor driver
As it stands, if U2 Q is high there is a constant 9mA drain on the battery in your latest schematic.
 
So both R8/C1 and U1/R9/C3 do some debouncing. Belt and braces.
As it stands, if U2 Q is high there is a constant 9mA drain on the battery in your latest schematic.

So I've reconfigured the Transistor drive to match your schematic and tested.

The output toggles on/off like it should, output changes polarity like it should. No measureable current draw when not operated.
I didn't see any power on/power off glitches either.

The tested schematic is attached. I didn't have a relay so I used a 75 ohm resistor in place of the relay for testing. I also didn't have 220uF
caps so I used 270uF.

Anyway, looks like it does what its designed to do...:)

eT
 

Attachments

  • MagLatchDrvr4Final.png
    MagLatchDrvr4Final.png
    39.5 KB · Views: 176
Looks good to me eTech. Either 220uF or 270uF should be ok in practice. I wonder if the 1meg in the POR section could be reduced to 470k to avoid having to source yet another resistor value?
 
I don't have to many capacitors left anyway, and no 220nF either so I have to order stuff anyway. Even though I do have some 1 Meg resistors lying around which I use as pulldown to avoid popping when activating or deactivating an effect. So no worries!
I'll let you guys now how it turns out! Thank you both for your help so far! I really appreciate it
 
The final layout works like a charm! At least so far. Still have to check if the relay is fully switching, but for now it seems to work with every button press.
You guys are epic!
 
Good to know it works for you. Thanks for the feedback.
 
What is being switched? Why use a high current relay instead of an extremely low power Cmos analog gate or a Mosfet?
If your high current relay is activated frequently then you can kiss the little 9V battery goodbye.
 
What is being switched? Why use a high current relay instead of an extremely low power Cmos analog gate or a Mosfet?
If your high current relay is activated frequently then you can kiss the little 9V battery goodbye.

It's a mag latch relay..

eT
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top