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. First voltage measurement reading is high

First voltage measurement reading is high

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 3 Posters 74 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.
  • G Offline
    G Offline
    grumpazoid
    wrote on last edited by
    #1

    I've recently had to rebuild a node - I am using a pro mini 3.3V with a BME280 sensor.
    Having tested it on the bench before putting outside

    I have noticed that at every startup the first reported voltage reading is about 0.2V higher than it actually is(significant on my 3S Lipo battery). The next reading is then nearer to the true voltage.

    I am using voltage divider with 1M and 82K resistors. I have a capacitor across the 82K. This allows a max voltage of 14.51 in case I go back to using a lead acid battery.

    I have tried moving the voltage part of the code to a different location in the loop but still the same.

    Has anyone else seen this behaviour or would know why it happens?? I don't get it on my other nodes that use a single 18650.

    Raspberry Pi 3B - Domoticz + Node Red
    Arduino Pro Mini 3.3V - W5100 Ethernet, Nrf24
    Arduino Mega, RFLink 433Mhz
    Sonoff/ESP8266/Tasmota switches

    sundberg84S NeverDieN 2 Replies Last reply
    0
    • G grumpazoid

      I've recently had to rebuild a node - I am using a pro mini 3.3V with a BME280 sensor.
      Having tested it on the bench before putting outside

      I have noticed that at every startup the first reported voltage reading is about 0.2V higher than it actually is(significant on my 3S Lipo battery). The next reading is then nearer to the true voltage.

      I am using voltage divider with 1M and 82K resistors. I have a capacitor across the 82K. This allows a max voltage of 14.51 in case I go back to using a lead acid battery.

      I have tried moving the voltage part of the code to a different location in the loop but still the same.

      Has anyone else seen this behaviour or would know why it happens?? I don't get it on my other nodes that use a single 18650.

      sundberg84S Offline
      sundberg84S Offline
      sundberg84
      Hardware Contributor
      wrote on last edited by
      #2

      @grumpazoid - yes, sometimes it helps to introduce a small wait() before the reading.
      I have also made a array so i it always read 4 times and sending an average.

      Controller: Proxmox VM - Home Assistant
      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

      G 1 Reply Last reply
      1
      • sundberg84S sundberg84

        @grumpazoid - yes, sometimes it helps to introduce a small wait() before the reading.
        I have also made a array so i it always read 4 times and sending an average.

        G Offline
        G Offline
        grumpazoid
        wrote on last edited by
        #3

        @sundberg84 Ah thanks good to know I am not alone.

        I have already included a 1500ms delay before the battery code.

        The array sounds a good idea. Any chance of pointing me at some code for that?

        Raspberry Pi 3B - Domoticz + Node Red
        Arduino Pro Mini 3.3V - W5100 Ethernet, Nrf24
        Arduino Mega, RFLink 433Mhz
        Sonoff/ESP8266/Tasmota switches

        1 Reply Last reply
        0
        • G grumpazoid

          I've recently had to rebuild a node - I am using a pro mini 3.3V with a BME280 sensor.
          Having tested it on the bench before putting outside

          I have noticed that at every startup the first reported voltage reading is about 0.2V higher than it actually is(significant on my 3S Lipo battery). The next reading is then nearer to the true voltage.

          I am using voltage divider with 1M and 82K resistors. I have a capacitor across the 82K. This allows a max voltage of 14.51 in case I go back to using a lead acid battery.

          I have tried moving the voltage part of the code to a different location in the loop but still the same.

          Has anyone else seen this behaviour or would know why it happens?? I don't get it on my other nodes that use a single 18650.

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

          @grumpazoid said in First voltage measurement reading is high:

          Has anyone else seen this behaviour or would know why it happens??

          This is well known. If you look in the atmega328p datasheet under ADC, it says to throw out the first reading after starting the ADC.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            grumpazoid
            wrote on last edited by
            #5

            @NeverDie Excellent. Thank you.

            Raspberry Pi 3B - Domoticz + Node Red
            Arduino Pro Mini 3.3V - W5100 Ethernet, Nrf24
            Arduino Mega, RFLink 433Mhz
            Sonoff/ESP8266/Tasmota switches

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


            29

            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