1
\$\begingroup\$

I want to make home automation using Arduino. Instead of relay modules, I prepare my own relay module using relays and transistor switches, in between the Arduino and relays.

I want to make many transistor switches. Instead I planned to use IC like ULN2003A which has 7 darlington arrays that I can use as switches. They also have flyback diodes to protect from sudden spikes. (Also cheaper compared to 7 transistor switches and diodes.)

Is it a good idea to use it? Or is there a better way to solve my problem?

Additional info:

I need to turn on/off 220V loads using 5V DC relays which are activated by a PNP transistor switch, whose base current is provided by the output of an Arduino and collector-emitter has a separate power source to activate the relays. If I want to operate many appliances, many such transistor switches are needed. Hence I searched for a simple solution and found an IC which can act as multiple transistor switches (ULN2003A).

Is it ideal to use that in my circuit, considering power losses and other factors?

enter image description here

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Your requirements are under-defined. \$\endgroup\$
    – Andy aka
    Sep 25, 2020 at 7:50
  • 1
    \$\begingroup\$ Under defined means... \$\endgroup\$
    – Nifty 17
    Sep 25, 2020 at 8:00
  • 1
    \$\begingroup\$ Power supply voltages, relay types, typical relay drive schematic etc.. \$\endgroup\$
    – Andy aka
    Sep 25, 2020 at 8:05
  • 2
    \$\begingroup\$ We need more information. In principle your idea works, but there is so much information lacking we can't say that it will work with your set up. \$\endgroup\$
    – Puffafish
    Sep 25, 2020 at 8:05
  • 1
    \$\begingroup\$ Welcome to the site. Please do not add information in comments otherwise readers have to piece the question together. Edit it into your question. Split your question into paragraphs instead of one big paragraph. Don't post big photos that need a scrollfest, reduce them to a sensible size first. Good presentation attracts better quality answers. Thanks and again, welcome. \$\endgroup\$
    – TonyM
    Sep 25, 2020 at 8:26

2 Answers 2

3
\$\begingroup\$

Question

Can I use ULN2003 to switch 5V relays which in turn switch 220VAC loads?


Answer

No problem at all.

Your ULN2003 choice is good, because it can handle max 150mA, and the most popular, typical 5V relay switch, Songle relay switch, takes only max 70mA.

I usually prefer ULN2803 which has 8 open collector, power NPN BJTs, ideal to sink 5V Songle switches.


Discussion, Conclusion, and Recommendation

  1. You may like to also consider I2C 16 channel MCP23017 GPIO expander. Using 2 I2C wires/signals you can control 8 MCP23017 for 8 x 16 relays. Another good thing aboue MCP23017 is that you can set input or output, interrupt control, and the output pins are sort of latched, ie, once setup, no need to take care afterwards.

  2. For prototyping or feasibility studies, you can buy cheap ULN2803 and MCP23017 modules which save soldering effort/time and space.

References

(1) MCP23017 I2C 16 Bit Bidirectional I/O Expansion Module - US$0.75 ~ 1.28

(2) What is an open collector?


Appendices

Appendix A - ULN2003/2803 Wiring Diagrams


uln2003/2803

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Comments are not for extended discussion; this conversation has been moved to chat. \$\endgroup\$
    – Voltage Spike
    Sep 26, 2020 at 4:05
  • 1
    \$\begingroup\$ @Voltage Spike. Many thanks for your help in opening the chat room. Cheers. \$\endgroup\$
    – tlfong01
    Sep 26, 2020 at 4:16
  • 1
    \$\begingroup\$ I'd say the ULN2003A is an antique and not a good choice, nor is the ULN2803. There are much better solutions, though site part recommendation rules prevent me giving examples. But they're an internet search away. \$\endgroup\$
    – TonyM
    Sep 26, 2020 at 18:36
1
\$\begingroup\$

Yes, ULN2003A can be used to control any loads such as relay coils as long ask the connected loads won't exceed the total or per-channel voltage and current limits of the chip.

ULN2001 2 3 4 datasheet here - 7 channels.
500 mA per channel subject to package dissipation limits (varies with package)
50V abs max. Less recommended.

Often competitive or superior to using discrete transistors.

MOSFET version here

ULN2803 8 channel - similar - datasheet here

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Thank you so much \$\endgroup\$
    – Nifty 17
    Sep 25, 2020 at 8:23
  • 1
    \$\begingroup\$ Is it efficient than normal transistor switches? \$\endgroup\$
    – Nifty 17
    Sep 25, 2020 at 8:23
  • 1
    \$\begingroup\$ That would depend on what you think as normal transistor, so only you can do the comparison. \$\endgroup\$
    – Justme
    Sep 25, 2020 at 8:32
  • 1
    \$\begingroup\$ ULN2803 is just similar to ULN2003 but just with an extra channel. Am I right? And is there any IC with some more channels like 12 or 16? \$\endgroup\$
    – Nifty 17
    Sep 25, 2020 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.