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. Powering sensors through the digital pins?

Powering sensors through the digital pins?

Scheduled Pinned Locked Moved Hardware
3 Posts 3 Posters 2.8k Views 1 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
    kolaf
    Hero Member
    wrote on last edited by
    #1

    I'm wondering whether it is possible to power different sensors using the digital outputs of the microcontroller. I guess I can put a reed switch between two digital pins, but what about a DHT22, a distance sensor, light sensors, and all the other types of sensors that consume some power? I seem to recall that the digital pins can source or sink 50 mA which I suppose is enough for most sensors? This would make mounting stuff much easier since I could just solder any three pin digital sensor directly to the board. I guess analog sensors are a bit more difficult unless I can pull power from the analog pins as well?

    YveauxY 1 Reply Last reply
    0
    • K kolaf

      I'm wondering whether it is possible to power different sensors using the digital outputs of the microcontroller. I guess I can put a reed switch between two digital pins, but what about a DHT22, a distance sensor, light sensors, and all the other types of sensors that consume some power? I seem to recall that the digital pins can source or sink 50 mA which I suppose is enough for most sensors? This would make mounting stuff much easier since I could just solder any three pin digital sensor directly to the board. I guess analog sensors are a bit more difficult unless I can pull power from the analog pins as well?

      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #2

      @kolaf please keep in mind that there's also a maximum total power budget for the whole atmega (don't have the figures at hand)

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • D Offline
        D Offline
        djdworks
        wrote on last edited by
        #3

        I'm usually doing this test for each and every sensor i bought and I can confirm that many of them can work without problems.
        Sensors like DHT seems to need a delay(500), before call the sensor read function, in order to let him "boot-up" otherwise you will experience communication errors.
        Sensors connected to analog input, like soil humidity, will not give correct measurement, if the precision is not your must is possible to use pin powering,

        Pay attention on the max current required for the sensor, if you exceed that the Arduino will be damaged. Measure it before to connect!

        Radio cannot be powered by digital pin (too much current during transmission).

        Arduino has also a maximum total current that normally can never be exceeded, special attention to be given if you use radio with PA antenna!

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


        21

        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