0
\$\begingroup\$

I just finished two versions of PCB layout for a relay board and I wanted to ask for some feedback before I order them - so it doesn't end up like my first PCB, which didn't work because I rushed it. I'm a beginner in this so any tips will be appreciated.

On the first one I'm using PCF8575 with 74HC14 logic inverter and ULN2003A. On the second pcb I'm using the MCP23017 directly with ULN2003A.

For the MCP23017 I also wanted to ask whether I need to add pull-down resistors for the output pins.

And my last question is about the LED's - I wanted to use blue led's but I only found them with 3-3.3Vf so there would be no room left for resistors and I have read that it's not good to connect them directly to 3.3V power source. So I found some red smd LED's on aliexpress with 2-2.2Vf, and in the description of the product they state that the forward current is 20mA. But I have read on several forums that 1mA is enough to light up these LED's so I used 470ohm resistors, which will be around 2mA. Is that correct?

Version with the PCF8575: PCF8575

PCF8575

PCF8575

PCF8575

Version with the MCP23017: MCP23017

MCP23017

MCP23017

MCP23017

\$\endgroup\$
3
  • \$\begingroup\$ Is there any reason that Vdd to the relays does not use much thicker traces? You could have a really wide trace that drops off to each relay. I am not a qualified electrical engineer. \$\endgroup\$ Commented Mar 26 at 17:02
  • \$\begingroup\$ Am I misunderstanding something (quite likely), or are the relay coils shorted to ground on the back of the board? \$\endgroup\$ Commented Mar 26 at 17:09
  • \$\begingroup\$ @AndrewMorton Neither am I so there could be some errors in the design, but the relay's coil I used is consuming about 15mA. And although the traces are my weakness, I think 6mm traces are enough for this current. And no, they are not shorted to ground. One side of the coil is connected directly to VDD and the ULN2003A provides a GND when turned on. That's how I understood it. \$\endgroup\$
    – k0cka
    Commented Mar 26 at 17:45

1 Answer 1

1
\$\begingroup\$

One thing: Do you need flyback protection diodes on your relays? If you are seeing an overvoltage when you turn the relays off, then they are needed.

So I found some red smd LED's on aliexpress with 2-2.2Vf, and in the description of the product they state that the forward current is 20mA. But I have read on several forums that 1mA is enough to light up these LED's so I used 470ohm resistors, which will be around 2mA. Is that correct?

There isn't a way to calculate this without a diode curve, which I'd imagine is not provided from your source. I would design high and then swap them out later. Since this board is probably plugged in you don't need to conserve power. Usually 5mA on many LED's is a good starting point, if you can't find any datasheet, then buy some and experiment with hooking up a current control bench supply to the LED.

\$\endgroup\$
6
  • \$\begingroup\$ Well I was advised to use the ULN2003A and if I understood corretly then it should have a flyback diode, but I'm not sure if that's enough or if I should add one more accross the relay's coil. So you are suggesting to use lower value resistor, for example 200ohm to get around 6mA? Sorry, english is not my first language so sometimes I need additional clarification to understand. \$\endgroup\$
    – k0cka
    Commented Mar 26 at 16:47
  • \$\begingroup\$ Like I said in the post, without a diode curve or datasheet you can't estimate the current, you must measure it. \$\endgroup\$
    – Voltage Spike
    Commented Mar 26 at 17:09
  • \$\begingroup\$ Ok, I will test them when I recieve them. What about the diode for the relay's coil, do you think I should add it? \$\endgroup\$
    – k0cka
    Commented Mar 26 at 17:51
  • 1
    \$\begingroup\$ @k0cka You don’t need extra diodes- the ULN2003A has one per output, each connected to COM and you have connected COM correctly. \$\endgroup\$ Commented Mar 26 at 18:10
  • \$\begingroup\$ @SpehroPefhany Ok, thank you for specifying! So do you think the layout is correct and will work as expected? \$\endgroup\$
    – k0cka
    Commented Mar 26 at 18:33

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.