RF 433 MHZ (Raspberry Pi)

Поделиться
HTML-код
  • Опубликовано: 4 сен 2017
  • Basic tutorial of how to setup a generic 433 MHZ transmitter/reciever with the Raspberry Pi.
    Official Website: www.piddlerintheroot.com/rf-4...
    rpi-rf: pypi.python.org/pypi/rpi-rf
    Required Parts:
    RPI 3 - amzn.to/2VA9pQY
    4 Amp Power Adapter - amzn.to/2CTptWu
    16GB micro SD - amzn.to/2SFMwd3
    120 pcs jumper cable: ebay.to/2VAb9cY
    433 MHZ TX/RX kit: amzn.to/2M9saGC
    RF Outlet Set: amzn.to/2M91DJu
    Music:
    "Too Cool" Kevin MacLeod (incompetech.com)
    Licensed under Creative Commons: By Attribution 3.0 License
    creativecommons.org/licenses/b...
    Support the channel with Bitcoin!
    blockchain.info/address/17frF...
  • НаукаНаука

Комментарии • 96

  • @AcediaUA
    @AcediaUA 6 лет назад +1

    Good job man. A really helpful video, easy done in 15 minutes with your help, thought it will be more difficult.

  • @14theManuel
    @14theManuel 6 лет назад

    Great video, it was just what i needed to automate my lights, keep the good work!

  • @Tessi42
    @Tessi42 3 года назад

    Great video.
    :-)
    Thanks for that. Everything works great and is my introduction to 433 MHz transmission/reception.

  • @jojo2massol
    @jojo2massol 6 лет назад +1

    Thank you !
    Simple & Precise

  • @michaelhenderson5098
    @michaelhenderson5098 6 лет назад

    Dangit! I need to pay closer attention. My transmitter was labelled such that I thought vcc was opposite of the gnd and the data pin was in the middle. Wrong. After a fair amount of testing with no luck, I finally realized the vcc was the middle pin. Now it works as advertised. Thanks for the video.

  • @nitzkit
    @nitzkit 7 лет назад +1

    This is awesome! Time to automate some stuff 😎

  • @felipe.verasay
    @felipe.verasay 5 лет назад

    Nice work! its possible to get the signal code in hexadecimal in stead of decimal? Thank you!

  • @Hex-Mas
    @Hex-Mas 2 года назад

    Grate. This is the only video i got the rfsniffer to work. Issue is that im getting pulses when none are present. SDR confirms this.

  • @michaelbonnet590
    @michaelbonnet590 2 года назад

    Can you use a transceiver like this to give terminal/SSH commands to the RPi from afar?

  • @TarunMall
    @TarunMall 6 лет назад

    Can you make one video with nRF24L01 transceiver as well?

  • @joenoeb
    @joenoeb 6 лет назад +8

    Nice work thanks for taking the time to put this up. Quick comment on hooking up the receiver to the RPI, though: the receiver operates at 5V, and the RPI's GPIOs are not designed to take voltage levels over 3.3V. You're connecting the data pin directly onto the RPI's GPIO, which may damage the RPI.

    • @Gabaloc
      @Gabaloc 2 года назад

      Complete noob here. What should I do then?

    • @joenoeb
      @joenoeb 2 года назад

      ​@@Gabaloc​ you could put a level shifter in between. Warning: not for a noob, like you say you are: a make-shift workaround could be to use a voltage divider, but be careful to take the RPI and radio board's impedances into account.

    • @kaniobal2
      @kaniobal2 2 года назад

      A bit too late but still: Get a 3.3V receiver/transmitter set and use 3.3V pins instead. Works exactly the same otherwise.

  • @ziaaskari9824
    @ziaaskari9824 6 лет назад

    Hey nice work !
    Can I interface/communicate Raspberry Pi 3 and Arduino Uno over radio frequency using these RF link (433MHz ones) ?

  • @robertperkins4909
    @robertperkins4909 2 года назад +1

    Where can I get directions on downloading and setting up the receive and send files?

  • @barrythelad7793
    @barrythelad7793 2 года назад

    would it be possible to use the pi as a receiver, and send signals through a transmitter on a seperate pi?

  • @matthewlabombard1890
    @matthewlabombard1890 4 года назад +2

    Can you use a raspberry pi 4?

  • @marcello9476
    @marcello9476 2 года назад

    is there a way i can easily test if my receiver is broken? Ive got everything else set up, but the receive.py code never receives anything. I have the pi right below the device too. Ive checked that my setup is exactly the same as yours. The only difference is im using a raspberry pi 3B. Would that have any affect on the receiver?

  • @jeljlimohamedkhalil7292
    @jeljlimohamedkhalil7292 4 года назад

    does it work with raspbery pi zero w ?

  • @khellafsamy
    @khellafsamy 2 года назад

    good job

  • @bernd_-
    @bernd_- 9 месяцев назад

    Hi, I came across this topic and want to contral a 433mhz fan. But if I'm listening i receive way to much signals. How can I filter out the right ones?

  • @LeeNullus
    @LeeNullus 2 года назад

    What's that... header label on your pi? it looks pretty sweet

  • @JurgenDictus
    @JurgenDictus 3 года назад

    Hi, how many meters will it bridge?

  • @jeljlimohamedkhalil7292
    @jeljlimohamedkhalil7292 5 лет назад +1

    Hello
    Could i do the same thing with a raspbery pi zero w , or only with the RP3 version

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  5 лет назад

      Hey Jeljli, this should work on the RPI zero w as well.

  • @belageletneky
    @belageletneky 6 лет назад

    Hi! First off: thank you for sharing this, it is really helpful! Secondly, since I am fairly new to raspberry pi prgramming do I need to install a software like Raspbian on the pi beforehand, or will it be fine if I just hook it up to my network using a LAN cable?

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  6 лет назад

      Yeah I'm using Raspbian. Once you get the OS installed you can hook it up to your network via WIFI or a LAN cable, either should work fine.

    • @belageletneky
      @belageletneky 6 лет назад

      PiddlerInTheRoot Thank you so much!

    • @belageletneky
      @belageletneky 6 лет назад

      Hi once again, I have set all this up now and my Raspberry Pi is up and running, but when I run receive.py it gives me a random power of two everytime I press the exact same button, do you have any suggestion what to do?

  • @remyegberts5006
    @remyegberts5006 5 лет назад

    what did you do with the recieve enad send scripts??were did you import them to? i got hassbian os with home assistant

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  5 лет назад

      If you are running home assistant, you need to make sure that your yaml is configured correctly. www.home-assistant.io/components/rpi_rf/

  • @rcxrbt
    @rcxrbt 4 года назад

    nice work! but what's the blue board on top Raspberry?

    • @phildejones
      @phildejones 4 года назад

      It's an overlay listing the pinout of the GPIO

  • @classicryda120908
    @classicryda120908 5 лет назад +1

    hi, i am using the same hardware but i cant send a 433 mhz signal from far distance, it is really strange that my receiver can only receive command when the transmitter is located REALLY close to it, like 2-5cm apart, i mean.. whats the point of having RF receiver if the achievable distance is this tiny?
    I also tried to add an antenna for both the tx and rx but still no luck

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  5 лет назад

      It should be good for about 100 ft. I think you may have a defective unit.

  • @jdaniele
    @jdaniele 3 года назад

    Hi, thanks for sharing.
    The output data pin from the receiver i think will produce a 5V signal. RPi accepts 3.3v input signals.
    Am i wrong if i say you should connect them through a level shifter 3.3V 5V or at least a voltage divider?
    RPi could be damaged otherwise....

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  3 года назад +1

      Hey Daniele, I think you're technically correct. However, I have seen multiple tutorials without a level shifter and I've been running a rf 433 mhz module on my home-assistant rpi for 2+ years without issue.
      (I plan on doing an update for this video sometime in the future, so I will definitely investigate your concern)

  • @janosbogos2010
    @janosbogos2010 Год назад

    How could it be working with 433MHz Rolling Code?

  • @djvincon
    @djvincon 6 лет назад

    When i run the receive script, i do get signal. The thing is it is not 1 row, it is like 5 different rows... What could that be?

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  6 лет назад +2

      When the script is running it's constantly reading. If you press the on/off button for more than a split second sometimes you get multiple results, and they may vary a little bit. My rule of thumb is to select the result that seems to repeat the most for a specific button press.

  • @rv90splittergaming6
    @rv90splittergaming6 6 лет назад

    If I would want to build a rc project, should I use these components??

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  6 лет назад

      I think it would be possible, I don't know how reliable it would be though. Alternatively, if your using the RPI you could use WiFi to control your RC device. I have several robots on my website I control via the keyboard using this design pattern: ruclips.net/video/LlFkybEQFFA/видео.html

  • @justuslanguell
    @justuslanguell 5 лет назад

    can you make two rpis talk to each other?

  • @PavanKumar-vu2mm
    @PavanKumar-vu2mm 6 лет назад

    when you run the python program you are only getting output whenever you're pressing the rf buttons but for me i get random number like crazy and not able to differentiate the noise from data. what do i do? Please help!!

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  6 лет назад

      Hey Pavan, it sounds like a hardware issue. Do you have another 433MHZ RF device to test against? I've received a bad transmitter/receiver pair in the past, you might need to get a new set. In the meantime the troubleshooting steps I would take would be... run sudo apt-get update, check your wiring, and test a different RF device. (if available)

    • @kaniobal2
      @kaniobal2 2 года назад

      I am experiencing the same, but when I transmit, I see that too -- only I see it 4 times. So not sure what's going on.

  • @rfjgfude
    @rfjgfude 2 года назад

    Great video! I was dreading having to hook up a logic analyzer or scope to decode the signal. Thank you! Can you show us how you imported the scripts. Going to the Github and using those scripts returns an error
    ModuleNotFoundError: No module named 'rpi_rf''

  • @hutchy9114
    @hutchy9114 5 лет назад

    Hi. Thanks for a great video! When I'm trying to send i am getting the error tx_code () takes from 2 to 4 positional arguments but 5 were given.

    • @-Rasmus-
      @-Rasmus- 5 лет назад

      Hi, I get the same error trying to send the code. Did you get any answer to your problem?
      //Rasmus

    • @realcubemonster
      @realcubemonster 5 лет назад

      Looks like you gave the script too many arguments

  • @gnakfaskdm
    @gnakfaskdm 6 лет назад

    Thanks. So far the simplest instruction for the simple 433 transmission. However, in my case, after installing the rpi-rf, send.py and recieve.py does not appear. Ls command shows nothing. I get the error "No such file or directory" where are the scripts gone?

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  6 лет назад

      You just installed the dependencies. The scripts can be found on my site (link in description) or the rpi-rf website

    •  5 лет назад

      website in description giving the code ....

    •  5 лет назад

      recieve.py :
      #!/usr/bin/env python3
      import argparse
      import signal
      import sys
      import time
      import logging
      from rpi_rf import RFDevice
      rfdevice = None
      # pylint: disable=unused-argument
      def exithandler(signal, frame):
      rfdevice.cleanup()
      sys.exit(0)
      logging.basicConfig(level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S',
      format='%(asctime)-15s - [%(levelname)s] %(module)s: %(message)s', )
      parser = argparse.ArgumentParser(description='Receives a decimal code via a 433/315MHz GPIO device')
      parser.add_argument('-g', dest='gpio', type=int, default=27,
      help="GPIO pin (Default: 27)")
      args = parser.parse_args()
      signal.signal(signal.SIGINT, exithandler)
      rfdevice = RFDevice(args.gpio)
      rfdevice.enable_rx()
      timestamp = None
      logging.info("Listening for codes on GPIO " + str(args.gpio))
      while True:
      if rfdevice.rx_code_timestamp != timestamp:
      timestamp = rfdevice.rx_code_timestamp
      logging.info(str(rfdevice.rx_code) +
      " [pulselength " + str(rfdevice.rx_pulselength) +
      ", protocol " + str(rfdevice.rx_proto) + "]")
      time.sleep(0.01)
      rfdevice.cleanup()

    •  5 лет назад

      send.py :
      #!/usr/bin/env python3
      import argparse
      import logging
      from rpi_rf import RFDevice
      logging.basicConfig(level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S',
      format='%(asctime)-15s - [%(levelname)s] %(module)s: %(message)s',)
      parser = argparse.ArgumentParser(description='Sends a decimal code via a 433/315MHz GPIO device')
      parser.add_argument('code', metavar='CODE', type=int,
      help="Decimal code to send")
      parser.add_argument('-g', dest='gpio', type=int, default=17,
      help="GPIO pin (Default: 17)")
      parser.add_argument('-p', dest='pulselength', type=int, default=None,
      help="Pulselength (Default: 350)")
      parser.add_argument('-t', dest='protocol', type=int, default=None,
      help="Protocol (Default: 1)")
      args = parser.parse_args()
      rfdevice = RFDevice(args.gpio)
      rfdevice.enable_tx()
      if args.protocol:
      protocol = args.protocol
      else:
      protocol = "default"
      if args.pulselength:
      pulselength = args.pulselength
      else:
      pulselength = "default"
      logging.info(str(args.code) +
      " [protocol: " + str(protocol) +
      ", pulselength: " + str(pulselength) + "]")
      rfdevice.tx_code(args.code, args.protocol, args.pulselength)
      rfdevice.cleanup()

    • @Nemares
      @Nemares 3 года назад +2

      @@PiddlerInTheRoot You skipped the part where you said you were going to show us how to make the scripts available, and went straight to "I already have it though, so I am gonna skip to the next step"

  • @muskel7587
    @muskel7587 5 лет назад

    Can I use pi 0 model with WiFi etc. ?

  • @aaaafaaaaf
    @aaaafaaaaf 6 лет назад

    Very nice work, Im get this working, I have installed a new image of rasbien and did the python3 install of pip3 - when I try to run the receive python script I get an error " No Module named rpi_rf" Did I miss something is there another package that I need to add?
    Thank you in advance....

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  6 лет назад

      Run these commands. "apt-get install python3-pip", "pip3 install rpi-rf"

    • @aaaafaaaaf
      @aaaafaaaaf 6 лет назад

      I did that a few times, but I did it again and I get the same issue. What version of the OS are you using on your RPI-3

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  6 лет назад

      Hmm that's odd. Try running "sudo apt-get update" and see if that helps.

    • @3ddd47
      @3ddd47 3 года назад

      ​@@PiddlerInTheRoot
      I have the same Traceback problem (last call last):
      The "rf.py" file, line 9, in
      z rpi_rf import RFDevice
      ImportError: No module named rpi_rf

  • @Trizo
    @Trizo 3 года назад

    receive.py never shows up

  •  5 лет назад

    have you tried to get it to work with Hass.io? whold love to see a vid about that. tanx

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  5 лет назад

      Bruh automation covers it in detail, I think there is a link buried deep the comments of this video.

  • @vanhetgoor
    @vanhetgoor 4 года назад +7

    Try to improve the small print, it is unreadable, even if a part of the screen is enlarged!

  • @mariaeduardacamargo9717
    @mariaeduardacamargo9717 2 года назад

    Is it work at raspberry pi 4 ?

  • @mateuszdziezok8631
    @mateuszdziezok8631 4 года назад

    my recieve.py every 5 sec or so reads some noise but never the right codes.
    I tried adding resistors or capacitors and resistors, nothing seems to work.
    PLS HELP
    that's how it looks:
    2020-04-30 18:55:40 - [INFO] recieve: 4 [pulselength 1064, protocol 2]
    2020-04-30 18:55:52 - [INFO] recieve: 128 [pulselength 218, protocol 1]
    2020-04-30 18:55:58 - [INFO] recieve: 64 [pulselength 781, protocol 1]

    • @UrZNL
      @UrZNL 4 года назад +1

      Same I get random codes, but when I press a 433 button near it. Nothing... did you solve it?

    • @mateuszdziezok8631
      @mateuszdziezok8631 4 года назад

      @@UrZNL not yet :( sorry

  • @ameenpt7458
    @ameenpt7458 6 лет назад

    that is awesome but I can't find the file of RPI_rf i got it but i can't get get send and recive file in it

    • @ameenpt7458
      @ameenpt7458 6 лет назад

      what wil i do

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  6 лет назад

      You cant find the files?? It's here, github.com/milaq/rpi-rf/tree/master/scripts and it's also posted on my website. Just upload them to your raspberry pi and run them like in the video.

    • @djvincon
      @djvincon 6 лет назад

      Hi, i dont know how to upload them to the raspberry... Could you explain?
      EDIT: GOt it

    • @wout8340
      @wout8340 6 лет назад

      could you explain it to me please?

  • @pterodactylx3100
    @pterodactylx3100 4 года назад

    sorry could not read the screen display

  • @brillesvin1505
    @brillesvin1505 7 лет назад

    I have tried quite a few guides to different RF setups online - all of wicth did not work! THIS ONE WORKED IN FIRST GO! thanks a lot for putting this out there. I think this guide is so much better and simpler that what I otherwise have been able to find.
    I have a small question if you or anybody else can point me in the right direction whare i can find more info:
    I would like to setup a pi so that i can tricker a 'send.py' script via a RF remote - so different RF signals could tricker a number of different codes to be sent, for eksample to make an 'all off' switch in different locations around the house.
    I have 25+ RF switches around the house and most of them can only 'learn' up to 3 different codes so i cannot just code all the RF sockets to different remotes.
    so if anybody have an idea og a link i would apriciate it a lot.
    once again, super guide.
    br
    P

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  7 лет назад

      Peter take a look at home-assistant.io/. Check out BRUH automation's channel (ruclips.net/video/5UUazFbK-Hg/видео.html), he has a very good tutorial on how to integrate this for home automation, and home assistant provides you a user friendly user interface and also supports many other home automation platforms as well.

    • @brillesvin1505
      @brillesvin1505 6 лет назад

      ill check it out - thanks again for this nice and simple to understand info
      /

    • @PeterHellmich
      @PeterHellmich 6 лет назад

      I'm looking for the same thing. Solution should be something like sending a signal with the remote, receiving this signal with the raspberry, triggering a script, sending a signal to the sockets.
      I want to try this via node red. But I'm not sure how to process the received signal there.

    • @brillesvin1505
      @brillesvin1505 6 лет назад +1

      hi peter,
      I am having quite a success with with the platform (rpi+hassio+home assistant), but i have yet to crack receiving a RF signal and using it as a trigger. I have connected a RF receiver + transmitter and i can send RF signals without problems - but i don't know how to receive ditto. So if you find a way I am listening.

  • @dannygeilen9656
    @dannygeilen9656 3 года назад

    enjoy frying the pi

  • @Louis2282
    @Louis2282 4 года назад

    once you moved to your computer the terminal window was completely unreadable

  • @K4ninchen
    @K4ninchen 6 лет назад +1

    Why you didn't show some shematics instead talking of "vcc red cable" and one minute later I plug in the red cable in ... I have to write down what colors you used for which pin.. kinda sucks.. 10min video for a work of 2 minutes.

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  6 лет назад

      Schematic is posted on my website, listed in the description

  • @kgirivarma4856
    @kgirivarma4856 5 лет назад +3

    you didnt explained clearly and completely.

  • @supersonic118boi8
    @supersonic118boi8 5 лет назад

    433 mhz is illegal in America

    • @PiddlerInTheRoot
      @PiddlerInTheRoot  5 лет назад

      electronics.stackexchange.com/questions/293639/north-american-regulations-on-433mhz-radio - "FCC Part 15.231"

  • @markusfenske5078
    @markusfenske5078 4 года назад

    Dude, lay off the weed.