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.

Alternate Switching of Relays

Status
Not open for further replies.
Ahh I see the debounce now that you have mentioned it, your circuit now works a treat, I changed the CLK cap to 4n7 & it fixed the problem, the opposing LED gives a minute flash when the button is released but I don't think this will be an issue.
I had the CLK cap at 1uF (excuse my handwriting), which should have been sufficient for debounce. There should be no flash from the other LED.

If I disconnect the relay contact from the supply rail I can't get power to the circuit to check it out?
Yeah, sorry I didn't think that through. You'd have to supply power to the LEDs. Maybe with the new relay there will be no problems.
 
Thanks alec_t,

I will have a look at the circuit provided, just got home.


Timescope,

Yes, my bad, I didn't worry to much about drawing the relay or the wiring to it on the schematic properly but I do have it correct on the circuits, seeing as I don't have a LTSpice model for a relay or the 4013 4017 etc I didn't worry to much about it.

I would like to get some models if anyone has them so I can simulate these things?

Dougy,

After I posted that I added 1k resistors across the transistor gates to emitters & it fixed the flashing issue immediately, I tried 10k, 4k7 etc but got to the 1k.

Thanks to everyone for the help, it's really appreciated.

Probably a waste of time & you may laugh but I decided to try to see if the button & the relay contacts were in fact bouncing & causing the issues. I am trying to learn more about things so I thought it was worthwhile.
I tried with the scope but had trouble picking it up so I decided to make a bounce detector circuit out of a 4017 & 10 LEDS.
Basically when you press the button with no contact bounce the Led count should increment from 1to 9 one LED at a time & then another button resets the circuit to zero LED.

So with the circuit Zeroed if you press the button any bounce will show up with say number 6 LED lighting instead of number 1 etc.

It was an eye opener & I guess it was a worthwhile exercise.

With the button tested first every now & again the circuit would pick up contact bounce & would explain the intermittent misfires I was having using the button.

With the Relay connected to the circuit & tested it showed exactly why I have had so much trouble.
With the circuit zeroed & then the relay was activated sometimes LED 3 would light & then LED 6 then 9, basically all over the place & explains a lot.

I know that this is only a basic test & more than likely I should & would be better to have tested a time constant of the worse bounce senario instead of the number of bounces to overcome the bounce issue & the then apply a time constant debounce circuit suitable for this.

But it did show the issue & as yet I am not sure how to set something up to test a time constant & haven't got anything to see it on screen.
Any Idea's?

My relays didn't turn up today, it will be Friday they say now but I did see a solid state relay in the shop so I picked it up to try it out & PRESTO all the circuits work perfectly now I have three & maybe four circuits with alec_t's new modded one.

There is no missfires of any kind with the SSR----PERFECT!

I will now try to work out how these circuits work, Timescope gave me an example of how his works but i'll have a look at the others & see if I can work them out--Don't hold your breath :D

Thanks Again it's much appreciated.

Cheers
 
Last edited:
Glad you've solved the problem. Your idea to use a 4017 to test contact bounce was good.
I would like to get some models if anyone has them so I can simulate these things?
They're available for download (as a set of zip files) from the Yahoo LTSpice user-group.
 
alec_t,

Thanks, just downloaded the models etc, I can see now how the debounce works, the sim works good.

Cheers
 
I haven't built this recently, maybe today, but if you're getting both LEDs on, your flip flop Q & Qnot may not be going to 0, so a diode or 2 in the emitter of the transistors will require a higher voltage to trigger. It won't simulate for me because Q & Qnot are only 1 volt on the simulation. Try measuring Q & Qnot and see how low they go.
Posted this before I read every thing. oh well.
 

Attachments

  • DIVIDE BY 2 FLIP FLOP.asc
    2 KB · Views: 122
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top