Two DPDT relays = 4PDT

Started by Buffalo Tom, April 07, 2018, 04:12:03 AM

Previous topic - Next topic

Buffalo Tom

Hello! Can I put two DPDT relays in parallel to make a 4PDT relay? Im using AMZ microprocessor and Panasonic TQ2-L-5V relays. I need more poles for switching. Is this a good way to do it?

mfunky

One Diode should be enough. Don't connect the relays directly to the microprocessor... Use a transistor Instead...

Buffalo Tom

Quote from: mfunky on April 07, 2018, 04:31:07 AM
One Diode should be enough. Don't connect the relays directly to the microprocessor... Use a transistor Instead...

Yes one diode is probably enough! I see that now. Looks like both doing the same thing. I don't think a transistor is needed. There is no transistor in AMZ Jack Ormans original description on how to use his micro. There is probably code in there that takes away the need of a transistor.

DIY Bass

Not an expert on this at all, but one thing you should look into is how much current the micro can deliver.  Two relay coils in parallel will draw more current, which could be bad if the micro can't deliver it.  That is potentially where using a transistor comes into play.  The micro then just needs to switch the tranny, which is what delivers the current you need.

Buffalo Tom

Quote from: DIY Bass on April 07, 2018, 05:51:02 AM
Not an expert on this at all, but one thing you should look into is how much current the micro can deliver.  Two relay coils in parallel will draw more current, which could be bad if the micro can't deliver it.  That is potentially where using a transistor comes into play.  The micro then just needs to switch the tranny, which is what delivers the current you need.

Thanks! Very good info. I will see if I can find out how much current the micro can handle.

anotherjim

The data sheet for that mcu chip will say how much current an I/O pin can source or sink. Can't remember off hand how much that is for an AVR but 20mA is typical, although I think you may be able to get 40mA AS AN ABSOLUTE MAXIMUM from some.

Next find out how much current a relay takes. If it's 20mA each then you might be able to switch 2 together, but you will not get the full 5v across the relay coil with a total 40mA current draw. The relays "might" work well enough with less than 5v, it may even be possible to add some small fixed resistance to reduce the current draw - but could you guarantee they relays would both always operate when they should?


Because a latching relay needs polarity reversing, it's not trivial to boost current drive with a transistor(s). I would think a H-bridge driver chip would be needed or an equivalent made with 4 discrete transistors. Usually used for DC motor control, the H-bridge can  serve any load that needs polarity reversal...




GibsonGM

#6
I've used this (H bridge), for my father in law's model train set.  We set it up for switching train tracks, to reverse the polarity to a servo that does the job.  Worked out very well.    In the end, though, we went to latching DPDT relays with TWO COILS, rather than one.   That allowed us to massively simplify setting it all up, as he has 6 pairs of switches....12 H's, 12 servos'....ugh....eliminated the H's. 

Just throwing the 2 coil relay idea out there, would have to think about the actual mechanics...it would be GREAT for discrete 'soft-touch' on-off switching.
  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

Buffalo Tom

Quote from: anotherjim on April 07, 2018, 07:36:16 AM
The data sheet for that mcu chip will say how much current an I/O pin can source or sink. Can't remember off hand how much that is for an AVR but 20mA is typical, although I think you may be able to get 40mA AS AN ABSOLUTE MAXIMUM from some.

Next find out how much current a relay takes. If it's 20mA each then you might be able to switch 2 together, but you will not get the full 5v across the relay coil with a total 40mA current draw. The relays "might" work well enough with less than 5v, it may even be possible to add some small fixed resistance to reduce the current draw - but could you guarantee they relays would both always operate when they should?


Because a latching relay needs polarity reversing, it's not trivial to boost current drive with a transistor(s). I would think a H-bridge driver chip would be needed or an equivalent made with 4 discrete transistors. Usually used for DC motor control, the H-bridge can  serve any load that needs polarity reversal...


THANKS. Im learning a lot here!  But I think the H-bridge schematic is to difficult for me to get right... I could use two micros and two relays with one switch. OR try to find a 5 volt latching 4pdt relay with low coil current draw, but thats not easy.

GibsonGM

I see no actual problem with using the 2 relays and 1 micro, Tom, as long as you account for how much current your micro can source.   

If it's not sufficient, we can easily walk you thru how to use a transistor to supply the current; all the uC would have to do is turn on the transistor (microamps).  The transistor does the rest.

Got any paperwork on the uC, so  you can post how much it can source?  Or a link to Jack's info...
  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

Buffalo Tom

#9
Quote from: GibsonGM on April 07, 2018, 05:25:50 PM
I see no actual problem with using the 2 relays and 1 micro, Tom, as long as you account for how much current your micro can source.   

If it's not sufficient, we can easily walk you thru how to use a transistor to supply the current; all the uC would have to do is turn on the transistor (microamps).  The transistor does the rest.

Got any paperwork on the uC, so  you can post how much it can source?  Or a link to Jack's info...

Wow thanks! I don't have the datasheet for the micro. Will send e-mail to Jack and ask... Then we can take it from there. Thanks

DIY Bass

#10
Assuming he is using a current production chip and not some old stock somewhere then it has to be an ATtiny13A - it's the only current chip available in 8 pin DIP.  That being the case, the datasheet is here http://ww1.microchip.com/downloads/en/DeviceDoc/doc8126.pdf
According to that the absolute max current for the IO pins is 40 mA.  Given that is the absolute max beyond which damage can occur I would think you would need to aim lower for standard operation.

Edit - I find the relay datasheet hard to read because of all the options crammed onto one datasheet, but it looks like the one you specified draws 20mA, which would be a big risk trying to work 2 from the one IO pin on that AVR.

anotherjim

Well, it seems my tech spec memory isn't so bad then.
The H bridge scheme I linked above ought to do it.
The PNP's can be 2N3906 & the NPN's can be 2N3904
The x4 base resistors can be 470ohm? (guess)
Ignore the resistors R5, R6 and the 2 switches.
The points marked 0 and 1 are the mcu pins.
Your relay coils, in parallel with identical polarity, go in the middle in place of the motor M.

Not shown in the scheme above are protection diodes. You need x4, one across each transistor emitter-collector. Cathodes facing up to Vcc (5v)
Like here, which I link ONLY to show where those diodes go...


Buffalo Tom

Quote from: anotherjim on April 08, 2018, 06:11:03 AM
Well, it seems my tech spec memory isn't so bad then.
The H bridge scheme I linked above ought to do it.
The PNP's can be 2N3906 & the NPN's can be 2N3904
The x4 base resistors can be 470ohm? (guess)
Ignore the resistors R5, R6 and the 2 switches.
The points marked 0 and 1 are the mcu pins.
Your relay coils, in parallel with identical polarity, go in the middle in place of the motor M.

Not shown in the scheme above are protection diodes. You need x4, one across each transistor emitter-collector. Cathodes facing up to Vcc (5v)
Like here, which I link ONLY to show where those diodes go...


This looks great! Thank you very much. Don't have all the parts but will buy them. Looking forward to try this.

amptramp

If you are driving two relays in parallel, they may switch at different voltages just due to the tolerances on the coils and the variations in speed of response.  Thus, the relays may switch at different times and there is no guarantee that if you build one unit and test it for switching times that another unit would not behave entirely differently.  If the order in which switch contact transfer takes place is important, you may want independent control of the relay coils.

Rixen

this relay: http://www.newark.com/te-connectivity-axicom/v23079f1101b301/relay-signal-dpdt-250vac-220vdc/dp/16H4396
requires less current and so is safe for connecting directly to micro pins (but you should probably drive the relays off different pins to reduce the current further though. ie 4 pins for two relays).

Note that your protection diodes need to go to the supply rails, and should be Schottky type, so the Vf is lower than the Vf of the micro's body diode

DIY Bass

From my reading though he is wanting to buy a kit with a pre-programmed micro, and be able to use it to do slightly different switching.  If that is the case and re-writing the code isn't an option then he is stuck working out how to use the currently used pins.

anotherjim

Yes, it's only an 8pin MCU and may not have another 2 pins spare.



Note that although the relay coil is marked with + and - polarity, that is only to show the polarity to put it in latched state. Unlatching requires reversed polarity, which is why it needs 2 control pins and you cannot simply place a protection diode across the coil as you certainly would do with a normal non-polarized relay control.

The design relies on the internal protection diodes in the chip to protect against coil flyback voltage. Plenty of commercial designs do too. However, flyback from an additional coil might prove too much for the IC's own diodes, then, as Rixen said, use Schottky protection diodes - 4 of them in same arrangement as the H-bridge.

As I said earlier, it might be fine with 2 relays -  you have to try it. The IC only supplies the coil for a few milliseconds, just long enough to latch or unlatch. So the the 40mA is never continuous, unless the MCU should crash/hang and leave it on.



Buffalo Tom

Quote from: anotherjim on April 09, 2018, 10:53:45 AM
Use Schottky protection diodes - 4 of them in same arrangement as the H-bridge.

Im sorry but I don't get where I should place the 4 Schottky diodes together with the relays.




Quote from: anotherjim on April 09, 2018, 10:53:45 AM
As I said earlier, it might be fine with 2 relays -  you have to try it. The IC only supplies the coil for a few milliseconds, just long enough to latch or unlatch. So the the 40mA is never continuous, unless the MCU should crash/hang and leave it on.

Yes I will try it! It would be very nice if it works without H-bridge. Less parts.. just diodes.

Here is the reply from Jack:
The micro can drive about 20 ma but the output voltage will begin to sag at higher currents. The datasheet says that the output is still above 4.4v at 20 ma but I have my doubts about it. Theoretically, it can drive two relays but I have not tried it.

GibsonGM

I'd use a latching relay with 2 coils. But that's just me....No H bridge.
  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

Rixen

connect diodes to relay coil like this:



I haven't shown the connections to micro pins.