Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: APA102 Temporal Dithering without Master Brightness?

  1. #1
    Member
    Join Date
    Jun 2015
    Location
    Palm Springs, CA
    Posts
    27

    APA102 Temporal Dithering without Master Brightness?

    Is there a way to do this without dimming all the LED's? I would like to specify each LED individually with 16-bit values of red, green, and blue.

    Related question: can a Teensy control multiple APA102 strips without having to daisy-chain the clock and data wires?

  2. #2
    Member
    Join Date
    Mar 2017
    Location
    Oakland, CA, USA
    Posts
    90
    Have you tried setting that brightness field for each pixel? I have not tried it myself, but since each pixel in the protocol specifies 5 bits of brightness, I suspect it may work. A side note is that the SK9822-based lights (an APA102 clone) do current-controlled brightness, while the APA102s do PWM-controlled brightness. You may see less flicker with the SK9822s when lowering the "global brightness".

    As for using 16 bits for each colour, it's probably possible to figure out a way to convert a 16-bit value into an 8-bit value plus 5-bit brightness. I would probably start with thinking of those 5 bits as a multiplier. The caveat here is that the brightness field affects all three RGB values, not just a single one. That would limit being able to specify 16-bit RGB values independently.

    And yes, the Teensy could control multiple strips. You could either use the SPI hardware or bit-bang the values. The various flavours of Teensys have one or more hardware SPI ports, so if you need to connect more strips than the Teensy supports for SPI, then you could bit-bang. In summary, the answer is "technically yes". Performance might be affected, depending on the number of strips and number of pixels you want to support.

  3. #3
    Member
    Join Date
    Jun 2015
    Location
    Palm Springs, CA
    Posts
    27
    Thanks Shawn, a lot of good info there. I havent actually tried this yet, though I have used APA102's in the past. I'm just researching at this point. I had thought that global brightness in the FastLED library was like a master brightness control knob at 8-bits, but now it sounds like it applies a curve at 5-bits? I think I'm going to have to actually test some LED's and see what is happening.

    Is this outdated info?
    https://github.com/FastLED/FastLED/w...oral-Dithering

    And this is the new way?
    http://fastled.io/docs/3.1/group___dimming.html
    (very little documentation, no examples)

  4. #4
    Member
    Join Date
    Mar 2017
    Location
    Oakland, CA, USA
    Posts
    90
    Iím not saying FastLED necessarily does it this way. I was responding to your question about APA102 control. (I donít see mention of FastLED in your original question?)

  5. #5
    Member
    Join Date
    Jun 2015
    Location
    Palm Springs, CA
    Posts
    27
    Okay, I think I understand what you're saying. I should experiment with sending SPI without using the FastLED library and see what happens.
    https://cdn.sparkfun.com/datasheets/...ED/APA102C.pdf

  6. #6
    Senior Member
    Join Date
    Feb 2017
    Posts
    304
    Given that the APA102 datasheet is pretty much written in Chinglish, you might find these helpful:
    https://cpldcpu.wordpress.com/2014/1...a102-superled/
    https://cpldcpu.wordpress.com/2014/08/27/apa102/

  7. #7
    Member
    Join Date
    Jun 2015
    Location
    Palm Springs, CA
    Posts
    27
    Good reads. Thanks. Found this too:
    https://cpldcpu.wordpress.com/2016/1...of-the-apa102/

    The people who make these great products should just hire this guy "Tim" to make their datasheets.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •