RF Remote Failing to Trigger

***Edited to indicate RF controller instead of IR from initial version of post

Hi everyone,
I am a newbie in terms of using Arduino, coding, and electronics; hoping you can help me with a small project for a photo booth trigger using Duinotech Uno R3 and the included RF remote controller (ZY108-V2.1) of the equipment (rotating motor) I bought. I am currently prototyping on a bread board using jumper cables, LEDs, optocoupler (4N25) and resistors. The prototype and codes are based of a few tutorial videos I’ve watch and copied the setup there, i.e. resistor values, use of optocoupler, wiring, etc. The LED on the breadboard serves as a visual cue to indicate connectivity. Please check my set-up below and teach (or send me links) me how to fix the issue. I would also appreciate any alternative set-ups, feedback on improvements, or any type of suggestions or comments.

Goal of the project:
When the input button is pressed, trigger the on/off button on the RF remote to turn the equipment on. After a 5 second delay, trigger the same on/off button to turn the equipment off. The RF remote will be about 3-5m away from the equipment.

The Issue:
When the button is pressed, the LED on the breadboard blinks once, then once again after a 5-second delay. Same goes with blinking the LED on the RF Remote control, it blinks the same time as the one on the breadboard. The issue is that the RF does not seem to send the signal to the equipment. Manually pressing this button makes the RF Remote control's LED blink and turn the equipment on/off.

Here are the schematics:

Here is a picture of the RF Remote control, I am using a jumper cable to connect the 2 contacts on the left side of the top button (on/off button):

Considerations:
There are 2 RF remote controllers that came with the equipment so no issues with soldering wires onto the button’s contact points to connect to the breadboard.

Here is my code:

void setup(){ //set-up pins as input and output
  pinMode(2,OUTPUT); //green
  pinMode(12,INPUT); //orange wire
}

void loop(){
  if(digitalRead(12) == HIGH){ //on button press
    digitalWrite(2,HIGH); //turn green LED on, trigger RF Button
    delay(100); //delay before turning off
    digitalWrite(2,LOW); //green off
    delay(5000); //wait 5000 ms
    digitalWrite(2,HIGH); //turn green LED on, trigger RF Button 
    delay(100); //LED remain on for 100 ms
  }
  else{ //button not pressed, LED off
    digitalWrite(2,LOW); //green off
  }
  
}

Run your pilot LED from a separate output that is identical.

Simplify your sketch for now so that the pilot LED and your optoisolator get exactly what you are pressing the button to do.

I mean drop the remote and use a pushbutton as a proxy for now.

Do something like just drive an LED from the output of your opto to verify that the signal,is getting that far.

Once you can control the LED on opto output, go back and worry about exactly what you do when the IR button is pressed.

100 milliseconds is right around where it may be too short of a stab, for example.

It's just easier to get the separate sections working.

I've left off the very last and most critical, whether your opto circuit is serving satisfactorily as a switch closure on the button you've place it in parallel with.

a7

What action do You expect to take place when delay(5000) is executed?

Hi alto777,
Thanks heaps for your suggestion. I will research on how I can test for pins 5 and 6 of the optoisolator.
I also read about another potential solution where an IR transmitter is used but it got too overwhelming for me. Im thinking this might be a simpler solution by triggering the push button.

Hi Railroader,
The 5 sec delay is for simulating 2 presses on the remote controller at an interval, 1st to turn it on, then to turn it off. The equipment is a rotating machine where a camera can be attached to. So the idea is to turn it on, which will spin the camera for 5 seconds, then turning it off.

Looks like an rf tx to me, not IR.

Yep. An antenna wouldn't be of much use on an IR remote, would it?

Thank you @bluejets and @van_der_decken, I edited the original post to state RF controller, I'll research on this topic as well.