3
\$\begingroup\$

I am using the following circuit as an industrial warning and control system.

According to input signals, LEDs and other outputs are HIGH or LOW. So, 24V in input is not always connected actually. System works quite well. Now I should add also relay outputs.

The outputs on J4 should control the relays. I am using this relay module.

My problem is that the relay module doesn't receive enough input current so it doesn't work.

I am thinking about reducing input resistor (24V input) and using a ULN2803A to drive the relay. However I think it will still not sufficient input current for relays. How can I solve this problem or what else can you recommend?

(I know the circuit is too newbie, therefore I would be glad to receive recommendations and advice instead of humiliation and non-useful critism.)

Circuit

\$\endgroup\$
  • 3
    \$\begingroup\$ A schematic for the relay module is required. Humiliation is a received thing and not a given thing. It's how you deal with people pointing out errors that's important. \$\endgroup\$ – Andy aka Oct 13 at 9:41
  • 1
    \$\begingroup\$ The relay module should work with direct GPIO output connections. But you have not shown if you have connected power supply and ground to relay module. Nor the code to know if IO pins are driven properly as outputs. The AVR also has no bypass capacitors and reset pin is left floating, so it may just fail to operate. \$\endgroup\$ – Justme Oct 13 at 9:55
  • 1
    \$\begingroup\$ The relay module already has the parts to increase the output current to make it sufficient for the relay module. \$\endgroup\$ – user253751 Oct 13 at 12:00
  • 1
    \$\begingroup\$ (1) On a side note, what voltage levels are coming in on J1? You have Q1, Q2 and Q3 configured as emitter-followers so the emitter voltage will be 0.7 V below the base voltage when high. Why do you think you need to buffer the signals? (2) Avoid running wires through components such as done on U1. \$\endgroup\$ – Transistor Oct 13 at 12:01
  • 1
    \$\begingroup\$ @Transistor 3 dry contacts from motor and two sensors are connected to J1. So. if they are closed, i check on arduino`s related pin if it is on/off. When some open, operation takes place according to combination. They need to be powered by 24V. The reason i used transistor is that otherwise higher current is received in input pin. \$\endgroup\$ – bcicek Oct 14 at 8:22
4
\$\begingroup\$

The relay module requires a 5V powersupply to operate. Simply switching the inputs will not operate the relays with out that 5V power source.

  1. You do not need R12 for your TSR1-2450 switching regulator. It can handle loads up to 1 ampere and input voltage up to 36V.
  2. You don't need D4. It is redundant. D3 is all you need as a reverse polarity protection.
  3. C3 and C4 are optional as the 2450 includes them. You only need C3 if the input voltage is above 32V.
  • Install jumpers in place of R12 and D4.
  • Remove R11 entirely.
  • C3 and C4 can stay, just make sure they are rated for the proper voltage. (More than 24V for C3, more then 5V for C4.)

Outside of that, your schematic is incomplete.

  • You show no ground connections to the external world, though they must be present for the circuit to work.
  • You don't show the 5V connection to the relay module, although you seem to be trying to power the relay module from the 5V regulator.
  • You don't have bypass capacitors on the processor's power pins. It may behave irratically. (Random lockups, doing odd things, etc.)
  • The reset pin is left floating. That can cause random resets of the processor,or it could stay stuck in reset and not do any thing at all.

You don't need to add a ULN2803 to drive the relays. All you need to do is to properly connect and use what you already have.


Your transistor input buffers are odd. Most folks would wire them as inverters. Pull up to 5V on the collector, emitter to ground, a resistor from the base to the signal input. Connect the collector to the processor's IO pin. It inverts the logic level, but that doesn't really matter.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ thank you very much for detailed answer. I will try to change and make the design better \$\endgroup\$ – bcicek Oct 14 at 12:14
2
\$\begingroup\$

Answer

(1) The OP's relay is opto-isolated, Low level triggered, JD-Vcc jumpered.

(2) To trigger the relay, a Low level signal is used to sink around 5mA to GPIO pin.

(3) The GPIO pin should be able to sink 5mA without any problem. In other words, it is not necessary to increase current using NPN BJT 2N2222, or Darlington ULN2803.


jdvcc current 1


References

(1) How to properly use a relay module with JD-VCC from Arduino/Raspberry? - SE EE 2020jun13


| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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