User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

433Mhz receiver and Raspberry

Thu Apr 21, 2016 7:57 am

Good Morning,

I bought it on amazon these transmitters and receivers 433mhz http://www.amazon.it/Aukru-Wireless-Ric ... +raspberry

I tried to follow some tutorials to make sure to receive the signals transmitted from Arduino or from a remote control I had at home, but when I launch RFSniffer does not seem to get anything.

I connected the receiver to Raspberry PI 3 in this way:

VCC -> 3v3 (PIN 1)
GND -> GND (PIN 9)
DATA -> PIN 13 (WiringPI 2 - GPIO27) - I tried to connect alternately both the receiver pin

but I can not in any way to capture any transmission.

to see if the receiver was working i connected a LED between pin DATA and GND pins and noticed flashing continuously. When you approach the remote and I press the button (or the active Arduino), however, it seems to happen.

The tutorials that I have tried are: viewtopic.php?f=37&t=82906
http://www.princetronics.com/how-to-rea ... -receiver/
I also found around this python script that draws the signal and tossing it I noticed that the rest form a square wave almost regular handset while in the face of external signals such as remote control or the transmission of parts of Arduino is effective signal reception but I do not know why 433Utils / RFSniffer fails to capture.

The script to plot the data I used is this:

Code: Select all

#!/usr/bin/python
from datetime import datetime
import matplotlib.pyplot as pyplot
import RPi.GPIO as GPIO
                                                                                                                                                             
RECEIVED_SIGNAL = [[], []]  #[[time of reading], [signal reading]]
MAX_DURATION = 5                                                                                                                                             
RECEIVE_PIN = 13                                                                                                                                             
                                                                                                                                                             
if __name__ == '__main__':
    GPIO.setmode(GPIO.BCM)                                                                                                                                   
    GPIO.setup(RECEIVE_PIN, GPIO.IN)                                                                                                                         
    cumulative_time = 0                                                                                                                                      
    beginning_time = datetime.now()                                                                                                                          
    print '**Started recording**'
    while cumulative_time < MAX_DURATION:
        time_delta = datetime.now() - beginning_time                                                                                                         
        RECEIVED_SIGNAL[0].append(time_delta)                                                                                                                
        RECEIVED_SIGNAL[1].append(GPIO.input(RECEIVE_PIN))                                                                                                   
        cumulative_time = time_delta.seconds                                                                                                                 
    print '**Ended recording**'
    print len(RECEIVED_SIGNAL[0]), 'samples recorded'
    GPIO.cleanup()                                                                                                                                           
                                                                                                                                                             
    print '**Processing results**'
    for i in range(len(RECEIVED_SIGNAL[0])):
        RECEIVED_SIGNAL[0][i] = RECEIVED_SIGNAL[0][i].seconds + RECEIVED_SIGNAL[0][i].microseconds/1000000.0                                                 
                                                                                                                                                             
    print '**Plotting results**'
    pyplot.plot(RECEIVED_SIGNAL[0], RECEIVED_SIGNAL[1])                                                                                                      
    pyplot.axis([0, MAX_DURATION, -1, 2])                                                                                                                    
    pyplot.show()                                                                                                                                                                                                                                                                                                         
What's wrong?
Some even I know how I can receive data via java?

Thanks for the support
Pier
Nothing is as it seems...

User avatar
piglet
Posts: 915
Joined: Sat Aug 27, 2011 1:16 pm

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 8:56 am

I'd love to get to the bottom of this. I've a range of different transmitters and receivers and have never been able to get anything remotely sensible out of any of them on a pi or any mcu.

When using the receiver the gain just seemed to go up till it was constantly triggering.

User avatar
Ferdinand
Posts: 236
Joined: Sun Dec 01, 2013 2:24 pm
Location: Leiderdorp, NL

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 10:40 am

Hi GhostMaster75,

I'm missing a library wich controls serial input and serial output data streams.
Many scripts are based on wiringPi
git.drogon.net/wiringPi.

A short manual you will find on this site:
http://www.princetronics.com/how-to-rea ... -receiver/

Extra information:
I'm using hc-12 transceiver of seeedstudio
http://www.seeedstudio.com/wiki/images/ ... Manual.pdf
This transceiver is very easy connect to a raspberry pi or arduino.

Success with your project.
Success with your project!
Ferdinand

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

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 10:46 am


User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 11:07 am

Ferdinand wrote:Hi GhostMaster75,

I'm missing a library wich controls serial input and serial output data streams.
Many scripts are based on wiringPi
git.drogon.net/wiringPi.

A short manual you will find on this site:
http://www.princetronics.com/how-to-rea ... -receiver/

Extra information:
I'm using hc-12 transceiver of seeedstudio
http://www.seeedstudio.com/wiki/images/ ... Manual.pdf
This transceiver is very easy connect to a raspberry pi or arduino.

Success with your project.
thanks for your reply reply.
wiringPi was already installed (I also tried to re-install it) and the tutorials I had already seen and followed without success.

if I can not make this work (I bought a kit and 5xTX 5xRX) try with seedstudio you suggested
Thank you again
Nothing is as it seems...

User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 11:36 am

joan wrote:Try http://abyz.co.uk/rpi/pigpio/examples.html#pdif2__433D

To check you are actually receiving a signal try http://abyz.co.uk/rpi/pigpio/piscope.html
now they are in the office and I can not do tests (meanwhile via ssh, I installed pigpio)
I'll let you know as soon as possible
thanks for now
Nothing is as it seems...

User avatar
Ferdinand
Posts: 236
Joined: Sun Dec 01, 2013 2:24 pm
Location: Leiderdorp, NL

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 12:38 pm

Hi GhostMaster75,
wiringPi was already installed (I also tried to re-install it) and the tutorials I had already seen and followed without success
Perhaps I'm missing some info, but I don't see any reference in your code to wiringpi or other serial library.

You use in your code 'RECEIVE_PIN = 13', this is not header pin 13 but gpio13 which is header pin 33
(caused by GPIO.setmode(GPIO.BCM)).
So you have to connect header pin 33 to your receiver.
Dubble check this please.
Success with your project!
Ferdinand

User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 1:25 pm

Ferdinand wrote:Hi GhostMaster75,
wiringPi was already installed (I also tried to re-install it) and the tutorials I had already seen and followed without success
Perhaps I'm missing some info, but I don't see any reference in your code to wiringpi or other serial library.

You use in your code 'RECEIVE_PIN = 13', this is not header pin 13 but gpio13 which is header pin 33
(caused by GPIO.setmode(GPIO.BCM)).
So you have to connect header pin 33 to your receiver.
Dubble check this please.
Sorry Ferdinand,

I made a mistake in copying the program, pin is 27 (I had changed for testing to the pin 18 and when I've pasted badly corrected).
that program has not wiringpi why not use it. Serve only to take the states of the pin and draw a graph (later place the image so maybe it will be more clear).
I do not remember where I found that program (yesterday I did hundreds of research to try to solve the problem).


Like i said i tried 433Utils -> RPI_Utils - RFSniffer> but does not receive anything.

I hope I explained despite my bad english
Nothing is as it seems...

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 1:35 pm

just to say, those modules usually work at 5V, not 3,3V, and without antennas even at 5V the range is ridiculous (in my case, something like 5cm lol)
so _if they work powered at 3,3V_ try to take the emitter really close to the receiver.
Piscope is a wonderful tool to check if you receive something.
Remember that the autogain of the receiver will fill your GPIO with random signals untill it receives a real signal (and you'll see it on piscope)

safety PS: while the emitter can be connected safely to 5V (Vcc 5V, GND and signal at 3,3 v from a GPIO), if you connect the receiver to 5V power you MUST (i said MUST) take down the data line to an acceptable level, otherwise it will kill your pi
A voltage divider is ok for this.

User avatar
piglet
Posts: 915
Joined: Sat Aug 27, 2011 1:16 pm

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 1:45 pm

If the range is this small, how do car keys manage to reach across a car-park? They don't have much by way of antenna do they, and they're running from a single coin battery?

In the end I gave up with the 433Mhz things I'd bought. I had got several different models, tried with antennae cut to the lengths I saw in tutorials, tried receiving from things I knew to work (car keys, home weather station, energy monitor) and just couldn't get anything sensible from the receiver which could be distinguished from the background noise. I'd love to work out how to get them working reliably...they're still sitting in the small box of "things to see if I can get working some time".

If there's a tutorial anywhere which helps get these things working reliably, I couldn't find it. :(

User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 1:48 pm

Massi wrote:just to say, those modules usually work at 5V, not 3,3V, and without antennas even at 5V the range is ridiculous (in my case, something like 5cm lol)
so _if they work powered at 3,3V_ try to take the emitter really close to the receiver.
Piscope is a wonderful tool to check if you receive something.
Remember that the autogain of the receiver will fill your GPIO with random signals untill it receives a real signal (and you'll see it on piscope)

safety PS: while the emitter can be connected safely to 5V (Vcc 5V, GND and signal at 3,3 v from a GPIO), if you connect the receiver to 5V power you MUST (i said MUST) take down the data line to an acceptable level, otherwise it will kill your pi
A voltage divider is ok for this.
Thank you massi,
the test I made by placing transmitter and receiver at a distance of a few millimeters.

The first time I tried it I was connected to 5v, without lowering down the voltage because I did not know it could be dangerous to the raspberry, fortunately it still works.
Later I try to connect with 5v and with voltage divider, with a 1k ohm resistor and a 2k ohms (probably 2 x 1k ohms in series).
Nothing is as it seems...

User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 9:57 pm

no way... piscope show me a square wave and when i send a transmission with my remote control signal change but _433D or 433Utils - RFSniffer catch notthing...
:roll:
i have the same problem with on p3 and p2...

:?: :?: :?: :?: :?:
Nothing is as it seems...

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

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 10:09 pm

GhostMaster75 wrote:no way... piscope show me a square wave and when i send a transmission with my remote control signal change but _433D or 433Utils - RFSniffer catch notthing...
:roll:
i have the same problem with on p3 and p2...

:?: :?: :?: :?: :?:
Have a look at http://abyz.co.uk/videos/433MHz.webm for what you should see.

I wouldn't expect a square wave. Static should be random. A signal should have edges of varying lengths.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 10:15 pm

piglet wrote: If there's a tutorial anywhere which helps get these things working reliably, I couldn't find it. :(
I initially used this tutorial for the Pi, but moved it to Arduino using this tutorial for environmental reasons*. I control these using Node-Red and other radios for comms.

*It's in a greenhouse with high humidity and wide temperature ranges - also it works better at 5v.

User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

Re: 433Mhz receiver and Raspberry

Thu Apr 21, 2016 10:21 pm

joan wrote:
GhostMaster75 wrote:no way... piscope show me a square wave and when i send a transmission with my remote control signal change but _433D or 433Utils - RFSniffer catch notthing...
:roll:
i have the same problem with on p3 and p2...

:?: :?: :?: :?: :?:
Have a look at http://abyz.co.uk/videos/433MHz.webm for what you should see.

I wouldn't expect a square wave. Static should be random. A signal should have edges of varying lengths.
it's very similar what i see ... the only difference that all noise signals are up to full scale ...
Nothing is as it seems...

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

Re: 433Mhz receiver and Raspberry

Fri Apr 22, 2016 7:48 am

Try using the glitch filter to remove static.

Run up piscope and use the following command.

pigs fg 4 100

That will filter all edges shorter than 100 µs from GPIO 4 (adjust for the GPIO you are using).

Try increasing 100 until there is a manageable level of static.

Can you see messages when you transmit? If the glitch filter is too high the messages will be filtered away as well.

User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

Re: 433Mhz receiver and Raspberry

Fri Apr 22, 2016 8:08 am

joan wrote:Try using the glitch filter to remove static.

Run up piscope and use the following command.

pigs fg 4 100

That will filter all edges shorter than 100 µs from GPIO 4 (adjust for the GPIO you are using).

Try increasing 100 until there is a manageable level of static.

Can you see messages when you transmit? If the glitch filter is too high the messages will be filtered away as well.
Thank you Joan, later i'll try it (im in office now)...
but i have another question...
the purpose of my project is to create a control unit that controls the heating and that it is also an alarm system. For the part of the heating are affixed, I created a program in java (still under development to be honest) that handles very well. Now I am dedicated to the part relating to alarm management.
I wanted to buy the wireless PIR sensors that transmit at 433mhz and manage them via course Raspberry (the sensors will total 4 PIR and 3 window alarms).

Do you think it's something doable? I could (if only I could operate the receiver) to manage all wireless sensors with a single receiver?

the pir who would buy these are:http://www.amazon.it/SENSORI-MOVIMENTO- ... r+wireless
Nothing is as it seems...

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

Re: 433Mhz receiver and Raspberry

Fri Apr 22, 2016 8:11 am

It is certainly doable. Do you have an antenna on your transmitter and receiver? I use a 16 cm piece of wire.

Some radio modules are better than others (they tend to be more expensive as well, not that price is often a good guide to quality).

User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

Re: 433Mhz receiver and Raspberry

Fri Apr 22, 2016 8:23 am

joan wrote:It is certainly doable. Do you have an antenna on your transmitter and receiver? I use a 16 cm piece of wire.

Some radio modules are better than others (they tend to be more expensive as well, not that price is often a good guide to quality).
Thank you again Joan,
I bought these antennas:http://www.ebay.it/itm/291700355952?_tr ... .S1.R1.TR2

You use what module? it's good?
Nothing is as it seems...

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: 433Mhz receiver and Raspberry

Fri Apr 22, 2016 8:25 am

Ciao :)
for sure it's doable.
for sure you need a proper antenna for that chinese receiver
for sure you need to code properly (rfsniffer uses A LOT of cpu power if i remember correctly.. and for sure coding it by yourself would be much more fun :))

and

you need to know how the sensors speak :) probably you'll not find a datasheet (do you?) so you'll need also to sniff the signal (piscope is the way) and see if it's a OOK signal or ASK or other..

much fun on your way :)

User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

Re: 433Mhz receiver and Raspberry

Fri Apr 22, 2016 8:42 am

Massi wrote:Ciao :)
for sure it's doable.
for sure you need a proper antenna for that chinese receiver
for sure you need to code properly (rfsniffer uses A LOT of cpu power if i remember correctly.. and for sure coding it by yourself would be much more fun :))

and

you need to know how the sensors speak :) probably you'll not find a datasheet (do you?) so you'll need also to sniff the signal (piscope is the way) and see if it's a OOK signal or ASK or other..

much fun on your way :)
Ciao Massi,
se volessi una cosa facile prenderei un allrame già fatto :lol:
(if I wanted an easy thing, I would take an already built alarm :lol: ;) )

anyway i have two roads ... I connect the receiver directly to the raspberry or use an Arduino Mini, which I then transforms the data receiver in a serial signal to be transmitted to raspberry.

that sensor have 2262/1527 wireless encoding but i don't know what kind signal have (OOK..ASK....)
Nothing is as it seems...

User avatar
GhostMaster75
Posts: 13
Joined: Thu Apr 14, 2016 9:11 am
Location: Italy

Re: 433Mhz receiver and Raspberry

Fri Apr 22, 2016 7:17 pm

I GOT IT!!!!!!!!!! :D :D :D :D :D

RFSniffer and 433D got signal...

so ... i understand what's wrong ... and thanks at Massi because his last post turn on the linght in my mind.
when he talking about signal mode and signal encoding i started to lookin for what kind of signal wireless pir have.

after a lot of research, I realized that it is not enough to send a signal from the transmitter to the receiver but to be read properly must be encoded (a little as would the LX2262A-R4) so I connected the transmitter to Arduino and I simulated using library RCSwitch, sending an encrypted code.

i found this tutorial: http://www.instructables.com/id/Decodin ... /?ALLSTEPS

and ... without receiver and transmitter antennas must be in close proximity to communicate


THANK YOU TO EVERYONE!!!! AND SPECIAL THANK TO MASSI.. (TI DEVO UNA BIRRA)
Nothing is as it seems...

Return to “Beginners”