Oliver();
Posts: 2
Joined: Wed Jan 14, 2015 4:15 pm
Location: Sweden

Control RF remote with GPIOs, help

Wed Jan 14, 2015 5:24 pm

Hi!
I'm a raspberry rookie and trying to make my first project. I want to create a way to control RF outlets over the network by activateing GPIOs that trigger buttons on the RF remote. I have successfully been able to create a server on my raspberry that allows me to controll the GPIOs through the webbrowser.
This was one of the tutorials I found and followed http://www.instructables.com/id/Raspber ... /?ALLSTEPS

Now, my problem is that my remote seems to be abit more complex than the one in the tutorial and I'm not sure how I should wire it to the GPIOs. All the ON buttons (to the left) are connected to the (-) pole on the battery while the right side are individually connected to the microchip. The OFF buttons are connected to the microchip on both sides.

Image
Image


Is there an easy way to connect them? I have seen people bying seperate RF transmitters that they connect to a Arduino and then to a raspbarry some how (again, I'm a rookie). Would that be a better solution or is does it require more advanced programming knowledge?

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Control RF remote with GPIOs, help

Fri Jan 16, 2015 12:39 am

I did this with my garage door remote, and am planning on doing an outlet controller like this soon... here's the trick.
Buttons are the simplest logic ever. All you have to do is bridge the connections. Relays do exactly this.
A relay is an electromagnet that closes a switch, much like a light switch. All you have to do is connect each relay from a relay board to a GPIO on one end and a button on the other.
If you search YouTube for "Raspberry pi relay board" you'll find an EXCELLENT tutorial on how relays and relay boards work, I believe by TheRaspberryPiGuy.

Good luck, and let me know if you run into any problems. Like I said, I've done this.

Note: You may be able to use a transistor instead of a relay, but that will require connecting your grounds together. For something low-voltage like a remote, that's probably not so bad, but you do run some risk so I preferred relays for my project.

Note 2: Solid state relays only work for AC. They last many times longer and are more expensive, but I'll tell you now that they won't work at all for this project.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Control RF remote with GPIOs, help

Fri Jan 16, 2015 1:41 am

Tarcas wrote:Note 2: Solid state relays only work for AC. They last many times longer and are more expensive, but I'll tell you now that they won't work at all for this project.
AC solid state relays only work for AC.

DC solid state relays only work for DC.

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Control RF remote with GPIOs, help

Fri Jan 16, 2015 1:50 am

ame wrote:
Tarcas wrote:Note 2: Solid state relays only work for AC. They last many times longer and are more expensive, but I'll tell you now that they won't work at all for this project.
AC solid state relays only work for AC.

DC solid state relays only work for DC.
Ah, okay. I guess I've only run into AC ones (or only been really paying attention when I have.) I just remember the zero-cross being a gotcha for others, so I thought I'd mention that as a potential gotcha.

BMS Doug
Posts: 3823
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Control RF remote with GPIOs, help

Fri Jan 16, 2015 9:54 am

Tarcas wrote:I did this with my garage door remote, and am planning on doing an outlet controller like this soon... here's the trick.
Buttons are the simplest logic ever. All you have to do is bridge the connections. Relays do exactly this.
A relay is an electromagnet that closes a switch, much like a light switch. All you have to do is connect each relay from a relay board to a GPIO on one end and a button on the other.
If you search YouTube for "Raspberry pi relay board" you'll find an EXCELLENT tutorial on how relays and relay boards work, I believe by TheRaspberryPiGuy.

Good luck, and let me know if you run into any problems. Like I said, I've done this.

Note: You may be able to use a transistor instead of a relay, but that will require connecting your grounds together. For something low-voltage like a remote, that's probably not so bad, but you do run some risk so I preferred relays for my project.

Note 2: Solid state relays only work for AC. They last many times longer and are more expensive, but I'll tell you now that they won't work at all for this project.

This video about connecting up a relay board seems good. there should be no issue with powering an 8 channel board from a B+.

I couldn't find raspberryPiGuy's video but I know of one video he made that was very bad (high risk of damage to Pi if followed) so I would advise not following his examples unless you thoroughly understand them.
Doug.
Building Management Systems Engineer.

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Control RF remote with GPIOs, help

Sun Jan 18, 2015 11:21 pm

Here's the video I was talking about:
https://www.youtube.com/watch?v=b6ZagKRnRdM

The problem video in question is the one on the H-bridge control board. If you watch his video on that, check the comments (mine included) for that video and plenty of people will tell you the mistake and what NOT to do before you follow his instructions. That mistake notwithstanding, his video on the relay board is excellent.

Oliver();
Posts: 2
Joined: Wed Jan 14, 2015 4:15 pm
Location: Sweden

Re: Control RF remote with GPIOs, help

Mon Jan 19, 2015 4:41 pm

Thank you guys for all the replys!
I did this with my garage door remote, and am planning on doing an outlet controller like this soon... here's the trick.
Buttons are the simplest logic ever. All you have to do is bridge the connections. Relays do exactly this.
A relay is an electromagnet that closes a switch, much like a light switch. All you have to do is connect each relay from a relay board to a GPIO on one end and a button on the other.
I figured that I would have to do some workaround and that i would not be able to connect the GPIOs directly to the remote. :?
This video about connecting up a relay board seems good. there should be no issue with powering an 8 channel board from a B+.
I don't know why i never thought of searching more on youtube for tutorials! Anyway I orderd on ebay the same relay board as he is using + some extra stuff that can be usefull, sensors, cables etc.
Shipping is around 3 weeks but later I'm going to post some kind of result just in case someone ends up on this thread in the future.

Thanks again!

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Control RF remote with GPIOs, help

Tue Jan 20, 2015 4:27 am

Oliver(); wrote:Thank you guys for all the replys!
Anyway I orderd on ebay the same relay board as he is using + some extra stuff that can be usefull, sensors, cables etc.
Shipping is around 3 weeks but later I'm going to post some kind of result just in case someone ends up on this thread in the future.

Thanks again!
Great plan!
While you're at it, I recommend something like this:
http://www.ebay.com/itm/400-Pcs-1-4W-1- ... 5402c60b9e
It's an assortment of resistors; 30 values, ~30 of each (total 400 pcs? Yeah, the math doesn't add up.) Anyway, I got an assortment and I'm finding that, as expected, I'm using more of some than of others, but it's nice to have the variety. By the time I run out of any, I'll have plenty of time to order a larger package of the ones that I find I will need more of. I ordered some extra 1k-ohm resistors already, but haven't touched them yet.
Note that these 1/4w resistors have fairly flimsy leads. They work in my breadboards, but you have to be a little careful with them.
Also consider some kind of compartmental carrying case for these and your other wires, sensors, LEDs, transistors, etc. Sure you can keep them wrapped in a rubber band or just toss them in a box or something, but an organized case makes it so much easier to find what you need quickly and easily. If you find the right one, you won't regret it.
...and if you didn't order any breadboards, get at least one of those also. Super-cheap, and incredibly useful for prototyping circuits. You don't need one if you're only using relay boards, but when you move on to experimenting with sensors and LEDs, it's virtually indispensable.

BMS Doug
Posts: 3823
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Control RF remote with GPIOs, help

Tue Jan 20, 2015 6:50 am

I currently have 1 big and 1 multidrawer small compartmentalised box for components, my resistors are still all in one compartment together. Maybe one day I'll be able to split them out into a compartment each....
Doug.
Building Management Systems Engineer.

Return to “Automation, sensing and robotics”