saving power with neopixels(question)

Posted on
  • Hey y'all,
    I'm thinking of using a neopixel in my project and I know that they use about 1 mah when turned off by the controller chip. I'm only going to use a single pixel anyways, so if I connect the neopixel's power to an IO pin and only provide power when I'm actually going to use it, will I be able to save the 1mah and thus improve battery life?

    Thanks! :)

  • You can save power with this... but there is a big but: from a different thread I get the understanding that powering on a string starts with all leds powered, and then you have to send out at least one complete string of RGB byte sets to turn all off (with the ones you want to have lit kept on). The spike you get in the beginning could be significant... How many pixels will be in your link?

  • Wed 2018.08.22

    Hello @Marty_McFly,

    re: 'I know that they use about 1 mah when turned off'

    Dr Emmett Brown here, . . . . It's more like 1.21 gigawatts? Great Scott!


    Would you provide a link to the datasheet you got that factoid from please. Which chip are you using?

    I'm not seeing that 1mAh detail for the WS2812­/WS2812.pdf


    Now on to how the project will power the Neopixel:

    re: 'so if I connect the neopixel's power to an IO pin'

    I'd be really concerned with the microcontroller GPIO pin:


    Each GPIO pin can source or sink only 25ma
    Total max all pins is 120ma

    So, out of luck that way, unless you use the GPIO pin to control a transistor to turn on that power. A standard 2n2222 should do.

    Incidentally, I'm against sourcing power using three GPIO pins tied together. Why risk frying a $30 microcontroller, for the sake of a $0.25 part? Turn off current can wreak havoc as the AdaFruit Uber Neopixel pdf indicates.

    Inexpensive way­N2222A.pdf

    Expensive way using a relay

    Also remember the Neopixel will draw ~60mA when producing white.

    See this forum post WS2812B issues from a week ago:­324269/#comment14372431

    So, what is the plan to power the insert name of espruino controller for your single neopixel project. A stand alone battery operated demo maybe?

  • I'm using a single pixel, just as an indicator light. I suppose one pixel would be about the same as a normal RGB led? am I wrong? Also I'm using an Espruino Pico. I'm mounting everything on a PCB.

  • re: 'I suppose one pixel would be about the same as a normal RGB led? am I wrong?'

    Well do I have to say it? . . . . Explained in #3 above. The last link forum post explains a lot.

    One should focus on the power supply first. What is the plan to power this project? Stand alone? Battery only? What other discreet parts are in the circuit?

    re: 'just as an indicator light'

    A Neopixel sounds like overkill here. As @allObjects explains in #2 there is a data line and code to be concerned about. How are you powering the Pico? 3.3V battery? The Neopixel requires 5V

    What about the LED either Red or Grn on the Pico itself?

    There are also ways using eye persistence and pulsing the LED (not a Neopixel :: see edit below) using code to reduce power consumption. Need a bit more on overall project concept.

    Edit Wed 2018.08.22
    Adafruit indicates that Neopixels may be pulsed via PWM. Looking into that right now . . . .

    Edit Thr 2018.08.23­picker.asp
    My misunderstanding was that a neopixel write() is not sending a RGB (actually GRB SK6812) triplet color representation intensity, it is sending a value representing the duty cycle applied to the specific LED by color, unlike a Html page screen pixel write intensity of color­mma-correction/the-issue

    "It’s nothing to do with the LEDs or your code, it’s how our eyes work…"

  • I assume, you have plenty of GPIO pins left... choosing a simple RGB LED with common anode on 3.3V and from each cathode a LED forward voltage specific resistor to an Espruino GPIO pin will do. GPIO pin setup with "opendrain" and driven w/ negative logic are a simple and power effective way to drive indicator LEDs. It is called negative logic because writing digital 0 lits LED, where 1 turns LED off. The resistors allow you to limit the current nicely and control as well 'equal(ly)' perceived brightness.

    Red has usually 2.0..2.2 forward voltage, green and blue have 3.2..3.3; therefore, red needs a resistor of higher value than green and blue. Peeking at this site about LEDs will give you some points to start with. There are also other LED calculators out there that help you with sizing the resistors.

  • Would you provide a link to the datasheet you got that factoid from please.

    The SK6812 datasheet you link to mentions 1mA in it.

    I'm afraid as the others say, a single GPIO may not be powerful enough to switch it - the only time I've seen a neopixel indicator on a board it was switched with a transistor. I'm struggling to find actual figures but I definitely thought that all on it could draw around 60mA (as it's basically 3 LEDs that get driven quite hard) and I remember from using them that a string of them drew a lot of power.

    Having said that, the 1mA figure is om the SK6812 datasheet (and presumably the WS2812), however looking at the APA104 datasheet it shows 1uA - so it may be that by using a different part you can avoid having to switch the LED at all.

  • Thr 2018.08.23

    'The SK6812 datasheet you link to mentions 1mA in it'

    Ahhh, . . . there it is p4/7 'Static power consumption IDD'

    Good catch @Gordon

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

saving power with neopixels(question)

Posted by Avatar for barry_b_benson @barry_b_benson