Softpy
Posts: 25
Joined: Wed Sep 11, 2013 2:45 pm
Location: Chișinău, Republic of Moldova
Contact: Website

Python + 433MHz RF Transmitter and Receiver

Mon Jan 06, 2014 12:52 pm

Hello.
I buy these devices (433MHz RF receiver/transmitter), and i want to use them in my projects (to send and receive commands).
But, to do anything, i have to know how these modules works.
I work in Python, so i try many times to find any libraries to help me send and receive data via these radio modules, but i didn't find anything in Python. :(
I read articles about radio.
And i wrote one little demo code, how to send and receive data by these radio modules in Python.
Ofcourse, i know that this method to send and receive bytes is very slow, and very bad.
I wrote this subject, because i want together to find better method than this to send and receive data via these modules in Python.

Python code:
Show code

Image
Image

User avatar
scruss
Posts: 3811
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Python + 433MHz RF Transmitter and Receiver

Mon Jan 06, 2014 1:38 pm

Well, that's one way of doing it …

These units are really designed to use Manchester coding. I've been wondering how one might implement it in real time on the Raspberry Pi.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Softpy
Posts: 25
Joined: Wed Sep 11, 2013 2:45 pm
Location: Chișinău, Republic of Moldova
Contact: Website

Re: Python + 433MHz RF Transmitter and Receiver

Mon Jan 06, 2014 8:13 pm

My other code = faster than first version = x4 speed:
Show code [v2]
Result:
Image

Vipertiper
Posts: 3
Joined: Thu Aug 22, 2013 6:30 pm

Re: Python + 433MHz RF Transmitter and Receiver

Mon Jan 06, 2014 10:45 pm

Well first your going to have to have a second raspberry pi or some sort.

User avatar
joan
Posts: 15370
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Python + 433MHz RF Transmitter and Receiver

Mon Jan 06, 2014 11:32 pm

The pigpio Python module (http://abyz.co.uk/rpi/pigpio/python.html) should allow Manchester decoding on the Pi.

The pigpio C library (specificallly http://abyz.co.uk/rpi/pigpio/cif.html#gpioWaveClear) will allow a competent programmer to transmit Manchester codes.

N.B. The bundled Python module uses a Linux feature which does not work on Windows. This only affects callbacks. I have an updated version which I will roll out shortly.

Softpy
Posts: 25
Joined: Wed Sep 11, 2013 2:45 pm
Location: Chișinău, Republic of Moldova
Contact: Website

Re: Python + 433MHz RF Transmitter and Receiver

Thu Jan 09, 2014 8:25 am

My other code - much better:
Show code - v3

I try many other ways to send data (made by myself), but for this moment this is better way.
I'll do other scripts and post here, much better and faster.
If you have any other Python example or you can make this script better, please share script here.

balaaa88
Posts: 1
Joined: Thu Jan 23, 2014 4:39 pm

Re: Python + 433MHz RF Transmitter and Receiver

Thu Jan 23, 2014 4:42 pm

Thank You very much! It's really working! Is there any solution to get the 433 MHz input from other device? Like 433 MHz door sensors or like this? Thanks!

deetreesquirrel
Posts: 2
Joined: Thu Mar 13, 2014 7:07 am

Re: Python + 433MHz RF Transmitter and Receiver

Thu Mar 13, 2014 7:17 am

You would need some type of real time independently clocked FIFO buffer to send manchester coding with the proper timing....

deetreesquirrel
Posts: 2
Joined: Thu Mar 13, 2014 7:07 am

Re: Python + 433MHz RF Transmitter and Receiver

Thu Mar 13, 2014 7:30 am

scruss wrote: These units are really designed to use Manchester coding. I've been wondering how one might implement it in real time on the Raspberry Pi.
Simply send the data to the SPI UART in Mode 0 and XOR MOSI with SCLK.

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Python + 433MHz RF Transmitter and Receiver

Thu Mar 13, 2014 7:08 pm

These sort of issues are why people buy built RF modules with controllers on them that handle this sort of stuff. Time is more valuable (to me, anyway) than the $10-15 more I spend for a well-built module like a moteino, or even an xbee.
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

andrewstorti
Posts: 1
Joined: Mon Jun 09, 2014 5:12 am

Re: Python + 433MHz RF Transmitter and Receiver

Mon Jun 09, 2014 5:16 am

I would love if you describe how did you do that working, and how to plug the cables, and whats that board, because I have even less knowledge than you.... Thank you my friend.

Bianco
Posts: 55
Joined: Sun Jul 13, 2014 9:41 pm

Re: Python + 433MHz RF Transmitter and Receiver

Mon Sep 01, 2014 4:44 pm

Alternatively, you could try the job joan did.

faditalalfaraj
Posts: 1
Joined: Wed Sep 03, 2014 3:50 pm

Re: Python + 433MHz RF Transmitter and Receiver

Thu Sep 04, 2014 1:13 am

i bought this RF relay http://www.ebay.com/itm/Raspberry-PI-RF ... 1317650099 and i trying to send on and off command from a raspberry pi But how can i do that using the send command
for example " sudo send 11111 1 1 " First argument is the system code ‘11111’, second argument is the device A = 1 and last is the value for the state of the outlet 1 = "on" but how can i pairing between transmitter and receiver and how can i know my receiver ID

Any idea to control this RF relay :!: ??

andy7t
Posts: 3
Joined: Fri Dec 05, 2014 5:50 pm

Re: Python + 433MHz RF Transmitter and Receiver

Fri Dec 05, 2014 5:53 pm

Hi,

I'm trying to use your code to get my RF Tx/Rx working.
I believe from your picture you have the same pair of device as I do.

Could you possibly post your pin configuration? Are you using 3.3v or 5v? Perhaps i'm doing something silly with the pin numbers, but i can't seem to get your code to work.
It "runs" - i.e. it allows me to send messages, but I don't receive them back.
I'm using your v3 - the quick one.

Thanks

breno
Posts: 14
Joined: Fri Jan 16, 2015 6:31 pm
Location: Brazil (not my fault)

Re: Python + 433MHz RF Transmitter and Receiver

Mon Jan 19, 2015 8:32 pm

I was trying to install the quick2wire on my pi. All the links on their tutorial are broken. It seems it is not under development anymore. Is there any alternative solution for quick2wire library on the Softpy's code ?

User avatar
DougieLawson
Posts: 40791
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Python + 433MHz RF Transmitter and Receiver

Mon Jan 19, 2015 8:39 pm

You can get all the Quick2Wire code from https://github.com/quick2wire

The Q2W hardware is now owned and distributed by SK Pang (http://www.skpang.co.uk).
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

saadi
Posts: 1
Joined: Sun Mar 27, 2016 7:01 pm

Re: Python + 433MHz RF Transmitter and Receiver

Sun Mar 27, 2016 7:09 pm

Hi.
By using Raspberry pi 3, i want to do wireless video transmission with 2 nodes using RF.
for that i need some help, and guidance.

mail=saadhaseeb123@gmail.com

danicymru54
Posts: 11
Joined: Fri Jan 20, 2017 12:57 pm
Contact: Website

Re: Python + 433MHz RF Transmitter and Receiver

Thu Sep 28, 2017 12:27 pm

You don't really need to worry too much about Manchester Coding. It is only really a method of validating. You can just count it as one digit. If you see my blog atdanicymru.wordpress.com/2016/12/15/433m ... -doorbell/ you will see that this is done with the Nexa switches.

Return to “Automation, sensing and robotics”