Hello everyone!
Could you recommend a good I2C controller IC to use with abou 16 relays?
I was looking for MCP23017,but someone told that it is a little difficulty to implement.
Thank you.
Hello everyone!
Could you recommend a good I2C controller IC to use with abou 16 relays?
I was looking for MCP23017,but someone told that it is a little difficulty to implement.
Thank you.
The MCP23017 will do what you want, but just like an Arduino, will require additional circuitry and possibly an additional power supply to control and power the relays.
Post a link to the product page or data sheet for the relays.
Hello, thank you for your help.
I will use the ULN2803 as the main driver for the relays (the relays are all Panasonic DS2Y / 5 volts coil).
Datasheet for relays: https://www.mouser.com/ds/2/315/mech_eng_ds2y-1076009.pdf
Datasheet for ULN2803: http://www.ti.com/lit/ds/symlink/uln2803a.pdf
Is it OK to use them?
Best regards!
claudiohideki:
Hello, thank you for your help.
I will use the ULN2803 as the main driver for the relays (the relays are all Panasonic DS2Y / 5 volts coil).Datasheet for relays: https://www.mouser.com/ds/2/315/mech_eng_ds2y-1076009.pdf
Datasheet for ULN2803: http://www.ti.com/lit/ds/symlink/uln2803a.pdfIs it OK to use them?
Best regards!
ULN2803 is octal NPN darlington transistors with common emitters, capable of sinking a relatively high current. You will need 2 ULN2803 to drive 16 coils. You will need pull-down (to ground) or pull-up (to VDD of the MCP23017) resistors (10 KOhms should work) on each "In" pin of the ULN2803, depending on if you want to sink our source with the MCP23017. You will want to tie the ground pin of the ULN2803s to the ground of the MCP23017 and the ground of the Arduino. MCP23017 is no more difficult to use than any other I²C chip. Libraries, such as this one from Adafruit, make it somewhat less difficult to use.
Thank you so much for all your help, I will give it a try!
Best regards!
Do you have to use I2C?
A TPIC6C596 (SMD package) shift register can directly drive eight relays, using three (SPI) pins of the Arduino.
The only other part needed is a 100n decouping cap on the VCC pin.
More chips can be daisy-chained, using the same three pins.
Several other chips in that family that do the same, like the TPIC6B595 (through-hole).
Leo..
claudiohideki:
I will use the ULN2803 as the main driver for the relays (the relays are all Panasonic DS2Y / 5 volts coil).
No, please don't even think of that chip!
It is an obsolete IC and drops at least a volt, so at 5 V, you are losing a significant amount.
Use the TPIC6B595 (or similar, depending on the package and current requirement). Two (or more) of them chain on only three control pins, two of which may possibly be shared for another function.
Paul__B:
No, please don't even think of that chip!It is an obsolete IC and drops at least a volt, so at 5 V, you are losing a significant amount.
Use the TPIC6B595 (or similar, depending on the package and current requirement). Two (or more) of them chain on only three control pins, two of which may possibly be shared for another function.
The TPIC6B595 can only sink 150 mA per pin if all are on. While better in some applications, it hasn't fully eclipsed the ULN2803 for all applications.
Thermal limitation of the ULN2803 kicks in much sooner than the TPIC6B595.
The ULN would dissipate ~6.4watt if eight channels are sinking 100mA each.
That would raise chip temp by 584C.
A heatsink couldn't fix that.
Leo..
Wawa:
The ULN would dissipate ~6.4watt if eight channels are sinking 100mA each.
That would raise chip temp by 584C.
A heatsink couldn't fix that.
Oops! ![]()
Perehama:
The TPIC6B595 can only sink 150 mA per pin if all are on. While better in some applications, it hasn't fully eclipsed the ULN2803 for all applications.
Inadequate research, eh?
OK, it's a technical matter.
Before the advent of MOSFETs, the only way of achieving high current gain was to tandem bipolar transistors. If saturation is important, the collector of the first transistor goes directly to the supply but as a matter of convenience, the Darlington pair is commonly used, reducing it to a three terminal "equivalent" and thus avoiding the need for a direct connection to the collector supply voltage.
The penalty for this is that the second transistor does not saturate unless the first base is fed enough current to saturate the second while its collector is dropped to below its emitter voltage and it thus contributes no gain, completely defeating the purpose of that first transistor. So the Darlington pair functions only to bring the collector voltage down to - as Wawa points out - about 800 mV at best in practice.
MOSFETs changed the playing field. Their (DC) current gain can be considered almost infinite, and they have been developed to the point of having a very low saturation resistance and thus a very low saturation voltage - substantially less than 800 mV - at useful current levels, and that at "logic level" gate voltages. That is what is inside the TPIC6x595 series ICs and this switching performance eclipses the Darlington-based ULN2x03 devices sufficiently to consider them obsolete.
You might use ULN2X03 if there is some reason you do not want a shift register but in Arduino applications, the shift register inherently provides a much appreciated expansion of the output capability of the processor and few applications require higher speed (which the hardware SPI can provide anyway), so I think it is poor advice to even mention them as a possible approach to a problem. If you really need individual control of higher current devices, individual logic-level FETs will be a much better solution.
Perehama:
You will need pull-down (to ground) or pull-up (to VDD of the MCP23017) resistors (10 KOhms should work) on each "In" pin of the ULN2803, depending on if you want to sink our source with the MCP23017.
Perhaps you should explain why, for the OP's benefit.
Another option is pcf8574. These are inexpensive and very easy to use. Probably a little simpler to use than the MCP chips. Less flexible, but for driving relays, it does not matter.
Paul__B:
No, please don't even think of that chip!It is an obsolete IC and drops at least a volt, so at 5 V, you are losing a significant amount.
Use the TPIC6B595 (or similar, depending on the package and current requirement). Two (or more) of them chain on only three control pins, two of which may possibly be shared for another function.
Its not obsolete, its still recommended for new designs - though that may only be the SMT versions.
PaulRB:
Another option is pcf8574. These are inexpensive and very easy to use. Probably a little simpler to use than the MCP chips. Less flexible, but for driving relays, it does not matter.
Key difference: the PCF8574 and it's 16-bit version (the PCF8575) can not source more than a few µA of current... making even switching on an N-MOSFET a problem. They can sink a reasonable 20 mA or so. And they're indeed really cheap.
wvmarle:
the PCF8574 can not source more than a few µA of current.
Perhaps I am reading the data sheets incorrectly. Can you check? The pcf8574 data sheet, seems to say it can source 4mA, continuous absolute maximum (table 6.1). The uln2803 data sheet seems to say the maximum input current is 1.35mA. It also indicates an input current of 500uA for an output current of 350mA (table 6.5). Am I reading the sheets correctly?
That 4 mA the absolute maximum rating; section 6.3 gives a recommended output of 1 mA; and section 6.5 gives a value of 30-300 µA for "P port" and suggests the 1 mA value comes from the internal pull-up resistor.
There appear to be differences between manufacturers on how much they can source - see the listings on digikey for this chip