wondar
Posts: 6
Joined: Wed Oct 31, 2018 1:06 am

Simulate RF Remote Button Press

Thu Nov 01, 2018 12:48 am

Hi Everyone,

I'm new to DIY electronics and am trying to learn as I go, but would appreciate if someone with more of a background could assist me.

Hardware
Surveillance Camera (NVR)
RF Remote (Utilizes 2x CR2032 3V Batteries)
RPi 3B+

What I'm Trying to Do
Connect the RPi to the NVR. Whenever the NVR alarm outputs, it will act as an input to RPi.
The RPi will then simulate a press on the RF Remote.
If possible, would like to remove the batteries in the RF Remote and connect directly to the RPi or NVR.

What I've Done so Far
Solder extension wires from the RF remote:
Image
I will only utilize 3 of the 4 buttons.
Measured that the RF remote is running at 6V.

What I've Researched
1. Cannot connect the RF remote directly to the GPIO pin on the RPi (This may damage the RPi)
2. Should use an Optoisolator
How would I measure the equipment so that I could choose the correct optoisolator? Is there a recommended brand?
3. Could use a 4 Channel DC 5V Relay Module
Since the remote is using 6V, but the relay is 5V, would this work?

PhatFil
Posts: 1705
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Simulate RF Remote Button Press

Thu Nov 01, 2018 2:31 am

An alternative to hacking the rf controller may be to use a £10 itead/sonoff rf bridge flashed with tasmota firmware to issue RF signals when prompted via Mqtt. https://github.com/arendst/Sonoff-Tasmota/wiki

h/w specific link:
https://github.com/arendst/Sonoff-Tasmo ... Bridge-433

that way you need only host a mqtt broker on your pi and you can keep the remote available for remote control too.


whats the remote for btw?

wondar
Posts: 6
Joined: Wed Oct 31, 2018 1:06 am

Re: Simulate RF Remote Button Press

Thu Nov 01, 2018 2:17 pm

Hi Phatfil,

The remote is for my garage door. Thanks for the suggestion, I did think to use something like this, but I believe that this would be a more difficult task for me.

Hi Gordon77,

I apologize for opening two topics, I couldn't find it through my profile/posts so I thought I didn't post it. Now it appears within my "Your Post" section. I would like to close the other topic and continue discussions here.
gordon77 wrote: You could try an opto-isolator (at your own risk!!)

It looks like your switches have a common gnd, so you could try connecting the opto output pins 16,13,12 and 9 together and to the gnd
Thank you for your suggestion. Please allow me to understand how you chose this Vishay opto-isolator? I'm looking at the spec sheet and would like to understand what are the important specs so that I would be able to carry out selecting the correct components (BV CEO/ECO/CBO). Also, what is the risk with the opto-isolator?

For the 150ohm resistor that connects to pins 1,4,5,8 of the opto-isolator how was this calculated? I understand that the resistor is only acting as a buffer to the peripheral devices and that the GPIO pins can supply a maximum of 50mA totally (16mA max on a single pin). The opto-isolator input requires 60mA to power though.
Attachments
opto.jpg
opto.jpg (21.31 KiB) Viewed 3370 times

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 14229
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Simulate RF Remote Button Press

Thu Nov 01, 2018 2:27 pm

deleted duplicate post

gordon77
Posts: 6121
Joined: Sun Aug 05, 2012 3:12 pm

Re: Simulate RF Remote Button Press

Thu Nov 01, 2018 3:40 pm

I used this device to interface my telescope. Datasheet available here https://uk.farnell.com/vishay/ilq74/opt ... 6409721995|

It will withstand up to 20 volts collector to emitter.

I selected 150ohm to get the output l needed, it should not exceed the 16mA, you may get away with more resistance.
If you assume the forward voltage is approx 1.3v then there will be 2v across the 150ohms so that will give approx 13mA.


60mA is the ABSOLUTE MAXIMUM it can cope with not normal running.

wondar
Posts: 6
Joined: Wed Oct 31, 2018 1:06 am

Re: Simulate RF Remote Button Press

Fri Nov 02, 2018 3:48 am

Hi Gordon,

Thanks for your explanation, did not notice that was the absolute max rating. I have a friend who is also helping me with this project and am in the process of ordering parts. I will update once everything is put together. I really appreciate your help on drawing out that diagram, thanks!

wondar
Posts: 6
Joined: Wed Oct 31, 2018 1:06 am

Re: Simulate RF Remote Button Press

Wed Nov 21, 2018 2:32 am

Hi Gordon,

I've finished assembling the project and will take a picture of the actual once things finalize.
When I wired up the build based on your diagram, I could not drive the IC to work.

To drive the ILQ74 IC, I ended utilizing the following diagram:
Image

Questions that I have:
Situation A:
One thing I don't understand is that when I have the multimeter read the voltage without the IC plugged in, it was around 3.2V by measuring through the socket. When the IC is plugged in, the voltage is 1.3V when measured at the IC legs. The IC functions correctly when using this setup.

Situation B:
Without plugging in the IC, I dropped the voltage to 1.3V using a series of resistors, but when I plug in the IC, the voltage reads 0.8V and the IC does not activate.

Situation C:
I tried using the IC via external adjustable keysight power supply and was only able to activate the IC at 1.5~1.9V.
I have ordered multiple ILQ74 ICs and all of them function the same.

Currently there are no issues with this setup, but I would like to know if what I've done is unsafe/incorrect.

gordon77
Posts: 6121
Joined: Sun Aug 05, 2012 3:12 pm

Re: Simulate RF Remote Button Press

Wed Nov 21, 2018 9:53 am

If your schematic is correct as you have built then your wiring is wrong. The resistors go between the GPIO pins and the ic pins NOT to gnd, look at my drawing again.

You will be putting the GPIO 3.3v directly to the led in the ic, not good and may damage the pi.

gordon77
Posts: 6121
Joined: Sun Aug 05, 2012 3:12 pm

Re: Simulate RF Remote Button Press

Thu Nov 22, 2018 11:01 am

corrected
Attachments
TmSFFwL2.jpg
TmSFFwL2.jpg (56.48 KiB) Viewed 3092 times

wondar
Posts: 6
Joined: Wed Oct 31, 2018 1:06 am

Re: Simulate RF Remote Button Press

Thu Nov 22, 2018 3:32 pm

I cannot believe it, I just double checked and I bought 150k ohm resistors instead of 150 ohm. I will be heading out to buy this tomorrow and retesting. I think this may have been the problem with not being able to activate the IC.

wondar
Posts: 6
Joined: Wed Oct 31, 2018 1:06 am

Re: Simulate RF Remote Button Press

Fri Nov 23, 2018 11:51 am

Hi Gordon,

Thanks for your help. I was able to get this working with the right resistor. Your diagram is indeed correct.
I'll have to actually test the setup this weekend at my parents' house.
One thing I don't understand is the IC does not create a short? I measured with a multimeter and no short was detected, but the led on the remote flashes.

gordon77
Posts: 6121
Joined: Sun Aug 05, 2012 3:12 pm

Re: Simulate RF Remote Button Press

Fri Nov 23, 2018 12:28 pm

I don't think you will get a short, it's a transistor. I chose the resistor to give the lowest resistance reading l could get whilst not exceeding the maximum GPIO output of 16mA.

Return to “Automation, sensing and robotics”