Relay switch on halts arduino reaction to input


I’m working on a project in which I have two smoke machines and a series of LED strips. All controlled by 433hz remote.

The smoke machines have two modes: in mode 1, they are on for a period, then off for a different period. Mode 0 is just off.

While in mode 1, the arduino doesn’t react to any input with my remote, if BOTH relays are plugged in (doesn’t matter if it’s the same pin or different pins).

If I unplug either or both relays, the code works fine and is reactive (tested with Serial.println).

My relays are both plugged into 5V, GND and P6 on the Arduino. It doesn’t matter whether anything is plugged into the relays or not (so it’s not the smoke machines or their power supplies that is the issue).

I’ve attached a photo. I can add my code as well if necessary, but it might just add to the confusion - I think this is a hardware issue. Possibly I’m wiring it wrong, it’s my first time working with these things.

IMG_3681 (1).jpg

No picture, yet. It is better if you post the image inline than attach it. How to post an image.

Yeah, I had some issues. First image was too large, then wrong format, then some other issues, and then I ran into a 5 minute block from posting. Doh. But it's there now :slight_smile:

Can you draw a schematic of the project? If you don't have a CAD schematic program, draw the schematic on paper, take a picture of the schematic and post the picture. The picture does not show how the relays are connected to the (unnamed) Arduino, how the relay coils are powered or how the Arduino is powered.

Very quick sketch that shows the smoke/relay part of the project.
Sorry that it’s kind of ugly.

In words: The GND of both relays and the 433hz module are all connected to 1 GND pin on the Arduino - at the moment an Uno (will be replaced by a Nano, if I manage to make my computer work with it).

The VCC ports from both relays and the 433hz module are all connected to the 5V pin on the arduino.

The IN on the relays are both connected to pin 6 (I’ve also tried connecting them to 5 and 6, one each, with no difference).

The DATA on the 433hz module is connected to pin 2.

Each relay has a powerbank with my smoke machine setup plugged in - I’ve tested with them plugged out, with them in the always open and always closed ports, no difference.

If I unplug ONE relay, it works as expected. As soon as both are in use, the arduino does not respond to input from the 433hz remote during ON period - but responds fine during OFF.


Where is the Arduino power coming from?

At the moment it's plugged into my computer. It will have a USB powerbank with 2,4A/5V once the project is done (at least that is my plan at the moment - this is all part of a costume that I will be wearing)

Well, the 2 relay coils need 150 mA and the radio probably needs a good surge when transmitting, wonder if your computer's USB supply is holding up. Can you post a link to the relay modules? May be able to get coil current from another source.

It should be these, there's not really much info.

Well, I was hoping the relays were the kind that could split the coil supply from the logic supply but no. Could you try powering the Arduino from one of the smoke machine power banks to see if it makes a diff?

I found a data sheet for the relay itself (SRD-05VDC-SL-C). Coil current is specified at 71.4mA.

Coil current is specified at 71.4mA.

Might be a bit higher actually. This data sheet for the JCQ 3FF gives the coil resistance as 70 ohms +- 10%. So if OP's is at the lower resistance of 90% of 70 ohms = 63, the current will be 5/63 = 80mA. So the 2 together will be closer to 160mA than the 150 suggested by outsider.

edit: the JCQ 3FF being the relay in the OP's own photo in the opening post, the link to amazon has the Songle

All those little relays are identical to an Omron I've had for 30 years, they must have made a skeezillion by now, I bet they come out of the assembly machines like machine gun bullets, I don't put much long term trust in them.

I don't put much long term trust in them.

You think they will break easy?

It seems for now that it's working running off a powerbank that supplies 2.4A/5V.
Will have to test it with the lights as well.

I need this thing to work for around 8 hours or so. The relays will only be working for maybe 1 hour at most of that time. The lights (externally powered RGB strip with mosfets connected to a pin each) will be on doing a standard fade effect most of that time.

My powerbank is 10k mAh. Does it sound like a realistic power source for the Arduino?