home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
HTPC Projects
Hardware
Ambient Lighting System
[DIY] User Showcases
[DIY] AtmoOrb - A Hue like mood lamp based on Particle Photon with NeoPixel - *Tutorial added*
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Rick164" data-source="post: 1150178" data-attributes="member: 17766"><p><u><span style="font-size: 18px"><strong>Introduction</strong></span></u></p><p></p><p>Since Hue had its fair share of limitations due to the protocol and it not being well suited for fast Ambilight [USER=97876]@Lightning303[/USER] and I started working on something similar without all the limitations called <strong>AtmoOrb</strong>, he completed his one a while back:</p><p></p><p><a href="https://forum.team-mediaportal.com/threads/diy-atmoorb-a-hue-like-mood-lamp-based-on-arduino-esp8266-wifi-module-and-ws2812b-rgb-leds.129229/" target="_blank">[DIY] AtmoOrb - A Hue like mood lamp based on Arduino, ESP8266 wifi module and WS2812B rgb leds</a></p><p></p><p>However wanted something that was easier hardware wise to build so waited for the Particle Photon which delay after delay finally arrived in July, afterwards waited a while for the Neo Pixel ring kit which was the last part of the puzzle.</p><p></p><p>The project is now completed and includes the awesome color smoothing done by [USER=97876]@Lightning303[/USER].</p><p></p><p><u><span style="font-size: 18px"><strong>Description</strong></span></u></p><p></p><p>A Hue like lamp controlled by AtmoLight that takes the average color from your video or audio (VU meter) and displays that on the AtmoOrb lamp via Wi-Fi.</p><p>A number of calculations are done to prevent flickering and during dark enough scenes it will turn off, with AtmoLight you can configure all those settings:</p><p></p><p>Darkness limit</p><p>Gamma</p><p>Saturation</p><p>Position - multiple lamps for different screen areas</p><p></p><p>Besides AtmoLight it can be controlled from <strong>Android </strong>and <strong>Windows </strong>via their own respective apps as well as externally via <strong>Hyperion</strong>.</p><p></p><p><u><span style="font-size: 18px"><strong>Hardware</strong></span></u></p><p></p><p>Comes down to these parts and no actual soldering except maybe the Neopixel headers but Adafruit can probably ship those pre-soldered as well, just stick em together and upload the code:</p><p></p><p>- Particle Photon - <a href="https://store.particle.io/?product=particle-photon" target="_blank">Particle Store</a></p><p>- Neopixel ring kit - <a href="https://www.adafruit.com/products/2268" target="_blank">Adafruit Particle/Spark NeoPixel Ring Kit - 24 NeoPixels ID: 2268 - $24.95 : Adafruit Industries, Unique & fun DIY electronics and kits</a></p><p>- 5V adapter (1A or higher) with DC jack connector - <a href="https://www.adafruit.com/products/276" target="_blank">5V 2A (2000mA) switching power supply - UL Listed ID: 276 - $7.95 : Adafruit Industries, Unique & fun DIY electronics and kits</a></p><p>- Female DC jack to connect power - <a href="https://www.adafruit.com/products/368" target="_blank">Female DC Power adapter - 2.1mm jack to screw terminal block ID: 368 - $2.00 : Adafruit Industries, Unique & fun DIY electronics and kits</a></p><p>- Lamp fixture - Ikea Fado used in videos: <a href="http://www.ikea.com/de/de/catalog/products/80096372/" target="_blank">FADO Tischleuchte - IKEA</a></p><p></p><p>If you want to use other WS2812B / Neopixel leds you can use the Data out connection on the ring kit to do so.</p><p>Most of the parts you should be able to get from your local shops however the Neopixel ring kit at least at this time is a Adafruit exclusive.</p><p></p><p><u><span style="font-size: 18px"><strong>Connection scheme</strong></span></u></p><p></p><p>NeoPixel ring kit --> Particle Photon (no soldering required)</p><p>5V 1A or higher DC adapter --> NeoPixel ring kit 5V DC connector</p><p></p><p>For testing you can connect the Photon micro USB connector to a PC to power the leds and Photon itself <u><strong>however make sure to disconnect the 5V DC adapter when you do this.</strong></u></p><p></p><p><u><span style="font-size: 18px"><strong>Tutorial </strong></span></u></p><p></p><p>[ATTACH=full]169337[/ATTACH]</p><p></p><p><strong>Step 1</strong></p><p></p><p></p><p><span style="font-size: 12px"><u><strong>For requirements check the Hardware chapter</strong></u></span></p><p></p><p><span style="color: #ff4d4d"><strong>Recommended Photon firmware is 0.5.3</strong> <strong>as 0.6.0 and up don't work properly with the FastLED library as of March 2017.</strong></span></p><p></p><p>Obviously first make sure the hardware is connected, basically you need have the Photon and Neopixel ring kit clicked together.</p><p></p><p>Setup the Particle Photon using their <a href="https://docs.particle.io/guide/getting-started/start/photon/" target="_blank">own guide</a> and open your Particle Build environment (build.particle.io), create a new application there and include the Library <strong>FastLED </strong>from the left side menu</p><p></p><p>[ATTACH=full]172948[/ATTACH]</p><p></p><p>Make sure to use FastLED 3.1.4 or higher as otherwise the app will not compile, select your app after clicking "Include in App" and re-open your app sketch again.</p><p></p><p>Afterwards use this sketch for Orb UDP multicast (preferred) in the app you created:</p><p></p><p><a href="https://github.com/ambilight-4-mediaportal/AtmoOrb/blob/master/Particle/Photon/AtmoOrb_UDP.ino" target="_blank">AtmoOrb/AtmoOrb_UDP.ino at master · ambilight-4-mediaportal/AtmoOrb · GitHub</a></p><p></p><p>Change your Orb ID at the top of the sketch if needed, for multiple Orbs you can assign the same ID to group them or different ones ranging from 1-255 to control them separately.</p><p>Now upload that application to your Photon.</p><p></p><p><span style="font-size: 12px"><strong>In case you run into compile errors due to a FastLED library mismatch (bug in Particle IDE) follow these instructions:</strong></span></p><p></p><p><a href="https://github.com/focalintent/FastLED-Sparkcore/issues/2#issuecomment-163702970" target="_blank">platforms/avr/led_sysdefs_avr.h: No such file or directory · Issue #2 · focalintent/FastLED-Sparkcore · GitHub</a></p><p></p><p><strong>Step 2</strong></p><p></p><p>First you can test if everything works right with either the Android or Windows app, specify the Orb ID there and leave the rest default:</p><p></p><p><a href="https://github.com/ambilight-4-mediaportal/AtmoOrbDroid/releases" target="_blank">Releases · ambilight-4-mediaportal/AtmoOrbDroid · GitHub</a> (Android app)</p><p><a href="https://github.com/RickDB/AtmoOrbNET/releases" target="_blank">Releases · RickDB/AtmoOrbNET · GitHub</a> (Windows app)</p><p></p><p>Make sure you are in the same network as your lamps, if that works continue onward.</p><p></p><p><strong>Step 3</strong></p><p></p><p></p><p></p><p></p><p>- Install the latest version of AtmoLight via the Mediaportal Extensions Manager (1.17.0.0 or higher)</p><p>- Open Mediaportal configuration and go to Plugins, select AtmoLight and click config</p><p></p><p>[ATTACH=full]169405[/ATTACH]</p><p></p><p>- Enable AtmoOrb and change any Effect Settings you want to use</p><p></p><p>[ATTACH=full]169401[/ATTACH]</p><p></p><p>- Now add the lamp with the ID you used in the sketch from <strong>Step 1 </strong>and optionally change any gamma / color correction, also if you have an non-standard setup with more than 24 leds you can change the default.</p><p></p><p>Only need to enter ID / Multicast and change the area you want to use for the average color (used 100% in example), afterwards press Add and Save to exit the AtmoLight configuration.</p><p></p><p>[ATTACH=full]169679[/ATTACH]</p><p></p><p><strong>Step 4</strong></p><p></p><p>Now start Mediaportal and if everything went alright you now have Orbs that change color based on your Video or Music.</p><p></p><p><u><strong>Optional features</strong></u></p><p></p><p><strong>Option 1 - Smoothing tweaks</strong></p><p><strong></strong></p><p>In the Photon Orb sketch you can tweak smoothing, the default is 200ms (50 steps * 4ms).</p><p>If you want to change that you can do so at the top of the Photon Orb sketch:</p><p></p><p>[code]</p><p>// SMOOTHING SETTINGS</p><p>#define SMOOTH_STEPS 50 // Steps to take for smoothing colors</p><p>#define SMOOTH_DELAY 4 // Delay between smoothing steps</p><p>#define SMOOTH_BLOCK 0 // Block incoming colors while smoothing</p><p>[/code]</p><p></p><p>For instance if you wanted 100ms you can change SMOOTH_STEPS to 25.</p><p></p><p><strong>Option 2 - Other protocol usage</strong></p><p></p><p>If for some reason you can't or don't like using Multicast the Orb also supports TCP and UDP on IP basis, in the Code / Software section there are sketches for TCP and UDP IP already works with the UDP Multicast sketch</p><p>You add them the same way only in AtmoLight you select a different Connection Type and Protocol / IP.</p><p></p><p><u><span style="font-size: 18px"><strong>Code / Software</strong></span></u></p><p></p><p><u><strong>Particle cloud code</strong></u></p><p><strong>TCP</strong></p><p><a href="https://github.com/ambilight-4-mediaportal/AtmoOrb/blob/master/Particle/Photon/AtmoOrb_TCP.ino" target="_blank">AtmoOrb/AtmoOrb_TCP.ino at master · ambilight-4-mediaportal/AtmoOrb · GitHub</a></p><p></p><p><strong>UDP Multicast + UDP IP</strong></p><p><a href="https://github.com/ambilight-4-mediaportal/AtmoOrb/blob/master/Particle/Photon/AtmoOrb_UDP.ino" target="_blank">AtmoOrb/AtmoOrb_UDP.ino at master · ambilight-4-mediaportal/AtmoOrb · GitHub</a></p><p></p><p><u><strong>Android app to control Orbs<u> (UDP multicast only)</u></strong></u></p><p><a href="https://github.com/ambilight-4-mediaportal/AtmoOrbDroid" target="_blank">GitHub - ambilight-4-mediaportal/AtmoOrbDroid: Android app for use with AtmoOrb lamps</a></p><p><a href="https://github.com/ambilight-4-mediaportal/AtmoOrbDroid/releases" target="_blank">Releases · ambilight-4-mediaportal/AtmoOrbDroid · GitHub</a> (.apk install)</p><p></p><p><u><strong>Windows application to test and calibrate Orb colors (UDP multicast only)</strong></u></p><p><a href="https://github.com/RickDB/AtmoOrbNET" target="_blank">GitHub - RickDB/AtmoOrbNET: Windows application to control and test Orb lamps</a></p><p><a href="https://github.com/RickDB/AtmoOrbNET/releases" target="_blank">Releases · RickDB/AtmoOrbNET · GitHub</a> (binary release)</p><p></p><p><span style="font-size: 18px"><strong>Credits</strong></span></p><p></p><p>[USER=97876]@Lightning303[/USER] - AtmoLight color smoothing and AtmoLight AtmoOrb core code, probably other things as well that I forgot <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p></p><p><a href="https://github.com/WoLpH" target="_blank">Wolph </a>- initial protocol sketch and performance improvements</p><p></p><p>Philips Hue - for making pos hardware which drove me to this <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" /></p></blockquote><p></p>
[QUOTE="Rick164, post: 1150178, member: 17766"] [U][SIZE=5][B]Introduction[/B][/SIZE][/U] Since Hue had its fair share of limitations due to the protocol and it not being well suited for fast Ambilight [USER=97876]@Lightning303[/USER] and I started working on something similar without all the limitations called [B]AtmoOrb[/B], he completed his one a while back: [URL="https://forum.team-mediaportal.com/threads/diy-atmoorb-a-hue-like-mood-lamp-based-on-arduino-esp8266-wifi-module-and-ws2812b-rgb-leds.129229/"][DIY] AtmoOrb - A Hue like mood lamp based on Arduino, ESP8266 wifi module and WS2812B rgb leds[/URL] However wanted something that was easier hardware wise to build so waited for the Particle Photon which delay after delay finally arrived in July, afterwards waited a while for the Neo Pixel ring kit which was the last part of the puzzle. The project is now completed and includes the awesome color smoothing done by [USER=97876]@Lightning303[/USER]. [U][SIZE=5][B]Description[/B][/SIZE][/U] A Hue like lamp controlled by AtmoLight that takes the average color from your video or audio (VU meter) and displays that on the AtmoOrb lamp via Wi-Fi. A number of calculations are done to prevent flickering and during dark enough scenes it will turn off, with AtmoLight you can configure all those settings: Darkness limit Gamma Saturation Position - multiple lamps for different screen areas Besides AtmoLight it can be controlled from [B]Android [/B]and [B]Windows [/B]via their own respective apps as well as externally via [B]Hyperion[/B]. [U][SIZE=5][B]Hardware[/B][/SIZE][/U] Comes down to these parts and no actual soldering except maybe the Neopixel headers but Adafruit can probably ship those pre-soldered as well, just stick em together and upload the code: - Particle Photon - [URL="https://store.particle.io/?product=particle-photon"]Particle Store[/URL] - Neopixel ring kit - [URL="https://www.adafruit.com/products/2268"]Adafruit Particle/Spark NeoPixel Ring Kit - 24 NeoPixels ID: 2268 - $24.95 : Adafruit Industries, Unique & fun DIY electronics and kits[/URL] - 5V adapter (1A or higher) with DC jack connector - [URL="https://www.adafruit.com/products/276"]5V 2A (2000mA) switching power supply - UL Listed ID: 276 - $7.95 : Adafruit Industries, Unique & fun DIY electronics and kits[/URL] - Female DC jack to connect power - [URL="https://www.adafruit.com/products/368"]Female DC Power adapter - 2.1mm jack to screw terminal block ID: 368 - $2.00 : Adafruit Industries, Unique & fun DIY electronics and kits[/URL] - Lamp fixture - Ikea Fado used in videos: [URL="http://www.ikea.com/de/de/catalog/products/80096372/"]FADO Tischleuchte - IKEA[/URL] If you want to use other WS2812B / Neopixel leds you can use the Data out connection on the ring kit to do so. Most of the parts you should be able to get from your local shops however the Neopixel ring kit at least at this time is a Adafruit exclusive. [U][SIZE=5][B]Connection scheme[/B][/SIZE][/U] NeoPixel ring kit --> Particle Photon (no soldering required) 5V 1A or higher DC adapter --> NeoPixel ring kit 5V DC connector For testing you can connect the Photon micro USB connector to a PC to power the leds and Photon itself [U][B]however make sure to disconnect the 5V DC adapter when you do this.[/B][/U] [U][SIZE=5][B]Tutorial [/B][/SIZE][/U] [ATTACH=full]169337[/ATTACH] [B]Step 1[/B] [SIZE=3][U][B]For requirements check the Hardware chapter[/B][/U][/SIZE] [COLOR=#ff4d4d][B]Recommended Photon firmware is 0.5.3[/B] [B]as 0.6.0 and up don't work properly with the FastLED library as of March 2017.[/B][/COLOR] Obviously first make sure the hardware is connected, basically you need have the Photon and Neopixel ring kit clicked together. Setup the Particle Photon using their [URL='https://docs.particle.io/guide/getting-started/start/photon/']own guide[/URL] and open your Particle Build environment (build.particle.io), create a new application there and include the Library [B]FastLED [/B]from the left side menu [ATTACH=full]172948[/ATTACH] Make sure to use FastLED 3.1.4 or higher as otherwise the app will not compile, select your app after clicking "Include in App" and re-open your app sketch again. Afterwards use this sketch for Orb UDP multicast (preferred) in the app you created: [URL="https://github.com/ambilight-4-mediaportal/AtmoOrb/blob/master/Particle/Photon/AtmoOrb_UDP.ino"]AtmoOrb/AtmoOrb_UDP.ino at master · ambilight-4-mediaportal/AtmoOrb · GitHub[/URL] Change your Orb ID at the top of the sketch if needed, for multiple Orbs you can assign the same ID to group them or different ones ranging from 1-255 to control them separately. Now upload that application to your Photon. [SIZE=3][B]In case you run into compile errors due to a FastLED library mismatch (bug in Particle IDE) follow these instructions:[/B][/SIZE] [URL="https://github.com/focalintent/FastLED-Sparkcore/issues/2#issuecomment-163702970"]platforms/avr/led_sysdefs_avr.h: No such file or directory · Issue #2 · focalintent/FastLED-Sparkcore · GitHub[/URL] [B]Step 2[/B] First you can test if everything works right with either the Android or Windows app, specify the Orb ID there and leave the rest default: [URL="https://github.com/ambilight-4-mediaportal/AtmoOrbDroid/releases"]Releases · ambilight-4-mediaportal/AtmoOrbDroid · GitHub[/URL] (Android app) [URL="https://github.com/RickDB/AtmoOrbNET/releases"]Releases · RickDB/AtmoOrbNET · GitHub[/URL] (Windows app) Make sure you are in the same network as your lamps, if that works continue onward. [B]Step 3[/B] - Install the latest version of AtmoLight via the Mediaportal Extensions Manager (1.17.0.0 or higher) - Open Mediaportal configuration and go to Plugins, select AtmoLight and click config [ATTACH=full]169405[/ATTACH] - Enable AtmoOrb and change any Effect Settings you want to use [ATTACH=full]169401[/ATTACH] - Now add the lamp with the ID you used in the sketch from [B]Step 1 [/B]and optionally change any gamma / color correction, also if you have an non-standard setup with more than 24 leds you can change the default. Only need to enter ID / Multicast and change the area you want to use for the average color (used 100% in example), afterwards press Add and Save to exit the AtmoLight configuration. [ATTACH=full]169679[/ATTACH] [B]Step 4[/B] Now start Mediaportal and if everything went alright you now have Orbs that change color based on your Video or Music. [U][B]Optional features[/B][/U] [B]Option 1 - Smoothing tweaks [/B] In the Photon Orb sketch you can tweak smoothing, the default is 200ms (50 steps * 4ms). If you want to change that you can do so at the top of the Photon Orb sketch: [code] // SMOOTHING SETTINGS #define SMOOTH_STEPS 50 // Steps to take for smoothing colors #define SMOOTH_DELAY 4 // Delay between smoothing steps #define SMOOTH_BLOCK 0 // Block incoming colors while smoothing [/code] For instance if you wanted 100ms you can change SMOOTH_STEPS to 25. [B]Option 2 - Other protocol usage[/B] If for some reason you can't or don't like using Multicast the Orb also supports TCP and UDP on IP basis, in the Code / Software section there are sketches for TCP and UDP IP already works with the UDP Multicast sketch You add them the same way only in AtmoLight you select a different Connection Type and Protocol / IP. [U][SIZE=5][B]Code / Software[/B][/SIZE][/U] [U][B]Particle cloud code[/B][/U] [B]TCP[/B] [URL="https://github.com/ambilight-4-mediaportal/AtmoOrb/blob/master/Particle/Photon/AtmoOrb_TCP.ino"]AtmoOrb/AtmoOrb_TCP.ino at master · ambilight-4-mediaportal/AtmoOrb · GitHub[/URL] [B]UDP Multicast + UDP IP[/B] [URL="https://github.com/ambilight-4-mediaportal/AtmoOrb/blob/master/Particle/Photon/AtmoOrb_UDP.ino"]AtmoOrb/AtmoOrb_UDP.ino at master · ambilight-4-mediaportal/AtmoOrb · GitHub[/URL] [U][B]Android app to control Orbs[U] (UDP multicast only)[/U][/B][/U] [URL="https://github.com/ambilight-4-mediaportal/AtmoOrbDroid"]GitHub - ambilight-4-mediaportal/AtmoOrbDroid: Android app for use with AtmoOrb lamps[/URL] [URL="https://github.com/ambilight-4-mediaportal/AtmoOrbDroid/releases"]Releases · ambilight-4-mediaportal/AtmoOrbDroid · GitHub[/URL] (.apk install) [U][B]Windows application to test and calibrate Orb colors (UDP multicast only)[/B][/U] [URL="https://github.com/RickDB/AtmoOrbNET"]GitHub - RickDB/AtmoOrbNET: Windows application to control and test Orb lamps[/URL] [URL="https://github.com/RickDB/AtmoOrbNET/releases"]Releases · RickDB/AtmoOrbNET · GitHub[/URL] (binary release) [SIZE=5][B]Credits[/B][/SIZE] [USER=97876]@Lightning303[/USER] - AtmoLight color smoothing and AtmoLight AtmoOrb core code, probably other things as well that I forgot ;) [URL='https://github.com/WoLpH']Wolph [/URL]- initial protocol sketch and performance improvements Philips Hue - for making pos hardware which drove me to this :p [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
HTPC Projects
Hardware
Ambient Lighting System
[DIY] User Showcases
[DIY] AtmoOrb - A Hue like mood lamp based on Particle Photon with NeoPixel - *Tutorial added*
Contact us
RSS
Top
Bottom