I'm currently encountering a problem when using a relay switch with a 5v receiver. When using the same receiver with a row of LEDS it works flawlessly. I've noticed that the relay keeps making the switching noise over and over like I'm pressing the transmitter really fast apart from the fact I'm not. Also, when the transmitter is moved closer to the receiver from 20" to around 1" the problem stops. Below is some circuits to help show you my setup.

Any help appreciated thanks.

Setup Specs

  • USB 5v DC (2AMPS)
  • Receiver (XY-DJM-5V - SC2272-M4)
  • Relay (SRD-05VDC-SL-C 5V DC)
  • Transmitter (XY-04)
  • Diode (1N4001)
  • Transistor (2N2222A)
  • Resistor (1.8K Ohms)


simulate this circuit – Schematic created using CircuitLab

Antenna Signal Workaround or Booster

I believe this issue is related to wireless signal on D0. Basically above 20" inches the output to the relay drops from 5.05v to 0.5v and is obviously causing the problem. I think I need to boost the signal or replace the transistor with something that triggers at low and high current but have no clue. Any help appreciated, I'm new at this.

Board Setup





2 Answers 2


The XY-DKM-5V doesn't appear to have a data sheet so if you could find one that will help you immensely - any electronic module that can be bought that doesn't have a pdf data sheet in my book is not worth buying.

Anyway, I suspect the problem is glitching on the supply when the relay coil is first activated and this might be cured by adding a ceramic 10uF capacitor across the power rails of the feed to the module. You might also consider putting a small resistor in series with the relay to limit its current slightly - hopefully it will still work of course.

I don't know how you constructed this circuit but if on a breadboard then you will undoubtedly have to wire it together with more care and attention. If it's on a circuit board then there could still be issues so please show your construction.

Alternatively your relay may be demanding far too much current that what your power supply can give so please check this too.

  • \$\begingroup\$ Do you know an reputable wireless module with a relay switch built in? and with a datasheet. I don't mind switching hardware if it works... currently this is annoying. \$\endgroup\$ Aug 6, 2014 at 13:29
  • \$\begingroup\$ Also added some pics of the current setup and testing. Basically between 4.92v and 5.05V on the relay when the remote is less than 10inches away from the receiver, any more the voltage drops too 0.10>1.00 volt (unstable). \$\endgroup\$ Aug 6, 2014 at 13:53
  • \$\begingroup\$ @bybe - where's the protection diode across the relay? \$\endgroup\$
    – Andy aka
    Aug 6, 2014 at 13:57
  • \$\begingroup\$ Ooops, I quickly wired it together for the picture. I'm placing the diode between NPN C and the relay switch. \$\endgroup\$ Aug 6, 2014 at 14:06
  • \$\begingroup\$ The diode needs to be directly across the coil for best effect. \$\endgroup\$
    – Andy aka
    Aug 6, 2014 at 14:11

This seems to be a common problem when people use R02A type 433MHz receivers with relays. When the relay fires it draws a higher 'pick' current that causes the voltage to the RF receiver momentarily to drop below its threshold. This cuts the signal to the relay which opens again, restoring power to the RF so the whole thing stutters. It happens with lots of remote control stuff, called 'brown out' when the receiver cuts out so they always have a protected power supply for the receiver.

I tried using capacitors to compensate for this but with no joy. The only solution that came close was a 100uF cap across the relay coil, in parallel with the diode, effectively delaying the relay opening for long enough to cover for the initial brown-out of the receiver. This, however, also delays its response when you stop pushing the button, so is not ideal.

The only solution I could find that worked 100% is to have two separate power supplies - one for the RF board and the other for the relay. These need to share a common GND connection to stop them floating relative to each other - which would risk allowing a much higher voltage to pass the wrong way through the circuit and cook your chips.


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.