PWM/No PWM/Full-on Flora NeoPixel V2s

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
stryker295
 
Posts: 9
Joined: Sat Jan 11, 2014 8:27 pm

PWM/No PWM/Full-on Flora NeoPixel V2s

Post by stryker295 »

My friend and I are working with some of these cool RGB pixel thingies. He says they're the Flora ones because they are on circuit boards, and they're the V2 version because they operate at 800kHz. Anyways they move at high speed and when set to maximum brightness it seems they're not solid on, but are flashing at a very high rate. We aren't sure if this is to save power, prevent overheating, something else, or an issue with our power supply/arduino/code.

Is there a way to just turn on an LED to a solid single color and not have it PWMing at all? Even on max brightness it's still flashing, at a very high rate obviously but flashing nonetheless.

(Also I'm new here so apologies of I left something important out.)

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: PWM/No PWM/Full-on Flora NeoPixel V2s

Post by adafruit_support_bill »

If you post a photo we can see exactly what pixels you are using.

User avatar
michaelmeissner
 
Posts: 1832
Joined: Wed Aug 29, 2012 12:40 am

Re: PWM/No PWM/Full-on Flora NeoPixel V2s

Post by michaelmeissner »

Is there a way to just turn on an LED to a solid single color and not have it PWMing at all? Even on max brightness it's still flashing, at a very high rate obviously but flashing nonetheless.
This is a guess of what you are asking about.

There are two basic methods to control the brightness of a LED. One method is to change the current that flows through the LED and the other is to flash it on/off (i.e. PWM or other techniques). The second approach is easier for a microprocessor to do, because all it has to do is turn the current on/off at predetermined times. Changing the current to a LED from a digital processor to analog takes a lot more electronics: http://en.wikipedia.org/wiki/Digital-to ... _converter.

If you just want a LED on/off, then just get standard LEDs, and use a pin to control each individual LED, and turn it on/off depending on your needs. However, you might run out of pins (on a Flora you would only have 8 pins, on a Trinket 5 pins, and on a Gemma 3 pins). You can get I2c chips like the MCP23017 (http://www.adafruit.com/products/732) that allow you to control 16 LEDs using 2 special pins on the board. You can use 8 MCP23017's in a design, to allow you to control up to 1,024 LEDs.

Assuming you mentioned Flora because you were interested in using LEDs in a costume, there is a Tindie shop that sells sewable i2c controller similar to the MCP23017 that can control up to 16 LEDs: https://www.tindie.com/products/PartFusion/sew-io-16/ as well as a version that supports 8 LEDs: https://www.tindie.com/products/PartFusion/sew-io-8/. I have not bought this.

Adafruit does sell a digital to analog converter (DAC) that sits on the i2c bus, and you can hook up 2 DAC's to the system: http://www.adafruit.com/products/93

User avatar
stryker295
 
Posts: 9
Joined: Sat Jan 11, 2014 8:27 pm

Re: PWM/No PWM/Full-on Flora NeoPixel V2s

Post by stryker295 »

Well due to the project we do want the LEDs to strobe, pulse, change color and speed, and sometimes just be solid on. As far as I know he is using an arduino+neopixels because he likes the single-pin serial method of controlling them, but if we can't have them solid on, we will have to switch to something else.

User avatar
michaelmeissner
 
Posts: 1832
Joined: Wed Aug 29, 2012 12:40 am

Re: PWM/No PWM/Full-on Flora NeoPixel V2s

Post by michaelmeissner »

Adafruit has i2c and spi PWM boards for driving single LEDs. For example, this board can drive 16 channels via i2c. You can have up to 62 of these boards on the i2c bus for 992 different LEDs. http://www.adafruit.com/products/815

User avatar
stryker295
 
Posts: 9
Joined: Sat Jan 11, 2014 8:27 pm

Re: PWM/No PWM/Full-on Flora NeoPixel V2s

Post by stryker295 »

I'm asking about the neopixels, not other products for other LEDs.

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: PWM/No PWM/Full-on Flora NeoPixel V2s

Post by pburgess »

The NeoPixel PWM cycle is only about 400 Hz, so it's very visible when there's fast motion or trying to to POV stuff. At max brightness it SHOULD be 100% duty cycle, or something very close to this, so I'm not sure what you're seeing there (have you set the strip brightness to something less than 100%?)

Better solution for POV would be LPD8806 strips, or discrete LEDs using one of the PWM driver breakout boards.

User avatar
stryker295
 
Posts: 9
Joined: Sat Jan 11, 2014 8:27 pm

Re: PWM/No PWM/Full-on Flora NeoPixel V2s

Post by stryker295 »

pburgess wrote:At max brightness it SHOULD be 100% duty cycle, or something very close to this...
This is exactly what I'm trying to find out but nobody seems to have an answer. Is it possible to turn on a NeoPixel so that it's 100% on, not blinking at all?

DANMDaniel
 
Posts: 24
Joined: Sun Oct 17, 2010 7:24 pm

Re: PWM/No PWM/Full-on Flora NeoPixel V2s

Post by DANMDaniel »

I think I know what you mean...
In your code (assuming you're including the neopixel library), try:

setup

Code: Select all

strip.begin();
strip.show();

loop

Code: Select all

strip.setPixelColor(0, 255, 255, 255);
strip.brightness(255);
strip.show();
Have you seen the neopixel uberguide http://learn.adafruit.com/adafruit-neopixel-uberguide? Has some nice code snippets.

User avatar
stryker295
 
Posts: 9
Joined: Sat Jan 11, 2014 8:27 pm

Re: PWM/No PWM/Full-on Flora NeoPixel V2s

Post by stryker295 »

I feel bad for just now getting around to replying to this. We've switched to a new library called FastLED, and when we set any value (R, G, or B) to 255, we've eliminated visible flickering. This includes setting multiple values high: (255,255,0) for example is a nice yellow color.

Anyways this has solved our problem! The code is a lot cleaner, much more modular, and overall noticeably better in the end. It also includes its own functions for things like sin (fastsine) and other such useful-but-slow math functions. (:

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”