Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. What radio to use? NRF24L01+, RFM69, RFM73 ?

What radio to use? NRF24L01+, RFM69, RFM73 ?

Scheduled Pinned Locked Moved Hardware
52 Posts 11 Posters 49.2k Views 9 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • NeverDieN Offline
    NeverDieN Offline
    NeverDie
    Hero Member
    wrote on last edited by
    #40

    I would wonder whether running some signals through the level shifter and some not might cause the signals to arrive out of phase? Anyway, something to consider if you can't get it to work.

    1 Reply Last reply
    0
    • Cliff KarlssonC Offline
      Cliff KarlssonC Offline
      Cliff Karlsson
      wrote on last edited by
      #41

      Ok, this is my temp sensor sketch. Does it also look Ok?

      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * DESCRIPTION
       *
       * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller
       * http://www.mysensors.org/build/temp
       */
      
      #include <MySensor.h>  
      #include <SPI.h>
      #include <DallasTemperature.h>
      #include <OneWire.h>
      #include <MyTransportRFM69.h>
      #define COMPARE_TEMP 1 // Send temperature only if changed? 1 = Yes 0 = No
      
      #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected 
      #define MAX_ATTACHED_DS18B20 16
      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
      OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
      DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. 
      MyTransportRFM69 transport; 
      MySensor gw(transport);
      float lastTemperature[MAX_ATTACHED_DS18B20];
      int numSensors=0;
      boolean receivedConfig = false;
      boolean metric = true; 
      // Initialize temperature message
      MyMessage msg(0,V_TEMP);
      void setup()  
      { 
        // Startup up the OneWire library
        sensors.begin();
        // requestTemperatures() will not block current thread
        sensors.setWaitForConversion(false);
      
        // Startup and initialize MySensors library. Set callback for incoming messages. 
        gw.begin();
      
        // Send the sketch version information to the gateway and Controller
        gw.sendSketchInfo("Temperature Sensor", "1.1");
      
        // Fetch the number of attached temperature sensors  
        numSensors = sensors.getDeviceCount();
      
        // Present all sensors to controller
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {   
           gw.present(i, S_TEMP);
        }
      }
      
      
      void loop()     
      {     
        // Process incoming messages (like config from server)
        gw.process(); 
      
        // Fetch temperatures from Dallas sensors
        sensors.requestTemperatures();
      
        // query conversion time and sleep until conversion completed
        int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
        // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
        gw.sleep(conversionTime);
      
        // Read temperatures and send them to controller 
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
       
          // Fetch and round temperature to one decimal
          float temperature = static_cast<float>(static_cast<int>((gw.getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
       
          // Only send data if temperature has changed and no error
          #if COMPARE_TEMP == 1
          if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) {
          #else
          if (temperature != -127.00 && temperature != 85.00) {
          #endif
       
            // Send in the new temperature
            gw.send(msg.setSensor(i).set(temperature,1));
            // Save new temperatures for next compare
            lastTemperature[i]=temperature;
          }
        }
        gw.sleep(SLEEP_TIME);
      }```
      1 Reply Last reply
      0
      • TD22057T Offline
        TD22057T Offline
        TD22057
        Hardware Contributor
        wrote on last edited by
        #42

        Well I'm having problems too... :anguished: I'm running basically the same serial gateway code you are and, like you, it starts up fine. For my sensor, I'm using the MockSensor sketch modified to send a counter. That starts up fine as well but can't communicate with the gateway. I tried level shifting IRQ and not level shifting IRQ - no change. Basically the gateway never gets the transmitted message. I'm using a small helical antenna that came w/ the radio on the sensor and a home made dipole on the gateway. I'm going to try and replace my home made antenna with a helical model on the gateway and see what happens.

        Here's what I see on the sensor:

        find parent
        send: 254-254-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
        

        I'm using this level shifter. If my antenna mod doesn't work (I'm not expecting it to), I'll try changing this to a resistor network to do the shifting and see if that helps.

        1 Reply Last reply
        0
        • Cliff KarlssonC Offline
          Cliff KarlssonC Offline
          Cliff Karlsson
          wrote on last edited by
          #43

          Hmm...

          I just connected both gateway and temp sensor to the same computer and used the serial monitor and now it shows temp info

          0;0;3;0;9;gateway started, id=0, parent=0, distance=0
          0;0;3;0;14;Gateway startup complete.
          0;0;3;0;9;read: 1-1-0 s=255,c=0,t=17,pt=0,l=3,sg=0:1.5
          1;255;0;0;17;1.5
          0;0;3;0;9;read: 1-1-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
          1;255;3;0;6;0
          0;0;3;0;9;read: 1-1-0 s=255,c=3,t=11,pt=0,l=18,sg=0:Temperature Senso
          1;255;3;0;11;Temperature Sensor
          0;0;3;0;9;read: 1-1-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.1
          1;255;3;0;12;1.1
          0;0;3;0;9;read: 1-1-0 s=0,c=0,t=6,pt=0,l=0,sg=0:
          1;0;0;0;6;
          0;0;3;0;9;read: 1-1-0 s=0,c=1,t=0,pt=7,l=5,sg=0:24.5
          1;0;1;0;0;24.5
          0;0;3;0;9;read: 1-1-0 s=0,c=1,t=0,pt=7,l=5,sg=0:24.7
          1;0;1;0;0;24.7
          0;0;3;0;9;read: 1-1-0 s=0,c=1,t=0,pt=7,l=5,sg=0:24.8
          1;0;1;0;0;24.8
          

          I don´t know if it is a range problem or if it is my controller platform.
          I am using a raspberry pi and domoticz and I get a lot of errors like:

          2015-09-28 19:30:16.415 MySensors: Using serial port: /dev/ttyUSB0
          2015-09-28 19:30:17.881 MySensors: Gateway Ready...
          2015-09-28 19:30:36.661 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:31:06.795 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:31:36.930 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:32:07.060 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:32:37.168 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:33:07.298 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:33:37.410 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:34:07.541 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:34:37.658 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:35:07.784 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:35:37.925 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:36:08.054 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:36:38.167 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:37:08.298 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:37:38.428 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:38:08.537 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:38:38.666 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:38:38.852 Error: Serial Port closed!... Error: End of file
          2015-09-28 19:38:39.513 MySensors: retrying in 30 seconds...
          2015-09-28 19:39:08.518 MySensors: Using serial port: /dev/ttyUSB0
          2015-09-28 19:39:08.518 Error: MySensors: Error opening serial port!
          2015-09-28 19:39:08.799 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:39:09.518 MySensors: retrying in 30 seconds...
          2015-09-28 19:39:38.523 MySensors: Using serial port: /dev/ttyUSB0
          2015-09-28 19:39:38.523 Error: MySensors: Error opening serial port!
          2015-09-28 19:39:38.898 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:39:39.523 MySensors: retrying in 30 seconds...
          2015-09-28 19:40:08.528 MySensors: Using serial port: /dev/ttyUSB0
          2015-09-28 19:40:08.528 Error: MySensors: Error opening serial port!
          2015-09-28 19:40:09.013 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:40:09.529 MySensors: retrying in 30 seconds...
          2015-09-28 19:40:38.533 MySensors: Using serial port: /dev/ttyUSB0
          2015-09-28 19:40:38.534 Error: MySensors: Error opening serial port!
          2015-09-28 19:40:39.107 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:40:39.534 MySensors: retrying in 30 seconds...
          2015-09-28 19:41:08.538 MySensors: Using serial port: /dev/ttyUSB0
          2015-09-28 19:41:08.539 Error: MySensors: Error opening serial port!
          2015-09-28 19:41:09.222 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:41:09.539 MySensors: retrying in 30 seconds...
          2015-09-28 19:41:38.543 MySensors: Using serial port: /dev/ttyUSB0
          2015-09-28 19:41:38.544 Error: MySensors: Error opening serial port!
          2015-09-28 19:41:39.335 Hardware Monitor: Fetching data (System sensors)
          2015-09-28 19:41:39.544 MySensors: retrying in 30 seconds...
          

          I have tried using two different raspberry pi´s and tried both the stable and the beta of domoticz and I get the same errors everytime.
          I was thinking there was some error in the gateway-sketch/temp-sketch or that the usb-port of the pi could not provide enough power for the nano+RFM69W.

          fetsF 1 Reply Last reply
          0
          • Cliff KarlssonC Cliff Karlsson

            Hmm...

            I just connected both gateway and temp sensor to the same computer and used the serial monitor and now it shows temp info

            0;0;3;0;9;gateway started, id=0, parent=0, distance=0
            0;0;3;0;14;Gateway startup complete.
            0;0;3;0;9;read: 1-1-0 s=255,c=0,t=17,pt=0,l=3,sg=0:1.5
            1;255;0;0;17;1.5
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
            1;255;3;0;6;0
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=11,pt=0,l=18,sg=0:Temperature Senso
            1;255;3;0;11;Temperature Sensor
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.1
            1;255;3;0;12;1.1
            0;0;3;0;9;read: 1-1-0 s=0,c=0,t=6,pt=0,l=0,sg=0:
            1;0;0;0;6;
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=0,pt=7,l=5,sg=0:24.5
            1;0;1;0;0;24.5
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=0,pt=7,l=5,sg=0:24.7
            1;0;1;0;0;24.7
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=0,pt=7,l=5,sg=0:24.8
            1;0;1;0;0;24.8
            

            I don´t know if it is a range problem or if it is my controller platform.
            I am using a raspberry pi and domoticz and I get a lot of errors like:

            2015-09-28 19:30:16.415 MySensors: Using serial port: /dev/ttyUSB0
            2015-09-28 19:30:17.881 MySensors: Gateway Ready...
            2015-09-28 19:30:36.661 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:31:06.795 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:31:36.930 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:32:07.060 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:32:37.168 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:33:07.298 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:33:37.410 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:34:07.541 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:34:37.658 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:35:07.784 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:35:37.925 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:36:08.054 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:36:38.167 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:37:08.298 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:37:38.428 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:38:08.537 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:38:38.666 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:38:38.852 Error: Serial Port closed!... Error: End of file
            2015-09-28 19:38:39.513 MySensors: retrying in 30 seconds...
            2015-09-28 19:39:08.518 MySensors: Using serial port: /dev/ttyUSB0
            2015-09-28 19:39:08.518 Error: MySensors: Error opening serial port!
            2015-09-28 19:39:08.799 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:39:09.518 MySensors: retrying in 30 seconds...
            2015-09-28 19:39:38.523 MySensors: Using serial port: /dev/ttyUSB0
            2015-09-28 19:39:38.523 Error: MySensors: Error opening serial port!
            2015-09-28 19:39:38.898 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:39:39.523 MySensors: retrying in 30 seconds...
            2015-09-28 19:40:08.528 MySensors: Using serial port: /dev/ttyUSB0
            2015-09-28 19:40:08.528 Error: MySensors: Error opening serial port!
            2015-09-28 19:40:09.013 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:40:09.529 MySensors: retrying in 30 seconds...
            2015-09-28 19:40:38.533 MySensors: Using serial port: /dev/ttyUSB0
            2015-09-28 19:40:38.534 Error: MySensors: Error opening serial port!
            2015-09-28 19:40:39.107 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:40:39.534 MySensors: retrying in 30 seconds...
            2015-09-28 19:41:08.538 MySensors: Using serial port: /dev/ttyUSB0
            2015-09-28 19:41:08.539 Error: MySensors: Error opening serial port!
            2015-09-28 19:41:09.222 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:41:09.539 MySensors: retrying in 30 seconds...
            2015-09-28 19:41:38.543 MySensors: Using serial port: /dev/ttyUSB0
            2015-09-28 19:41:38.544 Error: MySensors: Error opening serial port!
            2015-09-28 19:41:39.335 Hardware Monitor: Fetching data (System sensors)
            2015-09-28 19:41:39.544 MySensors: retrying in 30 seconds...
            

            I have tried using two different raspberry pi´s and tried both the stable and the beta of domoticz and I get the same errors everytime.
            I was thinking there was some error in the gateway-sketch/temp-sketch or that the usb-port of the pi could not provide enough power for the nano+RFM69W.

            fetsF Offline
            fetsF Offline
            fets
            wrote on last edited by
            #44

            @Cliff-Karlsson glad it works now.
            You should now try to use a different power source for node and see if it's stil working. Next start to move your node.
            Regarding domoticz outputs, these are not errors but' just logs from raspberry motherboard sensors.

            1 Reply Last reply
            0
            • TD22057T Offline
              TD22057T Offline
              TD22057
              Hardware Contributor
              wrote on last edited by
              #45

              Well - the good news is that mine is working now. The ??? news is that I'm not sure why. I was using an Uno as my gateway (w/ a dipole antenna) and a 5V mini (small helical antenna) as the sensor and couldn't get anything to go between them. To simply things, I changed the Uno to a 3V mini w/ a monopole antenna and got some traffic, but not very consistent. So I shut everything down, ate some dinner, watched some TV and came back to it. Turned both nodes on and everything was working fine. I rigged up a battery and booster to the 5V mini and started moving it around the house and it's working perfectly. Basically there doesn't seem to be anywhere on my property that I can't get a signal.

              The 5V mini is using a level shifter on all the lines (including IRQ) except MISO so I'll try removing the IRQ shifting next to make sure it works without that. And I need to see if I can get the Uno working as the gateway.

              My best guess is that I had a loose connection in the breadboard (i.e. maybe I should stop buying cheap breadboards). Or maybe start using wire wrap for my prototypes.

              NeverDieN 1 Reply Last reply
              0
              • TD22057T TD22057

                Well - the good news is that mine is working now. The ??? news is that I'm not sure why. I was using an Uno as my gateway (w/ a dipole antenna) and a 5V mini (small helical antenna) as the sensor and couldn't get anything to go between them. To simply things, I changed the Uno to a 3V mini w/ a monopole antenna and got some traffic, but not very consistent. So I shut everything down, ate some dinner, watched some TV and came back to it. Turned both nodes on and everything was working fine. I rigged up a battery and booster to the 5V mini and started moving it around the house and it's working perfectly. Basically there doesn't seem to be anywhere on my property that I can't get a signal.

                The 5V mini is using a level shifter on all the lines (including IRQ) except MISO so I'll try removing the IRQ shifting next to make sure it works without that. And I need to see if I can get the Uno working as the gateway.

                My best guess is that I had a loose connection in the breadboard (i.e. maybe I should stop buying cheap breadboards). Or maybe start using wire wrap for my prototypes.

                NeverDieN Offline
                NeverDieN Offline
                NeverDie
                Hero Member
                wrote on last edited by
                #46

                @TD22057 said:

                I rigged up a battery and booster to the 5V mini and started moving it around the house and it's working perfectly. Basically there doesn't seem to be anywhere on my property that I can't get a signal.

                Great!

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  shabba
                  wrote on last edited by
                  #47

                  So does the RFMxx need level shifters? I was under impression they were like that NRF24LO1+ and could just be wired direct to the minis.

                  fetsF 1 Reply Last reply
                  0
                  • S shabba

                    So does the RFMxx need level shifters? I was under impression they were like that NRF24LO1+ and could just be wired direct to the minis.

                    fetsF Offline
                    fetsF Offline
                    fets
                    wrote on last edited by
                    #48

                    @shabba levels shifters needed, unless with pro mini 3.3v

                    1 Reply Last reply
                    0
                    • Cliff KarlssonC Offline
                      Cliff KarlssonC Offline
                      Cliff Karlsson
                      wrote on last edited by
                      #49

                      Hi I had my RFM69(H)W Gateway and sensors working after several days of trial and error. A couple of days ago I started fiddeling around with the gateways when trying to add a NRF radio. The nrf works great but now my RFM69 has stopped working.

                      Can anyone write down a complete step by step instruction of how to get the Serial gateway and sensors working using the RFM69.

                      This is what I have done:

                      MyConfig.h - Checked that the right radio options was selected.

                      Mysensor.h - Added

                      #include "MyTransportRFM69.h"

                      //MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
                      MySensor(MyTransport &radio =*new MyTransportRFM69(), MyHw &hw=*new MyHwDriver()

                      SerialGateway:
                      added:
                      "MyTransportRFM69 transport (RFM69_FREQUENCY, RFM69_NETWORKID, RF69_SPI_CS, RF69_IRQ_PIN, true, RF69_IRQ_NUM) ;" (I have the H version on the gateway)

                      Are there any more steps? anything more I need to add to the SerialGateway Sketch?
                      The Sensor-sketches also seems to have been modified recently, how do I add the Radio info in the sketches?

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        shabba
                        wrote on last edited by
                        #50

                        Did anyone manage to get direct raspberry pi to RFM69 working? About to roll out a rfm69 network beside my nrf24 one.

                        1 Reply Last reply
                        0
                        • mahesh2000M Offline
                          mahesh2000M Offline
                          mahesh2000
                          wrote on last edited by
                          #51

                          hi, is there something like the nRF24LE1 (which has an nRF24L01 and 8051 microprocessor in one chip) in the RFM family? thanks!

                          1 Reply Last reply
                          0
                          • mfalkviddM Offline
                            mfalkviddM Offline
                            mfalkvidd
                            Mod
                            wrote on last edited by
                            #52

                            @mahesh2000 please don't post the same question in multiple places. It wastes people's time when some details are available in one thread and some details in another thread.
                            To anyone responding to @mahesh2000's question, please reply in https://forum.mysensors.org/post/85838 instead.

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            7

                            Online

                            11.7k

                            Users

                            11.2k

                            Topics

                            113.0k

                            Posts


                            Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • MySensors
                            • OpenHardware.io
                            • Categories
                            • Recent
                            • Tags
                            • Popular