2
\$\begingroup\$

I am using an ESP8285 to make my own wifi relay device. I am using an ULN2003A to drive the relays, I have the 5V relay coil voltage connected to COM and the other coil connected to the output of the ULN2003A. When I send a logic high to the input of the ULN2003A the output should go to logic low and turn on the relay but it is not going to a logic low. It only drops from about 4.98V to 4.18V which is not low enough to turn on the relays. I am not sure why it is not going to logic low when I give a logic high input. I have added the schematic I am using, I apologize if the pic is a little blurry.

Relay Schematic

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

You have the diodes backwards, which will likely damage the ULN2003A and the diodes. They are supposed to be reverse-biased when the relay is energized.

You also don't need them, there are diodes in the ULN2003A, which you have correctly connected to +5V via the COM pin (well, it will reduce the loop area a bit if the diodes are very close to the relay, so they're not entirely useless).

It would be a bit more clear if you followed convention in drawing the schematic and had the supply rail at the top.

\$\endgroup\$
7
  • 2
    \$\begingroup\$ ok I see what you mean, thank you! Man I goofed that one up \$\endgroup\$
    – XDM
    Sep 22, 2020 at 23:01
  • 1
    \$\begingroup\$ Easily fixable. Not everything is so. \$\endgroup\$ Sep 22, 2020 at 23:04
  • \$\begingroup\$ @Spehro Pefhany, I have two questions on the ULN2003/2803 datasheet's schematic: i.imgur.com/IFEZyIG.jpg. (1) How come the datasheet does not follow the convention and have the supply rail at the top? (2) How come each driver has so many diodes? \$\endgroup\$
    – tlfong01
    Sep 23, 2020 at 4:20
  • 1
    \$\begingroup\$ 1. The ULN2803 does not have a supply rail. I would prefer the COM line to be at the top as it is on the individual driver schematics. 2. There is one diode (to COM) for each driver that is a deliberately added "component" on the chip, the others are a consequence of bipolar IC process used to make the chips. Resistors etc. are isolated from the substrate by diffused junctions , so, for example if you try to pull the input below ground a large current can flow if the voltage is more than a few hundred mV. \$\endgroup\$ Sep 23, 2020 at 4:28
  • \$\begingroup\$ Many thanks for your answer. (1) I agree that COM should be placed on top. But perhaps for physical layout of pins on the chip, it might be easier to make the PCB tracing if the input and output pins aligned horizontally. But I am not sure if there are other reasons. One other reason is that COM is the common pin for connecting the 8 flash back diodes and is not necessary for non inductive loads. \$\endgroup\$
    – tlfong01
    Sep 23, 2020 at 7:11

Your Answer

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

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