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. Troubleshooting
  3. TX Power increase after every transmission

TX Power increase after every transmission

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 2 Posters 530 Views 2 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.
  • S Offline
    S Offline
    Steven987
    wrote on last edited by
    #1

    Hello,
    My current Test Setup is:
    Arduino with RFM69HW and for now an SHT31 and BMP280
    Raspberry as MQTT Gateway and an Mosquitto Broker

    i want to add rain, wind later but for now im testing the basics.

    When i start the Arduino the TX Power is at 8 and increasing every transmission by one till 20 i noticed that by measuring power draw.
    Here my basic sketch:

    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    
    #define MY_RADIO_RFM69
    #define MY_RFM69_NEW_DRIVER
    #define MY_IS_RFM69HW
    
    #define MY_NODE_ID 1
    
    #include <MySensors.h> 
    #include <Arduino.h>
    #include <Wire.h>
    #include <Adafruit_SHT31.h>
    #include <Adafruit_BMP280.h>
    
    Adafruit_SHT31 sht31 = Adafruit_SHT31();
    Adafruit_BMP280 bmp;
    
    unsigned long SLEEP_TIME = 10000;
    
    float altitude = 713.0;
    
    #define TEMP_CHILD_ID 0
    #define HUM_CHILD_ID 1
    #define BARO_CHILD_ID 2
    
    MyMessage temperatureMsg(TEMP_CHILD_ID, V_TEMP);
    MyMessage humidityMsg(HUM_CHILD_ID, V_HUM);
    MyMessage pressureMsg(BARO_CHILD_ID, V_PRESSURE);
    
    void setup() {
      if (!sht31.begin(0x44)) {   // Set to 0x45 for alternate i2c addr
        Serial.println("Couldn't find SHT31");
        while (1) delay(1);
      }
      if (!bmp.begin(0x76)) {
        Serial.println(F("Could not find a valid BMP280 sensor, check wiring!"));
        while (1);
      }
      bmp.setSampling(Adafruit_BMP280::MODE_FORCED,     /* Operating Mode. */
                      Adafruit_BMP280::SAMPLING_X2,     /* Temp. oversampling */
                      Adafruit_BMP280::SAMPLING_X16,    /* Pressure oversampling */
                      Adafruit_BMP280::FILTER_X16,
                      Adafruit_BMP280::STANDBY_MS_500);
    }
    
    void presentation() {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("SHT+BMP", "1.0");
      present(TEMP_CHILD_ID, S_TEMP);
      present(HUM_CHILD_ID, S_HUM);
      present(BARO_CHILD_ID, S_BARO);
    }
    
    void loop() {  
      float t = sht31.readTemperature();
      float h = sht31.readHumidity();
      float p = bmp.readPressure();
      float pSL = (((p)/pow((1-((float)(altitude))/44330), 5.255))/100.0);
      send(temperatureMsg.set(t, 2));
      send(pressureMsg.set(pSL, 2));
      send(humidityMsg.set(h, 2));
      int txPower = RFM69_getTxPowerLevel();
      Serial.println(txPower);
      sleep(SLEEP_TIME);
    }
    

    Any ideas?
    Thanks

    mfalkviddM 1 Reply Last reply
    0
    • S Steven987

      Hello,
      My current Test Setup is:
      Arduino with RFM69HW and for now an SHT31 and BMP280
      Raspberry as MQTT Gateway and an Mosquitto Broker

      i want to add rain, wind later but for now im testing the basics.

      When i start the Arduino the TX Power is at 8 and increasing every transmission by one till 20 i noticed that by measuring power draw.
      Here my basic sketch:

      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      #define MY_RADIO_RFM69
      #define MY_RFM69_NEW_DRIVER
      #define MY_IS_RFM69HW
      
      #define MY_NODE_ID 1
      
      #include <MySensors.h> 
      #include <Arduino.h>
      #include <Wire.h>
      #include <Adafruit_SHT31.h>
      #include <Adafruit_BMP280.h>
      
      Adafruit_SHT31 sht31 = Adafruit_SHT31();
      Adafruit_BMP280 bmp;
      
      unsigned long SLEEP_TIME = 10000;
      
      float altitude = 713.0;
      
      #define TEMP_CHILD_ID 0
      #define HUM_CHILD_ID 1
      #define BARO_CHILD_ID 2
      
      MyMessage temperatureMsg(TEMP_CHILD_ID, V_TEMP);
      MyMessage humidityMsg(HUM_CHILD_ID, V_HUM);
      MyMessage pressureMsg(BARO_CHILD_ID, V_PRESSURE);
      
      void setup() {
        if (!sht31.begin(0x44)) {   // Set to 0x45 for alternate i2c addr
          Serial.println("Couldn't find SHT31");
          while (1) delay(1);
        }
        if (!bmp.begin(0x76)) {
          Serial.println(F("Could not find a valid BMP280 sensor, check wiring!"));
          while (1);
        }
        bmp.setSampling(Adafruit_BMP280::MODE_FORCED,     /* Operating Mode. */
                        Adafruit_BMP280::SAMPLING_X2,     /* Temp. oversampling */
                        Adafruit_BMP280::SAMPLING_X16,    /* Pressure oversampling */
                        Adafruit_BMP280::FILTER_X16,
                        Adafruit_BMP280::STANDBY_MS_500);
      }
      
      void presentation() {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("SHT+BMP", "1.0");
        present(TEMP_CHILD_ID, S_TEMP);
        present(HUM_CHILD_ID, S_HUM);
        present(BARO_CHILD_ID, S_BARO);
      }
      
      void loop() {  
        float t = sht31.readTemperature();
        float h = sht31.readHumidity();
        float p = bmp.readPressure();
        float pSL = (((p)/pow((1-((float)(altitude))/44330), 5.255))/100.0);
        send(temperatureMsg.set(t, 2));
        send(pressureMsg.set(pSL, 2));
        send(humidityMsg.set(h, 2));
        int txPower = RFM69_getTxPowerLevel();
        Serial.println(txPower);
        sleep(SLEEP_TIME);
      }
      

      Any ideas?
      Thanks

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      Welcome to the forum @steven987

      The debug output (from the node and the gateway) will be the quickest and easiest way to find out. Post them here and we'll help you interpret them.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Steven987
        wrote on last edited by
        #3

        Debug from the Node the number inbetween is from RFM69_getTxPowerLevel();
        https://pastebin.com/ndqnrVqb

        And here from Gateway
        https://pastebin.com/kLS7EiKy

        mfalkviddM 1 Reply Last reply
        0
        • S Steven987

          Debug from the Node the number inbetween is from RFM69_getTxPowerLevel();
          https://pastebin.com/ndqnrVqb

          And here from Gateway
          https://pastebin.com/kLS7EiKy

          mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by
          #4

          @steven987 interesting. It looks like communication is working well all the time (no st=FAIL), but power is increased all the time.

          Could you add

          #define 	MY_DEBUG_VERBOSE_RFM69
          

          at the top of the node sketch? It will give more detailed information on the rfm radio.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Steven987
            wrote on last edited by Steven987
            #5

            Here with verbose
            https://pastebin.com/x8aaC429

            Looks like ATC is enabled but i heavent defined it anywhere?
            ATC on raspberry Gateway isnt working if i have read this correct
            https://forum.mysensors.org/topic/9796/rfm69-atc-not-working

            mfalkviddM 1 Reply Last reply
            1
            • S Steven987

              Here with verbose
              https://pastebin.com/x8aaC429

              Looks like ATC is enabled but i heavent defined it anywhere?
              ATC on raspberry Gateway isnt working if i have read this correct
              https://forum.mysensors.org/topic/9796/rfm69-atc-not-working

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by mfalkvidd
              #6

              @steven987 yes atc is on by default. It can be disabled by defining MY_RFM69_ATC_MODE_DISABLED

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


              28

              Online

              11.7k

              Users

              11.2k

              Topics

              113.1k

              Posts


              Copyright 2025 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