unnamed7
Posts: 42
Joined: Mon Jun 18, 2012 8:44 pm

RF question

Wed Jul 25, 2012 5:51 pm

Hi, i bought some cheap RF module receiver with 2 relays and 2 pilots with transmiters, after disassembling one of them i got this:

Image

how would you connect it to raspi gpio pin ?
button in white rectangle send data to receiver. can i somehow remove it and solder there some wire from gpio pin ?

what would be the best aproach to make it work from raspi ?

thanks for help

User avatar
jbeale
Posts: 3572
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: RF question

Wed Jul 25, 2012 6:40 pm

I'd worry about what voltages that device uses, seeing it has a 12V battery. Remember the GPIO pins are 3.3V max (not 5V tolerant, let alone 12 V). But an external transistor could probably do the job, if the switch is a simple pull-to-ground or pull-to-positive rail configuration. If the switch is connected in some other way (neither side at ground or Vcc) then the interface circuit becomes more tricky.

The first step is to use a voltmeter to see what voltage is present on both sides of that switch, when pressed and not pressed, relative to the negative terminal of the battery.

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

Re: RF question

Fri Jul 27, 2012 4:55 pm

Funny, is the battery in this RF transmitter really 12V? Seems excessive for a 433MHz transmitter (what I expect this to be). my exception is that this is actually a 1.2 Volt penlight battery.
Anyway, this is clearly the transmitter, not the receiver, which simply has two relays, that is simply a switch output, you can connect like any switch to a GPIO input, (using a 10K pullup to 3V3, and s 1K series resistor to protect the GPIO when accidentally programming it as output, and the relay contact shorts the GPIO to gnd.

unnamed7
Posts: 42
Joined: Mon Jun 18, 2012 8:44 pm

Re: RF question

Sat Jul 28, 2012 11:09 am

hi, i checked the voltage on button +/- and there is about 10V, when i push it, voltage goes to 0.
i have removed the button and solder two wires in his place, when i short them i can switch relay in receiver, just like i would do it with pushing the button.

so now my question is, how can i 'close circuit' with raspi pin ?

and for the battery, i have removed it, and used 3v3 power supply, and it works fine. so i guess that i can now work with raspi pin safely ?

khh
Posts: 49
Joined: Thu Jul 26, 2012 12:16 am

Re: RF question

Sat Jul 28, 2012 12:09 pm

unnamed7 wrote:so now my question is, how can i 'close circuit' with raspi pin ?
Connect the two wires to drain and source on a MOSFET transistor, and connect the GPIO pin to gate and the GPIO ground to the drain. If it's an n-type MOSFET it'll not conduct when GPIO is high, but will conduct when GPIO is low.

edit: This _should_ be safe even with a 12 V battery, but you might want someone to confirm that before going ahead.

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

Re: RF question

Sat Jul 28, 2012 1:48 pm

ah, I thought you wanted to remote control the raspi, not remote control something else with the raspi.

The previous poster is right, what he describes would work, but possibly only if you put the battery back, and not connect any other wires to from the PI than the wires going to the gate and drain of the FET.
That is unless the switch you want to "push" is actually connected to ground (of the transmitter) at one end, which is quite probable actually, but cannot be inferred from the picture.

Another solution would be to use an opto coupler, (LED + photo transistor) but that would also require a series resistor for the LED.
Also if you want to connect up more than one button, (unless both buttons are connected to a common gnd on the transmitter) the opto -couplers would work, and two fets would not.

unnamed7
Posts: 42
Joined: Mon Jun 18, 2012 8:44 pm

Re: RF question

Wed Aug 01, 2012 12:44 pm

hi again, i was today in my local electronic shop and tried to buy some transistor, but guy working there asked me to many question i couldn't answer :)

so my question is, what kind of transistor should i buy ? what should be it technical specification ?


unnamed7
Posts: 42
Joined: Mon Jun 18, 2012 8:44 pm

Re: RF question

Wed Aug 01, 2012 3:58 pm

thank you very much :)

User avatar
jackokring
Posts: 816
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: RF question

Wed Aug 01, 2012 5:52 pm

Other options for RF control include the eZ430-Chronos kit. It includes an RX/TX USB stick, which will work with Pi as a USB serial interface, and other stuff on the right band. It will maybe allow the Pi to RX the time too, or sync the Chronos to the net.

A full open source gcc-msp430 compiler is available. I wonder if this compiler is in Raspbian yet? Some of the demo software needs Tcl/Tk, but python also works (so I'm told).
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

unnamed7
Posts: 42
Joined: Mon Jun 18, 2012 8:44 pm

Re: RF question

Sun Aug 05, 2012 7:03 pm

thanks for help guys, finally got some time today to connect everything together and it's working pretty good :)
if anyone's interested here's a movie:
http://youtu.be/EUlX8horb_Q

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: RF question

Mon Aug 06, 2012 2:28 pm

Cool, so did you use the 12v battery or 3v ?
And if 3v what distance does it work from.
Also any chance of a digram or did you use this method
Connect the two wires to drain and source on a MOSFET transistor, and connect the GPIO pin to gate and the GPIO ground to the drain. If it's an n-type MOSFET it'll not conduct when GPIO is high, but will conduct when GPIO is low.
Thanks.
Batteries not included, Some assembly required.

unnamed7
Posts: 42
Joined: Mon Jun 18, 2012 8:44 pm

Re: RF question

Mon Aug 06, 2012 3:32 pm

i have tested it from battery, distance is great, it covers my whole house (170 square meters, 3 floors), i thought it would only work on one floor but it works great even through ceiling :)

i'am going to try 3v3 later :)

now i'am going to try to disasemble that little board and resolder it to my needs, coz now its a bit ugly :)

Smeg0rz
Posts: 7
Joined: Mon Aug 06, 2012 2:29 pm

Re: RF question

Wed Aug 08, 2012 9:28 am

Could you reply with your diagram of how this was done, as I'm interested in also switching these types of switches using the GPIO, the video its hard to see.,

unnamed7
Posts: 42
Joined: Mon Jun 18, 2012 8:44 pm

Re: RF question

Sat Aug 11, 2012 5:33 pm

finally got some time to replay :)

here's how i connected everything, rest you can see on video, hope that helps.
and can someone with better knowledge check this ? it's working but i'am not an expert so i don't know if u can somehow destroy pi gpio with this ? mine works fine for know so i suppose it's safe :)

Image

hugo1111
Posts: 1
Joined: Mon Feb 08, 2016 12:22 pm

Re: RF question

Mon Feb 08, 2016 12:27 pm

Hi,
could you please post a wiring diagram, I have a similar remote and want to achieve the same thing but as I am a complete newbie, i don't have a clue how to do it.
Cheers

Hugo

Return to “Automation, sensing and robotics”