Maker Pro
Maker Pro

Problems With Switched Ground Input for IC

Blumpkinson

Jul 29, 2013
21
Joined
Jul 29, 2013
Messages
21
I'm using a EDE2208 turn a momentary button into a latched. I was able to get the IC to work normally using a 5V powered momentary button like in the diagram below.

bHZOPCU.jpg


I want to try to get this IC to be able to also operate using a momentary button that provides a switched ground signal. I tried supplying the input with a steady 5V and then having the switched ground button change the signal slightly when pushed. This worked fine, however upon startup the 5V input to the IC triggers it to output the 5V. I want to be able to have the startup output the 0V untill the button is pressed.

Is there anyway I could pre-process the signal from the switched ground button, so that at startup the IC wont send out the 5V?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
It pays to link to the datasheet so we don't have to go looking for it.

As you will have noted, you can source a maximum of 25mA from each output pin.

This means you will have to do one of the following:

1) find a relay that operates on 25mA or less
2) use a transistor to increase the available current
3) parallel multiple outputs.

In your case, I would suggest you use a transistor.

I would suggest you google "transistor relay schematic". When I did, the first image hit was to this page. It talks about interfacing a relay yo a microcontroller. The output capability of your chip and a microcontroller are similar and the sense (high = on) is the same as you desire. Oh, and they've used a 5V supply.

Note the diode across the relay. It is required.

edit: If the outputs are initially high and the first press makes them low, I would recommend you change the circuit to be active low.

In this case you use a PNP transistor, you place it between the relay and +5V with the emitter connected to +5V and the collector to the relay (the other side of the relay goes to ground). This will then trigger the relay when the output goes low. (be sure that the diode points in the SAME direction - i.e. the arrow points to the positive rail).

If the output only goes high momentarily as power is connected, then you have a larger problem. This can be solved in a number of ways, but let's see if that's your problem before I describe the solution.

edit2: I should add... The datasheet doesn't seem to specify in what state the outputs are initially. Perhaps it is random? That will be a larger challenge!
 
Last edited:

Blumpkinson

Jul 29, 2013
21
Joined
Jul 29, 2013
Messages
21
Thank you for the response, it is very helpful. The initial outputs are low (0V), which makes this much easier. I'm going to try messing around with the circuit on my breadboard this week and see what kind of other problems I can run into.
 

Blumpkinson

Jul 29, 2013
21
Joined
Jul 29, 2013
Messages
21
I'm currently using a 16.7 mA relay on the output, which operates fine with the IC. Unless I missed something in your response, my big question is how would I go about having a switched ground momentary button as an input.

Ive come up with an idea to use an unlatched relay for this situation on the input side of the IC. When the switched ground button is pushed, it will trigger the relay to ouput the 5V to the IC. At startup the IC will not see any voltage and revert to its low (0V) state output.


GnC8COy.jpg


I'm going to be making this board in Eagle, so the more relays I have to add to worse off I am. The board is getting big and the component prices are adding up.

I'm a Mech E, so that is why I reverted to using a more mechanical approach. Is there any "prettier/more simple" approaches that I could take?

Thank You
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
One thing you WILL need is a diode across the relay to prevent a massive voltage spike from destroying your IC when the relay is de-energised.

That is only necessary for relays being activated by the IC (or any other semiconductor).
 

Blumpkinson

Jul 29, 2013
21
Joined
Jul 29, 2013
Messages
21
One thing you WILL need is a diode across the relay to prevent a massive voltage spike from destroying your IC when the relay is de-energised.

That is only necessary for relays being activated by the IC (or any other semiconductor).

Yeah, I learned that one the hard way. Luckily I purchased a few of the IC's.
 

Blumpkinson

Jul 29, 2013
21
Joined
Jul 29, 2013
Messages
21
So, I got everything working on my breadboard. I sent the eagle file to OSH park and now the flip/flop isn't functioning properly. When ever i press the Momentary button the circuit actives, however when pressing the button again sometimes the flip/flop reverts back to 0V and other times it just stays at 5V. I disconnected the relay and the flip/ functions normally, so i'm assuming the relay is the culprit.

I measured the current the relay is drawing from the flip/flop to be 20mA, which is below the Max of 25mA for each output pin. So I tried using the transistor like you had mentioned, the only way I could get it to function was to wire it up like in the picture below. The problem persists though, the flip/flop doesn't always revert back to 0V on the second push of the momentary button.

1_zpsec17982b.jpg
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
You show ground is up and +5V is down.

Are you from Australia?

Also you show no +5 to the relay.

Check your wiring carefully and compare it to what you used on the breadboard.
 

Blumpkinson

Jul 29, 2013
21
Joined
Jul 29, 2013
Messages
21
Haha. Nope from NJ unfortunately.

I did some research on NPN transistors last night and I think I've figured it out. My only question is in the schematic below:
a) Is this correctly wired?
b) How does the relay coil get grounded, it seems like the collector would be outputting a voltage signal not a ground signal?

2_zps70d4f825.jpg


Also would a PN2222A transistor work for this application?

I really appreciate all the help Steve.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Well I knew one of us was from Australia! :D

That looks much better. You don't show the -ve of your left voltage source connected to ground, but I trust that is an oversight.
 

Blumpkinson

Jul 29, 2013
21
Joined
Jul 29, 2013
Messages
21
Haha, much better than NJ.

Yeah, I didn't put that in b/c that's the output from the IC, which is just a 5V signal or nothing.

So thinking about the EMF that is created when the relay discharges, is it possible that EMF could influence another relay on the board?

I placed the relays very close together on the board for trace simplicity, which might be the reason the IC only hangs up when I try to switch it for the second time (closing the relay that is after the IC). The input to the IC runs through the leg of a relay, which i'm hoping is what is being influenced by the post IC relay.

Is this possible, if so would there be any other solutions besides physically moving the relays?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yeah, I didn't put that in b/c that's the output from the IC, which is just a 5V signal or nothing.

However it's still ground references and it would be important that the ground for that chip's power supply connections was common to this circuit.

So thinking about the EMF that is created when the relay discharges, is it possible that EMF could influence another relay on the board?

No.

I placed the relays very close together on the board for trace simplicity, which might be the reason the IC only hangs up when I try to switch it for the second time (closing the relay that is after the IC). The input to the IC runs through the leg of a relay, which i'm hoping is what is being influenced by the post IC relay.

The relay won't be affected, but the chip might. However this would only happen if you didn't have the diode connected, or maybe if you had it around the wrong way (that would prevent the relay from operating and potentially damage the chip)

Is this possible, if so would there be any other solutions besides physically moving the relays?

I'm sure another solution is the only solution.

Perhaps you can post images of both sides of your board so we can check it just in case you've made a silly mistake.

Sharp, clear photos so we can see markings. Taken in diffused light. Outside in shade is often best. NO flash!
 

Blumpkinson

Jul 29, 2013
21
Joined
Jul 29, 2013
Messages
21
I feel like this would be easier than trying to take a picture of the small PCB. This is a section of the eagle file I made.

Capture3_zps1a46d8da.jpg
 
Top