Go Down

Topic: Dual latch Relay Circuit Setup (Read 7192 times) previous topic - next topic

Mikie_lomas

After looking over the diagram further.

Does the white hollow arrow mean 5v? That would mean that 5v goes into the collecter, then the base is pulsed and the emitter delivers the current towards either reset or set? then the back flush of emf travels through the diode back into the centre pin?

DrDiettrich

You better use the circuit diagram in #8. The H-bridge circuit in #3 is too specialized and simplified, will work only under certain conditions. The weakest point is the restriction of the supply voltage, which is supposed to equal the logic HIGH voltage of the driving output pin, under load. Even then the top transistors may not turn fully on, due to the voltage drop in the base resistors. If a base current of only 1mA is required, this will drop 1-3V on the 1-3k base resistors, another 0.7V on B-E, and 0.4V on the C-E of the bottom transistors, so that less than 3V is left for the coil :-(
Increasing +V doesn't help, because the emitter voltage can not exceed the base voltage, which is determined by the connected controller output pin. In practice the top transistors should be PNP, with another NPN transistor driving their base.

The hollow arrows mean ground. The diodes let the back flush rush into the power source.

Mikie_lomas

Thank you for your reply. I am building the circuit now. Is the external 5v supply mandatory or is this the only way doing it this method?

Would this mean I would need two power supplies for every one of my projects? Would it be possible to have 1 main external supply that feeds all of the relays around the house through cat6? I know there would be a voltage drop, so you would up the voltage at the start, is there anyway however to ensure that 5v  goes into the circuit at the end?

Thank you so much for your guidance

Mikie_lomas

Hi There,

Quote
You better use the circuit diagram in #8.
I attempted the circuit. I have enclosed pictures but will describe as best as possible

arduino pin 6 -> 470 resitor to base of transistor, with left pin leading to ground and right pin leading a common line which splits off into 1 pin of relay (of the 3 pins), the other is a diode pointing towards a line that is fed 5v from an external power source. This is repeated for pin 7.

I then used the script your provided, no clicking noise when hot is not attached and no switching when it is.

I feel i have possibly confused myself somehow and done things wrong. The bit that worries me the most is around the input area. I have attached pictures to attempt to assist my explanation.


Thank you

DrDiettrich

Test your circuit by disconnecting the base resistors from the controller, and connect them momentarily to Vcc to switch the relay. You can also add a LED (+resistor) to the output pins, for visual feedback.

dlloyd

#20
Nov 21, 2016, 03:28 pm Last Edit: Nov 21, 2016, 03:40 pm by dlloyd
I was thinking something similar as DrDiettrich. If the LEDs alternately blink, then replace the relay test circuit with the actual relay. Here's an updated diagram:



I'm a little concerned that the 2N3904 will not be strong enough to switch the relay coil. May need to replace with PN2222A or other.

EDIT: In the code, you may need to temporarily change the pulse interval from 40ms to 100ms to see the LEDs blink (pulse) a bit brighter.

Mikie_lomas

Quote
I'm a little concerned that the 2N3904 will not be strong enough to switch the relay coil. May need to replace with PN2222A or other.
I have ordered 50 PnAAAA weeks ago, but they have not arrived. I also have:

2NAAAA will these work?

I understand this circuit a little better than the other. Does the led go in series after the diodes to the far right?

Once again thank you so much for your continued correspondence.


DrDiettrich

The 5V coils draw 120mA, should not be a problem with any transistor.

dlloyd

Quote
2NAAAA will these work?
If you mean 2N2222A, then yes.

Quote
I understand this circuit a little better than the other. Does the led go in series after the diodes to the far right?
The LEDs go in series with the 330 ohm resistors. The common connection point of the resistors is the 5V relay supply voltage.

Mikie_lomas

Quote
EDIT: In the code, you may need to temporarily change the pulse interval from 40ms to 100ms to see the LEDs blink (pulse) a bit brighter.
I just followed the code you provided originally and there was a 40 - 1000 ms delay change. So i assumed this was what you meant.

With the revised LED test circuit and changing the transistors I have managed to get the LED circuit working as I would imagine the relay circuit would. I think I understand the circuit better now.

Now I just replace the whole relay test driver section with a relay, or do I need to swap the resistors back to the oldies.

Thank you so much for your help so far.

DrDiettrich

I'd leave the test LEDs in place, also the long delay. Then change resistor values if required, and finally clean up.

Mikie_lomas

Quote
I'd leave the test LEDs in place, also the long delay. Then change resistor values if required, and finally clean up.
It looks alot nicer than last time.

How would i add the relay to this?

Thank you for all your help DrDiettrich

Mikie_lomas

I tried adding the relay, 1 pin to 5v before the LED's resistors , then the two outer pins to common line before the diodes.

It seemed to flash one side, then both at the same time. No clicking noise.

Mikie_lomas

Hi Guys,

I have removed the revised circuit from within the area entitled test relay circuit and replace that with the relay. This allow me to latch the relay either way, it kept its state after power off!!!

I am almost ready to put this onto a perfboard. Can you guys recommend any last minute things I should add or do to the circuit?

I was using the 330 resistors when I got it working, should I change this back to the 470s?

Out of curiosity and please forgive my ignorance. I was wondering if it is possible to perform this operation without the external power supply? By using an external ground? (I am new to all of this). Say for example if I had an arduino Nano, which has the job of pulse switching 1-3 relays.

Thank you so much, I am so happy I managed to get the circuit working

PS. my PN22222A's arrived today.

dave-in-nj

each coil uses 150mA
if you use the Arduino power, you may have a dip in voltage.
however, there is a away to trickle charge a cap to use that for the power dump to the coil.
you cannot change state before it charges, and you cannot energize two at the same time  unless you size the caps properly.

Go Up