[HOW TO] Ambilight with Teensy 2 board + Led Strip WS2801

Discussion in 'Ambient Lighting System' started by azzuro, January 27, 2013.

  1. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,380
    Likes Received:
    2,467
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,123 / 13
    Home Country:
    France France
    Show System Specs
    2012827052220 - copie.jpg 2012827052220 - copie.jpg 2012827052220 - copie.jpg 2012827052220 - copie.jpg 2012827052220 - copie.jpg
    Add compatibility to Teensy 2 board + Led strip WS2801
    (from Adafruit) to MediaPortal with Atmowin / Atmolight.(up to 256 channels )​
    carte-teensy-20.jpg 12mminput.jpg chaine5 - copie.jpg

    Hardware can work with Boblighthd with Adalight firmware ( no tested yet )​

    All Requirements for working solutions:

    Ambilight Hardware:
    Teensy 2 (with or without program inside ‘flashing lost all data inside!!!!’)
    Led strips WS2801 ( or other compatible with FastSPI )
    Power DC …
    Firmware AtmoDuino4Teensy_vX.ino http://code.google.com/p/ambilight-4-mediaportal/source/browse/#git/Hardware/Atmoduino/Teensy 2/Atmoduino Firmware



    Flashing Software:

    Serial Drivers (include in TeensyDuino ) http://www.pjrc.com/teensy/serial_install.exe
    Arduino IDE 1.0.3 : http://arduino.cc/en/main/software
    TeensyDuino 1.11: http://www.pjrc.com/teensy/td_download.html
    FastSPI LED mod for Teensy 2 : http://code.google.com/p/ambilight-4-mediaportal/source/browse/#git/Hardware/Atmoduino/Teensy 2/Atmoduino Firmware/FastSPI_LEd_4_Teensy_2


    Ambilight Software : Actually all software are available here :

    MPEI package by legnod available here:

    Atmowin 0.50 modded ( Atmoduino protocol) Rick164 blog :
    https://bitbucket.org/RickDB/atmoduino/overview
    https://bitbucket.org/RickDB/atmowin-atmoduino-mod/downloads
    MediaPortal https://www.team-mediaportal.com/mediaportal-download
    Atmolight patched for your MePo version ( all version can be found in MediaPortal forum)
    - Forum link :
    - English : https://forum.team-mediaportal.com/...-process-plugin-update-25-05-2010-v1-9.75840/
    - German : https://forum.team-mediaportal.com/threads/neues-plugin-atmolight-plugin.76173/
    - German ambilight dedicated: https://forum.team-mediaportal.com/...thread-sedu-board-led-stripes-atmowin.104785/
    Procedure !

    Flashing Firmware :

    Install Arduino IDE
    Install TeensyDuino on Arduino folder
    Replace FastSPI in plugin folder from here
    If your update FastSPI
    Verify this

    Code (C):
    1.  
    2. // Leonardo, teensy, blinkm
    3. #elif defined(__AVR_ATmega32U4__)
    4.  
    5. #define SPI_PORT PORTB
    6. #define SPI_DDR  DDRB
    7. #define SPI_PIN  PINB
    8. #define SPI_MOSI 2    // Arduino pin 10.
    9. #define SPI_MISO 3    // Arduino pin 11.
    10. #define SPI_SCK  1    // Arduino pin 9.
    11. #define SPI_SSN  0    // Arduino pin 8.
    12.             // Replace  Teensy 2 PB2 = 2 , ... , ...
    13. #define DATA_PIN 2    // PB2, pin 10, Digital16
    14. #define SLAVE_PIN 3  // PB3, pin 11, Digital14
    15. #define CLOCK_PIN 1  // PB1, pin 9, Digital15
    16. #define LATCH_PIN 0  // PB0, pin 8, Digital17
    17. #define TIMER_AVAILABLE 1
    Now your system is ready for flash Teensy Board.

    Open, Modif & Flash Firmware

    Open firmware file AtmoDuino4Teensy_vx.ino
    Verify this line code, from your Hardware
    Add “//” for disable line code and Del it for activate line

    NUM_LEDS xxx : set your numbers of led
    Data rate : set data rate for adapt to your Led strip for don’t have flickering
    This firmware use SPI Hardware set in FastSPI library

    Code (C):
    1.  
    2. //Set the number of leds in the strip.
    3. #define NUM_LEDS 150
    4.  
    5. // Sometimes chipsets wire in a backwards sort of way
    6. //struct CRGB { unsigned char b;  unsigned char r;  unsigned char g; };
    7. //struct CRGB { unsigned char r; unsigned char g; unsigned char b; };
    8. struct CRGB { unsigned char r;  unsigned char b;  unsigned char g; };
    9.  
    10.   //Change this to match your led strip
    11.   //FastSPI_LED.setChipset(CFastSPI_LED::SPI_SM16716);
    12.   //FastSPI_LED.setChipset(CFastSPI_LED::SPI_TM1809);
    13.   //FastSPI_LED.setChipset(CFastSPI_LED::SPI_LPD6803);
    14.   //FastSPI_LED.setChipset(CFastSPI_LED::SPI_HL1606);
    15.   //FastSPI_LED.setChipset(CFastSPI_LED::SPI_595);
    16.   FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801);
    17.  
    18.   //Change datarate to match your led strip as well
    19.   FastSPI_LED.setDataRate(2); // Data Rate set to (2) for Adafruit ID 322 12mm bullet because is 5V led strip
    20.  
    When your Firmware is OK !

    For Flashing click “Verify” and press button on Teensy board for Flash it !

    Teensy flashed -> Install Atmowin (UAC need to be Off ) !

    When Teensy reboot, if your firmware is OK, all led should show “fade-in / fade-out”
    Red > Blue > Green
    (DC power must be connected!) (For reboot teensy unplug USB cable)

    <<< don’t forget to install serial drivers if you use Ambilight on other PC !! >>>

    Close all Software. And verify if “java.exe” is running , if yes, kill it !
    Now, you can extract Atmowin to “c:\atmowin “
    UAC need to be OFF
    Register all files ! as described in Atmowin readme file!

    Explanation from RickDB repo .

    Setup
    · Start AtmowinA.exe
    · Device -> Select "Atmoduino"
    · Select "Configure device" and select your Arduino COM port and set the number of leds
    · Set number of leds in zones top/left-right/bottom, the total of the zones should result in the same amount as set in the number of leds before.
    · Save (OK) / exit (kill) and restart Atmowin.
    · Select "Configure software adjustment" and set:
    White balance software - On
    Red/Green/Blue - 254
    Gamma correction - Global
    Global 0.5
    Recommended settings for dynamic ambilight (smooth transitions)
    · Darkness limit 0
    · Filter threshold 67%
    · Filter smoothness 30%
    · Edge weighting 13 (depends on the screen size)

    Select “ColorChanger LR” for show Led !



    Atmowin OK -> Install Atmolight ( + patched Core ) !

    Unpack Archives, to MediaPortal folder
    Start MP configuration.exe > plugin & set Atmolight plugin.

    Now, you are ready for use your Ambilight with MediaPortal …​


    We will not be held responsible for any misuse, or damage to your equipment, that is designed to help and share!

    Testing Video / Pictures :
    Many files for testing are available on :


    Thank you to :
    MediaHD.fr kestouf for lent me hardware
    Atmowin / Atmolight : gemx / angie05 / MacGyver2k
    Atmoduino : Rick164 / scorpie
    forum help : legnod Dragy
     
    Last edited: August 27, 2013
    • Like Like x 2
    • Thank You! Thank You! x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. legnod
    • Premium Supporter

    legnod MP Donator

    Joined:
    September 24, 2011
    Messages:
    1,115
    Likes Received:
    275
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +303 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Hey,

    just wanted top say that i made an MPE Installer for the needed core.dll files, AtmoLight plugin and AtmoWin. I also included AtmoWin for the Atmoduino!
    Plugin repository link

    cheers
     
    • Like Like x 1
  4. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,380
    Likes Received:
    2,467
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,123 / 13
    Home Country:
    France France
    Show System Specs
    Hey, Thank you for your Package !
    Should be great to have "Atmowin mod" by angie05 with Atmoduino protocol !

    Atmoduino can have 256 channels / and maybe "Teensy board" can use DMX with library but i'm a newbie for this !,

    We must open an topic for Atmowin only !
    because "Atmolight plugin" Topic is overcharged, & we must speak only of Atmolight not both ! only problem for control MP & Atmowin with he ! & features ...
     
  5. legnod
    • Premium Supporter

    legnod MP Donator

    Joined:
    September 24, 2011
    Messages:
    1,115
    Likes Received:
    275
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +303 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Yeah the original threads for the whole atmolight /atmowin topics is really overloaded!
    I will open a new Thread if my MPE packet is done. (got some issues to sort out and add online update support....)

    The problem is that the atmowin versions are developed by different peoble and i think nobody except angie05 has got the sourcecode for his mod.
    The SEDU-Board also can handle 256 channels...the problem is AtmoWin. Angie has extended the miniDMX protocol for using up to 170 LEDs/Pixel.
    I think if he dont need more channels, he will not update his AtmoWin version and i am not a good developer...just started :)
     
  6. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,380
    Likes Received:
    2,467
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,123 / 13
    Home Country:
    France France
    Show System Specs
    Atmowin source is free to download : http://www.primacom.net/~w6533344/
    Rick164 is not present since 16/01, I hope he comes back soon.
    i think Atmoduino can be added as other protocol.Please start a new topic about Atmowin ( i don't want this topic, will overloaded ;) )
     
  7. legnod
    • Premium Supporter

    legnod MP Donator

    Joined:
    September 24, 2011
    Messages:
    1,115
    Likes Received:
    275
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +303 / 0
    Home Country:
    Germany Germany
    Show System Specs
    yes but thats the sourcecode of the default atmowin with support for only 64 channels with miniDMX.
    The source for the modified one with extended miniDMX is not available...
     
  8. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,380
    Likes Received:
    2,467
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,123 / 13
    Home Country:
    France France
    Show System Specs
  9. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Been kinda busy lately so sorry for the lack of response.

    Since it's been a while and not seeing any easy atmolight alternatives (DMX / SEDU aside) it might be time to post the source code of the atmowin mod on my bitbucket page, it's not documented and a bit hacky(lots of hardcoded stuff in original atmowin version which made it difficult).
    It started out as a small mod and didn't expect it to be widely used but if we can get some more talented C++ developers working on it maybe we can get it going again and maybe fix some long overdue bugs.
    Can add additional bitbucket users to my project if someone wants to submit changes, would much rather keep it a single project then seeing a lot of other mods popping up based on this one.

    /edit: source submitted:

    https://bitbucket.org/RickDB/atmowin-atmoduino-mod/src (based on 0.50)
     
    Last edited: February 14, 2013
    • Like Like x 1
  10. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,380
    Likes Received:
    2,467
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,123 / 13
    Home Country:
    France France
    Show System Specs
    @legnod and me, we have open an Code.google about Ambilight for mediaportal here http://code.google.com/p/ambilight-4-mediaportal/
    We want grouped "all" ambilight system for mediaportal. as Atmowin / Atmolight + Core.:D

    should cool, to have one version of Atmowin for all ! (y) we need create an topic for this !
     
  11. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,380
    Likes Received:
    2,467
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,123 / 13
    Home Country:
    France France
    Show System Specs
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!