You are here

PSoC NeoPixel Tree Lights | Cypress Semiconductor

PSoC NeoPixel Tree Lights

When you have the option between decorating your house or tree the normal way or the nerdy way, a true engineer will always pick the nerdy path, right?  Standard strings of holiday lights are usually only one color and at most just blink.  During the last couple years you can get some LED lights that change color and make interesting patterns.  That is cool and all, but your decorations will be the same as everyone else, that buy those lights. 

 

If you are interested in adding a little flash to your decorations this year, there are some fun modules available that will help you do just that.  The WS2811 and WS2812 contain three LEDs, red, green, and blue, and a serial interface to control the current in each LED. These RGB LED modules are also known as NeoPixel.  Strings up to five meters long or rings of them can be found at Adafruit.com.  You can chain a thousand or more of these devices in series, controlled by a single IO pin.  The bad news is that the interface is non-standard.  Most single chip microcontrollers require you to use firmware to bit-bang the interface.  Since the WS2811/12 parts operate at 800K bits per second interface, the firmware must bit-bang at an accuracy of about +/- 150 ns.  This can easily take up 100% of the CPU time just to send the data to the LEDs!  With PSoC (3,4,5) you can create your own custom interface and easily interface to parts such as the WS3811/12.  The UDBs in PSoC allow you to load a FIFO every 30uS instead of constantly toggling a GPIO pin at speeds at less than a 1 micro second interval.

 

Since this component has already been created, you can spend your time coming up with cool patterns to dazzle your friends and relatives.  I have included a PSoC Creator Workspace that includes the StripLights library (for the WS2811/12) and a couple of example projects to give you an idea of how to use the component.  Both projects are built for the PSoC 4200 family, but you can change the project to use either PSoC 3 or PSoC 5LP.  Project P4_OneRing controls a single ring of these LED modules.  The second project P4_MultiRings , allows you to string multiple rings together to make your own very cool string of circular lighted ornaments.  You can find the download here at http://www.cypress.com/?docID=51512 You are not limited to rings of lights with this library or the examples, you can use any combination of the LEDs to do whatever you want. So get out there and be creative with PSoC and some LEDs!

 

 

The images below show one of the 12 LED rings from Adafruit.com, twelve of these rings wired in series, our amazing Christmas tree in my office using several of these rings, and what the project schematic looks like. 

 

Happy Holidays,

Mark Hastings

Comments

Aaron's picture

Mark,

I am trying to do this project with the PSoC 4200 BLE and I am having an issue with one of the components regarding the clock speed:

"Component 'StripLights' uses component 'cy_clock_v2_10' in its implementation. 'cy_clock_v2_10' has an error: The cy_clock_v2_10 component (StripLights_HFCLK) is not compatible with the selected device. Please check the component datasheet for details on updating to a compatible component."

The details of the error include:

"The named component uses another component in its implementation that has a DRC error. Consider upgrading the parent component to a newer version via the Component Update Tool. As an alternate, you could import the parent component via the Component Import Tool and address the issue in your project's copy of the component. "

Are you familiar with this? Would you possibly know a solution?

Thank you.

 

 

support_1968351's picture

I had the same problem. You need to dive into his schematic and change the clock to v2.2.

maagalex's picture

Thank you for a perfect design. It is a pity that there is no API for direct access to the colors of each LED, and to use the module for something else other than a Christmas garland is not so easy ..

jordanss123 jordanss123's picture

fake yeezy boost 750 I appreciate such people conversing on such type of blogs.fake YEEZY BOOST 350

 

Soniya Singh's picture

You can acquire amazon gift card code generator from here without downloading any file or something which may harm your system. You can redeem these amazon gift card codes for shopping at amazon instead of your real money.

johnungerr_2934461's picture

Oh my Gosh!!! I feel myself so stupid. Holidays are around the corner, so I thought that it's time to think about decorations already. However, I had an issue with a clock speed and even diving into schematic and changing the clock to v2.2 didn't help. Re-thinking plenty of options, even began thinking to start taking super brain pills. What I do wrong? Help me, please.

ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.