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. Stupid question about powering leds

Stupid question about powering leds

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 5 Posters 1.7k 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.
  • Cliff KarlssonC Offline
    Cliff KarlssonC Offline
    Cliff Karlsson
    wrote on last edited by
    #1

    I was thinking that I could stick connect a couple of red leds to an Arduino pro mini and put in some pumkins on halloween. But I am abit shamed to ask, how do you do this simple task? In the arduino tutorials they use one pin/led and use a 220ohm resistor when powering from a 3.3V arduino.

    But if I want to use 4 leds that does not need to be individually controlled how would I connect them? and what resistors do I use?

    m26872M DwaltD 2 Replies Last reply
    0
    • rvendrameR Offline
      rvendrameR Offline
      rvendrame
      Hero Member
      wrote on last edited by
      #2

      @Cliff-Karlsson , welcome to the Ohm law. ;-)

      220ohm resistor on 3.3V = 15mA current, enough to power up most of common leds.

      Supposing your LEDs consume lets say 20mA each, and you want power 4 together, you need to provide 80mA instead, so U = R/I ==> 3.3 = R / 0.080 ==> R = 41.25 Ohms.

      -- BUT --- Each arduino output pin can provide a maximum of 40mA, so if you connect the 4 leds into one single pin, the leds will not receive enough power to light up, or worst, the arduino's pin internal driver will burn (most probable).

      In this case you have to either use more output pins (in order to distribute the load), or use a transistor to drive the output, like demonstrated by @hek in the LED Dimmer.

      Hope it helps

      Home Assistant / Vera Plus UI7
      ESP8266 GW + mySensors 2.3.2
      Alexa / Google Home

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wergeld
        wrote on last edited by
        #3

        Just wait until you run out of pins for the LEDs and you have to start charlieplexing. Crazy matrix computations but lots of fun!

        1 Reply Last reply
        0
        • Cliff KarlssonC Cliff Karlsson

          I was thinking that I could stick connect a couple of red leds to an Arduino pro mini and put in some pumkins on halloween. But I am abit shamed to ask, how do you do this simple task? In the arduino tutorials they use one pin/led and use a 220ohm resistor when powering from a 3.3V arduino.

          But if I want to use 4 leds that does not need to be individually controlled how would I connect them? and what resistors do I use?

          m26872M Offline
          m26872M Offline
          m26872
          Hardware Contributor
          wrote on last edited by
          #4

          @Cliff-Karlsson @rvendrame
          You have to subtract the leds forward voltage drop before you use ohm's law. Look here eg. For some leds it could be rather high (~3V), which is very much if you're on 3.3V.

          1 Reply Last reply
          0
          • Cliff KarlssonC Cliff Karlsson

            I was thinking that I could stick connect a couple of red leds to an Arduino pro mini and put in some pumkins on halloween. But I am abit shamed to ask, how do you do this simple task? In the arduino tutorials they use one pin/led and use a 220ohm resistor when powering from a 3.3V arduino.

            But if I want to use 4 leds that does not need to be individually controlled how would I connect them? and what resistors do I use?

            DwaltD Offline
            DwaltD Offline
            Dwalt
            wrote on last edited by Dwalt
            #5

            @Cliff-Karlsson Skip the Arduino and just go with red LEDs taped to coincell batteries. Should last thru Halloween. See this...

            Veralite UI5 :: IBoard Ethernet GW :: MyS 1.5

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


            27

            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