Skip to content
  • 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. My Project
  3. SoftSerial battery drain
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

SoftSerial battery drain

Scheduled Pinned Locked Moved My Project
5 Posts 2 Posters 1.1k 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.
  • K Offline
    K Offline
    kted
    wrote on last edited by kted
    #1

    I've built an oil tank level sensor, using the US100 ultrasonic sensor. The sensor, when communicating via serial protocol, has the capability to compensate for temperature variations, and is a lot more accurate than the traditional "ping" method.
    My problem is the current drain.
    When I enable the software serial port, the current drain during sleep goes from a few nA to 2mA, and the 2 AA batteries powering the node, only last for a couple of weeks.
    I take measurements only every 3 hours, but I have the battery reporting it's level every 30 minutes, and it is dropping like rock.
    Any suggestions for implementing a serial port for a battery powered sensor? (Pro mini @3.3V/8MHz, with NRF24L01+, powered by 2 AA batteries).

    mfalkviddM 1 Reply Last reply
    0
    • K kted

      I've built an oil tank level sensor, using the US100 ultrasonic sensor. The sensor, when communicating via serial protocol, has the capability to compensate for temperature variations, and is a lot more accurate than the traditional "ping" method.
      My problem is the current drain.
      When I enable the software serial port, the current drain during sleep goes from a few nA to 2mA, and the 2 AA batteries powering the node, only last for a couple of weeks.
      I take measurements only every 3 hours, but I have the battery reporting it's level every 30 minutes, and it is dropping like rock.
      Any suggestions for implementing a serial port for a battery powered sensor? (Pro mini @3.3V/8MHz, with NRF24L01+, powered by 2 AA batteries).

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

      @kted could you post your sketch?

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

        If you do serialport.end() before going to sleep and serialport.begin() after waking up, does that lower the power consumption?

        K 1 Reply Last reply
        0
        • K Offline
          K Offline
          kted
          wrote on last edited by
          #4

          OK, problem solved.
          First of all, I stopped using SoftSerial, and I am now using the regular serial port.
          I can't debug the node any more, but it is working.
          And the drain dropped to 1.9 mA.
          This is the US100 idle current, so that was also a problem.
          So I chose to power the sensor from pins 3 & 4, as VCC and GND, since just using pin 3 and GND kept the drain to 1.9mA
          I turn pin 3 to output high and pin4 to output low, wait 5 seconds to let the sensor stabilize, since it gave erratic readings with anything less, take the measurement, and turn pins 3 & 4 to inputs, so there is no drain.
          Seems to work so far, after a whole day of taking readings every minute, I am down by 10mV. I intend to take readings every 2 hours in normal operation, so I figure the batteries will last for about a year.
          I am writing this from my phone, so I cannot post the source if anyone is interested, but let me know...

          1 Reply Last reply
          1
          • mfalkviddM mfalkvidd

            If you do serialport.end() before going to sleep and serialport.begin() after waking up, does that lower the power consumption?

            K Offline
            K Offline
            kted
            wrote on last edited by
            #5

            @mfalkvidd Haven't tried that.
            I'll give it a chance just in case.

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


            17

            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
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular